Angband
Data Fields
player Struct Reference

Most of the "player" information goes here. More...

#include <player.h>

Data Fields

const struct player_racerace
 
const struct player_classclass
 
s16b py
 
s16b px
 
byte hitdie
 
byte expfact
 
s16b age
 
s16b ht
 
s16b wt
 
s32b au
 
s16b max_depth
 
s16b depth
 
s16b max_lev
 
s16b lev
 
s32b max_exp
 
s32b exp
 
u16b exp_frac
 
s16b mhp
 
s16b chp
 
u16b chp_frac
 
s16b msp
 
s16b csp
 
u16b csp_frac
 
s16b stat_max [STAT_MAX]
 
s16b stat_cur [STAT_MAX]
 
s16b stat_map [STAT_MAX]
 
s16btimed
 
s16b word_recall
 
s16b deep_descent
 
s16b energy
 
u32b total_energy
 
u32b resting_turn
 
s16b food
 
byte confusing
 
byte unignoring
 
bytespell_flags
 
bytespell_order
 
byte searching
 
char full_name [PLAYER_NAME_LEN]
 
char died_from [80]
 
char * history
 
struct questquests
 
u16b total_winner
 
u16b noscore
 
bool is_dead
 
bool wizard
 
s16b player_hp [PY_MAX_LEVEL]
 
s32b au_birth
 
s16b stat_birth [STAT_MAX]
 
s16b ht_birth
 
s16b wt_birth
 
struct player_options opts
 
struct player_history hist
 
struct player_body body
 
struct objectgear
 
struct objectgear_k
 
struct objectobj_k
 
struct chunkcave
 
struct player_state state
 
struct player_state known_state
 
struct player_upkeepupkeep
 

Detailed Description

Most of the "player" information goes here.

This stucture gives us a large collection of player variables.

This entire structure is wiped when a new character is born.

This structure is more or less laid out so that the information which must be saved in the savefile precedes all the information which can be recomputed as needed.

Field Documentation

s16b age
s32b au
s32b au_birth
struct player_body body
struct chunk* cave
s16b chp
u16b chp_frac
const struct player_class* class
byte confusing
s16b csp
u16b csp_frac
s16b deep_descent
s16b depth

Referenced by acquirement(), build_score(), calc_torch(), cave_generate(), cavern_gen(), classic_gen(), death_knowledge(), display_feeling(), do_birth_reset(), do_cmd_go_down(), do_cmd_go_up(), do_cmd_lock_door(), do_cmd_tunnel_aux(), do_cmd_wiz_jump(), do_cmd_wiz_play(), dungeon_change_level(), effect_handler_ACQUIRE(), effect_handler_ALTER_REALITY(), effect_handler_CREATE_STAIRS(), effect_handler_CURSE_ARMOR(), effect_handler_CURSE_WEAPON(), effect_handler_DEEP_DESCENT(), effect_handler_DESTRUCTION(), effect_handler_EARTHQUAKE(), effect_handler_ENCHANT(), effect_handler_RECALL(), effect_handler_SUMMON(), effect_handler_TELEPORT_LEVEL(), gauntlet_gen(), get_debug_command(), get_mon_num(), get_vault_monsters(), hard_centre_gen(), history_add_with_flags(), hit_trap(), labyrinth_gen(), lair_gen(), make_artifact(), make_artifact_special(), make_gold(), melee_effect_handler_EAT_GOLD(), modified_gen(), mon_create_drop(), mon_restrict(), mon_select(), monster_list_entry_line_color(), moria_gen(), on_new_level(), pick_trap(), place_friends(), place_monster(), place_new_monster_one(), play_ambient_sound(), player_update_light(), poly_race(), print_tomb(), process_world(), project_feature_handler_DARK_WEAK(), project_feature_handler_KILL_WALL(), prt_depth(), prt_level_feeling(), rd_dungeon(), summon_specific(), test_stairs1(), test_stairs2(), town_gen(), vault_chunk(), wiz_create_item_drop_object(), wiz_create_item_object_from_kind(), wiz_reroll_item(), wiz_statistics(), wiz_test_kind(), wiz_tweak_item(), wr_description(), and wr_dungeon().

char died_from[80]
s16b energy
s32b exp
u16b exp_frac

Referenced by mon_take_hit(), rd_player(), and wr_player().

byte expfact
s16b food
char full_name[PLAYER_NAME_LEN]
struct object* gear
struct object* gear_k
struct player_history hist
char* history
byte hitdie
s16b ht
s16b ht_birth
bool is_dead
struct player_state known_state
s16b lev
s16b max_depth
s32b max_exp
s16b max_lev
s16b mhp
s16b msp
u16b noscore
struct object* obj_k
struct player_options opts
s16b player_hp[PY_MAX_LEVEL]
s16b px

Referenced by autoinscribe_ground(), build_quest_stairs(), chance_of_missile_hit(), cmp_distance(), context_menu_object(), context_menu_player(), coords_desc(), coords_to_dir(), count_chests(), count_feats(), display_map(), do_autopickup(), do_cmd_alter_aux(), do_cmd_buy(), do_cmd_close(), do_cmd_disarm(), do_cmd_go_down(), do_cmd_go_up(), do_cmd_hold(), do_cmd_jump(), do_cmd_open(), do_cmd_redraw(), do_cmd_retrieve(), do_cmd_run(), do_cmd_sell(), do_cmd_stash(), do_cmd_tunnel(), do_cmd_walk(), do_cmd_wiz_features(), do_cmd_wiz_hack_nick(), do_cmd_wiz_named(), do_cmd_wiz_query(), effect_handler_ACQUIRE(), effect_handler_BALL(), effect_handler_BIZARRE(), effect_handler_BREATH(), effect_handler_CREATE_STAIRS(), effect_handler_DARKEN_AREA(), effect_handler_DESTRUCTION(), effect_handler_DETECT_DOORS(), effect_handler_DETECT_EVIL(), effect_handler_DETECT_GOLD(), effect_handler_DETECT_INVISIBLE_MONSTERS(), effect_handler_DETECT_OBJECTS(), effect_handler_DETECT_STAIRS(), effect_handler_DETECT_TRAPS(), effect_handler_DETECT_VISIBLE_MONSTERS(), effect_handler_EARTHQUAKE(), effect_handler_LIGHT_AREA(), effect_handler_MAP_AREA(), effect_handler_RUBBLE(), effect_handler_RUNE(), effect_handler_SENSE_OBJECTS(), effect_handler_SPOT(), effect_handler_STAR(), effect_handler_STAR_BALL(), effect_handler_SUMMON(), effect_handler_SWARM(), effect_handler_TELEPORT(), effect_handler_TELEPORT_TO(), effect_handler_THRUST_AWAY(), enter_store(), fill_terrain_info(), find_hiding(), find_safety(), findpath(), get_debug_command(), get_moves(), get_moves_advance(), get_target(), hit_trap(), hp_colour_change(), ignore_drop(), inven_drop(), item_is_available(), lair_gen(), make_attack_spell(), make_noise(), melee_effect_handler_SHATTER(), monster_list_collect(), monster_swap(), move_player(), near_permwall(), no_light(), object_list_collect(), object_list_format_name(), origin_get_loc(), pack_overflow(), path_analyse(), pick_and_place_distant_monster(), place_new_monster_one(), player_know_object(), player_pickup_aux(), player_pickup_gold(), player_pickup_item(), player_place(), pre_turn_refresh(), process_player_cleanup(), project_touch(), prt_dtrap(), ranged_helper(), refill_lamp(), run_init(), run_step(), run_test(), rune_autoinscribe(), scan_floor(), search(), show_obj(), square_know_pile(), store_will_buy_tester(), target_able(), target_set_interactive(), target_set_interactive_aux(), test_drop_eat(), test_drop_pickup(), textui_get_command(), textui_get_rep_dir(), textui_process_click(), uncurse_object(), update_maps(), update_mon(), update_scent(), update_view(), use_aux(), use_store(), verify_panel_int(), wiz_create_item_drop_object(), wiz_test_kind(), and wr_dungeon().

s16b py

Referenced by autoinscribe_ground(), build_quest_stairs(), chance_of_missile_hit(), cmp_distance(), context_menu_object(), context_menu_player(), coords_desc(), coords_to_dir(), count_chests(), count_feats(), display_map(), do_autopickup(), do_cmd_alter_aux(), do_cmd_buy(), do_cmd_close(), do_cmd_disarm(), do_cmd_go_down(), do_cmd_go_up(), do_cmd_hold(), do_cmd_jump(), do_cmd_open(), do_cmd_redraw(), do_cmd_retrieve(), do_cmd_run(), do_cmd_sell(), do_cmd_stash(), do_cmd_tunnel(), do_cmd_walk(), do_cmd_wiz_features(), do_cmd_wiz_hack_nick(), do_cmd_wiz_named(), do_cmd_wiz_query(), effect_handler_ACQUIRE(), effect_handler_BALL(), effect_handler_BIZARRE(), effect_handler_BREATH(), effect_handler_CREATE_STAIRS(), effect_handler_DARKEN_AREA(), effect_handler_DESTRUCTION(), effect_handler_DETECT_DOORS(), effect_handler_DETECT_EVIL(), effect_handler_DETECT_GOLD(), effect_handler_DETECT_INVISIBLE_MONSTERS(), effect_handler_DETECT_OBJECTS(), effect_handler_DETECT_STAIRS(), effect_handler_DETECT_TRAPS(), effect_handler_DETECT_VISIBLE_MONSTERS(), effect_handler_EARTHQUAKE(), effect_handler_LIGHT_AREA(), effect_handler_MAP_AREA(), effect_handler_RUBBLE(), effect_handler_RUNE(), effect_handler_SENSE_OBJECTS(), effect_handler_SPOT(), effect_handler_STAR(), effect_handler_STAR_BALL(), effect_handler_SUMMON(), effect_handler_SWARM(), effect_handler_TELEPORT(), effect_handler_TELEPORT_TO(), effect_handler_THRUST_AWAY(), enter_store(), fill_terrain_info(), find_hiding(), find_safety(), findpath(), get_debug_command(), get_moves(), get_moves_advance(), get_target(), hit_trap(), hp_colour_change(), ignore_drop(), inven_drop(), item_is_available(), make_attack_spell(), make_noise(), melee_effect_handler_SHATTER(), monster_list_collect(), monster_swap(), move_player(), near_permwall(), no_light(), object_list_collect(), object_list_format_name(), origin_get_loc(), pack_overflow(), path_analyse(), pick_and_place_distant_monster(), place_new_monster_one(), player_know_object(), player_pickup_aux(), player_pickup_gold(), player_pickup_item(), player_place(), pre_turn_refresh(), process_player_cleanup(), project_touch(), prt_dtrap(), ranged_helper(), refill_lamp(), run_init(), run_step(), run_test(), rune_autoinscribe(), scan_floor(), search(), show_obj(), square_know_pile(), store_will_buy_tester(), target_able(), target_set_interactive(), target_set_interactive_aux(), test_drop_eat(), test_drop_pickup(), textui_get_command(), textui_get_rep_dir(), textui_process_click(), uncurse_object(), update_maps(), update_mon(), update_scent(), update_view(), use_aux(), use_store(), verify_panel_int(), wiz_create_item_drop_object(), wiz_test_kind(), and wr_dungeon().

struct quest* quests
const struct player_race* race
u32b resting_turn
byte searching
byte* spell_flags
byte* spell_order
s16b stat_birth[STAT_MAX]
s16b stat_cur[STAT_MAX]
s16b stat_map[STAT_MAX]
s16b stat_max[STAT_MAX]
struct player_state state
s16b* timed

