forked from External/mage
Added 4 cards from AHK
* Added Cartouche of Strength * Added Nest of Scarabs (More correct implementation than existing one) * Added Soul-Scar Mage * Added Battlefield Scavenger
This commit is contained in:
parent
04f1b6306a
commit
db74576397
9 changed files with 459 additions and 53 deletions
|
|
@ -0,0 +1,45 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author stravant
|
||||
*/
|
||||
public class EffectKeyValue implements DynamicValue {
|
||||
private String key;
|
||||
private String description;
|
||||
|
||||
public EffectKeyValue(String key) {
|
||||
this.key = key;
|
||||
this.description = key;
|
||||
}
|
||||
|
||||
public EffectKeyValue(String key, String description) {
|
||||
this(key);
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability source, Effect effect) {
|
||||
return (Integer)effect.getValue(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectKeyValue copy(){
|
||||
return new EffectKeyValue(this.key, this.description);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "equal to";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return description;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue