diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/CloudcrestLake.java b/Mage.Sets/src/mage/sets/championsofkamigawa/CloudcrestLake.java index 5ffcd591f1..aa26608dda 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/CloudcrestLake.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/CloudcrestLake.java @@ -46,6 +46,9 @@ public class CloudcrestLake extends CardImpl { public CloudcrestLake(UUID ownerId) { super(ownerId, 274, "Cloudcrest Lake", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "CHK"; + + // {T}: Add {1} to your mana pool. + // {T}: Add {W} or {U} to your mana pool. Cloudcrest Lake doesn't untap during your next untap step. this.addAbility(new ColorlessManaAbility()); Ability whiteManaAbility = new WhiteManaAbility(); whiteManaAbility.addEffect(new SkipNextUntapSourceEffect()); diff --git a/Mage/src/mage/abilities/effects/common/SkipEnchantedUntapEffect.java b/Mage/src/mage/abilities/effects/common/SkipEnchantedUntapEffect.java index e8ad2134bf..6a49d8a9c5 100644 --- a/Mage/src/mage/abilities/effects/common/SkipEnchantedUntapEffect.java +++ b/Mage/src/mage/abilities/effects/common/SkipEnchantedUntapEffect.java @@ -1,7 +1,7 @@ package mage.abilities.effects.common; import mage.abilities.Ability; -import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.ContinuousRuleModifiyingEffectImpl; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.PhaseStep; @@ -12,7 +12,7 @@ import mage.game.permanent.Permanent; /** * @author nantuko */ -public class SkipEnchantedUntapEffect extends ReplacementEffectImpl { +public class SkipEnchantedUntapEffect extends ContinuousRuleModifiyingEffectImpl { public SkipEnchantedUntapEffect() { super(Duration.WhileOnBattlefield, Outcome.Detriment); @@ -34,12 +34,7 @@ public class SkipEnchantedUntapEffect extends ReplacementEffectImpl { } @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - return true; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { + public boolean applies(GameEvent event, Ability source, boolean checkPlayableMode, Game game) { if (game.getTurn().getStepType() == PhaseStep.UNTAP && event.getType() == GameEvent.EventType.UNTAP) { Permanent enchantment = game.getPermanent(source.getSourceId()); if (enchantment != null && enchantment.getAttachedTo() != null) { diff --git a/Mage/src/mage/abilities/effects/common/SkipNextUntapSourceEffect.java b/Mage/src/mage/abilities/effects/common/SkipNextUntapSourceEffect.java index e352f75d92..fd01453fe4 100644 --- a/Mage/src/mage/abilities/effects/common/SkipNextUntapSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/SkipNextUntapSourceEffect.java @@ -1,18 +1,21 @@ package mage.abilities.effects.common; import mage.abilities.Ability; -import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.ContinuousRuleModifiyingEffectImpl; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.PhaseStep; import mage.game.Game; import mage.game.events.GameEvent; -public class SkipNextUntapSourceEffect extends ReplacementEffectImpl { +public class SkipNextUntapSourceEffect extends ContinuousRuleModifiyingEffectImpl { + private int validForTurnNum; + public SkipNextUntapSourceEffect() { - super(Duration.OneUse, Outcome.Detriment); + super(Duration.Custom, Outcome.Detriment); staticText = "{this} doesn't untap during your next untap step"; + validForTurnNum = 0; } public SkipNextUntapSourceEffect(final SkipNextUntapSourceEffect effect) { @@ -30,19 +33,24 @@ public class SkipNextUntapSourceEffect extends ReplacementEffectImpl { } @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - used = true; - return true; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { + public boolean applies(GameEvent event, Ability source, boolean checkPlayableMode, Game game) { + if (validForTurnNum > 0 && validForTurnNum < game.getTurnNum()) { + discard(); + return false; + } + if (GameEvent.EventType.UNTAP_STEP.equals(event.getType()) + && game.getActivePlayerId().equals(source.getControllerId())) { + validForTurnNum = game.getTurnNum(); + } if (game.getTurn().getStepType() == PhaseStep.UNTAP && event.getType() == GameEvent.EventType.UNTAP && event.getTargetId().equals(source.getSourceId())) { + if (!checkPlayableMode) { + discard(); + } return true; } return false; } -} \ No newline at end of file +}