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 recall_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

◆ age

s16b age

◆ au

s32b au

◆ au_birth

s32b au_birth

◆ body

struct player_body body

◆ cave

struct chunk* cave

◆ chp

s16b chp

◆ chp_frac

u16b chp_frac

◆ class

const struct player_class* class

◆ confusing

byte confusing

◆ csp

s16b csp

◆ csp_frac

u16b csp_frac

◆ deep_descent

s16b deep_descent

◆ depth

s16b depth

Referenced by acquirement(), build_score(), calc_torch(), cave_generate(), cavern_gen(), choose_profile(), chunk_find_adjacent(), 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_join_info(), 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_create_mimicked_object(), mon_restrict(), mon_select(), monster_list_entry_line_color(), moria_gen(), on_new_level(), pick_trap(), place_friends(), place_new_monster_one(), play_ambient_sound(), player_update_light(), poly_race(), prepare_next_level(), 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().

◆ died_from

char died_from[80]

◆ energy

s16b energy

◆ exp

s32b exp

◆ exp_frac

u16b exp_frac

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

◆ expfact

byte expfact

◆ food

s16b food

◆ full_name

char full_name[PLAYER_NAME_LEN]

◆ gear

struct object* gear

◆ gear_k

struct object* gear_k

◆ hist

struct player_history hist

◆ history

char* history

◆ hitdie

byte hitdie

◆ ht

s16b ht

◆ ht_birth

s16b ht_birth

◆ is_dead

bool is_dead

◆ known_state

struct player_state known_state

◆ lev

s16b lev

◆ max_depth

s16b max_depth

◆ max_exp

s32b max_exp

◆ max_lev

s16b max_lev

◆ mhp

s16b mhp

◆ msp

s16b msp

◆ noscore

u16b noscore

◆ obj_k

struct object* obj_k

◆ opts

struct player_options opts

◆ player_hp

s16b player_hp[PY_MAX_LEVEL]

◆ px

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(), findpath(), get_debug_command(), get_move(), get_move_advance(), get_move_find_hiding(), get_move_find_safety(), 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_near_permwall(), monster_swap(), move_player(), new_player_spot(), 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(), prepare_next_level(), process_player_cleanup(), project_touch(), prt_dtrap(), ranged_helper(), refill_lamp(), run_init(), run_step(), run_test(), rune_autoinscribe(), sanitize_player_loc(), 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().

◆ py

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(), findpath(), get_debug_command(), get_move(), get_move_advance(), get_move_find_hiding(), get_move_find_safety(), 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_near_permwall(), monster_swap(), move_player(), new_player_spot(), 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(), prepare_next_level(), process_player_cleanup(), project_touch(), prt_dtrap(), ranged_helper(), refill_lamp(), run_init(), run_step(), run_test(), rune_autoinscribe(), sanitize_player_loc(), 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().

◆ quests

struct quest* quests

◆ race

const struct player_race* race

◆ recall_depth

s16b recall_depth

◆ resting_turn

u32b resting_turn

◆ searching

byte searching

◆ spell_flags

byte* spell_flags

◆ spell_order

byte* spell_order

◆ stat_birth

s16b stat_birth[STAT_MAX]

◆ stat_cur

s16b stat_cur[STAT_MAX]

◆ stat_map

s16b stat_map[STAT_MAX]

◆ stat_max

s16b stat_max[STAT_MAX]

◆ state

struct player_state state

◆ timed

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(), teardown_tests(), textui_process_click(), update_mon(), update_view(), and wr_player().

◆ total_energy

u32b total_energy

◆ total_winner

u16b total_winner

◆ unignoring

byte unignoring

◆ upkeep

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(), 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_run(), 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_RUBBLE(), 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(), light_room(), 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(), monster_turn_can_move(), 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(), object_lists_check_integrity(), on_new_level(), pack_overflow(), place_new_monster_one(), 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_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(), teardown_tests(), 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().

◆ wizard

bool wizard

◆ word_recall

s16b word_recall

◆ wt

s16b wt

◆ wt_birth

s16b wt_birth

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