Fix Offspring regression with Zinnia when granting source is removed before ETB#14609
Draft
sneddigrolyat wants to merge 7 commits intomagefree:masterfrom
Draft
Fix Offspring regression with Zinnia when granting source is removed before ETB#14609sneddigrolyat wants to merge 7 commits intomagefree:masterfrom
sneddigrolyat wants to merge 7 commits intomagefree:masterfrom
Conversation
OffspringAbility.java updated with new OffspringDelayedTriggeredAbility for implementation of ZinniaValleysVoice
Add Zinnia, Valley's Voice
Add ZinniaValleysVoice.java in conjunction with changes to OffspringAbility.java with new OffspringDelayedTriggeredAbility
This was referenced Mar 8, 2026
Author
|
@DreamWaker @Grath @keloks @theelk801 can anyone please help me validate if this PR is ready for review? |
Author
|
Since this approach seems too specific to Zinnia, I'm trying to work on a more general approach in new PR #14625 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This draft PR fixes a regression where a creature spell could still create an Offspring token even when the ability granting Offspring (for example, Zinnia) was removed before the creature entered the battlefield.
It also preserves correct behavior for multiple Offspring instances (printed + granted), including separate payments and separate triggers.
Problem
In live testing, this incorrect behavior reproduced:
Root Cause
The delayed-trigger fallback for granted Offspring could outlive the source-granted ability state and still fire from stale activation tag data.
Fix
Engine-level changes:
OffspringAbility: added per-instance activation tagging and explicit trigger gating.Spell.resolve: before storing permanent cost tags, synchronize/remove stale Offspring activation tags based on the spell’s current abilities at resolution.Files Changed
Mage/src/main/java/mage/abilities/keyword/OffspringAbility.javaMage/src/main/java/mage/game/stack/Spell.javaMage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/OffspringTest.javaMage.Tests/src/test/java/org/mage/test/cards/single/blc/ZinniaValleysVoiceTest.javaTests
Unit tests
OffspringTestnow covers:ZinniaValleysVoiceTestcovers granted Offspring behavior and regression scenarios.Commands run
mvn -pl Mage.Tests -am "-Dtest=org.mage.test.cards.abilities.keywords.OffspringTest" "-Dsurefire.failIfNoSpecifiedTests=false" test
mvn -pl Mage.Tests -am "-Dtest=org.mage.test.cards.single.blc.ZinniaValleysVoiceTest" "-Dsurefire.failIfNoSpecifiedTests=false" test
Result: pass.
Optional quality pass (JaCoCo)
mvn -pl Mage.Tests -am "-Dtest=org.mage.test.cards.abilities.keywords.OffspringTest" "-Dsurefire.failIfNoSpecifiedTests=false" "-Djacoco.skip=false" test
mvn -pl Mage.Tests,Mage.Reports -am "-Djacoco.skip=false" "-DskipTests" verify
Result: touched OffspringAbility defensive skip branch is now covered (previously missed line at OffspringAbility.java:275).
Live gameplay testing
10/10 live gameplay scenarios passed, including the Path-before-ETB regression case.
Risk / Scope
This touches core Spell and OffspringAbility behavior. Review focus:
•cost-tag lifecycle during spell resolution,
•interactions with other optional additional costs,
•multi-instance Offspring payment/trigger behavior.
Request for Review
Opening as draft to get engine/rules validation before marking ready.
Please double-check:
•rules correctness for 702.175a / 702.175b edge cases,
•unintended side effects from Offspring tag synchronization in Spell.resolve