forked from External/mage
Implemented Jirina Kudro
This commit is contained in:
parent
87d322c8e9
commit
176f06c1dc
5 changed files with 134 additions and 32 deletions
|
|
@ -0,0 +1,35 @@
|
|||
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.CommanderPlaysCountWatcher;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum CommanderCastCountValue implements DynamicValue {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability source, Effect effect) {
|
||||
CommanderPlaysCountWatcher watcher = game.getState().getWatcher(CommanderPlaysCountWatcher.class);
|
||||
return watcher != null ? watcher.getPlayerCount(source.getControllerId()) : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommanderCastCountValue copy() {
|
||||
return CommanderCastCountValue.instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "for each";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "time you've cast a commander from the command zone this game";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue