mixed on_attack(object victim)

This event is called on weapons when they are used to attack in order to
allow them to specify their own combat behavior - such as giving the wielder
vampiric healing, guaranteeing damage, dispelling shields, severing limbs,
etc...

The event is responsible for duplicating the entire behavior of
battle::execute_melee(), by doing the following:
 - determine if a hit occurred
 - give the victim a chance to respond
 - calculate chance of critical hit if appropriate
 - practice skills and stats involved
 - set cause_of_death env var if the attack has a possibility of killing the
   victim
 - actually inflict damage to both the victim and their eq (and the weapon
   itself)

The event does not actually display any messaging, that is handled by the
combat action that initiated the event in the first place.

The value returned is an array of the form:
 ({ result type, damage, message, body part struck, item of armour struck })

- Valid result types are: "hit" and "miss" though battle actions may support
  more than these, including "parry", "dodge", "counter", "block", and
  "immune".
- Damage is an integer specifying the percentage of the target's current hp
  the attack was worth.
- Message is a string that will be appended to whatever string is generated by
  the combat action (based on result type and damage returned).
- Body part is the integer bitmask value of the body part hit (optional but
  recommended).
- Armour struck is required if body part is returned. It is a reference to
  the outermost piece of armour that the blow impacted, and may be null if
  the body part was unprotected.
