set_hp

foundationI_fluffos_v1/lib/doc/lfun/set_hp · 563 B

From the archive foundation1_fluffos_v1.zip

Download the archive   « Back to the archive contents

Nightmare mudlib living lfun: set_hp()

void set_hp(int hp)

Basically, this sets the hit points of a living object to "hp".  There are a 
few side effects in certain cases.  If "max_hp" is 0 then this sets the
maximum hit points to "hp" also.  If "hp" is greater than "max_hp" and the
living object is a player, then "hp" is set to "max_hp".  If "hp" is greater
than "max_hp" and the living object is not a player, then the hit points
and the maximum hit points are both set to "hp".

See also: query_max_hp(), add_hp(), query_hp()
Defined in /std/living/body.c

Site Stats

Snippets: 1791
Codebases: 571