Referenced by calc_bonuses(), cleanup_player(), context_menu_cave(), decrease_timeouts(), display_resistance_panel(), do_cmd_disarm_aux(), do_cmd_disarm_chest(), do_cmd_lock_door(), do_cmd_open_aux(), do_cmd_open_chest(), do_cmd_pathfind(), do_cmd_walk(), effect_handler_BEAM(), effect_handler_BOLT(), effect_handler_DARKEN_AREA(), effect_handler_DRAIN_LIGHT(), effect_handler_LIGHT_AREA(), effect_handler_MON_HEAL_HP(), effect_handler_MON_HEAL_KIN(), effect_handler_STAR(), effect_handler_SUMMON(), effect_handler_TIMED_DEC(), effect_handler_TIMED_INC(), effect_handler_TIMED_INC_NO_RES(), get_panel_skills(), hit_trap(), init_player(), make_attack_normal(), make_attack_spell(), map_info(), melee_effect_handler_EAT_GOLD(), melee_effect_handler_EAT_ITEM(), melee_effect_handler_PARALYZE(), monster_health_attr(), monster_list_format_special(), move_player(), player_can_cast(), player_can_read(), player_confuse_dir(), player_dec_timed(), player_inc_check(), player_inc_timed(), player_init(), player_regen_hp(), player_resting_complete_special(), player_set_timed(), player_update_light(), process_player(), process_player_cleanup(), process_world(), project(), project_feature_handler_ACID(), project_feature_handler_ARROW(), project_feature_handler_CHAOS(), project_feature_handler_COLD(), project_feature_handler_DISEN(), project_feature_handler_ELEC(), project_feature_handler_FIRE(), project_feature_handler_FORCE(), project_feature_handler_GRAVITY(), project_feature_handler_HOLY_ORB(), project_feature_handler_ICE(), project_feature_handler_INERTIA(), project_feature_handler_LIGHT_WEAK(), project_feature_handler_MANA(), project_feature_handler_METEOR(), project_feature_handler_MISSILE(), project_feature_handler_NETHER(), project_feature_handler_NEXUS(), project_feature_handler_PLASMA(), project_feature_handler_POIS(), project_feature_handler_SHARD(), project_feature_handler_SOUND(), project_feature_handler_TIME(), project_feature_handler_WATER(), project_p(), prt_cut(), prt_health(), prt_stun(), prt_tmd(), rd_player(), run_step(), search(), see_floor_items(), set_cut(), set_stun(), show_speed(), spell_chance(), take_hit(), target_able(), target_accept(), target_set_interactive_aux(), textui_process_click(), update_mon(), update_view(), and wr_player().

u32b total_energy
u16b total_winner
byte unignoring
struct player_upkeep* upkeep

