forked from External/mage
Dymamic Values, Sigil of Distinction as example, tooltip is generated badly
This commit is contained in:
parent
cba120cb24
commit
d06b3a924b
6 changed files with 274 additions and 10 deletions
33
Mage/src/mage/abilities/dynamicvalue/common/StaticValue.java
Normal file
33
Mage/src/mage/abilities/dynamicvalue/common/StaticValue.java
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.game.Game;
|
||||
|
||||
public class StaticValue implements DynamicValue {
|
||||
private int value = 0;
|
||||
|
||||
public StaticValue(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public StaticValue(final StaticValue staticValue) {
|
||||
this.value = staticValue.value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility) {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DynamicValue clone() {
|
||||
return new StaticValue(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("%1$+d", value);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue