Crossfire Server, Branches 1.12
R18729
|
Go to the source code of this file.
Macros | |
#define | FALSE 0 |
#define | TRUE 1 |
Functions | |
void | dump_experience (void) |
void | free_experience (void) |
int | has_ability (const object *ob) |
void | init_experience (void) |
sint64 | new_exp (const object *ob) |
Variables | |
static const float | exp_att_mult [NROFATTACKS+2] |
static const float | exp_prot_mult [NROFATTACKS+2] |
sint64 * | levels |
Experience management. reading data from files and such.
Definition in file exp.c.
#define FALSE 0 |
Definition at line 42 of file exp.c.
Referenced by command_abil(), command_addexp(), command_create(), command_explore(), command_patch(), command_search_items(), command_title(), compare_ob_value_lists_one(), convert_item(), did_make_save_item(), has_ability(), is_valid_faceset(), load_settings(), map_info(), metaserver2_init(), new_exp(), parse_dialog_information(), pay_for_item(), pick_up_object(), set_ob_key_value(), set_ob_key_value_s(), set_object_face_main(), set_object_face_other(), and spell_failure().
#define TRUE 1 |
Definition at line 41 of file exp.c.
Referenced by attack_ob_simple(), cast_spell(), check_login(), check_pick(), clean_tmp_files(), command_nowiz(), compare_ob_value_lists_one(), did_make_save_item(), fix_object(), flush_old_maps(), god_enchants_weapon(), god_gives_present(), has_ability(), is_valid_faceset(), key_confirm_quit(), kill_player(), load_settings(), LOG(), metaserver2_init(), parse_dialog_information(), process_events(), process_players1(), rangetostring(), save_player(), scroll_failure(), scroll_type_apply(), set_ob_key_value(), set_ob_key_value_s(), set_object_face_main(), set_object_face_other(), SP_level_spellpoint_cost(), spellbook_type_apply(), and swap_map().
void dump_experience | ( | void | ) |
void free_experience | ( | void | ) |
Frees experience-related memory.
Definition at line 269 of file exp.c.
References FREE_AND_CLEAR, and levels.
Referenced by free_globals().
int has_ability | ( | const object * | ob | ) |
Checks whether object has innate abilities (spell/spellbook in inventory).
Definition at line 151 of file exp.c.
References obj::below, FALSE, obj::inv, SPELL, SPELLBOOK, TRUE, and obj::type.
Referenced by new_exp().
void init_experience | ( | void | ) |
This loads the experience table from the exp_table file. This tends to exit on any errors, since it populates the table as it goes along, so if there are errors, the table is likely in an inconsistent state.
Definition at line 170 of file exp.c.
References close_and_delete(), Settings::confdir, levels, llevDebug, llevError, LOG(), MAX_BUF, Settings::max_level, open_and_uncompress(), settings, snprintf(), and strncasecmp().
Referenced by init_library().
sint64 new_exp | ( | const object * | ob | ) |
Alternative way to calculate experience based on the ability of a monster.
It's far from perfect, and doesn't consider everything which can be considered, thus it's only used in debugging. this is only used with one of the dumpflags, and not anyplace in the code.
ob | object for which to return experience |
Definition at line 104 of file exp.c.
References liv::ac, obj::attacktype, liv::Con, liv::dam, exp_att_mult, exp_prot_mult, FABS, FALSE, FLAG_CAST_SPELL, FLAG_HITBACK, FLAG_NO_MAGIC, FLAG_REFL_MISSILE, FLAG_REFL_SPELL, FLAG_SEE_INVISIBLE, FLAG_SPLITTING, FLAG_STAND_STILL, FLAG_USE_BOW, FLAG_USE_RANGE, FLAG_USE_SCROLL, has_ability(), MAX, liv::maxhp, liv::maxsp, MIN, NROFATTACKS, QUERY_FLAG, obj::resist, obj::speed, obj::stats, and liv::wc.
Referenced by print_monsters().
|
static |
|
static |
sint64* levels |
Number of levels for which we have experience.
Definition at line 39 of file exp.c.
Referenced by add_player_exp(), apply_death_exp_penalty(), dump_experience(), free_experience(), init_experience(), level_exp(), and send_exp_table().