forked from External/mage
* 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:
parent
d1c25b0662
commit
d0db2d51ed
33 changed files with 407 additions and 385 deletions
|
|
@ -81,11 +81,11 @@ public class Token extends MageObjectImpl {
|
|||
this.name = name;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
|
||||
public Token(String name, String description, int power, int toughness) {
|
||||
this(name, description);
|
||||
this.power.setValue(power);
|
||||
this.toughness.setValue(toughness);
|
||||
this.power.modifyBaseValue(power);
|
||||
this.toughness.modifyBaseValue(toughness);
|
||||
}
|
||||
|
||||
public Token(String name, String description, ObjectColor color, List<String> subtype, int power, int toughness, Abilities<Ability> abilities) {
|
||||
|
|
@ -93,8 +93,8 @@ public class Token extends MageObjectImpl {
|
|||
this.cardType.add(CardType.CREATURE);
|
||||
this.color = color.copy();
|
||||
this.subtype = subtype;
|
||||
this.power.setValue(power);
|
||||
this.toughness.setValue(toughness);
|
||||
this.power.modifyBaseValue(power);
|
||||
this.toughness.modifyBaseValue(toughness);
|
||||
if (abilities != null) {
|
||||
this.abilities = abilities.copy();
|
||||
}
|
||||
|
|
@ -217,11 +217,11 @@ public class Token extends MageObjectImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public void setPower(int power) {
|
||||
this.power.setValue(power);
|
||||
}
|
||||
|
||||
|
||||
public void setToughness(int toughness) {
|
||||
this.toughness.setValue(toughness);
|
||||
}
|
||||
|
|
@ -264,17 +264,13 @@ public class Token extends MageObjectImpl {
|
|||
if (availableImageSetCodes.size() > 0) {
|
||||
if (availableImageSetCodes.contains(code)) {
|
||||
setOriginalExpansionSetCode(code);
|
||||
} else {
|
||||
// we should not set random set if appropriate set is already used
|
||||
if (getOriginalExpansionSetCode() == null || getOriginalExpansionSetCode().isEmpty()
|
||||
|| !availableImageSetCodes.contains(getOriginalExpansionSetCode())) {
|
||||
setOriginalExpansionSetCode(availableImageSetCodes.get(new Random().nextInt(availableImageSetCodes.size())));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (getOriginalExpansionSetCode() == null || getOriginalExpansionSetCode().isEmpty()) {
|
||||
setOriginalExpansionSetCode(code);
|
||||
} else // we should not set random set if appropriate set is already used
|
||||
if (getOriginalExpansionSetCode() == null || getOriginalExpansionSetCode().isEmpty()
|
||||
|| !availableImageSetCodes.contains(getOriginalExpansionSetCode())) {
|
||||
setOriginalExpansionSetCode(availableImageSetCodes.get(new Random().nextInt(availableImageSetCodes.size())));
|
||||
}
|
||||
} else if (getOriginalExpansionSetCode() == null || getOriginalExpansionSetCode().isEmpty()) {
|
||||
setOriginalExpansionSetCode(code);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue