Skip to content

Commit

Permalink
If Emerge reduces mana cost to zero, pass noMana flag to allow spell …
Browse files Browse the repository at this point in the history
…to be cast with empty manaCostsToPay. (#12896)

Fixes #12841
  • Loading branch information
Grath authored Sep 21, 2024
1 parent 360cde3 commit 291a28d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Mage/src/main/java/mage/abilities/keyword/EmergeAbility.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ public boolean activate(Game game, Set<MageIdentifier> allowedIdentifiers, boole
Permanent creature = game.getPermanent(target.getFirstTarget());
if (creature != null) {
CardUtil.reduceCost(this, creature.getManaValue());
if (super.activate(game, allowedIdentifiers, false)) {
boolean reducedToZero = this.getManaCostsToPay().isEmpty();
if (super.activate(game, allowedIdentifiers, reducedToZero)) {
MageObjectReference mor = new MageObjectReference(creature, game);
if (creature.sacrifice(this, game)) {
this.setCostsTag(EMERGE_ACTIVATION_CREATURE_REFERENCE, mor); //Can access with LKI afterwards
Expand Down

0 comments on commit 291a28d

Please sign in to comment.