Crossfire Server, Trunk
common_trap.cpp File Reference
#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
+ Include dependency graph for common_trap.cpp:

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)
 

Detailed Description

Common code for traps and runes.

Definition in file common_trap.cpp.

Function Documentation

◆ common_trap_type_move_on()

method_ret common_trap_type_move_on ( object trap,
object victim,
object originator 
)

Move on this Rune or Trap object.

Parameters
trapThe rune or trap we're moving on
victimThe object moving over this one
originatorThe object that caused the move_on event
Returns
METHOD_OK

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ common_trap_type_process()

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

Parameters
opThe rune or trap to process
Returns
Always METHOD_OK

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: