* Fixed a bug that mana sources that could produce any mana (e.g. Forbidden Orchard) did trigger the TAPPED_FO_MANA event twice.

This commit is contained in:
LevelX2 2015-02-12 12:08:13 +01:00
parent 7b95da55a7
commit 728281524a
2 changed files with 9 additions and 5 deletions

View file

@ -376,7 +376,7 @@ public abstract class AbilityImpl implements Ability {
} else if (effect instanceof DynamicManaEffect) {
mana = ((DynamicManaEffect)effect).getMana(game, this);
}
if (mana != null) { // if mana == null the event has to be fired in the mana effect
if (mana != null && mana.getAny() == 0) { // if mana == null or Any > 0 the event has to be fired in the mana effect to know which mana was produced
ManaEvent event = new ManaEvent(GameEvent.EventType.TAPPED_FOR_MANA, sourceId, sourceId, controllerId, mana);
if (!game.replaceEvent(event)) {
game.fireEvent(event);