Refactor - moved ZuberasDiedDynamicValue to shared area

This commit is contained in:
JOAC69 2016-09-24 23:50:08 -05:00
parent 8e6389040d
commit b17b5c9e1a
5 changed files with 39 additions and 27 deletions

View file

@ -0,0 +1,34 @@
package mage.abilities.dynamicvalue.common;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.game.Game;
import mage.watchers.common.ZuberasDiedWatcher;
/**
* Created by Eric on 9/24/2016.
*/
public class ZuberasDiedDynamicValue implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
ZuberasDiedWatcher watcher = (ZuberasDiedWatcher) game.getState().getWatchers().get("ZuberasDied");
return watcher.zuberasDiedThisTurn;
}
@Override
public ZuberasDiedDynamicValue copy() {
return new ZuberasDiedDynamicValue();
}
@Override
public String toString() {
return "1";
}
@Override
public String getMessage() {
return "Zubera that died this turn";
}
}