diff --git a/Mage/src/mage/abilities/condition/common/NoSpellsWereCastLastTurnCondition.java b/Mage/src/mage/abilities/condition/common/NoSpellsWereCastLastTurnCondition.java index 102f1ab9b1..61d78f90ed 100644 --- a/Mage/src/mage/abilities/condition/common/NoSpellsWereCastLastTurnCondition.java +++ b/Mage/src/mage/abilities/condition/common/NoSpellsWereCastLastTurnCondition.java @@ -46,6 +46,13 @@ public class NoSpellsWereCastLastTurnCondition implements Condition { @Override public boolean apply(Game game, Ability source) { CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get("CastSpellLastTurnWatcher"); - return watcher.getAmountOfSpellsCastOnPrevTurn() == 0; + // if any player cast spell, return false + for (Integer count : watcher.getAmountOfSpellsCastOnPrevTurn().values()) { + if (count > 0) { + return false; + } + } + // no one cast spell this turn + return true; } } diff --git a/Mage/src/mage/abilities/condition/common/TwoOrMoreSpellsWereCastLastTurnCondition.java b/Mage/src/mage/abilities/condition/common/TwoOrMoreSpellsWereCastLastTurnCondition.java index f38e7ea6de..78d7c09619 100644 --- a/Mage/src/mage/abilities/condition/common/TwoOrMoreSpellsWereCastLastTurnCondition.java +++ b/Mage/src/mage/abilities/condition/common/TwoOrMoreSpellsWereCastLastTurnCondition.java @@ -46,6 +46,13 @@ public class TwoOrMoreSpellsWereCastLastTurnCondition implements Condition { @Override public boolean apply(Game game, Ability source) { CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get("CastSpellLastTurnWatcher"); - return watcher.getAmountOfSpellsCastOnPrevTurn() >= 2; + // if any player cast more than two spells, return true + for (Integer count : watcher.getAmountOfSpellsCastOnPrevTurn().values()) { + if (count >= 2) { + return true; + } + } + // no one cast two or more spells this turn + return false; } } diff --git a/Mage/src/mage/watchers/common/CastSpellLastTurnWatcher.java b/Mage/src/mage/watchers/common/CastSpellLastTurnWatcher.java index 3f98608d26..dc72951a70 100644 --- a/Mage/src/mage/watchers/common/CastSpellLastTurnWatcher.java +++ b/Mage/src/mage/watchers/common/CastSpellLastTurnWatcher.java @@ -33,14 +33,18 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.watchers.WatcherImpl; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + /** * - * @author BetaSteward_at_googlemail.com + * @author nantuko, BetaSteward_at_googlemail.com */ public class CastSpellLastTurnWatcher extends WatcherImpl { - private int amountOfSpellsCastOnPrevTurn; - private int amountOfSpellsCastOnCurrentTurn; + private Map amountOfSpellsCastOnPrevTurn = new HashMap(); + private Map amountOfSpellsCastOnCurrentTurn = new HashMap(); public CastSpellLastTurnWatcher() { super("CastSpellLastTurnWatcher", WatcherScope.GAME); @@ -55,17 +59,29 @@ public class CastSpellLastTurnWatcher extends WatcherImpl getAmountOfSpellsCastOnPrevTurn() { return amountOfSpellsCastOnPrevTurn; }