freestorageaccount wrote:I blocked an
Essence Sliver with a
Black Knight and a
Slith Bloodletter, but no damage was assigned to my creatures. I assume the computer tried to kill the Knight (damage can indeed be assigned to it, though it's rarely a smart move) but zero assigned damage is a hack to emulate damage prevention until it's implemented, which explains why giving protection from a color to
Knight of Dawn after it's assigned lethal combat damage doesn't rescue it. Still, even though the Knight can be assigned damage from a white source perfectly well, the computer should be smart enough (I wish

) to figure out that an alternative is more productive.
How hard is damage prevention?
I was thinking about it just the other day. In my mind, when damage is dealt, I see all those little points of damage hanging in the air for a frozen second. Each point is an object containing ID of source, ID of recipient, some flags marking it as combat, unpreventable, or unredirectable damage, and (and this is important), a list of all effects that were already applied on this point of damage. Points which have all these factors identical are equivalent.
Now, before the damage is actually done, various effects are applied. I suppose active player applies effects that affect him and his permanents in any order, then inactive player applies the rest.
Basic damage effects are:
Fixed prevention (like
Samite Healer). This effect is a shield over recipient stating a number.
If there are any points of preventable damage aiming at the protected object, it prevents all of them or its stated number, whichever is less. If it prevents less than its stated number, the number is decreased. If it prevents as much, the shield disappears. If some points of damage are not equivalent, it can be chosen which ones will be prevented (for cases where, say, you take damage from
Hypnotic Specter and one other creature, and you want to prevent the damage from specter).
All damage from source (like protection abilities). This effect prevents all damage from any source that matches description (the description can be so precise it only works for one source, for example in Circles of Protection). If there are any points of preventable damage aiming at the object with source matching the key, all of them are prevented. Some of these effects are one-shot, some permanent.
All damage by source (like
Muzzle). Similar, but prevents damage dealt by specific source to recipients matching the key.
All combat damage (like
Fog). Applies if there are any preventable points of combat damage around, and prevents them all at once.
Damage redirection. If there are redirectable points satisfying the condition, their recipient is changed, and the effect is written into their list so it wouldn't accidentally affect them twice. Planeswalker damage redirection is special case here. Can occur in specified amount incarnation (
Harm's Way) or redirect all damage.
These are basic. Every system of damage prevention has to know how to do at least these. Then there are more complex things like Phantom creatures,
Phytohydra,
Equal Treatment,
Furnace of Rath, etc. In a system like this, there should all be possible.