magefree / magefree/mage

Clean up effects that move cards corresponding to a permanent that left the battlefield

Open
#14,979 5 comments 0 reactions 0 assignees View on GitHub
refactoring
Dominant language
Java
Stars
2.4k
Forks
940
Avg merge
2d 12h
Merged PRs (30d)
160

Description

Followup from #14900 . Previous work #14919 , #14931. There are likely some remaining custom effects that don't properly account for the fact that a permanent may have mutated cards.

Things to consider for new and reworked implementations:
* Effects moving cards must iterate through all targets, not just the first
* Triggered abilities need to set target pointer for such use cases to fixed targets and use an effect that moves a target, not an effect that moves source/enchanted
* Use `CardUtil::getAllCardsFromPermanentLeftBattlefield` whenever you need to do something with a card that left the battlefield

Incomplete list of effects to check:
* [ ] "when this dies, return it to the battlefield (tapped and) transformed" [Scryfall search for 10 cards](https://scryfall.com/search?q=o%3A%2Fwhen+%7E+dies%2C+return+it+to+the+battlefield+%28tapped+and+%29%3Ftransformed%2F&unique=cards&as=grid&order=name)
* [ ] Adarkar Valkyrie and other cards using WhenTargetDiesDelayedTriggeredAbility
* [ ] Athreos, Shroud-Veiled
* [ ] ReturnToHandAttachedEffect (example bugged: Demonic Vigor; compare fixed: False Demise)
* [ ] Gift of Immortality (weird one)
* [ ] Lim-Dul the Necromancer
* [ ] Magnanimous Magistrate
* [ ] Necroskitter
* [ ] Meathook Massacre II
* [ ] Puppet Master
* [ ] DealtDamageAndDiedTriggeredAbility
* [ ] DealtDamageAttachedAndDiedTriggeredAbility
* [ ] Valkyrie's Call
* [ ] Vraska, the Silencer
* [ ] ReturnMORToBattlefieldUnderOwnerControlWithCounterEffect

For any reworks of custom card effects, consider if it can be accomplished with common classes.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.