Crossfire Server, Branch 1.12  R12190
Functions
common_trap.c File Reference

Common code for traps and runes. More...

#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)
 Move on this Rune or Trap object.
method_ret common_trap_type_process (ob_methods *context, object *op)
 Processes a Rune or Trap.

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, 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 MAX, METHOD_OK, rndm(), 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: