hit_player

Format: hit_player(int dam[,int kind[,mixed *elem]])

Example: hit_player(10) | hit_player(40, 5, ({ 2, 12 }) )

See also: reduce_hit_point.

This function is called from other players when they want to make damage to 
us. We return how much damage we received, which will change the attackers 
score. This routine is probably called from heart_beat() from another player.
The second argument is not necessary, and determines the kind of the strike. 

kind: damage-kind 
 0 .. AC  (eg normal hit),
 1 .. str (some spells eg. 'entangle'),
 2 .. dex (eg. falls or certain traps),
 3 .. con (eg. poisons),
 4 .. int (some spells eg. illusion or charm),
 5 .. wis (attack spells, traps ...),
 6 .. chr (*shrug* maybe backstab?),
 7 .. undefined damage(no resistance!)

elem: damage-element .. eg ({ 2, 12 }) for electric/magic == lightning spell
 0  .. undefined	1  .. heat	2  .. electric	3  .. cold
 4  .. acid		5  .. energy	6  .. drain	7  .. touch
 8  .. petrify		9  .. poison	10 .. breath 	11 .. deathmagic
 12 .. magic		13 .. pierce 	14 .. slash 	15 .. crush

the elem variable is good for use in shadows (eg. Prot from Fire Spell)

See also efun/enable_commands, efun/living, lfun/attacked_by.
