during undo, enchantedPermanent becomes invalid when the change control action is undone.
now we store the result of isValid during doAction in a variable.

fixes issue 516
support exile card pattern
remove groovy code with card script
replace groovy code with card script