mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
[MOM] Implement Xerex Strobe-Knight
This commit is contained in:
parent
4b71941d21
commit
c087e77776
3 changed files with 109 additions and 0 deletions
73
Mage.Sets/src/mage/cards/x/XerexStrobeKnight.java
Normal file
73
Mage.Sets/src/mage/cards/x/XerexStrobeKnight.java
Normal file
|
@ -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";
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue