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].player = number of Auras enchanting the permanents. Used only by some creatures, needs the "check_for_auras_enchanting_me" function in order to work.
targets[17].card
Bit 0-3 : Non mana abilities are disabled.
Bit 4-7 : All abilities disabled.
Bit 8-11 : Creature is "humiliated".
Bit 12-15 : For each bit set, non-mana activated abilities cost 1 less to activate (couldn't reduce the total activation cost under 1).
Bit 16-19 : For each bit set, non-mana activated abilities cost 2 less to activate (couldn't reduce the total activation cost under 1).
Bit 20-23 : For each bit set, non-mana activated abilities cost 2 more to activate.
targets[16].player = used by the function dealt_damage_to_player.
targets[16].card = used to store non-standard abilities for creatures. Check "special_abilities" in "manalink.h"
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 = various special flags (check "special_flags" in "manalink.h").
targets[13].player = used by animated lands, double faced card, flip cards and clone-type cards. It contains the original ID of the card.
targets[13].card = used by animated lands, double faced card, flip cards and clone-type cards. It contains the ID of the animated / doubled / flipped card.
targets[12].player = used by "Face-down Creature", contains its "face-up" ID. If the ID is more than the actually available slots, then it's a creature played face-down by Illusionary Mask.
targets[12].card = used by the "cloning"-type creatures, "Face-down creature", animated lands, double-faced lands and flip cards.
targets[11].player = used by various functions for resolving graveyard-from-play triggers
targets[11].card = used by the function count_graveyard_from_play, return how many specific cards went from play to graveyard.
