Add a parameter to mdefense to differentiate range and melee attacks.

Allows the shocker to shock only when attacked by a melee attack.