#include <player.h>
Definition at line 65 of file player.h.
Data Fields | |
| sshort | x |
| sshort | y |
| sshort | class |
| Player class (fighter, wizard, etc). | |
| sshort | hps |
| Current hit points. (If zero, die). | |
| sshort | hps_max |
| Max. hit points. | |
| sshort | hps_max_mod |
| How much max HPs have been modified by. | |
| sshort | pps |
| Power points (spellcasting power). | |
| sshort | pps_max |
| Max. power points (spellcasting power). | |
| sshort | pps_max_mod |
| Modifier to max. power points. | |
| ushort | partialhps |
| Fractional hit points. | |
| ushort | partialpps |
| Fractional power points. | |
| ushort | level |
| Player level. | |
| schar | facing_forced |
| schar | facing |
| Force-facing direction (zapping, shooting). | |
| ushort | velocity |
| Last movement direction. | |
| stat_timer | stat_timers [NUM_STATMOD_TIMERS] |
| sshort | intrinsic [NUM_STATS] |
| Base stats. | |
| sshort | extrinsic [NUM_STATS] |
| Stats after equipment modifiers. | |
| sshort | maximum [NUM_STATS] |
| Highest value a stat's ever taken. | |
| ushort | skill [NUM_SKILLS+1] |
| Weapon skills. | |
| ushort | skill_marks [NUM_SKILLS+1] |
| Weapon skill marks. | |
| ulong | xp |
| slong | satiation |
| Number of turns until starvation. | |
| ulong | debt |
| (Unused) money owed to a shopkeeper | |
| item | inventory [PLRINVSIZE] |
| Carried items. | |
| slong * | spellknowledge |
| Turns on which spells will be forgotten. | |
| ulong | score |
| The score so far. | |
|
|
Player class (fighter, wizard, etc).
Definition at line 70 of file player.h. Referenced by char_info(), deref_jump_table(), distribute_attributes(), init_player(), init_skills(), marks_to_advance(), study_book(), and study_spell(). |
|
|
(Unused) money owed to a shopkeeper
Definition at line 148 of file player.h. Referenced by init_player(). |
|
|
Stats after equipment modifiers. Calculated from update_player based on intrinsics and worn equipment. All of the player's stats are included; to access a stat, use the corresponding index into this array. For example, strength is w->plr.extrinsic[STAT_STRENGTH]. Definition at line 135 of file player.h. Referenced by apply_stat_mod_desc(), award_mark(), calc_light_tile(), cast_spell(), char_info(), draw(), draw_tile(), init_player(), init_skills(), mod_from_attribute(), monst_attack_plr(), monst_attack_type(), monst_hit_plr(), monstname(), player_can_see(), plr_attack(), plr_move(), plr_run(), plr_takedamage(), plr_walk(), spell_confusion(), study_spell(), throw_item(), timepass(), update_player(), weapon_skill_attack(), weapon_skill_damage(), and webspinner_cower(). |
|
|
Force-facing direction (zapping, shooting).
Definition at line 116 of file player.h. Referenced by init_player(), player_facing(), plr_walk(), and prompt_dir(). |
|
|
Definition at line 115 of file player.h. Referenced by init_player(), player_facing(), prompt_dir(), and timepass(). |
|
|
Current hit points. (If zero, die).
Definition at line 73 of file player.h. Referenced by draw(), init_player(), plr_takedamage(), potion_numbness_expire(), spell_confusion(), and timepass(). |
|
|
Max. hit points. Calculated from update_player. Do not modify directly for game effects; instead, change hps_max_mod. Definition at line 79 of file player.h. Referenced by draw(), init_player(), potion_numbness_expire(), timepass(), and update_player(). |
|
|
How much max HPs have been modified by. Normally, HPs can be calculated solely based on Wi and To. However, hit points may be drained (by vampires, for example) or boosted. This drain/boost is represented here. Definition at line 86 of file player.h. Referenced by init_player(), and update_player(). |
|
|
Base stats. After modifying one of these, be sure to call update_player so the extrinsic (modified) stats will be changed as well. Do not read these values to determine effects; look at player::extrinsic instead. Definition at line 128 of file player.h. Referenced by char_info(), distribute_attributes(), init_player(), plr_mod_stat(), plr_restore_stat(), potion_numbness_expire(), and update_player(). |
|
|
Carried items.
Definition at line 150 of file player.h. Referenced by init_inventory(). |
|
|
Player level.
Definition at line 113 of file player.h. Referenced by awardXP(), char_info(), deref_jump_table(), draw(), init_player(), plr_attack(), plr_attack_monster_roll(), study_spell(), throw_item(), timepass(), and update_player(). |
|
|
Highest value a stat's ever taken.
Definition at line 137 of file player.h. Referenced by distribute_attributes(), plr_mod_stat(), and plr_restore_stat(). |
|
|
Fractional hit points. Used to keep track of when the player will regenerate. See timepass. Definition at line 105 of file player.h. Referenced by init_player(), and timepass(). |
|
|
Fractional power points. Used to keep track of when the player will regenerate. See timepass. Definition at line 110 of file player.h. Referenced by init_player(), and timepass(). |
|
|
Power points (spellcasting power).
Definition at line 89 of file player.h. Referenced by cast_spell(), draw(), init_player(), and timepass(). |
|
|
Max. power points (spellcasting power). Calculated from update_player. Do not modify directly for game effects; instead, change hps_max_mod. Definition at line 95 of file player.h. Referenced by draw(), init_player(), study_spell(), timepass(), and update_player(). |
|
|
Modifier to max. power points. Power points may be "lost" mainly by casting a summoning spell. Definition at line 100 of file player.h. Referenced by init_player(), and update_player(). |
|
|
Number of turns until starvation.
Definition at line 146 of file player.h. Referenced by hunger_status(), init_player(), and timepass(). |
|
|
The score so far.
Definition at line 154 of file player.h. Referenced by award_item_points(), awardXP(), end_game(), gen_map(), and init_player(). |
|
|
Weapon skills.
Definition at line 139 of file player.h. Referenced by award_mark(), init_skills(), marks_to_advance(), print_skills(), weapon_skill_attack(), and weapon_skill_damage(). |
|
|
Weapon skill marks.
Definition at line 140 of file player.h. Referenced by award_mark(), and init_skills(). |
|
|
Turns on which spells will be forgotten.
Definition at line 152 of file player.h. Referenced by cast_spell(), cleanup(), init_spells(), learn_spell(), numSpellsKnown(), refresh_spell(), restore_game(), save_game(), spellByIndex(), spellString(), and study_spell(). |
|
|
Definition at line 120 of file player.h. Referenced by add_timer(), apply_timers(), init_timers(), and remove_expired_timers(). |
|
|
Last movement direction. Time spent going in the same direction (used to check for stumbling) Definition at line 117 of file player.h. Referenced by init_player(), plr_walk(), and timepass(). |
|
|
|
Number of XP points gained last level
Definition at line 144 of file player.h. Referenced by awardXP(), and init_player(). |
|
1.3.6