mirror of
https://github.com/correl/mage.git
synced 2025-03-17 01:06:26 -09:00
- small adjustment to Thousand-Year Storm to handle multiple copies of it on the battlefield.
This commit is contained in:
parent
1092552425
commit
f77a647608
1 changed files with 3 additions and 3 deletions
|
@ -67,8 +67,8 @@ class ThousandYearStormEffect extends OneShotEffect {
|
||||||
if (watcher != null) {
|
if (watcher != null) {
|
||||||
// recall only the spells cast before it
|
// recall only the spells cast before it
|
||||||
int numberOfCopies = 0;
|
int numberOfCopies = 0;
|
||||||
if (game.getState().getValue(spell.getId().toString()) != null) {
|
if (game.getState().getValue(spell.getId().toString() + source.getSourceId().toString()) != null) {
|
||||||
numberOfCopies = (int) game.getState().getValue(spell.getId().toString()) - 1;
|
numberOfCopies = (int) game.getState().getValue(spell.getId().toString() + source.getSourceId().toString());
|
||||||
}
|
}
|
||||||
if (numberOfCopies > 0) {
|
if (numberOfCopies > 0) {
|
||||||
for (int i = 0; i < numberOfCopies; i++) {
|
for (int i = 0; i < numberOfCopies; i++) {
|
||||||
|
@ -110,7 +110,7 @@ class ThousandYearWatcher extends Watcher {
|
||||||
amountOfInstantSorcerySpellsCastOnCurrentTurn.compute(playerId, (k, a) -> a + 1);
|
amountOfInstantSorcerySpellsCastOnCurrentTurn.compute(playerId, (k, a) -> a + 1);
|
||||||
|
|
||||||
// remember only the spells cast before it
|
// 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);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue