forked from External/mage
* Monarch designations - improved effects stability after game rollback or in AI games;
This commit is contained in:
parent
e1c7943636
commit
29242ec759
2 changed files with 39 additions and 32 deletions
|
|
@ -16,6 +16,7 @@ import mage.constants.SubType;
|
|||
import mage.constants.SuperType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.util.Copyable;
|
||||
import mage.util.GameLog;
|
||||
import mage.util.SubTypeList;
|
||||
|
||||
|
|
@ -27,17 +28,15 @@ import java.util.UUID;
|
|||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
public abstract class Designation implements MageObject {
|
||||
public abstract class Designation implements MageObject, Copyable<Designation> {
|
||||
|
||||
private static EnumSet emptySet = EnumSet.noneOf(CardType.class);
|
||||
private static List emptyList = new ArrayList<>();
|
||||
private static ObjectColor emptyColor = new ObjectColor();
|
||||
private static ManaCostsImpl emptyCost = new ManaCostsImpl();
|
||||
private static final ObjectColor emptyColor = new ObjectColor();
|
||||
private static final ManaCostsImpl emptyCost = new ManaCostsImpl();
|
||||
|
||||
private String name;
|
||||
private DesignationType designationType;
|
||||
private final DesignationType designationType;
|
||||
private UUID id;
|
||||
private FrameStyle frameStyle;
|
||||
private final FrameStyle frameStyle;
|
||||
private boolean copy;
|
||||
private MageObject copyFrom; // copied card INFO (used to call original adjusters)
|
||||
private Abilities<Ability> abilites = new AbilitiesImpl<>();
|
||||
|
|
@ -58,13 +57,14 @@ public abstract class Designation implements MageObject {
|
|||
}
|
||||
|
||||
public Designation(final Designation designation) {
|
||||
this.id = designation.id;
|
||||
this.name = designation.name;
|
||||
this.designationType = designation.designationType;
|
||||
this.id = designation.id;
|
||||
this.frameStyle = designation.frameStyle;
|
||||
this.copy = designation.copy;
|
||||
this.copyFrom = (designation.copyFrom != null ? designation.copyFrom.copy() : null);
|
||||
this.abilites = designation.abilites.copy();
|
||||
this.expansionSetCodeForImage = designation.expansionSetCodeForImage;
|
||||
this.unique = designation.unique;
|
||||
}
|
||||
|
||||
|
|
@ -267,5 +267,4 @@ public abstract class Designation implements MageObject {
|
|||
public boolean isUnique() {
|
||||
return unique;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue