* Fixed Identity Thief copying creature with +1/+1 counter gets P/T boost from it, but not counter (fixes #2131).

This commit is contained in:
LevelX2 2016-08-05 21:15:07 +02:00
parent d1c25b0662
commit d0db2d51ed
33 changed files with 407 additions and 385 deletions

View file

@ -24,8 +24,7 @@
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
*/
package mage;
import java.io.Serializable;
@ -49,15 +48,28 @@ public class MageInt implements Serializable, Copyable<MageInt> {
};
protected int baseValue;
protected int baseValueModified;
protected int boostedValue;
protected String cardValue = "";
public MageInt(int value) {
this.baseValue = value;
this.baseValueModified = baseValue;
this.boostedValue = baseValue;
this.cardValue = Integer.toString(value);
}
public MageInt(int baseValue, String cardValue) {
this.baseValue = baseValue;
this.baseValueModified = baseValue;
this.boostedValue = baseValue;
this.cardValue = cardValue;
}
public MageInt(int baseValue, int baseValueModified, int boostedValue, String cardValue) {
this.baseValue = baseValue;
this.baseValueModified = baseValueModified;
this.boostedValue = boostedValue;
this.cardValue = cardValue;
}
@ -66,24 +78,37 @@ public class MageInt implements Serializable, Copyable<MageInt> {
if (this == EmptyMageInt) {
return this;
}
return new MageInt(baseValue, cardValue);
return new MageInt(baseValue, baseValueModified, boostedValue, cardValue);
}
public int getValue() {
public int getBaseValue() {
return baseValue;
}
public void initValue(int value) {
this.baseValue = value;
public int getBaseValueModified() {
return baseValueModified;
}
public int getValue() {
return boostedValue;
}
public void modifyBaseValue(int value) {
this.baseValueModified = value;
this.boostedValue = value;
this.cardValue = Integer.toString(value);
}
public void setValue(int value) {
this.baseValue = value;
this.boostedValue = value;
}
public void boostValue(int amount) {
this.baseValue += amount;
this.boostedValue += amount;
}
public void resetToBaseValue() {
this.boostedValue = this.baseValueModified;
}
@Override