magefree / mage

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

Issue with "As long as you control" creatures that are being controlled by a player other than the owner #8006

Open IsoGumby opened 3 years ago

IsoGumby commented 3 years ago

On two separate occasions with two separate sets of cards, a player within my EDH pod would gain control of a card that had a "for as long as you control X" creature, and its effect would fail to resolve when the correct conditions became true. In the first example, a roil elemental was taken via Sower of temptation's enter the battlefield effect. Afterword, a land was played by the new controller of Roil Elemental which says "Landfall - when a land enters the battlefield under your control, you may gain control of target creature for as long as you control roil elemental". The prompt was given to the controller, who selected yes. The creature targeted by roil elemental did not have its' control changed to the current owner of roil elemental. Because the game would have ended with this play, we allowed it to continue for testing purposes, and the effect happened multiple times with each land drop made by the new controller. In the second example, an Olivia Voldaren was reanimated from an opponents' graveyard using the scarab god's activated ability. A vampire was targeted by Olivia Voldaren's second activated ability which states "3BB: Gain control of target vampire for as long as you control Olivia Voldaren". It was a legal target, and the ability was allowed to resolve. The control of the targeted vampire was not changed to the current owner of Olivia Voldaren as it should have been.

Thanks for all you guys do! Be safe :)

Tharkon commented 3 years ago

Welcome to Github.

You seem to be mixing up controller and owner a bit in your post but it is still understandable what you mean. I want to point out that the situations are quite different though. The Scarab God's ability creates a token, so you are the owner of that token. While Sower of Temptation gives you control of a creature owned by another player, which may or may not be a token.

I was able to replicate the second bug with this setup: battlefield:Human:Swamp:5 battlefield:Human:Island:5 graveyard:Human:Olivia Voldaren:1 battlefield:Human:The Scarab God:1 battlefield:Computer:Bloodbond Vampire:1

As well as with this one: battlefield:Human:Swamp:5 battlefield:Human:Island:5 battlefield:Human:Olivia Voldaren:1 hand:Human:Quasiduplicate:1 battlefield:Computer:Bloodbond Vampire:1

So it seems that is has to do with it being a token and specifically a token of Olivia Voldaren. If I use The Scarab God on a Roil Elemental I was unable to reproduce the bug, but did discover another. When I sacrificed the Roil Elemental token to a Carrion Feeder or destroyed it with Go for the Throat, the creature I took was not returned.

IsoGumby commented 3 years ago

Hello!

Thanks for getting back to me on this. After re-reading it I do realize that I mixed up my wording quite a few times. Thanks for still taking a look at the issue. Yes, I do feel like you have captured the issue with olivia. I am surprised that the roil elemental issue was not replicable, and I will do my best to see if I can make it happen again and give you a proper boardstate breakdown to go with it. I don't know if there is anything else I can really do to help with this but I do wanna say thanks so much for all you guys do! If I knew anything about coding this kind of thing I would gladly help out.

I'll get back to you as soon as I can on the roil elemental issue. Thanks!

On Mon, Jul 19, 2021 at 8:54 AM Tharkon @.***> wrote:

You seem to be mixing up controller and owner a bit in your post but it is still understandable what you mean. I want to point out that the situations are quite different though. The Scarab God's ability creates a token, so you are the owner of that token. While Sower of Temptation gives you control of a creature owned by another player, which may or may not be a token.

I was able to replicate the second bug with this setup: battlefield:Human:Swamp:5 battlefield:Human:Island:5 graveyard:Human:Olivia Voldaren:1 battlefield:Human:The Scarab God:1 battlefield:Computer:Bloodbond Vampire:1

As well as with this one: battlefield:Human:Swamp:5 battlefield:Human:Island:5 battlefield:Human:Olivia Voldaren:1 hand:Human:Quasiduplicate:1 battlefield:Computer:Bloodbond Vampire:1

So it seems that is has to do with it being a token and specifically a token of Olivia Voldaren. If I use The Scarab God on a Roil Elemental I was unable to reproduce the bug, but did discover another. When I sacrificed the Roil Elemental token to a Carrion Feeder or destroyed it with Go for the Throat, the creature I took was not returned.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/magefree/mage/issues/8006#issuecomment-882567633, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU2VESTFTRRYP4W7JCIVOKTTYQVBTANCNFSM5AJK6PZQ .

Tharkon commented 3 years ago

I actually only know the code on a theoretical level as well. I can read it and have an idea of what might be wrong, but I don't know how to actually make the edits. Other than that I know how to run tests with init.txt to try and replicate bugs to see what might be the cause.

Further testing revealed a Clone copying Olvia Voldaren also showed the same bug. However a Clone copying Roil Elemental does return control if destroyed.