Crossfire Server, Trunk
|
#include "global.h"
#include <string.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 (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 33 of file potion.c.
References POTION, potion_type_apply(), and register_apply().
Referenced by register_all_ob_types().
|
static |
Handles applying a potion, dust, balm, or figurine.
potion | The potion to apply |
applier | The object attempting to apply the potion |
aflags | Special flags (always apply/unapply) |
Definition at line 44 of file potion.c.
References add_string(), apply_handle_yield(), arch_to_object(), AT_DEPLETE, AT_GODPOWER, obj::attacktype, cast_spell(), change_abil(), change_resist_msg, CLEAR_FLAG, obj::contr, create_archetype(), obj::dam_modifier, drain_stat(), draw_ext_info(), draw_ext_info_format(), EXPLODING_FIREBALL, obj::facing, fix_object(), FLAG_APPLIED, FLAG_CURSED, FLAG_DAMNED, FLAG_IDENTIFIED, FLAG_REMOVED, dragon_attune::force, FORCE_NAME, free_string(), identify(), INS_ON_TOP, obj::inv, obj::level, pl::levgrace, pl::levhp, pl::levsp, obj::map, MAX_BUF, liv::maxhp, METHOD_OK, MIN, MOVE_PER_SECOND, MSG_TYPE_APPLY, MSG_TYPE_APPLY_CURSED, MSG_TYPE_APPLY_FAILURE, MSG_TYPE_APPLY_SUCCESS, give::name, obj::name, NDI_RED, NDI_UNIQUE, NROFATTACKS, object_decrease_nrof_by_one, object_insert_in_map_at(), object_insert_in_ob(), obj::other_arch, play_sound_map(), PLAYER, POTION_RESIST_EFFECT, PREFER_LOW, QUERY_FLAG, random_roll(), remove_depletion(), obj::resist, SET_FLAG, SOUND_TYPE_ITEM, obj::stats, store_spell_expiry(), obj::type, obj::value, nlohmann::detail::void(), obj::x, and obj::y.
Referenced by init_type_potion().