* Cabal Ritual, Gemstone Caverns, River of Tears - Fixed a problem that the tap for mana event was sent twice for theses lands (fixes #4288).

This commit is contained in:
LevelX2 2017-12-28 12:57:16 +01:00
parent 2197fe2bcd
commit d85637336e
2 changed files with 14 additions and 11 deletions

View file

@ -79,8 +79,10 @@ public class ConditionalManaEffect extends ManaEffect {
otherwiseEffect.setTargetPointer(this.targetPointer);
}
Mana mana = getMana(game, source);
if (mana != null && mana.getAny() > 0) {
if (mana == null) {
return false;
}
if (mana.getAny() > 0) {
int amount = mana.getAny();
ChoiceColor choice = new ChoiceColor(true);
@ -92,13 +94,14 @@ public class ConditionalManaEffect extends ManaEffect {
createdMana = choice.getMana(amount);
}
if (createdMana == null) {
return false;
}
mana = createdMana;
}
if (mana != null) {
// because the mana type is now choosen, fire the event with the mana information
checkToFirePossibleEvents(mana, game, source);
controller.getManaPool().addMana(mana, game, source);
}
controller.getManaPool().addMana(mana, game, source);
return true;
}