Crossfire Server, Branches 1.12  R18729
power_crystal.c File Reference
#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sproto.h>
+ Include dependency graph for power_crystal.c:

Go to the source code of this file.

Functions

void init_type_power_crystal (void)
 
static method_ret power_crystal_type_apply (ob_methods *context, object *op, object *applier, int aflags)
 

Detailed Description

The implementation of a Power Crystal. A Power Crystal can store mana from a player, and give it back when needed.

Definition in file power_crystal.c.

Function Documentation

void init_type_power_crystal ( void  )

Initializer for the POWER_CRYSTAL object type.

Definition at line 37 of file power_crystal.c.

References common_ob_describe(), POWER_CRYSTAL, power_crystal_type_apply(), register_apply(), and register_describe().

Referenced by register_all_ob_types().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static method_ret power_crystal_type_apply ( ob_methods context,
object op,
object applier,
int  aflags 
)
static

This function handles the application of power crystals. Power crystals, when applied, either suck power from the applier, if he's at full spellpoints, or gives him power, if it's got spellpoins stored.

Parameters
contextThe method context
opThe power crystal to apply
applierThe object applying the crystal
aflagsSpecial flags (always apply/unapply)
Returns
The return value is always METHOD_OK

Definition at line 53 of file power_crystal.c.

References esrv_update_item(), liv::maxsp, METHOD_OK, MIN, PLAYER, liv::sp, obj::speed, obj::stats, obj::type, UPD_ANIMSPEED, and update_ob_speed().

Referenced by init_type_power_crystal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: