Log in

Reserved fields in the targets array

In order to code previously unsupported abilities, the field "player" and "card" from the "targets[]" array are currently used, so if you're coding a new card, please avoid use values > 10 (Example : does not use "targets[13].player" to store your data). This is especially true for Creatures.
Here's a list of the currently used values :
targets[18].player = number of +1/+1 counters
targets[18].card = number of -1/-1 counters
targets[17].card = used by Pithing Needle, humility and to determine if a card was "played for free".
targets[15].player = used by the cards that remove all other Subtypes and set a new Subtype (like Rise from the Grave).
targets[15].card = used by the cards that add a new Subtypes to a permanent (like Captivating Vampire).

targets[14].player = special infos, used by tokens or other creatures used for some tokens (Mitotic Slime). Check "tokens.c".
targets[14].card = special values checked by Planeswalkers in order to not lose counters if an effect prevent all combat damage dealt by a specific creature (use for the new code of Maze of Ith, for example).
targets[13].player = number of Auras enchanting the permanents. Used only by some creatures, needs the "check_for_auras_enchanting_me" or the "is_enchanted_legacy" function in order to work.