#11064 Scarlet Witch, Chaotic Avenger ability#11134
Open
steven-robert-eddy wants to merge 4 commits into
Open
Conversation
tool4ever
requested changes
Jul 2, 2026
Contributor
|
I have personally confirmed that this change does not fix the issue. |
Contributor
Author
My apologies, I am new to this and did not quite understand everything, I will be better about thorough testing |
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.
Problem
Issue #11064 describes a bug where Scarlet Witch, Chaotic Avenger's ability does not allow casting of exiled cards.
The card exiles the top 2 cards of your library face-down, then should allow casting a Hero or noncreature spell among those exiled cards without paying its mana cost. However, the Play effect's validation logic was unable to check the spell abilities of face-down cards, causing all cards to fail validation and be uncasting.
The relevant class is
PlayEffectinforge-game/src/main/java/forge/game/ability/effects/PlayEffect.java, which handles thePlayability effect used by Scarlet Witch's triggered ability.Solution
The fix involved two changes:
Card Definition Update :
ValidSAparameter from genericSpelltoSpell.Hero,Spell.nonCreaturefor more precise filteringValidparameter toCard.nonLand+ExiledWithSourceOptional$ Trueto make casting truly optionalPlayEffect.java Enhancement:
lacksValidSpellAbility()that temporarily turns face-down cards face-up to check their abilitiesWhy this approach:
Validation
mvn -pl forge-gui -am -DskipTests compile- Code compiles successfullyKnown Limits
Playeffect with face-down cardsAI Assistance Disclosure
I used AI assistance to help inspect the code, understand the issue, and draft this change. I reviewed all generated code, verified the implementation manually, and performed the validation listed above.
Refs #11064