* Removed effect's ApplyEffectsAfter functionality. It's now always applied.

This commit is contained in:
LevelX2 2018-03-17 13:43:31 +01:00
parent d9ede35857
commit 66bd5294e8
36 changed files with 92 additions and 162 deletions

View file

@ -44,12 +44,11 @@ import mage.target.common.TargetControlledCreaturePermanent;
public class AcrobaticManeuver extends CardImpl { public class AcrobaticManeuver extends CardImpl {
public AcrobaticManeuver(UUID ownerId, CardSetInfo setInfo) { public AcrobaticManeuver(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
// Exile target creature you control, then return that card to the battlefield under its owner's control. // Exile target creature you control, then return that card to the battlefield under its owner's control.
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
Effect effect = new ExileTargetForSourceEffect(); Effect effect = new ExileTargetForSourceEffect();
effect.setApplyEffectsAfter();
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect()); this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect());

View file

@ -56,10 +56,8 @@ public class Ambuscade extends CardImpl {
public Ambuscade(UUID ownerId, CardSetInfo setInfo) { public Ambuscade(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// Target creature you control gets +1/+0 until end of turn. // Target creature you control gets +1/+0 until end of turn.
Effect effect = new BoostTargetEffect(1, 0, Duration.EndOfTurn); Effect effect = new BoostTargetEffect(1, 0, Duration.EndOfTurn);
effect.setApplyEffectsAfter(); // needed to count the boost for the second effect
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);

View file

@ -46,13 +46,12 @@ import mage.target.common.TargetCreaturePermanent;
public class BarrelDownSokenzan extends CardImpl { public class BarrelDownSokenzan extends CardImpl {
public BarrelDownSokenzan(UUID ownerId, CardSetInfo setInfo) { public BarrelDownSokenzan(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}");
this.subtype.add(SubType.ARCANE); this.subtype.add(SubType.ARCANE);
// Sweep - Return any number of Mountains you control to their owner's hand. Barrel Down Sokenzan deals damage to target creature equal to twice the number of Mountains returned this way. // Sweep - Return any number of Mountains you control to their owner's hand. Barrel Down Sokenzan deals damage to target creature equal to twice the number of Mountains returned this way.
this.getSpellAbility().addEffect(new SweepEffect(SubType.MOUNTAIN)); this.getSpellAbility().addEffect(new SweepEffect(SubType.MOUNTAIN));
DynamicValue sweepValue = new MultipliedValue(new SweepNumber("Mountain", false), 2); DynamicValue sweepValue = new MultipliedValue(new SweepNumber("Mountain"), 2);
this.getSpellAbility().addEffect(new DamageTargetEffect(sweepValue)); this.getSpellAbility().addEffect(new DamageTargetEffect(sweepValue));
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
} }

View file

@ -53,7 +53,7 @@ import mage.target.common.TargetControlledPermanent;
public class BragoKingEternal extends CardImpl { public class BragoKingEternal extends CardImpl {
public BragoKingEternal(UUID ownerId, CardSetInfo setInfo) { public BragoKingEternal(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.SPIRIT); this.subtype.add(SubType.SPIRIT);
@ -65,7 +65,6 @@ public class BragoKingEternal extends CardImpl {
// When Brago, King Eternal deals combat damage to a player, exile any number of target nonland permanents you control, then return those cards to the battlefield under their owner's control. // When Brago, King Eternal deals combat damage to a player, exile any number of target nonland permanents you control, then return those cards to the battlefield under their owner's control.
Effect effect = new ExileTargetEffect(this.getId(), this.getName(), Zone.BATTLEFIELD); Effect effect = new ExileTargetEffect(this.getId(), this.getName(), Zone.BATTLEFIELD);
effect.setText("exile any number of target nonland permanents you control"); effect.setText("exile any number of target nonland permanents you control");
effect.setApplyEffectsAfter();
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(effect, false); Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(effect, false);
FilterControlledPermanent filterControlledNonlandPermanent = new FilterControlledPermanent(); FilterControlledPermanent filterControlledNonlandPermanent = new FilterControlledPermanent();
filterControlledNonlandPermanent.add(Predicates.not(new CardTypePredicate(CardType.LAND))); filterControlledNonlandPermanent.add(Predicates.not(new CardTypePredicate(CardType.LAND)));

View file

@ -42,11 +42,10 @@ import mage.target.common.TargetCreaturePermanent;
*/ */
public class CauldronHaze extends CardImpl { public class CauldronHaze extends CardImpl {
private String rule = "Choose any number of target creatures. Each of those creatures gains persist until end of turn"; private final String rule = "Choose any number of target creatures. Each of those creatures gains persist until end of turn";
public CauldronHaze(UUID ownerId, CardSetInfo setInfo) { public CauldronHaze(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W/B}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W/B}");
// Choose any number of target creatures. Each of those creatures gains persist until end of turn. // Choose any number of target creatures. Each of those creatures gains persist until end of turn.
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new PersistAbility(), Duration.EndOfTurn, rule)); this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new PersistAbility(), Duration.EndOfTurn, rule));

View file

@ -1,4 +1,4 @@
/* /*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, are * Redistribution and use in source and binary forms, with or without modification, are
@ -27,16 +27,16 @@
*/ */
package mage.cards.c; package mage.cards.c;
import java.util.UUID; import java.util.UUID;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.SweepNumber; import mage.abilities.dynamicvalue.common.SweepNumber;
import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.keyword.SweepEffect; import mage.abilities.effects.keyword.SweepEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType; import mage.constants.SubType;
/** /**
* *
@ -45,14 +45,13 @@ package mage.cards.c;
public class ChargeAcrossTheAraba extends CardImpl { public class ChargeAcrossTheAraba extends CardImpl {
public ChargeAcrossTheAraba(UUID ownerId, CardSetInfo setInfo) { public ChargeAcrossTheAraba(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{W}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{W}");
this.subtype.add(SubType.ARCANE); this.subtype.add(SubType.ARCANE);
// Sweep - Return any number of Plains you control to their owner's hand. Creatures you control get +1/+1 until end of turn for each Plains returned this way. // Sweep - Return any number of Plains you control to their owner's hand. Creatures you control get +1/+1 until end of turn for each Plains returned this way.
this.getSpellAbility().addEffect(new SweepEffect(SubType.PLAINS)); this.getSpellAbility().addEffect(new SweepEffect(SubType.PLAINS));
DynamicValue sweepValue = new SweepNumber("Plains", true); DynamicValue sweepValue = new SweepNumber("Plains");
this.getSpellAbility().addEffect(new BoostControlledEffect(sweepValue, sweepValue, Duration.EndOfTurn)); this.getSpellAbility().addEffect(new BoostControlledEffect(sweepValue, sweepValue, Duration.EndOfTurn, null, false, true));
} }

View file

@ -58,7 +58,6 @@ public class ClearShot extends CardImpl {
// Target creature you control gets +1/+1 until end of turn. // Target creature you control gets +1/+1 until end of turn.
Effect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn); Effect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn);
effect.setApplyEffectsAfter(); // needed to count the boost for the second effect
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);

View file

@ -43,12 +43,11 @@ import mage.target.common.TargetControlledCreaturePermanent;
public class Cloudshift extends CardImpl { public class Cloudshift extends CardImpl {
public Cloudshift(UUID ownerId, CardSetInfo setInfo) { public Cloudshift(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
// Exile target creature you control, then return that card to the battlefield under your control. // Exile target creature you control, then return that card to the battlefield under your control.
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
Effect effect = new ExileTargetForSourceEffect(); Effect effect = new ExileTargetForSourceEffect();
effect.setApplyEffectsAfter();
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(true)); this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(true));
} }

View file

@ -78,7 +78,6 @@ public class DromokasCommand extends CardImpl {
Mode mode = new Mode(); Mode mode = new Mode();
Effect effect = new SacrificeEffect(filterEnchantment, 1, "target player"); Effect effect = new SacrificeEffect(filterEnchantment, 1, "target player");
effect.setText("Target player sacrifices an enchantment"); effect.setText("Target player sacrifices an enchantment");
effect.setApplyEffectsAfter(); // so P/T chnaging effects take place before the fighting effect is applied
mode.getEffects().add(effect); mode.getEffects().add(effect);
mode.getTargets().add(new TargetPlayer()); mode.getTargets().add(new TargetPlayer());
this.getSpellAbility().getModes().addMode(mode); this.getSpellAbility().getModes().addMode(mode);
@ -87,7 +86,6 @@ public class DromokasCommand extends CardImpl {
mode = new Mode(); mode = new Mode();
effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance()); effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
effect.setText("Put a +1/+1 counter on target creature"); effect.setText("Put a +1/+1 counter on target creature");
effect.setApplyEffectsAfter(); // so the counter is taken into account if the target is also used in mode 4
mode.getEffects().add(effect); mode.getEffects().add(effect);
mode.getTargets().add(new TargetCreaturePermanent(filterCreature)); mode.getTargets().add(new TargetCreaturePermanent(filterCreature));
this.getSpellAbility().getModes().addMode(mode); this.getSpellAbility().getModes().addMode(mode);

View file

@ -58,7 +58,7 @@ public class EldraziDisplacer extends CardImpl {
} }
public EldraziDisplacer(UUID ownerId, CardSetInfo setInfo) { public EldraziDisplacer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.ELDRAZI); this.subtype.add(SubType.ELDRAZI);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
@ -69,7 +69,6 @@ public class EldraziDisplacer extends CardImpl {
// {2}{C}: Exile another target creature, then return it to the battlefield tapped under its owner's control. // {2}{C}: Exile another target creature, then return it to the battlefield tapped under its owner's control.
Effect effect = new ExileTargetForSourceEffect(); Effect effect = new ExileTargetForSourceEffect();
effect.setText("Exile another target creature"); effect.setText("Exile another target creature");
effect.setApplyEffectsAfter(); // Needed to let temporary continuous effects end if a permanent is blinked
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{2}{C}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{2}{C}"));
effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(true); effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(true);
effect.setText(", then return it to the battlefield tapped under its owner's control"); effect.setText(", then return it to the battlefield tapped under its owner's control");

View file

@ -47,6 +47,7 @@ import mage.target.common.TargetCreaturePermanent;
* @author fireshoes * @author fireshoes
*/ */
public class EpicConfrontation extends CardImpl { public class EpicConfrontation extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
static { static {
@ -54,11 +55,10 @@ public class EpicConfrontation extends CardImpl {
} }
public EpicConfrontation(UUID ownerId, CardSetInfo setInfo) { public EpicConfrontation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
// Target creature you control gets +1/+2 until end of turn. It fights target creature you don't control. // Target creature you control gets +1/+2 until end of turn. It fights target creature you don't control.
Effect effect = new BoostTargetEffect(1,2,Duration.EndOfTurn); Effect effect = new BoostTargetEffect(1, 2, Duration.EndOfTurn);
effect.setApplyEffectsAfter();
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
effect = new FightTargetsEffect(); effect = new FightTargetsEffect();
effect.setText("It fights target creature you don't control"); effect.setText("It fights target creature you don't control");

View file

@ -54,12 +54,11 @@ import mage.util.CardUtil;
public class EssenceFlux extends CardImpl { public class EssenceFlux extends CardImpl {
public EssenceFlux(UUID ownerId, CardSetInfo setInfo) { public EssenceFlux(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
// Exile target creature you control, then return that card to the battlefield under its owner's control. If it's a Spirit, put a +1/+1 counter on it. // Exile target creature you control, then return that card to the battlefield under its owner's control. If it's a Spirit, put a +1/+1 counter on it.
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
Effect effect = new ExileTargetForSourceEffect(); Effect effect = new ExileTargetForSourceEffect();
effect.setApplyEffectsAfter();
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new EssenceFluxEffect()); this.getSpellAbility().addEffect(new EssenceFluxEffect());
} }
@ -102,8 +101,7 @@ class EssenceFluxEffect extends OneShotEffect {
for (UUID targetId : this.getTargetPointer().getTargets(game, source)) { for (UUID targetId : this.getTargetPointer().getTargets(game, source)) {
if (exileZone.contains(targetId)) { if (exileZone.contains(targetId)) {
cardsToBattlefield.add(targetId); cardsToBattlefield.add(targetId);
} } else {
else {
Card card = game.getCard(targetId); Card card = game.getCard(targetId);
if (card != null && card instanceof MeldCard) { if (card != null && card instanceof MeldCard) {
MeldCard meldCard = (MeldCard) card; MeldCard meldCard = (MeldCard) card;

View file

@ -64,7 +64,6 @@ public class FelidarGuardian extends CardImpl {
// When Felidar Guardian enters the battlefield, you may exile another target permanent you control, then return that card to the battlefield under its owner's control. // When Felidar Guardian enters the battlefield, you may exile another target permanent you control, then return that card to the battlefield under its owner's control.
Effect effect = new ExileTargetForSourceEffect(); Effect effect = new ExileTargetForSourceEffect();
effect.setApplyEffectsAfter();
Ability ability = new EntersBattlefieldTriggeredAbility(effect, true); Ability ability = new EntersBattlefieldTriggeredAbility(effect, true);
ability.addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect()); ability.addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect());
ability.addTarget(new TargetControlledPermanent(filter)); ability.addTarget(new TargetControlledPermanent(filter));

View file

@ -51,12 +51,12 @@ import mage.target.common.TargetCreaturePermanent;
/** /**
* *
* @author LoneFox * @author LoneFox
*
*/ */
public class GrabTheReins extends CardImpl { public class GrabTheReins extends CardImpl {
public GrabTheReins(UUID ownerId, CardSetInfo setInfo) { public GrabTheReins(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}");
// Choose one - // Choose one -
this.getSpellAbility().getModes().setMinModes(1); this.getSpellAbility().getModes().setMinModes(1);
@ -64,7 +64,6 @@ public class GrabTheReins extends CardImpl {
// Until end of turn, you gain control of target creature and it gains haste; // Until end of turn, you gain control of target creature and it gains haste;
Effect effect = new GainControlTargetEffect(Duration.EndOfTurn); Effect effect = new GainControlTargetEffect(Duration.EndOfTurn);
effect.setText("Until end of turn, you gain control of target creature"); effect.setText("Until end of turn, you gain control of target creature");
effect.setApplyEffectsAfter();
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
effect.setText("and it gains haste"); effect.setText("and it gains haste");
@ -111,15 +110,15 @@ class GrabTheReinsEffect extends OneShotEffect {
Target target = new TargetCreaturePermanent(); Target target = new TargetCreaturePermanent();
target.setNotTarget(true); target.setNotTarget(true);
target.setTargetName("a creature to sacrifice"); target.setTargetName("a creature to sacrifice");
if(!target.canChoose(source.getSourceId(), controllerId, game)) { if (!target.canChoose(source.getSourceId(), controllerId, game)) {
return false; return false;
} }
Player player = game.getPlayer(controllerId); Player player = game.getPlayer(controllerId);
if(player != null) { if (player != null) {
player.chooseTarget(Outcome.Sacrifice, target, source, game); player.chooseTarget(Outcome.Sacrifice, target, source, game);
Permanent creatureToSacrifice = game.getPermanent(target.getTargets().get(0)); Permanent creatureToSacrifice = game.getPermanent(target.getTargets().get(0));
int amount = creatureToSacrifice.getPower().getValue(); int amount = creatureToSacrifice.getPower().getValue();
if(!creatureToSacrifice.sacrifice(creatureToSacrifice.getId(), game)) { if (!creatureToSacrifice.sacrifice(creatureToSacrifice.getId(), game)) {
return false; return false;
} }
if (amount > 0) { if (amount > 0) {
@ -133,8 +132,7 @@ class GrabTheReinsEffect extends OneShotEffect {
player.damage(amount, source.getSourceId(), game, false, true); player.damage(amount, source.getSourceId(), game, false, true);
return true; return true;
} }
} } else {
else {
return true; return true;
} }
} }

View file

@ -53,6 +53,7 @@ public class HuntTheHunter extends CardImpl {
private static final FilterControlledCreaturePermanent filterControlledGreen = new FilterControlledCreaturePermanent("green creature you control"); private static final FilterControlledCreaturePermanent filterControlledGreen = new FilterControlledCreaturePermanent("green creature you control");
private static final FilterCreaturePermanent filterOpponentGreen = new FilterCreaturePermanent("green creature an opponent controls"); private static final FilterCreaturePermanent filterOpponentGreen = new FilterCreaturePermanent("green creature an opponent controls");
static { static {
filterControlledGreen.add(new ColorPredicate(ObjectColor.GREEN)); filterControlledGreen.add(new ColorPredicate(ObjectColor.GREEN));
filterOpponentGreen.add(new ControllerPredicate(TargetController.OPPONENT)); filterOpponentGreen.add(new ControllerPredicate(TargetController.OPPONENT));
@ -60,14 +61,12 @@ public class HuntTheHunter extends CardImpl {
} }
public HuntTheHunter(UUID ownerId, CardSetInfo setInfo) { public HuntTheHunter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{G}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}");
// Target green creature you control gets +2/+2 until end of turn. It fights target green creature an opponent controls. // Target green creature you control gets +2/+2 until end of turn. It fights target green creature an opponent controls.
Effect effect = new BoostTargetEffect(2,2, Duration.EndOfTurn); Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn);
effect.setApplyEffectsAfter();
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(1,1,filterControlledGreen, false)); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(1, 1, filterControlledGreen, false));
effect = new FightTargetsEffect(); effect = new FightTargetsEffect();
effect.setText("It fights target green creature an opponent controls"); effect.setText("It fights target green creature an opponent controls");

View file

@ -49,17 +49,16 @@ import mage.target.common.TargetCreaturePermanent;
public class HuntTheWeak extends CardImpl { public class HuntTheWeak extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
static { static {
filter.add(new ControllerPredicate(TargetController.NOT_YOU)); filter.add(new ControllerPredicate(TargetController.NOT_YOU));
} }
public HuntTheWeak(UUID ownerId, CardSetInfo setInfo) { public HuntTheWeak(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}");
// Put a +1/+1 counter on target creature you control. Then that creature fights target creature you don't control. // Put a +1/+1 counter on target creature you control. Then that creature fights target creature you don't control.
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance()); Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
effect.setApplyEffectsAfter();
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
effect = new FightTargetsEffect(); effect = new FightTargetsEffect();
effect.setText("Then that creature fights target creature you don't control"); effect.setText("Then that creature fights target creature you don't control");

View file

@ -60,11 +60,10 @@ public class NissasJudgment extends CardImpl {
} }
public NissasJudgment(UUID ownerId, CardSetInfo setInfo) { public NissasJudgment(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{G}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}");
// Support 2. // Support 2.
Effect effect = new SupportEffect(this, 2, false); Effect effect = new SupportEffect(this, 2, false);
effect.setApplyEffectsAfter();
getSpellAbility().addEffect(effect); getSpellAbility().addEffect(effect);
// Choose up to one target creature an opponent controls. Each creature you control with a +1/+1 counter on it deals damage equal to its power to that creature. // Choose up to one target creature an opponent controls. Each creature you control with a +1/+1 counter on it deals damage equal to its power to that creature.

View file

@ -46,14 +46,13 @@ import mage.target.common.TargetCreaturePermanent;
public class PlowThroughReito extends CardImpl { public class PlowThroughReito extends CardImpl {
public PlowThroughReito(UUID ownerId, CardSetInfo setInfo) { public PlowThroughReito(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
this.subtype.add(SubType.ARCANE); this.subtype.add(SubType.ARCANE);
// Sweep - Return any number of Plains you control to their owner's hand. Target creature gets +1/+1 until end of turn for each Plains returned this way. // Sweep - Return any number of Plains you control to their owner's hand. Target creature gets +1/+1 until end of turn for each Plains returned this way.
this.getSpellAbility().addEffect(new SweepEffect(SubType.PLAINS)); this.getSpellAbility().addEffect(new SweepEffect(SubType.PLAINS));
DynamicValue sweepValue = new SweepNumber("Plains", true); DynamicValue sweepValue = new SweepNumber("Plains");
this.getSpellAbility().addEffect(new BoostTargetEffect(sweepValue, sweepValue, Duration.EndOfTurn)); this.getSpellAbility().addEffect(new BoostTargetEffect(sweepValue, sweepValue, Duration.EndOfTurn, true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
} }

View file

@ -45,7 +45,6 @@ import mage.target.Target;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -59,14 +58,13 @@ public class SavagePunch extends CardImpl {
} }
public SavagePunch(UUID ownerId, CardSetInfo setInfo) { public SavagePunch(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
// <i>Ferocious</i> - The creature you control gets +2/+2 until end of turn before it fights if you control a creature with power 4 or greater. // <i>Ferocious</i> - The creature you control gets +2/+2 until end of turn before it fights if you control a creature with power 4 or greater.
Effect effect = new ConditionalContinuousEffect( Effect effect = new ConditionalContinuousEffect(
new BoostTargetEffect(2,2,Duration.EndOfTurn), new BoostTargetEffect(2, 2, Duration.EndOfTurn),
new LockedInCondition(FerociousCondition.instance), new LockedInCondition(FerociousCondition.instance),
"<i>Ferocious</i> &mdash; The creature you control gets +2/+2 until end of turn before it fights if you control a creature with power 4 or greater"); "<i>Ferocious</i> &mdash; The creature you control gets +2/+2 until end of turn before it fights if you control a creature with power 4 or greater");
effect.setApplyEffectsAfter();
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
// Target creature you control fights target creature you don't control. // Target creature you control fights target creature you don't control.

View file

@ -75,7 +75,6 @@ public class SavageStomp extends CardImpl {
// Put a +1/+1 counter on target creature you control. Then that creature fights target creature you don't control. // Put a +1/+1 counter on target creature you control. Then that creature fights target creature you don't control.
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance()); Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
effect.setApplyEffectsAfter();
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
effect = new FightTargetsEffect(); effect = new FightTargetsEffect();
effect.setText("Then that creature fights target creature you don't control"); effect.setText("Then that creature fights target creature you don't control");

View file

@ -45,13 +45,12 @@ import mage.target.TargetPlayer;
public class SinkIntoTakenuma extends CardImpl { public class SinkIntoTakenuma extends CardImpl {
public SinkIntoTakenuma(UUID ownerId, CardSetInfo setInfo) { public SinkIntoTakenuma(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
this.subtype.add(SubType.ARCANE); this.subtype.add(SubType.ARCANE);
// Sweep - Return any number of Swamps you control to their owner's hand. Target player discards a card for each Swamp returned this way. // Sweep - Return any number of Swamps you control to their owner's hand. Target player discards a card for each Swamp returned this way.
this.getSpellAbility().addEffect(new SweepEffect(SubType.SWAMP)); this.getSpellAbility().addEffect(new SweepEffect(SubType.SWAMP));
DynamicValue sweepValue = new SweepNumber("Swamp", false); DynamicValue sweepValue = new SweepNumber("Swamp");
this.getSpellAbility().addEffect(new DiscardTargetEffect(sweepValue)); this.getSpellAbility().addEffect(new DiscardTargetEffect(sweepValue));
this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addTarget(new TargetPlayer());
} }

View file

@ -27,6 +27,7 @@
*/ */
package mage.cards.s; package mage.cards.s;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
@ -37,8 +38,6 @@ import mage.constants.*;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -46,11 +45,10 @@ import java.util.UUID;
public class StartYourEngines extends CardImpl { public class StartYourEngines extends CardImpl {
public StartYourEngines(UUID ownerId, CardSetInfo setInfo) { public StartYourEngines(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}");
// Vehicles you control becomes artifact creatures until end of turn. // Vehicles you control becomes artifact creatures until end of turn.
Effect effect = new StartYourEnginesEffect(); Effect effect = new StartYourEnginesEffect();
effect.setApplyEffectsAfter(); // needed to recognize vehicle as creatures by the next effect
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
// Creatures you control get +2/+0 until end of turn. // Creatures you control get +2/+0 until end of turn.

View file

@ -49,17 +49,16 @@ import mage.target.common.TargetCreaturePermanent;
public class SwiftKick extends CardImpl { public class SwiftKick extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
static { static {
filter.add(new ControllerPredicate(TargetController.NOT_YOU)); filter.add(new ControllerPredicate(TargetController.NOT_YOU));
} }
public SwiftKick(UUID ownerId, CardSetInfo setInfo) { public SwiftKick(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}");
// Target creature you control gets +1/+0 until end of turn. It fights target creature you don't control. // Target creature you control gets +1/+0 until end of turn. It fights target creature you don't control.
Effect effect = new BoostTargetEffect(1,0,Duration.EndOfTurn); Effect effect = new BoostTargetEffect(1, 0, Duration.EndOfTurn);
effect.setApplyEffectsAfter();
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());

View file

@ -132,7 +132,7 @@ class SylvanLibraryEffect extends OneShotEffect {
} }
} }
} }
controller.putCardsOnTopOfLibrary(cardsPutBack, game, source, applyEffectsAfter); controller.putCardsOnTopOfLibrary(cardsPutBack, game, source, false);
} }
} }
return true; return true;

View file

@ -64,13 +64,11 @@ public class TemurCharm extends CardImpl {
} }
public TemurCharm(UUID ownerId, CardSetInfo setInfo) { public TemurCharm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}{U}{R}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}{U}{R}");
// Choose one - // Choose one -
// <strong><EFBFBD></strong> Target creature you control gets +1/+1 until end of turn. That creature fights target creature you don't control. // <strong><EFBFBD></strong> Target creature you control gets +1/+1 until end of turn. That creature fights target creature you don't control.
Effect effect = new BoostTargetEffect(1,1,Duration.EndOfTurn); Effect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn);
effect.setApplyEffectsAfter();
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
effect = new FightTargetsEffect(); effect = new FightTargetsEffect();
effect.setText("That creature fights target creature you don't control"); effect.setText("That creature fights target creature you don't control");

View file

@ -54,11 +54,10 @@ public class WildInstincts extends CardImpl {
} }
public WildInstincts(UUID ownerId, CardSetInfo setInfo) { public WildInstincts(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}");
// Target creature you control gets +2/+2 until end of turn. It fights target creature an opponent controls. // Target creature you control gets +2/+2 until end of turn. It fights target creature an opponent controls.
Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn); Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn);
effect.setApplyEffectsAfter();
getSpellAbility().addEffect(effect); getSpellAbility().addEffect(effect);
getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
effect = new FightTargetsEffect(); effect = new FightTargetsEffect();

View file

@ -42,8 +42,8 @@ import mage.cards.Cards;
import mage.cards.CardsImpl; import mage.cards.CardsImpl;
import mage.cards.MeldCard; import mage.cards.MeldCard;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
@ -66,7 +66,7 @@ public class WispweaverAngel extends CardImpl {
} }
public WispweaverAngel(UUID ownerId, CardSetInfo setInfo) { public WispweaverAngel(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}");
this.subtype.add(SubType.ANGEL); this.subtype.add(SubType.ANGEL);
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
@ -76,7 +76,6 @@ public class WispweaverAngel extends CardImpl {
// When Wispweaver Angel enters the battlefield, you may exile another target creature you control, then return that card to the battlefield under its owner's control. // When Wispweaver Angel enters the battlefield, you may exile another target creature you control, then return that card to the battlefield under its owner's control.
Effect effect = new ExileTargetForSourceEffect(); Effect effect = new ExileTargetForSourceEffect();
effect.setApplyEffectsAfter();
Ability ability = new EntersBattlefieldTriggeredAbility(effect, true); Ability ability = new EntersBattlefieldTriggeredAbility(effect, true);
ability.addTarget(new TargetControlledCreaturePermanent(1, 1, filter, false)); ability.addTarget(new TargetControlledCreaturePermanent(1, 1, filter, false));
ability.addEffect(new WispweaverAngelEffect()); ability.addEffect(new WispweaverAngelEffect());

View file

@ -49,7 +49,7 @@ import mage.target.TargetPermanent;
public class ZealousConscripts extends CardImpl { public class ZealousConscripts extends CardImpl {
public ZealousConscripts(UUID ownerId, CardSetInfo setInfo) { public ZealousConscripts(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}");
this.subtype.add(SubType.HUMAN, SubType.WARRIOR); this.subtype.add(SubType.HUMAN, SubType.WARRIOR);
this.power = new MageInt(3); this.power = new MageInt(3);

View file

@ -220,10 +220,8 @@ public abstract class AbilityImpl implements Ability {
* too late Example: * too late Example:
* {@link org.mage.test.cards.replacement.DryadMilitantTest#testDiesByDestroy testDiesByDestroy} * {@link org.mage.test.cards.replacement.DryadMilitantTest#testDiesByDestroy testDiesByDestroy}
*/ */
if (effect.applyEffectsAfter()) { game.applyEffects();
game.applyEffects(); game.getState().getTriggers().checkStateTriggers(game);
game.getState().getTriggers().checkStateTriggers(game);
}
} }
} }
return result; return result;

View file

@ -30,7 +30,6 @@ package mage.abilities.dynamicvalue.common;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.cards.Card;
import mage.game.Game; import mage.game.Game;
/** /**
@ -39,37 +38,21 @@ import mage.game.Game;
*/ */
public class SweepNumber implements DynamicValue { public class SweepNumber implements DynamicValue {
private int zoneChangeCounter = 0;
private final String sweepSubtype; private final String sweepSubtype;
private final boolean previousZone;
public SweepNumber(String sweepSubtype, boolean previousZone) { public SweepNumber(String sweepSubtype) {
this.sweepSubtype = sweepSubtype; this.sweepSubtype = sweepSubtype;
this.previousZone = previousZone;
} }
@Override @Override
public int calculate(Game game, Ability source, Effect effect) { public int calculate(Game game, Ability source, Effect effect) {
if (zoneChangeCounter == 0) { Integer sweepNumber = (Integer) game.getState().getValue("sweep" + source.getSourceId() + game.getState().getZoneChangeCounter(source.getSourceId()));
Card card = game.getCard(source.getSourceId()); return sweepNumber != null ? sweepNumber : 0;
if (card != null) {
zoneChangeCounter = card.getZoneChangeCounter(game);
if (previousZone) {
zoneChangeCounter--;
}
}
}
int number = 0;
Integer sweepNumber = (Integer) game.getState().getValue(new StringBuilder("sweep").append(source.getSourceId()).append(zoneChangeCounter).toString());
if (sweepNumber != null) {
number = sweepNumber;
}
return number;
} }
@Override @Override
public SweepNumber copy() { public SweepNumber copy() {
return new SweepNumber(sweepSubtype, previousZone); return new SweepNumber(sweepSubtype);
} }
@Override @Override
@ -79,6 +62,6 @@ public class SweepNumber implements DynamicValue {
@Override @Override
public String getMessage() { public String getMessage() {
return new StringBuilder("the number of ").append(sweepSubtype).append(sweepSubtype.endsWith("s") ? "":"s").append(" returned this way").toString(); return "the number of " + sweepSubtype + (sweepSubtype.endsWith("s") ? "" : "s") + " returned this way";
} }
} }

View file

@ -88,10 +88,6 @@ public interface Effect extends Serializable {
Object getValue(String key); Object getValue(String key);
void setApplyEffectsAfter();
boolean applyEffectsAfter();
Effect copy(); Effect copy();
} }

View file

@ -138,18 +138,4 @@ public abstract class EffectImpl implements Effect {
} }
return values.get(key); return values.get(key);
} }
/**
* If set, the game.applyEffects() method will be called to apply the
* effects before the next effect (of the same ability) will resolve.
*/
@Override
public void setApplyEffectsAfter() {
applyEffectsAfter = true;
}
@Override
public boolean applyEffectsAfter() {
return applyEffectsAfter;
}
} }

View file

@ -37,6 +37,7 @@ import mage.constants.Duration;
import mage.constants.Layer; import mage.constants.Layer;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubLayer; import mage.constants.SubLayer;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -54,15 +55,15 @@ public class BoostControlledEffect extends ContinuousEffectImpl {
protected boolean lockedIn = false; protected boolean lockedIn = false;
public BoostControlledEffect(int power, int toughness, Duration duration) { public BoostControlledEffect(int power, int toughness, Duration duration) {
this(power, toughness, duration, new FilterCreaturePermanent("creatures"), false); this(power, toughness, duration, StaticFilters.FILTER_PERMANENT_CREATURES, false);
} }
public BoostControlledEffect(DynamicValue power, DynamicValue toughness, Duration duration) { public BoostControlledEffect(DynamicValue power, DynamicValue toughness, Duration duration) {
this(power, toughness, duration, new FilterCreaturePermanent("creatures"), false); this(power, toughness, duration, StaticFilters.FILTER_PERMANENT_CREATURES, false);
} }
public BoostControlledEffect(int power, int toughness, Duration duration, boolean excludeSource) { public BoostControlledEffect(int power, int toughness, Duration duration, boolean excludeSource) {
this(power, toughness, duration, new FilterCreaturePermanent("creatures"), excludeSource); this(power, toughness, duration, StaticFilters.FILTER_PERMANENT_CREATURES, excludeSource);
} }
public BoostControlledEffect(int power, int toughness, Duration duration, FilterCreaturePermanent filter) { public BoostControlledEffect(int power, int toughness, Duration duration, FilterCreaturePermanent filter) {
@ -91,7 +92,7 @@ public class BoostControlledEffect extends ContinuousEffectImpl {
super(duration, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); super(duration, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
this.power = power; this.power = power;
this.toughness = toughness; this.toughness = toughness;
this.filter = filter; this.filter = (filter == null ? StaticFilters.FILTER_PERMANENT_CREATURES : filter);
this.excludeSource = excludeSource; this.excludeSource = excludeSource;
this.lockedIn = lockedIn; this.lockedIn = lockedIn;
setText(); setText();

View file

@ -70,7 +70,7 @@ public class SweepEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if (controller != null) { if (controller != null) {
FilterPermanent filter = new FilterControlledLandPermanent(new StringBuilder("any number of ").append(sweepSubtype).append("s you control").toString()); FilterPermanent filter = new FilterControlledLandPermanent("any number of " + sweepSubtype + "s you control");
filter.add(new SubtypePredicate(sweepSubtype)); filter.add(new SubtypePredicate(sweepSubtype));
Target target = new TargetPermanent(0, Integer.MAX_VALUE, filter, true); Target target = new TargetPermanent(0, Integer.MAX_VALUE, filter, true);
if (controller.chooseTarget(outcome, target, source, game)) { if (controller.chooseTarget(outcome, target, source, game)) {

View file

@ -1,4 +1,4 @@
/* /*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, are * Redistribution and use in source and binary forms, with or without modification, are
@ -24,8 +24,7 @@
* The views and conclusions contained in the software and documentation are those of the * The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.abilities.keyword; package mage.abilities.keyword;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
@ -41,7 +40,6 @@ import mage.game.events.GameEvent.EventType;
* *
* @author LevelX2 * @author LevelX2
*/ */
public class InspiredAbility extends TriggeredAbilityImpl { public class InspiredAbility extends TriggeredAbilityImpl {
public InspiredAbility(Effect effect) { public InspiredAbility(Effect effect) {
@ -73,6 +71,6 @@ public class InspiredAbility extends TriggeredAbilityImpl {
@Override @Override
public String getRule() { public String getRule() {
return new StringBuilder("<i>Inspired</i> - Whenever {this} becomes untapped, ").append(super.getRule()).toString(); return "<i>Inspired</i> - Whenever {this} becomes untapped, " + super.getRule();
} }
} }