Crossfire Server, Branches 1.12
R18729
|
#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
Go to the source code of this file.
Functions | |
void | init_type_potion (void) |
static method_ret | potion_type_apply (ob_methods *context, object *potion, object *applier, int aflags) |
The implementation of the Potion class of objects.
Definition in file potion.c.
void init_type_potion | ( | void | ) |
Initializer for the potion object type.
Definition at line 38 of file potion.c.
References POTION, potion_type_apply(), and register_apply().
Referenced by register_all_ob_types().
|
static |
Handles applying a potion.
context | The method context |
potion | The potion to apply |
applier | The object attempting to apply the potion |
aflags | Special flags (always apply/unapply) |
Definition at line 50 of file potion.c.
References ARCH_DEPLETION, AT_DEPLETE, AT_GODPOWER, obj::attacktype, cast_spell(), change_abil(), CLEAR_FLAG, obj::contr, create_archetype(), obj::dam_modifier, decrease_ob, drain_stat(), draw_ext_info(), EXPLODING_FIREBALL, obj::facing, find_archetype(), fix_object(), FLAG_APPLIED, FLAG_CURSED, FLAG_DAMNED, FLAG_IDENTIFIED, FLAG_REMOVED, liv::food, FORCE_NAME, free_object(), get_attr_value(), handle_apply_yield(), identify(), insert_ob_in_map(), insert_ob_in_ob(), obj::inv, obj::level, pl::levgrace, pl::levhp, pl::levsp, llevError, LOG(), obj::map, liv::maxhp, METHOD_ERROR, METHOD_OK, MIN, MSG_TYPE_APPLY, MSG_TYPE_APPLY_CURSED, MSG_TYPE_APPLY_FAILURE, MSG_TYPE_APPLY_SUCCESS, MSG_TYPE_ATTRIBUTE, MSG_TYPE_ATTRIBUTE_STAT_GAIN, NDI_UNIQUE, NROFATTACKS, NUM_STATS, PLAYER, POTION_EFFECT, PREFER_LOW, present_arch_in_ob(), QUERY_FLAG, random_roll(), remove_ob(), obj::resist, restore_msg, SET_FLAG, obj::speed_left, obj::stats, obj::type, obj::value, obj::x, and obj::y.
Referenced by init_type_potion().