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

Documentation Area

Document Path: /doc/living/spell


Name: spell - generic spell function in a living

Syntax:
	spell(string name, int cost, object target)

Description:
	The spell function is the proper way for using spells. The spell name
	is displayed when the spell is cast, the spell cost is reduced from
	the living's spell points after the spell is cast.

	The spell will be cast in the next combat round at target, if the
	target is still present.

Return value: none

Examples:
	this_player()->spell("fire ball", 20, this_player()->query_attack());

Bugs:
	You cannot use "spell()" in monster.c, as the combat system
	will probably cough on that. Call spell() only in player objects
	to produce spontaneous unusual spells.

See also:


This page was generated in LPC

Imprint / Impressum