thefiremind wrote:I thought about that while I was turning my PC off...

I'd really like to find some alternative... or we could just leave
Mikaeus, the Unhallowed (and the other instant that grants undying until end of turn, can't remember the name) with the old code, and live with the approximation.
I'll definitely keep thinking about a better solution, anyway.
Well, I think I found a solution. It's hideously complex and there is still a couple of minor things (like getting the Undying badge to show up properly) I'm trying to work out, but here is the gist of it. I created a fake characteristic system that is built using and on top of my ObjectDC functions (I didn't really want to have to use them, but I couldn't find any other way). Cards that use the fake characteristic system will need to create a characteristic manager token when the game starts (to make sure it is always in effect and no token doubling/modifications are yet in play, at most we want one per player in case a player dies and all their cards/permanents/tokens get removed). The characteristic manager's main function is to clear the fake characteristics from all cards (in any and all zones) at the lowest continuous action layer (layer 0, this allows the characteristics to be easily and reliably removed if the card changes zones, controllers, ceases to be meet the conditions for the ability, etc...) at higher levels (I recommend adding the ability at layer 5 then in that ability use layer 6 to set the characteristic) the fake characteristics can then be added by the cards/abilities that need to add them (I have some functions to make all this easy). So for our example with
Mikaeus, the Unhallowed we have him assign a simple ability to the cards he affects which simply adds the fake characteristic to the card and has some text so we know it has been added (this allows the system to work with cards like
Ovinize and
Turn to Frog which uses LoseAllAbilities()). Now we have a token in play that acts as that ability's manager (I'm building Undying and Persist directly into the characteristics manager to keep the tokens to a minimum) which actually has the real abilities for the characteristic and will call them on the other card's behalf if and only if the other card currently has the characteristic (it won't have the characteristic if it lost all abilities because the granted ability that would bestow the characteristic has been turned off). This allows the abilities to correctly trigger if and only if the card should really get them.
While this is quite complex it should work under all conditions (as the token has shroud and other abilities to make sure it can't lose all it's abilities). The system should also be fairly flexible so that other people can add their own ability managers (for abilities like unearth) then piggy-back the creation onto the creation of the characteristics manager. If I have missed something conceptually then please tell me so I can try to address that before I release this system and the updated core fixes to include
Mikaeus, the Unhallowed.
thefiremind wrote:EDIT: I found a TEXT_PERMANENT error: the localised strings for Tribal Enchantment have the 2 types inverted, even in English (who wrote them?

). I found the same strings in another XML file, this time in the correct order, so if you want to start a TEXT_PERMANENT folder in the core fixes, here's the first entry to add:
I'll add one in the next update.