A
          / \      _             Play Now                         Nemesis on fb
          | |     | |  _______   _        _   _______    _______   _    _______
          | |\    | | |   ____| |  \    /  | |   ____|  /   ____| | |  /   ____|
 /-------/-------------------------------------------------------------------,
O= Home <=XX|  About  News  Pics  Adventurers  Wizards  Download  Connect     >
 \-------\-------------------------------------------------------------------'
          | |   \   | |  |____  | |      | | |  |____   ___ \  \  | |  ___ \  \
          | |     \_| |_______| |_|      |_| |_______| |_______/  |_| |_______/
          \ /
           V  

Documentation Area

Document Path: /doc/living/hit_player


Name: hit_player - do damage to a living

Syntax:
	int hit_player(int dam)

Description:
	The hit_player call afflicts damage on a living, like it is done in a
	battle. The damage is normally reduced from the current hit points of
	the living.

	If this function is called on another living as the current player,
	a battle starts.

	If the damage inflicted is greater than the current hit points of the
	living and if the living is no wizard, it dies.

	The dam argument must be greater than zero.

	The living and its surrounding should be informed about the damage
	inflicted using the efuns write and say.

Return value:
	Hit_player returns the actually afflicted damage. A living cannot get
	more damage than it has hit points.

Examples:
	this_player()->hit_player(10);

See also:


This page was generated in LPC

Imprint / Impressum