From f77a647608759d132c987e5e26e36298ea80a30b Mon Sep 17 00:00:00 2001 From: jeffwadsworth Date: Fri, 8 Feb 2019 04:20:32 -0600 Subject: [PATCH] - small adjustment to Thousand-Year Storm to handle multiple copies of it on the battlefield. --- Mage.Sets/src/mage/cards/t/ThousandYearStorm.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/t/ThousandYearStorm.java b/Mage.Sets/src/mage/cards/t/ThousandYearStorm.java index d644f8fe93..ef1216e1f9 100644 --- a/Mage.Sets/src/mage/cards/t/ThousandYearStorm.java +++ b/Mage.Sets/src/mage/cards/t/ThousandYearStorm.java @@ -67,8 +67,8 @@ class ThousandYearStormEffect extends OneShotEffect { if (watcher != null) { // recall only the spells cast before it int numberOfCopies = 0; - if (game.getState().getValue(spell.getId().toString()) != null) { - numberOfCopies = (int) game.getState().getValue(spell.getId().toString()) - 1; + if (game.getState().getValue(spell.getId().toString() + source.getSourceId().toString()) != null) { + numberOfCopies = (int) game.getState().getValue(spell.getId().toString() + source.getSourceId().toString()); } if (numberOfCopies > 0) { for (int i = 0; i < numberOfCopies; i++) { @@ -110,7 +110,7 @@ class ThousandYearWatcher extends Watcher { amountOfInstantSorcerySpellsCastOnCurrentTurn.compute(playerId, (k, a) -> a + 1); // remember only the spells cast before it - game.getState().setValue(spell.getId().toString(), amountOfInstantSorcerySpellsCastOnCurrentTurn.get(playerId)); + game.getState().setValue(spell.getId().toString() + sourceId.toString(), amountOfInstantSorcerySpellsCastOnCurrentTurn.get(playerId) - 1); } }