-
Notifications
You must be signed in to change notification settings - Fork 808
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
[refactor/bugfix] use rule 802.2a where appropriate. #13179
[refactor/bugfix] use rule 802.2a where appropriate. #13179
Conversation
Many effects which relied on getDefendingPlayerId would fail if the attacking creature had been removed from combat before they resolved, in which case the defending player ID would be null. This fixes these issues.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide some buggy use cases or tests?
I'll confirm my suspicions in a sec to write a test for a simpler buggy use case, but I encountered it trying to do [[Norin the Wary]] + [[Blade of Selves]] - Myriad would fail due to null defending player when Norin had already exiled himself before Myriad resolved.
Yeah, it's probably possible to default it to true. There's a couple use cases where it's important to be false I think, but most cases it can be true. Lemme look over it a bit further. |
Norin the Wary - (Gatherer) (Scryfall) (EDHREC)
Blade of Selves - (Gatherer) (Scryfall) (EDHREC)
|
…red ability. Change allowFormer to be true by default, reduce falses to only necessary cases.
* [refactor/bugfix] use rule 802.2a where appropriate. Many effects which relied on getDefendingPlayerId would fail if the attacking creature had been removed from combat before they resolved, in which case the defending player ID would be null. This fixes these issues. * Add test for removing attacking creature with Defending Player triggered ability. Change allowFormer to be true by default, reduce falses to only necessary cases.
* [refactor/bugfix] use rule 802.2a where appropriate. Many effects which relied on getDefendingPlayerId would fail if the attacking creature had been removed from combat before they resolved, in which case the defending player ID would be null. This fixes these issues. * Add test for removing attacking creature with Defending Player triggered ability. Change allowFormer to be true by default, reduce falses to only necessary cases.
Many effects which relied on getDefendingPlayerId would fail if the attacking creature had been removed from combat before they resolved, in which case the defending player ID would be null. This fixes these issues.