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.game.stack;
|
||||
|
||||
import java.util.*;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.Mana;
|
||||
|
|
@ -22,6 +23,7 @@ import mage.counters.Counters;
|
|||
import mage.filter.FilterMana;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameState;
|
||||
import mage.game.MageObjectAttribute;
|
||||
import mage.game.events.CopiedStackObjectEvent;
|
||||
import mage.game.events.CopyStackObjectEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
|
@ -34,8 +36,6 @@ import mage.util.CardUtil;
|
|||
import mage.util.GameLog;
|
||||
import mage.util.SubTypeList;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
|
|
@ -575,6 +575,12 @@ public class Spell extends StackObjImpl implements Card {
|
|||
|
||||
@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