61 if (available_power >= 0 && power_space > 0)
62 power_grab =
MIN(power_space, 0.5*applier->
stats.
sp);
63 if (available_power < 0 && op->stats.sp > 0)
64 power_grab = -
MIN(-available_power, op->
stats.
sp);
66 applier->
stats.
sp -= power_grab;
void register_describe(int ob_type, describe_func method)
void esrv_update_item(int flags, object *pl, object *op)
static method_ret power_crystal_type_apply(ob_methods *context, object *op, object *applier, int aflags)
void common_ob_describe(const ob_methods *context, const object *op, const object *observer, char *buf, size_t size)
void register_apply(int ob_type, apply_func method)
void update_ob_speed(object *op)
void init_type_power_crystal(void)