Re: Card Development Questions
Posted: 19 Jun 2016, 08:53
This is the main crux of "damage control", I think -- full szstem of damage prevention and redirection is like a minigame all by itself.
At one time, damage used to be in "packets", and I believe it's still a good way to group damage points that are fungible (i.e. completely identical). Every time damage is dealt, there could be a window with list of damage packets, and the players (in standard APNAP order) would get a chance to apply replacement effects to it.
A damage packet should carry the following information:
1. The source, or LKI if the source no longer exists (Mogg Fanatic would be a good example here).
2. The recipient. Unlike source, the recipient must be currently valid object, and moreover must be creature, player or planeswalker.
3. The type of damage (combat or noncombat). Currently, I don't believe there is any way to mix both types in the same damage-dealing event.
4. Special properties of damage. There are two that need to be taken into account: non-preventable damage, which means that damage prevention effects can't apply to this packet (but all others still can, even if the net result is reducing of damage), and non-redirectable damage. Non-redirectable damage is only used by two cards, AFAIK, Lava Burst, and Whippoorwill, which both predate planeswalkers. Damage redirection effects fail against this type damage if the new recipient would be a creature or a player, but they will still work if the new recipient is unanimated planeswalker.
5. Amount of damage
6. Effects that were already applied to the damage. Rules say that each replacement effect can only affect a given event once, but a damage control window can contain many events and some effects can apply multiple times. Urza's Armor is an example here: you have to apply it to each individual packet of damage that aims to your face, but whenever you do it, the packet will be modified by adding this effect to "applied effects" list, so the same Urza's Armor can't be used to modify it again (but a second copy of Urza's Armor still can).
To make it easier, an effect should write itself here only if the effect still exists after applying.
Applying an effect can erase a packet, change its characteristics, or split it. It can happen that you end up with two packets that have the same source and recipient, but differ in applied effects, but this should be rare.
Example: Standard damage-prevention effect like Healing Salve has a variable counting how many points of damage to prevent, and set recipient. It applies to any preventable damage packet with this recipient, with this result:
1. Player selects how many points of damage to prevent from this packet. There can be some calculations involved to determine if the selected amount isn't too low (so the effect wouldn't have points left over even after fully preventing all other packets), or the player can simply be allowed to apply this effect to the same packet multiple times if this happens. (That might be better.) If only one value can be chosen, it's chosen automatically.
2. If chosen damage is equal to Packet_Damage, erase the packet. Subtract the Packet_Damage from Prevention; if result is 0, the prevention effect is spent and erased.
3. If chosen damage is less than Packet_Damage, modify the packet by reducing the damage. Then, once again, subtract the chosen damage from Prevention.
Harm's Way would then work in a completely analogical way, except that in case 2, the packet's recipient would be changed, and in case 3, the packet would be split in two.
Another "fun" part is that applying replacement effects might cause the event to contain things that are not damage at all, for example when Swans of Bryn Argoll replaces damage with card draw, or Phytohydra replaces it with placing of +1/+1 counters. I suggest that such effects are held in reserve until players finish dealing with damage, and applied together with final damage results afterwards, modified by their own replacements like Thought Reflection of Doubling Season. Still, there are some weird situations, for example replacing damage to Swans of Bryn Argoll by card drawing, then replacing one of the draws with Words of War, dealing damage back to the Swans -- in this case, Swans shouldn't replace that damage, since it's still part of an event it has already replaced.
Reflect Damage applies itself on the whole damage event, in this case, it would replace recipients in ALL packets originating from the source by that source's controller (and merge identical packets). This is because Reflect Damage never revers to the recipient of damage.
Should you wish to tackle this tangled web, this might be also a good time to fix effects like Dromad Purebred to only trigger once per damage event, regardless of how many sources deal damage (and corresponding "deal damage" effects like Spirit Link).
At one time, damage used to be in "packets", and I believe it's still a good way to group damage points that are fungible (i.e. completely identical). Every time damage is dealt, there could be a window with list of damage packets, and the players (in standard APNAP order) would get a chance to apply replacement effects to it.
A damage packet should carry the following information:
1. The source, or LKI if the source no longer exists (Mogg Fanatic would be a good example here).
2. The recipient. Unlike source, the recipient must be currently valid object, and moreover must be creature, player or planeswalker.
3. The type of damage (combat or noncombat). Currently, I don't believe there is any way to mix both types in the same damage-dealing event.
4. Special properties of damage. There are two that need to be taken into account: non-preventable damage, which means that damage prevention effects can't apply to this packet (but all others still can, even if the net result is reducing of damage), and non-redirectable damage. Non-redirectable damage is only used by two cards, AFAIK, Lava Burst, and Whippoorwill, which both predate planeswalkers. Damage redirection effects fail against this type damage if the new recipient would be a creature or a player, but they will still work if the new recipient is unanimated planeswalker.
5. Amount of damage
6. Effects that were already applied to the damage. Rules say that each replacement effect can only affect a given event once, but a damage control window can contain many events and some effects can apply multiple times. Urza's Armor is an example here: you have to apply it to each individual packet of damage that aims to your face, but whenever you do it, the packet will be modified by adding this effect to "applied effects" list, so the same Urza's Armor can't be used to modify it again (but a second copy of Urza's Armor still can).
To make it easier, an effect should write itself here only if the effect still exists after applying.
Applying an effect can erase a packet, change its characteristics, or split it. It can happen that you end up with two packets that have the same source and recipient, but differ in applied effects, but this should be rare.
Example: Standard damage-prevention effect like Healing Salve has a variable counting how many points of damage to prevent, and set recipient. It applies to any preventable damage packet with this recipient, with this result:
1. Player selects how many points of damage to prevent from this packet. There can be some calculations involved to determine if the selected amount isn't too low (so the effect wouldn't have points left over even after fully preventing all other packets), or the player can simply be allowed to apply this effect to the same packet multiple times if this happens. (That might be better.) If only one value can be chosen, it's chosen automatically.
2. If chosen damage is equal to Packet_Damage, erase the packet. Subtract the Packet_Damage from Prevention; if result is 0, the prevention effect is spent and erased.
3. If chosen damage is less than Packet_Damage, modify the packet by reducing the damage. Then, once again, subtract the chosen damage from Prevention.
Harm's Way would then work in a completely analogical way, except that in case 2, the packet's recipient would be changed, and in case 3, the packet would be split in two.
Another "fun" part is that applying replacement effects might cause the event to contain things that are not damage at all, for example when Swans of Bryn Argoll replaces damage with card draw, or Phytohydra replaces it with placing of +1/+1 counters. I suggest that such effects are held in reserve until players finish dealing with damage, and applied together with final damage results afterwards, modified by their own replacements like Thought Reflection of Doubling Season. Still, there are some weird situations, for example replacing damage to Swans of Bryn Argoll by card drawing, then replacing one of the draws with Words of War, dealing damage back to the Swans -- in this case, Swans shouldn't replace that damage, since it's still part of an event it has already replaced.
Reflect Damage applies itself on the whole damage event, in this case, it would replace recipients in ALL packets originating from the source by that source's controller (and merge identical packets). This is because Reflect Damage never revers to the recipient of damage.
Should you wish to tackle this tangled web, this might be also a good time to fix effects like Dromad Purebred to only trigger once per damage event, regardless of how many sources deal damage (and corresponding "deal damage" effects like Spirit Link).