magefree / mage

Magic Another Game Engine
http://xmage.today
MIT License
1.88k stars 767 forks source link

BUG - Diabolic Servitude exiles creature that returns to battlefield with Persist before Diabolic Servitude trigger resolves to exile #11866

Open Athanar90 opened 7 months ago

Athanar90 commented 7 months ago

Apologies for the lack of screen capture, it was a long game and we forgot to grab it.

Process of what happened: -Creature with Persist exists on the battlefield, returned earlier with Diabolic Servitude -Creature with Persist is sacrificed to an effect and goes to the graveyard (dies) -Diabolic Servitude trigger and Persist trigger activate simultaneously -Player chooses to resolve Persist trigger first -After Persist trigger successfully resolves, Diabolic Servitude trigger resolves -Diabolic Servitude incorrectly exiles the creature with Persist, despite M:tG rules stating that creature is a new object after leaving the graveyard zone

The Persist creature was either Kitchen Finks or Putrid Goblin, I can't remember which it was.

xenohedron commented 7 months ago

Yep, looks like Diabolic Servitude is implemented with custom effects and just doesn't use the zcc properly

https://github.com/magefree/mage/blob/6cf05a554c8c778cdc28c0d76bbb98725fbc17b9/Mage.Sets/src/mage/cards/d/DiabolicServitude.java#L145-L149

it's setting a new fixed target but needs to use the zcc from the mor instead

Easy enough fix for anyone willing to take the time to actually test it and get the right zcc offset