Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If Emerge reduces mana cost to zero, pass noMana flag to allow spell to be cast with empty manaCostsToPay. #12896

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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