Also fix stack display and removed unnecessary code (border for card is
targetted/targetter since we used forcedborder in actionstack). Also
fixed some cards
704.5n If an Aura is attached to an illegal object or player, or is not
attached to an object or player, that Aura is put into its owner’s
graveyard.
704.5p If an Equipment or Fortification is attached to an illegal
permanent, it becomes unattached from that permanent. It remains on the
battlefield.
704.5q If a creature is attached to an object or player, it becomes
unattached and remains on the battlefield. Similarly, if a permanent
that’s neither an Aura, an Equipment, nor a Fortification is attached to
an object or player, it becomes unattached and remains on the
battlefield.
added new pw & legend rule (i just leave the old rules behind and
disabled it), added phasesin, faceup, copiedacard event, added facedup &
phasedin trigger.
added zone position (adjust dynamically), also inverts the display of
the zone so we always get the top/recent one... the library zpos is
inverted so if we choose to target the top 5 zpos like
target(*[zpos>=5|mylibrary), it will do from top to bottom... this is
only for AI so we can add alternate code for them since they cant use
reveal atm, we can make them target within allowed range...
Also this commit disabled the new legend and planeswalker rule since it
conflicts with reveal ability, unless I/We figure it out, I recommend to
use the old one...
added aicode for cards that uses reveal. since reveal cancels for ai,
aicode is the alternative code. use basic code only.
aicode=activate dosomething...
aicode - use with caution, its very basic atm and you must test each
card that uses it as it can cause crash.
legendary rule moved to game state based effect so it will not conflict
with cards with copy effects and andability. the legendary check applies
only when legendrule is found.