forked from External/mage
Introduce new batch event for life lost for a specific player (#13071)
* Introduce new batch event for life lost for a specific player closes #12202, fix #10805 * implement [DSC] Valgavoth, Harrower of Souls * text fixes
This commit is contained in:
parent
95e986dee7
commit
d6cf207a8b
28 changed files with 693 additions and 707 deletions
|
|
@ -0,0 +1,49 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public enum SavedLifeLossValue implements DynamicValue {
|
||||
MANY("many"),
|
||||
MUCH("much");
|
||||
|
||||
private final String message;
|
||||
|
||||
private static final String key = "SavedLifeLoss";
|
||||
|
||||
/**
|
||||
* value key used to store the amount of life lost
|
||||
*/
|
||||
public static String getValueKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
SavedLifeLossValue(String message) {
|
||||
this.message = "that " + message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return (Integer) effect.getValue(getValueKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SavedLifeLossValue copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue