mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
Fixed a problem that the TAPPED_FOR_MANA event was not always send (fixed #2826).
This commit is contained in:
parent
2a6978197c
commit
1d404ee57f
1 changed files with 3 additions and 3 deletions
|
@ -50,8 +50,8 @@ import mage.abilities.effects.ContinuousEffect;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.Effects;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.abilities.effects.common.DynamicManaEffect;
|
||||
import mage.abilities.effects.common.ManaEffect;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.abilities.mana.ActivatedManaAbilityImpl;
|
||||
import mage.cards.Card;
|
||||
|
@ -418,8 +418,8 @@ public abstract class AbilityImpl implements Ability {
|
|||
Effect effect = getEffects().get(0);
|
||||
if (effect instanceof DynamicManaEffect) {
|
||||
mana = ((DynamicManaEffect) effect).getMana(game, this);
|
||||
} else if (effect instanceof BasicManaEffect) {
|
||||
mana = ((BasicManaEffect) effect).getMana(game, this);
|
||||
} else if (effect instanceof ManaEffect) {
|
||||
mana = ((ManaEffect) effect).getMana(game, this);
|
||||
}
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue