Damage redirection issue (applies even if the receiving permanent has left the battlefield)
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
> 614.9. Some effects replace damage dealt to one creature, planeswalker, or player with the same damage dealt to another creature, planeswalker, or player; such effects are called redirection effects. **If either creature or planeswalker is no longer on the battlefield when the damage would be redirected, or is no longer a creature or planeswalker when the damage would be redirected, the effect does nothing. If damage would be redirected to or from a player who has left the game, the effect does nothing.**
The bolded portion of the above quote currently isn't implemented properly - for example I cast Shaman en-Kor (1/2) and a random other 1/1, then target Shaman with two Lightning Bolts. I activate Shaman's {0} ability 6 times targetting the 1/1 guy, yet Shaman survives because all 3+3 damage was succesfully redirected to a creature that was dead since receiving 3 damage from the first bolt.
In cases of redirection applied in reverse (for example in cards like Daughter of Autumn, Shaman en-Kor), the replacement effects still don't work correctly - if I play out the above scenario again, except target the 1/1 with two Bolts and activate Shaman's second {1}{W} ability twice, both instances targetting the 1/1 and choosing the two bolts as a source, Shaman dies and the 1/1 will live.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Java implementation and tests for damage replacement and redirection effects. Reproduce the Shaman en-Kor, Lightning Bolt, and 1/1 scenarios described in the issue, including both redirection directions. Done means redirection no longer applies when the source or recipient permanent has left the battlefield or changed type, and the scenarios resolve correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100