Refactor: Add proper support for modifying and querying base P/T (#9409)

This commit is contained in:
Alex Vasile 2022-09-01 19:57:30 -04:00 committed by GitHub
parent d83eb41073
commit 07a142c9e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
415 changed files with 1844 additions and 2095 deletions

View file

@ -1,5 +1,6 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.MageObject;
import mage.MageObjectImpl;
import mage.abilities.Ability;
@ -65,12 +66,6 @@ public abstract class TokenImpl extends MageObjectImpl implements Token {
this.description = description;
}
public TokenImpl(String name, String description, int power, int toughness) {
this(name, description);
this.power.modifyBaseValue(power);
this.toughness.modifyBaseValue(toughness);
}
public TokenImpl(final TokenImpl token) {
super(token);
this.description = token.description;
@ -381,12 +376,12 @@ public abstract class TokenImpl extends MageObjectImpl implements Token {
@Override
public void setPower(int power) {
this.power.setValue(power);
this.power = new MageInt(power);
}
@Override
public void setToughness(int toughness) {
this.toughness.setValue(toughness);
this.toughness = new MageInt(toughness);
}
@Override