Crossfire Server, Branches 1.12  R18729
common_trap.c 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.c:

Go to the source code of this file.

Functions

method_ret common_trap_type_move_on (ob_methods *context, object *trap, object *victim, object *originator)
 
method_ret common_trap_type_process (ob_methods *context, object *op)
 

Detailed Description

Common code for traps and runes.

Definition in file common_trap.c.

Function Documentation

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

Move on this Rune or Trap object.

Parameters
contextThe method context
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 41 of file common_trap.c.

References common_post_ob_move_on(), common_pre_ob_move_on(), FLAG_ALIVE, obj::level, METHOD_ERROR, METHOD_OK, QUERY_FLAG, and spring_trap().

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:

method_ret common_trap_type_process ( ob_methods context,
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
contextThe method context
opThe rune or trap to process
Returns
Always METHOD_OK

Definition at line 66 of file common_trap.c.

References liv::Cha, obj::invisible, obj::level, MAX, METHOD_OK, rndm(), obj::speed_left, obj::stats, UP_OBJ_FACE, and update_object().

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: