[confirmed]Gain control/activations on stack

Describe the bug:
Changes of control cause activations on the stack to lose track of their source. When they resolve, they, at best, see the obliterated card instance that was their source as it existed under the previous player's control. This is good enough for creating effect cards, and (mostly) good enough for dealing damage, but not for plenty of other things - cards that pump themselves, or put counters on themselves (not as a target), bounce or destroy or exile themselves, etc. Very nearly every activated ability that contains the card's name in its rules text.
Test case: 2 copies of Swamp, 2 copies of Frozen Shade, a non-summonsick Bazaar Trader. Activate a Frozen Shade and let it resolve; it pumps itself to 1/2. Activate the other and respond by donating it with the Bazaar Trader; the AI will end up controlling it as 0/1.
Which card behaved improperly?
real_switch_control().
Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Dev 6d9017f.
What exactly should be the correct behavior/interaction?
Change of control isn't a change of zone, so it doesn't create a new object. The activation should still find the card under its new controller, so both copies of Frozen Shade should be 1/2.
Are any other cards possibly affected by this bug?
This is a bug in the original game. It's harder but not impossible to exercise it with just the original cards - Old Man of the Sea, for example, lets you change control at instant speed. See the changes to shandalar/cards/control.cpp in 9c27b85b for a fix.
Cards that activate to sacrifice themselves during resolution (using wording like "sacrifice [name]", not the much-rarer but not-unknown "[Name]'s controller sacrifices it") currently work correctly entirely by accident, and will break when this is fixed. Such sacrifices should still fail per rule 701.15a, reading in part "A player can't sacrifice something that isn't a permanent, or something that's a permanent he or she doesn't control." Helm of Obedience will be a prominent example; I found this bug was still extant in Manalink while trying to figure out why the Helm wasn't broken.
Changes of control cause activations on the stack to lose track of their source. When they resolve, they, at best, see the obliterated card instance that was their source as it existed under the previous player's control. This is good enough for creating effect cards, and (mostly) good enough for dealing damage, but not for plenty of other things - cards that pump themselves, or put counters on themselves (not as a target), bounce or destroy or exile themselves, etc. Very nearly every activated ability that contains the card's name in its rules text.
Test case: 2 copies of Swamp, 2 copies of Frozen Shade, a non-summonsick Bazaar Trader. Activate a Frozen Shade and let it resolve; it pumps itself to 1/2. Activate the other and respond by donating it with the Bazaar Trader; the AI will end up controlling it as 0/1.
Which card behaved improperly?
real_switch_control().
Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Dev 6d9017f.
What exactly should be the correct behavior/interaction?
Change of control isn't a change of zone, so it doesn't create a new object. The activation should still find the card under its new controller, so both copies of Frozen Shade should be 1/2.
Are any other cards possibly affected by this bug?
This is a bug in the original game. It's harder but not impossible to exercise it with just the original cards - Old Man of the Sea, for example, lets you change control at instant speed. See the changes to shandalar/cards/control.cpp in 9c27b85b for a fix.
Cards that activate to sacrifice themselves during resolution (using wording like "sacrifice [name]", not the much-rarer but not-unknown "[Name]'s controller sacrifices it") currently work correctly entirely by accident, and will break when this is fixed. Such sacrifices should still fail per rule 701.15a, reading in part "A player can't sacrifice something that isn't a permanent, or something that's a permanent he or she doesn't control." Helm of Obedience will be a prominent example; I found this bug was still extant in Manalink while trying to figure out why the Helm wasn't broken.