mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Unstoppable Ash - Fixed that the boost effect did not work.
This commit is contained in:
parent
c0aa97802e
commit
77bd944d82
1 changed files with 4 additions and 28 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue