mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
[WOE] Implement Rowdy Research ; Implement Witchstalker Frenzy (#10985)
* add new DynamicValue * [WOE] Implement Rowdy Research * [WOE] Implement Witchstalker Frenzy
This commit is contained in:
parent
8de38bcde2
commit
5998f43f4d
4 changed files with 126 additions and 0 deletions
|
|
@ -0,0 +1,40 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.AttackedThisTurnWatcher;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public enum CreaturesThatAttackedThisTurnCount implements DynamicValue {
|
||||
instance;
|
||||
|
||||
private static final Hint hint = new ValueHint("Creatures that attacked this turn", instance);
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
AttackedThisTurnWatcher watcher = game.getState()
|
||||
.getWatcher(AttackedThisTurnWatcher.class);
|
||||
|
||||
return watcher == null ? 0 : watcher.getAttackedThisTurnCreatures().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DynamicValue copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "creatures that attacked this turn";
|
||||
}
|
||||
|
||||
public static Hint getHint() {
|
||||
return hint;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue