mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 12:22:10 -08:00
[MKC] Implement Follow the Bodies
This commit is contained in:
parent
63c65680c8
commit
8174be9926
3 changed files with 60 additions and 0 deletions
|
|
@ -3,8 +3,10 @@ package mage.abilities.keyword;
|
|||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
|
|
@ -21,6 +23,9 @@ public class GravestormAbility extends TriggeredAbilityImpl {
|
|||
public GravestormAbility() {
|
||||
super(Zone.STACK, new GravestormEffect());
|
||||
this.addWatcher(new GravestormWatcher());
|
||||
this.addHint(new ValueHint(
|
||||
"Permanents put into graveyards from the battlefield this turn", PermanentsDestroyedThisTurnValue.instance
|
||||
));
|
||||
}
|
||||
|
||||
private GravestormAbility(final GravestormAbility ability) {
|
||||
|
|
@ -95,3 +100,22 @@ class GravestormEffect extends OneShotEffect {
|
|||
return new GravestormEffect(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum PermanentsDestroyedThisTurnValue implements DynamicValue {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return game.getState().getWatcher(GravestormWatcher.class).getGravestormCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PermanentsDestroyedThisTurnValue copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue