Ability Controller Work
So I was looking to adding some of the cards that any player can activate, such as Volrath's Dungeon, but it seems there's an intermediary step that needs to be done. I think I should be able to manage it, but figured I'd see if anyone has looked into this (or if rares knows a good place to start unraveling the knot) before I started.
Basically the problem boils down to that (a lot of) cards assume that whoever controls the card is the same person who is activating the ability. While this is the case 98% of the time, there are a few situations where this isn't actually the case. The first, as stated above, is cards like Aluren, AEther Storm, and a bunch of crappy cards from Masques cycle. According to magiccards.info, there are 53 cards that use the phrase "any player may." Some of these are the "extortion" spells which can be handled differently, but for permanents there needs to be a clear distinction between card controller and ability controller.
The other situation is: I activate an ability that is non-targeting like creating a token. Then I lose control of the permanent creating the token while the ability is on the stack. When the ability resolves, the current controller of the card is the one gaining the token.
If you want to see this in action, make the following decks.
8 Island, 4 Old Man of the Sea.
8 Mountain, 4 Rakka Mar.
You play the Old Man deck, let the computer play Rakka.
Cast your Old Man on turn 3, let your opponent cast his Rakka on turn 4.
Now don't activate your Old Man until after he activates his Rakka on turn 5. You will sucessfully steal Rakka and the token your opponent paid to generate.
So yea, just let me know if anyone has looked into this before, or anything of the like. My current dive in point is GameAction.playCard but maybe there's a better spot.
Thanks
Sol.
Basically the problem boils down to that (a lot of) cards assume that whoever controls the card is the same person who is activating the ability. While this is the case 98% of the time, there are a few situations where this isn't actually the case. The first, as stated above, is cards like Aluren, AEther Storm, and a bunch of crappy cards from Masques cycle. According to magiccards.info, there are 53 cards that use the phrase "any player may." Some of these are the "extortion" spells which can be handled differently, but for permanents there needs to be a clear distinction between card controller and ability controller.
The other situation is: I activate an ability that is non-targeting like creating a token. Then I lose control of the permanent creating the token while the ability is on the stack. When the ability resolves, the current controller of the card is the one gaining the token.
If you want to see this in action, make the following decks.
8 Island, 4 Old Man of the Sea.
8 Mountain, 4 Rakka Mar.
You play the Old Man deck, let the computer play Rakka.
Cast your Old Man on turn 3, let your opponent cast his Rakka on turn 4.
Now don't activate your Old Man until after he activates his Rakka on turn 5. You will sucessfully steal Rakka and the token your opponent paid to generate.
So yea, just let me know if anyone has looked into this before, or anything of the like. My current dive in point is GameAction.playCard but maybe there's a better spot.
Thanks
Sol.