* Fixed some problems with color changes of cards and spells - e.g. Painter's Servant (fixes #7325 fixes #6487).

This commit is contained in:
LevelX2 2021-01-08 11:03:39 +01:00
parent f6c70d5d4a
commit c67ce93ec4
13 changed files with 294 additions and 115 deletions

View file

@ -1,5 +1,8 @@
package mage.cards;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
import mage.MageObject;
import mage.MageObjectImpl;
import mage.Mana;
@ -20,14 +23,9 @@ import mage.game.stack.Spell;
import mage.game.stack.StackObject;
import mage.util.CardUtil;
import mage.util.GameLog;
import mage.util.SubTypeList;
import mage.watchers.Watcher;
import org.apache.log4j.Logger;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
public abstract class CardImpl extends MageObjectImpl implements Card {
private static final long serialVersionUID = 1L;
@ -869,28 +867,6 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
spellAbility = ability;
}
@Override
public ObjectColor getColor(Game game) {
if (game != null) {
CardAttribute cardAttribute = game.getState().getCardAttribute(getId());
if (cardAttribute != null) {
return cardAttribute.getColor();
}
}
return super.getColor(game);
}
@Override
public SubTypeList getSubtype(Game game) {
if (game != null) {
CardAttribute cardAttribute = game.getState().getCardAttribute(getId());
if (cardAttribute != null) {
return cardAttribute.getSubtype();
}
}
return super.getSubtype(game);
}
@Override
public List<UUID> getAttachments() {
return attachments;