Crossfire Server, Branches 1.12
R18729
|
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) |
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.
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().
|
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.
context | The method context |
op | The power crystal to apply |
applier | The object applying the crystal |
aflags | Special flags (always apply/unapply) |
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().