diff --git a/Mage.Sets/src/mage/cards/x/XerexStrobeKnight.java b/Mage.Sets/src/mage/cards/x/XerexStrobeKnight.java new file mode 100644 index 0000000000..c97b78a4f0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/x/XerexStrobeKnight.java @@ -0,0 +1,73 @@ +package mage.cards.x; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateIfConditionActivatedAbility; +import mage.abilities.condition.Condition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.token.KnightWhiteBlueToken; +import mage.watchers.common.CastSpellLastTurnWatcher; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class XerexStrobeKnight extends CardImpl { + + public XerexStrobeKnight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // {T}: Create a 2/2 white and blue Knight creature token with vigilance. Activate only if you've cast two or more spells this turn. + this.addAbility(new ActivateIfConditionActivatedAbility( + Zone.BATTLEFIELD, new CreateTokenEffect(new KnightWhiteBlueToken()), + new TapSourceCost(), XerexStrobeKnightCondition.instance + )); + } + + private XerexStrobeKnight(final XerexStrobeKnight card) { + super(card); + } + + @Override + public XerexStrobeKnight copy() { + return new XerexStrobeKnight(this); + } +} + +enum XerexStrobeKnightCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + return game + .getState() + .getWatcher(CastSpellLastTurnWatcher.class) + .getAmountOfSpellsPlayerCastOnCurrentTurn(source.getControllerId()) >= 2; + } + + @Override + public String toString() { + return "you've cast two or more spells this turn"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index 59ab36d0f5..c86afbf358 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -98,6 +98,7 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Voldaren Thrillseeker", 171, Rarity.RARE, mage.cards.v.VoldarenThrillseeker.class)); cards.add(new SetCardInfo("Wind-Scarred Crag", 276, Rarity.COMMON, mage.cards.w.WindScarredCrag.class)); cards.add(new SetCardInfo("Wrenn and Realmbreaker", 217, Rarity.MYTHIC, mage.cards.w.WrennAndRealmbreaker.class)); + cards.add(new SetCardInfo("Xerex Strobe-Knight", 85, Rarity.UNCOMMON, mage.cards.x.XerexStrobeKnight.class)); cards.add(new SetCardInfo("Yargle and Multani", 256, Rarity.RARE, mage.cards.y.YargleAndMultani.class)); cards.add(new SetCardInfo("Zephyr Winder", 328, Rarity.COMMON, mage.cards.z.ZephyrWinder.class)); cards.add(new SetCardInfo("Zhalfirin Lancer", 45, Rarity.UNCOMMON, mage.cards.z.ZhalfirinLancer.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/KnightWhiteBlueToken.java b/Mage/src/main/java/mage/game/permanent/token/KnightWhiteBlueToken.java new file mode 100644 index 0000000000..30ed39c2a1 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/KnightWhiteBlueToken.java @@ -0,0 +1,35 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.keyword.VigilanceAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class KnightWhiteBlueToken extends TokenImpl { + + public KnightWhiteBlueToken() { + super("Knight Token", "2/2 white and blue Knight creature token with vigilance"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + color.setBlue(true); + subtype.add(SubType.KNIGHT); + power = new MageInt(2); + toughness = new MageInt(2); + + addAbility(VigilanceAbility.getInstance()); + + this.setExpansionSetCodeForImage("MOM"); + } + + public KnightWhiteBlueToken(final KnightWhiteBlueToken token) { + super(token); + } + + public KnightWhiteBlueToken copy() { + return new KnightWhiteBlueToken(this); + } + +}