diff --git a/Mage.Sets/src/mage/sets/magic2010/WallOfFrost.java b/Mage.Sets/src/mage/sets/magic2010/WallOfFrost.java index a3007f4908..e2df7c304f 100644 --- a/Mage.Sets/src/mage/sets/magic2010/WallOfFrost.java +++ b/Mage.Sets/src/mage/sets/magic2010/WallOfFrost.java @@ -25,22 +25,16 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.magic2010; -import mage.Constants; +import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BlocksTriggeredAbility; import mage.abilities.effects.common.SkipNextUntapTargetEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.target.common.TargetCreaturePermanent; - -import java.util.UUID; /** * @author BetaSteward_at_googlemail.com @@ -57,8 +51,7 @@ public class WallOfFrost extends CardImpl { this.addAbility(DefenderAbility.getInstance()); // Whenever Wall of Frost blocks a creature, that creature doesn't untap during its controller's next untap step. - //this.addAbility(new BlocksTriggeredAbility(new SkipNextUntapTargetEffect(), false, true)); - this.addAbility(new WallOfFrostAbility()); + this.addAbility(new BlocksTriggeredAbility(new SkipNextUntapTargetEffect("that creature"), false, true)); } public WallOfFrost(final WallOfFrost card) { @@ -69,40 +62,4 @@ public class WallOfFrost extends CardImpl { public WallOfFrost copy() { return new WallOfFrost(this); } - } - -class WallOfFrostAbility extends TriggeredAbilityImpl { - - public WallOfFrostAbility() { - super(Constants.Zone.BATTLEFIELD, new SkipNextUntapTargetEffect(), false); - } - - public WallOfFrostAbility(final WallOfFrostAbility ability) { - super(ability); - } - - @Override - public WallOfFrostAbility copy() { - return new WallOfFrostAbility(this); - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.BLOCKER_DECLARED && event.getSourceId().equals(this.getSourceId())) { - this.addTarget(new TargetCreaturePermanent()); - this.getTargets().get(0).add(event.getTargetId(), game); - return true; - } - return false; - } - - @Override - public String getRule() { - return "Whenever {this} blocks a creature, that creature doesn't untap during its controller's next untap step"; - } - -} - - - diff --git a/Mage/src/mage/abilities/common/BlocksTriggeredAbility.java b/Mage/src/mage/abilities/common/BlocksTriggeredAbility.java index d2b00fe4be..9f4ad51c1a 100644 --- a/Mage/src/mage/abilities/common/BlocksTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/BlocksTriggeredAbility.java @@ -54,6 +54,7 @@ public class BlocksTriggeredAbility extends TriggeredAbilityImpl