This adds restricted classes and status effects support to splash, melee and death damage.
Status effects were introduced in rP22304/D1252, but support for other attack types than ranged was not implemented. (I guess the code for that could/should(?) just be moved to cause damage, so there is less duplication and scripts causing damage can also use status effects?)
Restricted classes were introduced in rP11710, where it was used to determine whether an entity can attack another entity. In the related ticket #1144, it was stated (first comment, by non-team member) that although a unit is not allowed to attack a specific entity, it *should* be able to damage it. In the light of D1971, this could pose problems (archers not allowed to attack walls, so using attack ground on wall's position).
As a consequencHere the code for is moved to cause damage, the addiso there is less duplication of restricted classes toand any script causing damage ought to be discussedcan also use status effects.