Crossfire Server, Branch 1.12  R12190
Functions
potion.c File Reference

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>
Include dependency graph for potion.c:

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.

Detailed Description

The implementation of the Potion class of objects.

Definition in file potion.c.


Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

static method_ret potion_type_apply ( ob_methods context,
object *  potion,
object *  applier,
int  aflags 
) [static]

Handles applying a potion.

Parameters:
contextThe method context
potionThe potion to apply
applierThe object attempting to apply the potion
aflagsSpecial flags (always apply/unapply)
Returns:
METHOD_OK unless failure for some reason.

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().

Here is the call graph for this function:

Here is the caller graph for this function: