Crossfire Server, Trunk
|
#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
Go to the source code of this file.
Functions | |
method_ret | common_trap_type_move_on (object *trap, object *victim, object *originator) |
method_ret | common_trap_type_process (object *op) |
Common code for traps and runes.
Definition in file common_trap.cpp.
method_ret common_trap_type_move_on | ( | object * | trap, |
object * | victim, | ||
object * | originator | ||
) |
Move on this Rune or Trap object.
trap | The rune or trap we're moving on |
victim | The object moving over this one |
originator | The object that caused the move_on event |
Definition at line 40 of file common_trap.cpp.
References common_post_ob_move_on(), common_pre_ob_move_on(), FLAG_ALIVE, object::level, METHOD_ERROR, METHOD_OK, QUERY_FLAG, spring_trap(), and sword_of_souls::victim.
Referenced by init_type_rune(), and init_type_trap().
method_ret common_trap_type_process | ( | object * | op | ) |
Processes a Rune or Trap. Comments on runes (and traps): rune->level : level at which rune will cast its spell. rune->hp : number of detonations before rune goes away rune->msg : message the rune displays when it goes off rune->direction : direction it will cast a spell in rune->dam : damage the rune will do if it doesn't cast spells rune->attacktype: type of damage it does, if not casting spells rune->other_arch: spell in the rune rune->Cha : how hidden the rune is rune->maxhp : number of spells the rune casts
op | The rune or trap to process |
Definition at line 64 of file common_trap.cpp.
References MAX, METHOD_OK, object_update(), give::op, rndm(), and UP_OBJ_FACE.
Referenced by init_type_rune(), and init_type_trap().