From the NannyMUD documentation
2000-12-15
NAME
hit_player - attempt to do damage to a living objectLOCATION
/obj/living.cSYNTAX
int hit_player(int damage, int ignoreflag, string dam_type, object who, int ignore_ac);DESCRIPTION
This function is used to attack a living object and attempt to do damage amount of hit point damage to the living. An attack on a non-PK (player-killing) character by another interactive character will fail unless a true value is passed as a second argument. The third argument to hit_player is damage_type. See damage_types for more information on what diffrent types you can set. See also protection_and sensitivity_ . The fourth argument is the object doing the damage. The fifth argument will, if non-zero, cause the target's ac protection to be ignored. RETURN VALUES
The actual damage done to the living object is returned. Due to armour and other causes, this may be lower than the passed value.NOTE
Do not use the ignoreflag without obtaining permission from a 35++ wizard. Use of the ignoreflag is logged. Use of ignore_ac flag requires approval as well.NOTE
This function is meant for combat usage and other code which can kill the victim, such as poison, falling into pits, and the like.NOTE
Almost all combat occurs in this function. Because this may change in the future, if you redefine this function do not copy the information over. Instead use ::hit_player(damage) to pass the damage on to the living. You may wish to modify the damage beforehand depending on your purposes. See the inheritance(LPC) doc to understand the '::'.NOTE
Uses for this function include custom spells and the like.NOTE
It is rather common that you wish to create a monster that cannot be killed, but that won't be used for target practise by guilds using skills. One easy way to do so is to re-define hit_player so that it returns -1. hit_player() { return -1; }