From fef57af8966ee446892ce2893e8cdd80627d373f Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 12 Apr 2015 21:39:29 +0200 Subject: [PATCH] * Commune with Lava - Fixed that it did not last until your next turn if it was cast during your turn. --- .../mage/sets/dragonsoftarkir/CommuneWithLava.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/CommuneWithLava.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/CommuneWithLava.java index 29672dc34b..a12f5d6312 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/CommuneWithLava.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/CommuneWithLava.java @@ -112,6 +112,8 @@ class CommuneWithLavaEffect extends OneShotEffect { class CommuneWithLavaMayPlayEffect extends AsThoughEffectImpl { + int castOnTurn = 0; + public CommuneWithLavaMayPlayEffect() { super(AsThoughEffectType.PLAY_FROM_NON_HAND_ZONE, Duration.Custom, Outcome.Benefit); this.staticText = "Until the end of your next turn, you may play that card."; @@ -119,6 +121,7 @@ class CommuneWithLavaMayPlayEffect extends AsThoughEffectImpl { public CommuneWithLavaMayPlayEffect(final CommuneWithLavaMayPlayEffect effect) { super(effect); + castOnTurn = effect.castOnTurn; } @Override @@ -126,9 +129,15 @@ class CommuneWithLavaMayPlayEffect extends AsThoughEffectImpl { return new CommuneWithLavaMayPlayEffect(this); } + @Override + public void init(Ability source, Game game) { + super.init(source, game); + castOnTurn = game.getTurnNum(); + } + @Override public boolean isInactive(Ability source, Game game) { - if (game.getPhase().getStep().getType() == PhaseStep.END_TURN) { + if (castOnTurn != game.getTurnNum() && game.getPhase().getStep().getType() == PhaseStep.END_TURN) { if (game.getActivePlayerId().equals(source.getControllerId())) { return true; }