Crossfire Server, Branch 1.12
R12190
|
The implementation of the Potion class of objects. More...
#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) |
Initializer for the potion object type. | |
static method_ret | potion_type_apply (ob_methods *context, object *potion, object *applier, int aflags) |
Handles applying a potion. |
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 method_ret potion_type_apply | ( | ob_methods * | context, |
object * | potion, | ||
object * | applier, | ||
int | aflags | ||
) | [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 AT_DEPLETE, AT_GODPOWER, cast_spell(), change_abil(), CLEAR_FLAG, create_archetype(), decrease_ob, drain_stat(), draw_ext_info(), EXPLODING_FIREBALL, find_archetype(), fix_object(), FLAG_APPLIED, FLAG_CURSED, FLAG_DAMNED, FLAG_IDENTIFIED, FLAG_REMOVED, FORCE_NAME, free_object(), get_attr_value(), handle_apply_yield(), identify(), insert_ob_in_map(), insert_ob_in_ob(), llevError, LOG(), 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(), restore_msg, and SET_FLAG.
Referenced by init_type_potion().