I was investigating a bug report that indicated that
Stolen Goods did not work correctly (did not allow the player to cast the card without paying its mana cost). In trying to fix it I revealed a rather big issue in the code that I'm not sure what to make of or how to fix.
Some cards that make you able to cast spells from cards owned by your opponent work using the MayPlay/MayPlayWithoutManaCost mechanism (which works but has a couple visual glitches - in particular, the ability is not visually cleared from the card after it stops being active; also, if you're able to cast a spell without paying its mana cost, you're also allowed to choose an option to cast it and pay its mana cost - this is probably incorrect). Some other cards try to make it work by adding a hidden keyword to the card, for example "May be played by opponent without paying its mana cost". While there are a couple references to these hidden keywords in the code, they're not hooked to anything that may allow them to work (for instance, they do not participate in checking for zone restrictions or for activator restrictions for spells). Therefore, they literally do nothing, and any card that currently depends on them does not work.
Is the MayPlay/MayPlayWithoutManaCost mechanism "newer" than the keywords? Was it supposed to replace it? Or were the keywords a part of the code that someone started and did not finish / that got broken later?... At any rate, I'm not sure what to do with these cards. I converted a couple of them to MayPlay/MayPlayWithoutManaCost (see r29676), and visual glitches aside, that at least makes them functional. If you have an idea how this *should* be implemented / what should be done, your assistance is highly welcome!
Will also track this on the bug tracker as Issue 19.
- Agetian