forked from External/mage
* Fixed some problems with color changes of cards and spells - e.g. Painter's Servant (fixes #7325 fixes #6487).
This commit is contained in:
parent
f6c70d5d4a
commit
c67ce93ec4
13 changed files with 294 additions and 115 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package mage;
|
||||
|
||||
import java.util.*;
|
||||
import mage.abilities.Abilities;
|
||||
import mage.abilities.AbilitiesImpl;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -16,12 +17,11 @@ import mage.cards.FrameStyle;
|
|||
import mage.cards.mock.MockCard;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.MageObjectAttribute;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.util.GameLog;
|
||||
import mage.util.SubTypeList;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public abstract class MageObjectImpl implements MageObject {
|
||||
|
||||
protected UUID objectId;
|
||||
|
|
@ -117,6 +117,12 @@ public abstract class MageObjectImpl implements MageObject {
|
|||
|
||||
@Override
|
||||
public SubTypeList getSubtype(Game game) {
|
||||
if (game != null) {
|
||||
MageObjectAttribute mageObjectAttribute = game.getState().getMageObjectAttribute(getId());
|
||||
if (mageObjectAttribute != null) {
|
||||
return mageObjectAttribute.getSubtype();
|
||||
}
|
||||
}
|
||||
return subtype;
|
||||
}
|
||||
|
||||
|
|
@ -170,6 +176,12 @@ public abstract class MageObjectImpl implements MageObject {
|
|||
|
||||
@Override
|
||||
public ObjectColor getColor(Game game) {
|
||||
if (game != null) {
|
||||
MageObjectAttribute mageObjectAttribute = game.getState().getMageObjectAttribute(getId());
|
||||
if (mageObjectAttribute != null) {
|
||||
return mageObjectAttribute.getColor();
|
||||
}
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue