forked from External/mage
game: fixed "if mana was spent to cast" abilities after leaves (#11419)
* ManaWasSpentCondition should use MageObjectReferences
This commit is contained in:
parent
44b8a0faf4
commit
ca80849249
6 changed files with 63 additions and 22 deletions
|
|
@ -7,6 +7,7 @@ import mage.abilities.effects.Effect;
|
|||
import mage.constants.AbilityType;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.game.Game;
|
||||
import mage.util.CardUtil;
|
||||
import mage.watchers.common.ManaSpentToCastWatcher;
|
||||
|
||||
/**
|
||||
|
|
@ -32,7 +33,7 @@ public enum EachTwoManaSpentToCastValue implements DynamicValue {
|
|||
Mana payment = game
|
||||
.getState()
|
||||
.getWatcher(ManaSpentToCastWatcher.class)
|
||||
.getLastManaPayment(sourceAbility.getSourceId());
|
||||
.getManaPayment(CardUtil.getSourceStackMomentReference(game, sourceAbility));
|
||||
if (payment == null) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue