mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[STX] Implemented Magma Opus
This commit is contained in:
parent
8f37428518
commit
f831eac6fc
3 changed files with 120 additions and 0 deletions
89
Mage.Sets/src/mage/cards/m/MagmaOpus.java
Normal file
89
Mage.Sets/src/mage/cards/m/MagmaOpus.java
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
package mage.cards.m;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.DiscardSourceCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.DamageMultiEffect;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.game.permanent.token.PrismariToken;
|
||||||
|
import mage.game.permanent.token.TreasureToken;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetAnyTargetAmount;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class MagmaOpus extends CardImpl {
|
||||||
|
|
||||||
|
public MagmaOpus(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{6}{U}{R}");
|
||||||
|
|
||||||
|
// Magma Opus deals 4 damage divided as you choose among any number of targets. Tap two target permanents. Create a 4/4 blue and red Elemental creature token. Draw two cards.
|
||||||
|
this.getSpellAbility().addEffect(new DamageMultiEffect(4));
|
||||||
|
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(4).withChooseHint("damage"));
|
||||||
|
this.getSpellAbility().addEffect(new MagmaOpusTapEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetPermanent(2, StaticFilters.FILTER_PERMANENTS).withChooseHint("tap"));
|
||||||
|
this.getSpellAbility().addEffect(new CreateTokenEffect(new PrismariToken()));
|
||||||
|
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2).setText("Draw two cards"));
|
||||||
|
|
||||||
|
// {U/R}{U/R}, Discard Magma Opus: Create a Treasure token.
|
||||||
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
Zone.HAND, new CreateTokenEffect(new TreasureToken()), new ManaCostsImpl("{U/R}{U/R}")
|
||||||
|
);
|
||||||
|
ability.addCost(new DiscardSourceCost());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private MagmaOpus(final MagmaOpus card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MagmaOpus copy() {
|
||||||
|
return new MagmaOpus(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MagmaOpusTapEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
MagmaOpusTapEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "Tap two target permanents.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private MagmaOpusTapEffect(final MagmaOpusTapEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MagmaOpusTapEffect copy() {
|
||||||
|
return new MagmaOpusTapEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
for (UUID targetId : getTargetPointer().getTargets(game, source)) {
|
||||||
|
if (!source.getTargets().get(1).getTargets().contains(targetId)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Permanent permanent = game.getPermanent(targetId);
|
||||||
|
if (permanent != null) {
|
||||||
|
permanent.tap(source, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -64,6 +64,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Lorehold Campus", 268, Rarity.COMMON, mage.cards.l.LoreholdCampus.class));
|
cards.add(new SetCardInfo("Lorehold Campus", 268, Rarity.COMMON, mage.cards.l.LoreholdCampus.class));
|
||||||
cards.add(new SetCardInfo("Lorehold Command", 199, Rarity.RARE, mage.cards.l.LoreholdCommand.class));
|
cards.add(new SetCardInfo("Lorehold Command", 199, Rarity.RARE, mage.cards.l.LoreholdCommand.class));
|
||||||
cards.add(new SetCardInfo("Lorehold Pledgemage", 201, Rarity.COMMON, mage.cards.l.LoreholdPledgemage.class));
|
cards.add(new SetCardInfo("Lorehold Pledgemage", 201, Rarity.COMMON, mage.cards.l.LoreholdPledgemage.class));
|
||||||
|
cards.add(new SetCardInfo("Magma Opus", 203, Rarity.MYTHIC, mage.cards.m.MagmaOpus.class));
|
||||||
cards.add(new SetCardInfo("Mountain", 372, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Mountain", 372, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Mountain", 373, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Mountain", 373, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Necroblossom Snarl", 269, Rarity.RARE, mage.cards.n.NecroblossomSnarl.class));
|
cards.add(new SetCardInfo("Necroblossom Snarl", 269, Rarity.RARE, mage.cards.n.NecroblossomSnarl.class));
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
package mage.game.permanent.token;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class PrismariToken extends TokenImpl {
|
||||||
|
|
||||||
|
public PrismariToken() {
|
||||||
|
super("Elemental", "4/4 blue and red Elemental creature token");
|
||||||
|
cardType.add(CardType.CREATURE);
|
||||||
|
color.setBlue(true);
|
||||||
|
color.setRed(true);
|
||||||
|
subtype.add(SubType.ELEMENTAL);
|
||||||
|
power = new MageInt(4);
|
||||||
|
toughness = new MageInt(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
private PrismariToken(final PrismariToken token) {
|
||||||
|
super(token);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PrismariToken copy() {
|
||||||
|
return new PrismariToken(this);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue