* Fixed a problem of becomes ColorTargetEffect that causes objects to not always reset to original color.

This commit is contained in:
LevelX2 2018-04-24 11:35:33 +02:00
parent 229cad7330
commit 6bd8f52b66
2 changed files with 8 additions and 4 deletions

View file

@ -41,6 +41,8 @@ import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.players.Player;
/**
@ -106,8 +108,12 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl {
for (UUID targetId : targetPointer.getTargets(game, source)) {
MageObject targetObject = game.getObject(targetId);
if (targetObject != null) {
objectFound = true;
targetObject.getColor(game).setColor(setColor);
if (targetObject instanceof Spell || targetObject instanceof Permanent) {
objectFound = true;
targetObject.getColor(game).setColor(setColor);
} else {
objectFound = false;
}
}
}
if (!objectFound && this.getDuration() == Duration.Custom) {