Skip to content

Fix MDFC mana value#15471

Open
nandmp wants to merge 2 commits into
magefree:masterfrom
nandmp:FixMdfcManaValue
Open

Fix MDFC mana value#15471
nandmp wants to merge 2 commits into
magefree:masterfrom
nandmp:FixMdfcManaValue

Conversation

@nandmp

@nandmp nandmp commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #15415

if (secondSideCard != null && getCard() instanceof DoubleFacedCardHalf) {
DoubleFacedCardHalf half = (DoubleFacedCardHalf) getCard();
if (half.getParentCard() instanceof ModalDoubleFacedCard) {
return secondSideCard.getManaValue();

@JayDi85 JayDi85 Jun 30, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks wrong. On battlefield and stack it must be current side. On other zones it must be left side. You are added left side on battlefield useless MDFC lookup. It's strange. Need more review-research from other devs.

Image

P.S. Also don't forget to implement related use case in tests. It's important for such bugs. Maybe real bug in wrong targeting, not in mana value calculation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.card already contain actual card half ref (for transformed it will contain second side), so that parent card check looks useless

Image

@github-actions github-actions Bot added the tests label Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect mana value for MDFC permanents (Esika, God of the Tree // The Prismatic Bridge)

2 participants