mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
[WOE] Implement Rowan, Scion of War (#10853)
Co-authored-by: Evan Kranzler <theelk801@gmail.com>
This commit is contained in:
parent
1560696302
commit
54ec026369
4 changed files with 143 additions and 1 deletions
|
|
@ -286,7 +286,7 @@ public class SpellAbility extends ActivatedAbilityImpl {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a card object with the spell characteristics like calor, types,
|
||||
* Returns a card object with the spell characteristics like color, types,
|
||||
* subtypes etc. E.g. if you cast a Bestow card as enchantment, the
|
||||
* characteristics don't include the creature type.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
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.PlayerLostLifeWatcher;
|
||||
|
||||
/**
|
||||
* Amount of life the controller lost this turn.
|
||||
*
|
||||
* @author Susucr
|
||||
*/
|
||||
public enum ControllerLostLifeCount implements DynamicValue {
|
||||
instance;
|
||||
|
||||
private static final Hint hint = new ValueHint("Life lost this turn", instance);
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
PlayerLostLifeWatcher watcher = game.getState().getWatcher(PlayerLostLifeWatcher.class);
|
||||
if (watcher != null) {
|
||||
return watcher.getLifeLost(sourceAbility.getControllerId());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ControllerLostLifeCount copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "X";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "the amount of life you lost this turn";
|
||||
}
|
||||
|
||||
public static Hint getHint() {
|
||||
return hint;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue