mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* 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:
parent
7b95da55a7
commit
728281524a
2 changed files with 9 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue