diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeSourceEffect.java index 56d90e8f218..4ee8f6462e4 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeSourceEffect.java @@ -3,6 +3,7 @@ package mage.abilities.effects.common.continuous; import mage.abilities.Ability; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; +import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -10,17 +11,28 @@ import mage.target.targetpointer.FixedTarget; public class BecomesChosenCreatureTypeSourceEffect extends OneShotEffect { + private final boolean nonWall; + private final Duration duration; + public BecomesChosenCreatureTypeSourceEffect() { - this(false); + this(false, Duration.EndOfTurn); } public BecomesChosenCreatureTypeSourceEffect(boolean nonWall) { + this(nonWall, Duration.EndOfTurn); + } + + public BecomesChosenCreatureTypeSourceEffect(boolean nonWall, Duration duration) { super(Outcome.BoostCreature); - staticText = "{this} becomes the creature type of your choice until end of turn."; + this.nonWall = nonWall; + this.duration = duration; + staticText = "{this} becomes the creature type of your choice" + (duration == Duration.EndOfTurn ? " until end of turn." : ""); } public BecomesChosenCreatureTypeSourceEffect(final BecomesChosenCreatureTypeSourceEffect effect) { super(effect); + this.nonWall = effect.nonWall; + this.duration = effect.duration; } @Override @@ -29,7 +41,7 @@ public class BecomesChosenCreatureTypeSourceEffect extends OneShotEffect { if (sourcePerm == null) { return false; } - Effect effect = new BecomesChosenCreatureTypeTargetEffect(); + Effect effect = new BecomesChosenCreatureTypeTargetEffect(nonWall, duration); effect.setTargetPointer(new FixedTarget(sourcePerm, game)); return effect.apply(game, source); }