@Override public ExertCreatureControllerTriggeredAbility copy() { return new ExertCreatureControllerTriggeredAbility(this); }
@Override public boolean checkTrigger(GameEvent event, Game game) { boolean weAreExerting = isControlledBy(event.getPlayerId()); Permanent exerted = game.getPermanent(event.getTargetId()); boolean exertedIsCreature = (exerted != null) && exerted.isCreature(); return weAreExerting && exertedIsCreature; }
public BattlefieldScavenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.JACKAL, SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); // You may exert Battlefield Scavenger as it attacks. this.addAbility(new ExertAbility(null, false)); // Whenever you exert a creature, you may discard a card. If you do, draw a card. this.addAbility(new ExertCreatureControllerTriggeredAbility(new RummageEffect())); }
public TrueheartTwins(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); this.subtype.add(SubType.JACKAL); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); // You may exert Trueheart Twins as it attacks. this.addAbility(new ExertAbility(null, false)); // Whenever you exert a creature, creatures you control get +1/+0 until end of turn. this.addAbility(new ExertCreatureControllerTriggeredAbility(new BoostControlledEffect(1, 0, Duration.EndOfTurn))); }
public ResoluteSurvivors(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); // You may exert Resolute Survivors as it attacks. this.addAbility(new ExertAbility(null, false)); // Whenever you exert a creature, Resolute Survivors deals 1 damage to each opponent and you gain 1 life. Effect effect = new LoseLifeOpponentsEffect(1); effect.setText("Whenever you exert a creature, {this} deals 1 damage to each opponent"); Ability ability = new ExertCreatureControllerTriggeredAbility(effect); effect = new GainLifeEffect(1); effect.setText("and you gain 1 life"); ability.addEffect(effect); this.addAbility(ability); }