mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
* Fixed a problem of becomes ColorTargetEffect that causes objects to not always reset to original color.
This commit is contained in:
parent
229cad7330
commit
6bd8f52b66
2 changed files with 8 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue