Open Susucre opened 1 year ago
Example of bug: [[Phantom Centaur]] being damaged by a black source has counters removed, but should ask which replacement effect to use (typically player will want to prevent the damage and not remove counters).
Phantom Centaur - (Gatherer) (Scryfall) (EDHREC)
{2}{G}{G} Creature — Centaur Spirit 2/0 Protection from black Phantom Centaur enters the battlefield with three +1/+1 counters on it. If damage would be dealt to Phantom Centaur, prevent that damage. Remove a +1/+1 counter from Phantom Centaur.
From a discussion in https://github.com/magefree/mage/pull/10652#discussion_r1276595896 I went digging in the ruling, and I think our way to handle the prevention part of protection is not exactly right.
Protection is in part a prevention effect:
When there are muliple prevention/protection applying at the same time, the player controlling the affected object's controller choose one, apply it, then repeat until there is no effect left to apply.
Both in PermanentImpl and PlayerImpl, the protection effect is currently applied after prevention/replacement. And from what I understand from the rules, they should be handled together.