Referenced by add_monster_message(), adjust_level(), become_aware(), bell_message(), blow_color(), brand_object(), build_obj_list(), build_quest_stairs(), calc_bonuses(), calc_hitpoints(), calc_mana(), calc_spells(), calc_torch(), cave_generate(), cave_illuminate(), cave_light(), cave_unlight(), check_for_player_interrupt(), cleanup_player(), cmd_cancel_repeat(), cmd_set_repeat(), combine_pack(), compact_monsters_aux(), context_menu_player_display_floor(), death_info(), death_knowledge(), delete_monster_idx(), desc_obj_fake(), display_bolt(), display_explosion(), display_missile(), display_player(), disturb(), do_animation(), do_cmd_accept_character(), do_cmd_alter_aux(), do_cmd_autoinscribe(), do_cmd_autopickup(), do_cmd_buy(), do_cmd_cast(), do_cmd_close(), do_cmd_close_aux(), do_cmd_disarm(), do_cmd_drop(), do_cmd_equip(), do_cmd_fire_at_nearest(), do_cmd_go_down(), do_cmd_go_up(), do_cmd_hold(), do_cmd_inscribe(), do_cmd_inven(), do_cmd_jump(), do_cmd_open(), do_cmd_open_aux(), do_cmd_open_chest(), do_cmd_options_item(), do_cmd_pathfind(), do_cmd_pickup(), do_cmd_query_symbol(), do_cmd_quiver(), do_cmd_redraw(), do_cmd_refill(), do_cmd_rerate(), do_cmd_rest(), do_cmd_sell(), do_cmd_sleep(), do_cmd_study_book(), do_cmd_study_spell(), do_cmd_takeoff(), do_cmd_tunnel(), do_cmd_uninscribe(), do_cmd_walk(), do_cmd_wiz_advance(), do_cmd_wiz_play(), do_cmd_wiz_zap(), do_cmd_wizard(), dungeon_change_level(), effect_handler_BANISH(), effect_handler_CURSE_ARMOR(), effect_handler_CURSE_WEAPON(), effect_handler_DEEP_DESCENT(), effect_handler_DESTRUCTION(), effect_handler_DETECT_EVIL(), effect_handler_DETECT_INVISIBLE_MONSTERS(), effect_handler_DETECT_OBJECTS(), effect_handler_DETECT_VISIBLE_MONSTERS(), effect_handler_DISENCHANT(), effect_handler_DRAIN_LIGHT(), effect_handler_DRAIN_MANA(), effect_handler_EARTHQUAKE(), effect_handler_HEAL_HP(), effect_handler_MAP_AREA(), effect_handler_MASS_BANISH(), effect_handler_MON_HEAL_HP(), effect_handler_MON_HEAL_KIN(), effect_handler_RECALL(), effect_handler_RECHARGE(), effect_handler_RESTORE_MANA(), effect_handler_RESTORE_STAT(), effect_handler_SENSE_OBJECTS(), ego_ignore(), ego_ignore_clear(), ego_ignore_toggle(), enchant(), floor_object_for_use(), gear_excise_object(), gear_object_for_use(), gear_to_label(), get_bonuses(), get_debug_command(), get_item_action(), get_panel_midleft(), get_tag(), handle_signal_simple(), handle_stuff(), ignore_drop(), ignore_sval_menu_action(), init_player(), inven_carry(), inven_carry_num(), inven_damage(), inven_takeoff(), inven_wield(), item_menu(), item_menu_browser(), kind_ignore_clear(), kind_ignore_when_aware(), kind_ignore_when_unaware(), labyrinth_gen(), leave_store(), lore_do_probe(), lore_treasure(), make_attack_normal(), melee_effect_handler_DRAIN_CHARGES(), melee_effect_handler_EAT_FOOD(), melee_effect_handler_EAT_GOLD(), melee_effect_handler_EAT_ITEM(), menu_header(), minus_ac(), modify_panel(), mon_lore(), mon_set_timed(), mon_take_hit(), monster_death(), monster_health_attr(), monster_swap(), move_player(), new_level_display_update(), new_player_spot(), notice_stuff(), o_xtra_act(), object_curses_find_flags(), object_curses_find_modifiers(), object_delete(), object_flavor_aware(), object_is_in_quiver(), object_learn_on_use(), object_learn_on_wield(), on_new_level(), pack_overflow(), play_game(), player_book_has_unlearned_spells(), player_can_study(), player_init(), player_is_resting(), player_outfit(), player_pickup_aux(), player_pickup_gold(), player_place(), player_regen_hp(), player_regen_mana(), player_resting_can_regenerate(), player_resting_complete_special(), player_resting_count(), player_resting_set_count(), player_resting_step_turn(), player_restore_mana(), player_set_food(), player_set_timed(), player_stat_dec(), player_stat_inc(), player_update_light(), pre_turn_refresh(), process_command(), process_monster_can_move(), process_monsters(), process_player(), process_player_cleanup(), project(), project_feature_handler_DARK_WEAK(), project_feature_handler_KILL_DOOR(), project_feature_handler_KILL_WALL(), project_feature_handler_LIGHT_WEAK(), project_feature_handler_MAKE_DOOR(), project_m(), project_m_monster_attack(), project_monster_handler_MON_HEAL(), prt_health(), prt_study(), py_attack(), py_attack_real(), quest_check(), quiver_absorb_num(), ranged_helper(), rd_gear(), rd_gear_aux(), recharge_objects(), redraw_stuff(), refill_lamp(), regen_monster(), run_game_loop(), run_init(), run_step(), rune_xtra_act(), savefile_load(), scan_items(), screen_save(), set_cut(), set_stun(), show_equip(), show_inven(), show_obj_list(), show_quiver(), spell_cast(), spell_learn(), square_light_spot(), start_game(), store_sell(), take_hit(), target_set_closest(), target_set_interactive(), target_set_interactive_aux(), test_blows(), test_drop_eat(), test_drop_pickup(), test_effects(), textui_cmd_ignore_menu(), textui_cmd_toggle_ignore(), textui_get_item(), textui_get_spell_from_book(), textui_obj_examine(), textui_process_click(), textui_quit(), textui_spell_browse(), twall(), ui_enter_world(), uncurse_object(), update_bonuses(), update_inventory(), update_maps(), update_minimap_subwindow(), update_mon(), update_monster_subwindow(), update_object_subwindow(), update_one(), update_stuff(), use_aux(), use_store(), verify_panel_int(), weight_remaining(), wield_all(), wipe_mon_list(), wiz_create_item(), wiz_light(), wiz_quantity_item(), wiz_reroll_item(), and write_character_dump().

bool wizard
s16b word_recall
s16b wt
s16b wt_birth

The documentation for this struct was generated from the following file: