Crossfire Server, Trunk
living.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  living
 

Macros

#define MAXLEVEL   115
 

Enumerations

enum  {
  STRENGTH = 0, DEXTERITY = 1, CONSTITUTION = 2, WISDOM = 3,
  CHARISMA = 4, INTELLIGENCE = 5, POWER = 6, NUM_STATS = 7
}
 

Functions

int get_cha_bonus (int stat)
 
int get_cleric_chance (int stat)
 
int get_dam_bonus (int stat)
 
int get_dex_bonus (int stat)
 
int get_fear_bonus (int stat)
 
int get_learn_spell (int stat)
 
float get_speed_bonus (int stat)
 
int get_thaco_bonus (int stat)
 
int get_turn_bonus (int stat)
 
uint32_t get_weight_limit (int stat)
 

Variables

const char *const attacks [NROFATTACKS]
 
const char *const drain_msg [NUM_STATS]
 
const char *const lose_msg [NUM_STATS]
 
const char *const restore_msg [NUM_STATS]
 
const char *const short_stat_name [NUM_STATS]
 
const char *const statname [NUM_STATS]
 

Detailed Description

Structure containing object statistics.

Definition in file living.h.

Macro Definition Documentation

◆ MAXLEVEL

#define MAXLEVEL   115

Maximum level a player can reach.

Definition at line 22 of file living.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Object statistics.

Enumerator
STRENGTH 
DEXTERITY 
CONSTITUTION 
WISDOM 
CHARISMA 
INTELLIGENCE 
POWER 
NUM_STATS 

Number of statistics.

Definition at line 10 of file living.h.

Function Documentation

◆ get_cha_bonus()

int get_cha_bonus ( int  stat)

Definition at line 2350 of file living.cpp.

References get_index(), int_bonuses, INT_CHA_BONUS, Settings::max_stat, and settings.

+ Here is the call graph for this function:

◆ get_cleric_chance()

int get_cleric_chance ( int  stat)

Definition at line 2370 of file living.cpp.

References get_index(), int_bonuses, INT_CLERIC_CHANCE, Settings::max_stat, and settings.

Referenced by cast_spell().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_dam_bonus()

int get_dam_bonus ( int  stat)

Definition at line 2378 of file living.cpp.

References get_index(), int_bonuses, INT_DAM_BONUS, Settings::max_stat, and settings.

Referenced by do_throw(), fire_bow(), and fix_player().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_dex_bonus()

int get_dex_bonus ( int  stat)

Definition at line 2354 of file living.cpp.

References get_index(), int_bonuses, INT_DEX_BONUS, Settings::max_stat, and settings.

Referenced by do_throw(), fire_bow(), and fix_player().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_fear_bonus()

int get_fear_bonus ( int  stat)

Definition at line 2386 of file living.cpp.

References get_index(), int_bonuses, INT_FEAR_BONUS, Settings::max_stat, and settings.

Referenced by cast_cone().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_learn_spell()

int get_learn_spell ( int  stat)

Definition at line 2366 of file living.cpp.

References get_index(), int_bonuses, INT_LEARN_SPELL, Settings::max_stat, and settings.

Referenced by learn_skill(), and spellbook_type_apply().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_speed_bonus()

float get_speed_bonus ( int  stat)

Definition at line 2382 of file living.cpp.

References float_bonuses, FLOAT_DEX_BONUS, get_index(), Settings::max_stat, and settings.

Referenced by do_throw(), and fix_player().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_thaco_bonus()

int get_thaco_bonus ( int  stat)

Definition at line 2358 of file living.cpp.

References get_index(), int_bonuses, INT_THAC0_BONUS, Settings::max_stat, and settings.

Referenced by do_throw(), fire_bow(), and fix_player().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_turn_bonus()

int get_turn_bonus ( int  stat)

Definition at line 2374 of file living.cpp.

References get_index(), int_bonuses, INT_TURN_BONUS, Settings::max_stat, and settings.

Referenced by cast_cone(), and hit_with_one_attacktype().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_weight_limit()

uint32_t get_weight_limit ( int  stat)

Definition at line 2362 of file living.cpp.

References get_index(), int_bonuses, INT_WEIGHT_LIMIT, Settings::max_stat, and settings.

Referenced by converter_type_apply(), do_harvest(), do_throw(), esrv_update_stats(), fix_player(), monster_check_pickup(), object_can_pick(), and pick_up_object().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ attacks

const char* const attacks[NROFATTACKS]

Attack type names.

Definition at line 129 of file living.cpp.

Referenced by CREScriptEngine::CREScriptEngine(), describe_attacktype(), did_make_save_item(), and set_dragon_name().

◆ drain_msg

const char* const drain_msg[NUM_STATS]

Message when a player is drained of a stat.

Definition at line 139 of file living.cpp.

Referenced by drain_specific_stat(), and kill_player_not_permadeath().

◆ lose_msg

const char* const lose_msg[NUM_STATS]

Message when a player decreases permanently a stat.

Definition at line 172 of file living.cpp.

Referenced by change_abil(), and kill_player_not_permadeath().

◆ restore_msg

const char* const restore_msg[NUM_STATS]

Message when a player has a stat restored.

Definition at line 150 of file living.cpp.

Referenced by remove_depletion().

◆ short_stat_name

const char* const short_stat_name[NUM_STATS]

Short name of stats.

Definition at line 194 of file living.cpp.

Referenced by create_player_cmd(), describe_item(), key_roll_stat(), ring_desc(), send_new_char_info(), and swap_stat().

◆ statname

const char* const statname[NUM_STATS]

Name of stats.

Definition at line 183 of file living.cpp.

Referenced by improve_weapon_stat(), and perceive_self().