From 77bd944d8212dec8762f534a332a158c67172b8d Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 13 Jun 2014 14:02:03 +0200 Subject: [PATCH] * Unstoppable Ash - Fixed that the boost effect did not work. --- .../mage/sets/morningtide/UnstoppableAsh.java | 32 +++---------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/Mage.Sets/src/mage/sets/morningtide/UnstoppableAsh.java b/Mage.Sets/src/mage/sets/morningtide/UnstoppableAsh.java index a46d7d65b3..72d7ae4002 100644 --- a/Mage.Sets/src/mage/sets/morningtide/UnstoppableAsh.java +++ b/Mage.Sets/src/mage/sets/morningtide/UnstoppableAsh.java @@ -31,6 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BecomesBlockedAllTriggeredAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continious.BoostTargetEffect; import mage.abilities.keyword.ChampionAbility; @@ -76,7 +77,9 @@ public class UnstoppableAsh extends CardImpl { this.addAbility(new ChampionAbility(this, new String[]{"Treefolk", "Warrior"})); // Whenever a creature you control becomes blocked, it gets +0/+5 until end of turn. - this.addAbility(new BecomesBlockedAllTriggeredAbility(new UnstoppableAshEffect(), false, filter, true)); + Effect effect = new BoostTargetEffect(0, 5, Duration.EndOfTurn); + effect.setText("it gets +0/+5 until end of turn"); + this.addAbility(new BecomesBlockedAllTriggeredAbility(effect, false, filter, true)); } @@ -89,30 +92,3 @@ public class UnstoppableAsh extends CardImpl { return new UnstoppableAsh(this); } } - -class UnstoppableAshEffect extends OneShotEffect { - - UnstoppableAshEffect() { - super(Outcome.Neutral); - staticText = "it gets +0/+5 until end of turn"; - } - - UnstoppableAshEffect(final UnstoppableAshEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); - if (creature != null) { - game.addEffect(new BoostTargetEffect(0, 5, Duration.EndOfTurn), source); - return true; - } - return false; - } - - @Override - public UnstoppableAshEffect copy() { - return new UnstoppableAshEffect(this); - } -}