Angband
player.h
Go to the documentation of this file.
1 
21 #ifndef PLAYER_H
22 #define PLAYER_H
23 
24 #include "guid.h"
25 #include "obj-properties.h"
26 #include "object.h"
27 #include "option.h"
28 
32 enum {
33  #define STAT(a) STAT_##a,
34  #include "list-stats.h"
35  #undef STAT
36 
37  STAT_MAX
38 };
39 
43 enum
44 {
45  #define PF(a,b,c) PF_##a,
46  #include "list-player-flags.h"
47  #undef PF
48  PF_MAX
49 };
50 
51 #define PF_SIZE FLAG_SIZE(PF_MAX)
52 
53 #define pf_has(f, flag) flag_has_dbg(f, PF_SIZE, flag, #f, #flag)
54 #define pf_next(f, flag) flag_next(f, PF_SIZE, flag)
55 #define pf_is_empty(f) flag_is_empty(f, PF_SIZE)
56 #define pf_is_full(f) flag_is_full(f, PF_SIZE)
57 #define pf_is_inter(f1, f2) flag_is_inter(f1, f2, PF_SIZE)
58 #define pf_is_subset(f1, f2) flag_is_subset(f1, f2, PF_SIZE)
59 #define pf_is_equal(f1, f2) flag_is_equal(f1, f2, PF_SIZE)
60 #define pf_on(f, flag) flag_on_dbg(f, PF_SIZE, flag, #f, #flag)
61 #define pf_off(f, flag) flag_off(f, PF_SIZE, flag)
62 #define pf_wipe(f) flag_wipe(f, PF_SIZE)
63 #define pf_setall(f) flag_setall(f, PF_SIZE)
64 #define pf_negate(f) flag_negate(f, PF_SIZE)
65 #define pf_copy(f1, f2) flag_copy(f1, f2, PF_SIZE)
66 #define pf_union(f1, f2) flag_union(f1, f2, PF_SIZE)
67 #define pf_inter(f1, f2) flag_inter(f1, f2, PF_SIZE)
68 #define pf_diff(f1, f2) flag_diff(f1, f2, PF_SIZE)
69 
70 #define player_has(p, flag) (pf_has(p->race->pflags, (flag)) || pf_has(p->class->pflags, (flag)))
71 
76 #define STAT_RANGE 38
77 
81 #define PY_MAX_EXP 99999999L /* Maximum exp */
82 #define PY_KNOW_LEVEL 30 /* Level to know all runes */
83 #define PY_MAX_LEVEL 50 /* Maximum level */
84 
88 #define PY_SPELL_LEARNED 0x01 /* Spell has been learned */
89 #define PY_SPELL_WORKED 0x02 /* Spell has been successfully tried */
90 #define PY_SPELL_FORGOTTEN 0x04 /* Spell has been forgotten */
91 
92 #define BTH_PLUS_ADJ 3 /* Adjust BTH per plus-to-hit */
93 
97 #define NOSCORE_WIZARD 0x0002
98 #define NOSCORE_DEBUG 0x0008
99 #define NOSCORE_JUMPING 0x0010
100 
104 enum {
110 
112 };
113 
117 enum {
118  SKILL_DISARM_PHYS, /* Disarming - physical */
119  SKILL_DISARM_MAGIC, /* Disarming - magical */
120  SKILL_DEVICE, /* Magic Devices */
121  SKILL_SAVE, /* Saving throw */
122  SKILL_SEARCH, /* Searching ability */
123  SKILL_STEALTH, /* Stealth factor */
124  SKILL_TO_HIT_MELEE, /* To hit (normal) */
125  SKILL_TO_HIT_BOW, /* To hit (shooting) */
126  SKILL_TO_HIT_THROW, /* To hit (throwing) */
127  SKILL_DIGGING, /* Digging */
128 
130 };
131 
135 struct quest
136 {
137  struct quest *next;
139  char *name;
140  byte level; /* Dungeon level */
141  struct monster_race *race; /* Monster race */
142  int cur_num; /* Number killed (unused) */
143  int max_num; /* Number required (unused) */
144 };
145 
149 struct equip_slot {
150  struct equip_slot *next;
151 
153  char *name;
154  struct object *obj;
155 };
156 
160 struct player_body {
161  struct player_body *next;
162 
163  char *name;
165  struct equip_slot *slots;
166 };
167 
171 struct player_race {
172  struct player_race *next;
173  const char *name;
174 
175  unsigned int ridx;
176 
177  int r_mhp;
178  int r_exp;
180  int b_age;
181  int m_age;
183  int base_hgt;
184  int mod_hgt;
185  int base_wgt;
186  int mod_wgt;
188  int infra;
190  int body;
200 
202 };
203 
208 struct start_item {
209  struct object_kind *kind;
210  int min;
211  int max;
213  struct start_item *next;
214 };
215 
219 struct magic_realm {
220  struct magic_realm *next;
221  char *code;
222  char *name;
223  int stat;
224  char *verb;
225  char *spell_noun;
226  char *book_noun;
227 };
228 
232 struct class_spell {
233  char *name;
234  char *text;
235 
236  struct effect *effect;
238  int sidx;
239  int bidx;
240  int slevel;
241  int smana;
242  int sfail;
243  int sexp;
244 };
245 
249 struct class_book {
250  int tval;
251  int sval;
252  int realm;
254  struct class_spell *spells;
255 };
256 
260 struct class_magic {
263  const struct magic_realm *spell_realm;
264  int num_books;
265  struct class_book *books;
267 };
268 
272 struct player_class {
274  const char *name;
275  unsigned int cidx;
276 
277  const char *title[10];
284  int c_mhp;
285  int c_exp;
294  int sense_div;
299 };
300 
327  int isucc;
328  int roll;
329  char *text;
330 };
331 
335  unsigned int idx;
336 };
337 
345  size_t next;
346  size_t length;
347 };
348 
354 struct player_state {
362  int speed;
364  int num_blows;
365  int num_shots;
367  int ammo_mult;
368  int ammo_tval;
370  int ac;
371  int to_a;
372  int to_h;
373  int to_d;
375  int see_infra;
377  int cur_light;
379  int noise;
381  bool heavy_wield;
382  bool heavy_shoot;
383  bool icky_wield;
391 };
392 
399  bool playing; /* True if player is playing */
400  bool autosave; /* True if autosave is pending */
401  bool generate_level; /* True if level needs regenerating */
402  bool only_partial; /* True if only partial updates are needed */
403  bool dropping; /* True if auto-drop is in progress */
404 
405  int energy_use; /* Energy use this turn */
406  int new_spells; /* Number of spells available */
407 
408  struct monster *health_who; /* Health bar trackee */
409  struct monster_race *monster_race; /* Monster race trackee */
410  struct object *object; /* Object trackee */
411  struct object_kind *object_kind; /* Object kind trackee */
412 
413  u32b notice; /* Bit flags for pending actions such as
414  * reordering inventory, ignoring, etc. */
415  u32b update; /* Bit flags for recalculations needed
416  * such as HP, or visible area */
417  u32b redraw; /* Bit flags for things that /have/ changed,
418  * and just need to be redrawn by the UI,
419  * such as HP, Speed, etc.*/
420 
421  int command_wrk; /* Used by the UI to decide whether
422  * to start off showing equipment or
423  * inventory listings when offering
424  * a choice. See obj-ui.c */
425 
426  bool create_up_stair; /* Create up stair on next level */
427  bool create_down_stair; /* Create down stair on next level */
428 
429  int resting; /* Resting counter */
430 
431  int running; /* Running counter */
432  bool running_withpathfind; /* Are we using the pathfinder ? */
433  bool running_firststep; /* Is this our first step running? */
434 
435  struct object **quiver; /* Quiver objects */
436  struct object **inven; /* Inventory objects */
437  int total_weight; /* Total weight being carried */
438  int inven_cnt; /* Number of items in inventory */
439  int equip_cnt; /* Number of items in equipment */
440  int quiver_cnt; /* Number of items in the quiver */
441 };
442 
454 struct player {
455  const struct player_race *race;
456  const struct player_class *class;
457 
458  s16b py; /* Player location */
459  s16b px; /* Player location */
460 
461  byte hitdie; /* Hit dice (sides) */
462  byte expfact; /* Experience factor */
463 
464  s16b age; /* Characters age */
465  s16b ht; /* Height */
466  s16b wt; /* Weight */
467 
468  s32b au; /* Current Gold */
469 
470  s16b max_depth; /* Max depth */
471  s16b depth; /* Cur depth */
472 
473  s16b max_lev; /* Max level */
474  s16b lev; /* Cur level */
475 
476  s32b max_exp; /* Max experience */
477  s32b exp; /* Cur experience */
478  u16b exp_frac; /* Cur exp frac (times 2^16) */
479 
480  s16b mhp; /* Max hit pts */
481  s16b chp; /* Cur hit pts */
482  u16b chp_frac; /* Cur hit frac (times 2^16) */
483 
484  s16b msp; /* Max mana pts */
485  s16b csp; /* Cur mana pts */
486  u16b csp_frac; /* Cur mana frac (times 2^16) */
487 
488  s16b stat_max[STAT_MAX]; /* Current "maximal" stat values */
489  s16b stat_cur[STAT_MAX]; /* Current "natural" stat values */
490  s16b stat_map[STAT_MAX]; /* Tracks remapped stats from temp stat swap */
491 
492  s16b *timed; /* Timed effects */
493 
494  s16b word_recall; /* Word of recall counter */
495  s16b deep_descent; /* Deep Descent counter */
496 
497  s16b energy; /* Current energy */
498  u32b total_energy; /* Total energy used (including resting) */
499  u32b resting_turn; /* Number of player turns spent resting */
500 
501  s16b food; /* Current nutrition */
502 
503  byte confusing; /* Glowing hands */
504  byte unignoring; /* Unignoring */
505 
506  byte *spell_flags; /* Spell flags */
507  byte *spell_order; /* Spell order */
508  byte searching; /* Currently searching */
509 
510  char full_name[PLAYER_NAME_LEN]; /* Full name */
511  char died_from[80]; /* Cause of death */
512  char *history; /* Player history */
513  struct quest *quests; /* Quest history */
514  u16b total_winner; /* Total winner */
515 
516  u16b noscore; /* Cheating flags */
517 
518  bool is_dead; /* Player is dead */
519 
520  bool wizard; /* Player is in wizard mode */
521 
522  s16b player_hp[PY_MAX_LEVEL]; /* HP gained per level */
523 
524  /* Saved values for quickstart */
525  s32b au_birth; /* Birth gold when option birth_money is false */
526  s16b stat_birth[STAT_MAX]; /* Birth "natural" stat values */
527  s16b ht_birth; /* Birth Height */
528  s16b wt_birth; /* Birth Weight */
529 
530  struct player_options opts; /* Player options */
531  struct player_history hist; /* Player history (see player-history.c) */
532 
533  struct player_body body; /* Equipment slots available */
534 
535  struct object *gear; /* Real gear */
536  struct object *gear_k; /* Known gear */
537 
538  struct object *obj_k; /* Object knowledge ("runes") */
539  struct chunk *cave; /* Known version of current level */
540 
541  struct player_state state; /* Calculatable state */
542  struct player_state known_state; /* What the player can know of the above */
543  struct player_upkeep *upkeep; /* Temporary player-related values */
544 };
545 
546 
552 extern struct player_body *bodies;
553 extern struct player_race *races;
554 extern struct player_class *classes;
555 extern struct magic_realm *realms;
556 
557 extern const s32b player_exp[PY_MAX_LEVEL];
558 extern struct player *player;
559 
560 /* player-class.c */
561 struct player_class *player_id2class(guid id);
562 
563 /* player.c */
564 int stat_name_to_idx(const char *name);
565 const char *stat_idx_to_name(int type);
566 const struct magic_realm *lookup_realm(const char *code);
567 bool player_stat_inc(struct player *p, int stat);
568 bool player_stat_dec(struct player *p, int stat, bool permanent);
569 void player_exp_gain(struct player *p, s32b amount);
570 void player_exp_lose(struct player *p, s32b amount, bool permanent);
571 void player_flags(struct player *p, bitflag f[OF_SIZE]);
572 byte player_hp_attr(struct player *p);
573 byte player_sp_attr(struct player *p);
574 bool player_restore_mana(struct player *p, int amt);
575 void player_safe_name(char *safe, size_t safelen, const char *name, bool strip_suffix);
576 
577 /* player-race.c */
578 struct player_race *player_id2race(guid id);
579 
580 #endif /* !PLAYER_H */
struct quest * quests
Definition: player.h:513
struct monster * health_who
Definition: player.h:408
uint16_t u16b
Definition: h-basic.h:169
void player_safe_name(char *safe, size_t safelen, const char *name, bool strip_suffix)
Return a version of the player's name safe for use in filesystems.
Definition: player.c:345
struct object * obj_k
Definition: player.h:538
int bidx
The index into the player's books array.
Definition: player.h:239
int infra
Infra-vision range.
Definition: player.h:188
const char * title[10]
Titles.
Definition: player.h:277
struct history_chart * history
Definition: player.h:199
int stat_top[STAT_MAX]
Maximal modified stats.
Definition: player.h:358
int to_d
Bonus to dam.
Definition: player.h:373
struct object * object
Definition: player.h:410
struct object * gear
Definition: player.h:535
Definition: player.h:107
struct player_body * next
Definition: player.h:161
const char * stat_idx_to_name(int type)
Definition: player.c:119
definitions and functions for object flags and modifiers
Definition: player.h:129
Monster "race" information, including racial memories.
Definition: monster.h:263
Player race info.
Definition: player.h:171
struct history_chart * next
Definition: player.h:333
int sidx
The index of this spell for this class.
Definition: player.h:238
u32b total_energy
Definition: player.h:498
int cur_num
Definition: player.h:142
s16b stat_max[STAT_MAX]
Definition: player.h:488
s16b stat_cur[STAT_MAX]
Definition: player.h:489
struct monster_race * monster_race
Definition: player.h:409
int equip_cnt
Definition: player.h:439
A structure to hold class-dependent information on spell books.
Definition: player.h:249
char * spell_noun
Definition: player.h:225
int command_wrk
Definition: player.h:421
int isucc
Definition: player.h:327
int sfail
Base chance of failure.
Definition: player.h:242
Structure for magic realms.
Definition: player.h:219
struct history_chart * succ
Definition: player.h:326
struct magic_realm * next
Definition: player.h:220
Monster information, for a specific monster.
Definition: monster.h:320
s16b lev
Definition: player.h:474
int new_spells
Definition: player.h:406
uint32_t u32b
Definition: h-basic.h:172
struct effect * effect
The spell's effect.
Definition: player.h:236
Player history information.
Definition: player.h:343
struct player_state known_state
Definition: player.h:542
int num_shots
Number of shots.
Definition: player.h:365
Information about object kinds, including player knowledge.
Definition: object.h:157
char * book_noun
Definition: player.h:226
void player_exp_lose(struct player *p, s32b amount, bool permanent)
Definition: player.c:274
u32b redraw
Definition: player.h:417
struct player_race * player_id2race(guid id)
Definition: player-race.c:21
struct element_info el_info[ELEM_MAX]
Resists from race and items.
Definition: player.h:390
s16b ht_birth
Definition: player.h:527
keycode_t code
Definition: ui-event.c:25
char full_name[PLAYER_NAME_LEN]
Definition: player.h:510
void player_flags(struct player *p, bitflag f[OF_SIZE])
Obtain object flags for the player.
Definition: player.c:287
int num_books
Number of spellbooks.
Definition: player.h:264
int x_skills[SKILL_MAX]
Extra skills.
Definition: player.h:282
char died_from[80]
Definition: player.h:511
Definition: player.h:106
Information about class magic knowledge.
Definition: player.h:260
Definition: player.h:119
bool player_restore_mana(struct player *p, int amt)
Definition: player.c:326
struct player_class * classes
Definition: player.c:39
Definition: player.h:76
u16b type
Definition: player.h:152
struct equip_slot * next
Definition: player.h:150
u16b exp_frac
Definition: player.h:478
int r_mhp
Hit-dice modifier.
Definition: player.h:177
s16b ht
Definition: player.h:465
void player_exp_gain(struct player *p, s32b amount)
Definition: player.c:266
s16b stat_map[STAT_MAX]
Definition: player.h:490
struct player_body body
Definition: player.h:533
Entity guids.
player race and class flags
s16b * timed
Definition: player.h:492
Structure for the "quests".
Definition: player.h:135
const struct magic_realm * lookup_realm(const char *code)
Definition: player.c:127
struct monster_race * race
Definition: player.h:141
bitflag pflags[PF_SIZE]
Racial (player) flags.
Definition: player.h:197
int c_skills[SKILL_MAX]
Class skills.
Definition: player.h:281
int stat_name_to_idx(const char *name)
Definition: player.c:108
bitflag flags[OF_SIZE]
Racial (object) flags.
Definition: player.h:196
s16b food
Definition: player.h:501
uint8_t byte
Definition: h-basic.h:167
s16b max_depth
Definition: player.h:470
int max
Maximum starting amount.
Definition: player.h:211
char * text
Definition: player.h:329
int noise
Derived from stealth.
Definition: player.h:379
bool cumber_armor
Mana draining armor.
Definition: player.h:385
int spell_first
Level of first spell.
Definition: player.h:261
Options table and definitions.
u16b count
Definition: player.h:164
int max_attacks
Maximum possible attacks.
Definition: player.h:289
const s32b player_exp[PY_MAX_LEVEL]
Base experience levels, may be adjusted up for race and/or class.
Definition: player.c:45
size_t length
Current length.
Definition: player.h:346
Definition: player.h:125
int min_weight
Minimum weapon weight for calculations.
Definition: player.h:290
unsigned int idx
Definition: player.h:335
s16b deep_descent
Definition: player.h:495
struct player_options opts
Definition: player.h:530
Write value lines for a set of modifiers.
int slevel
Required level (to learn)
Definition: player.h:240
int r_adj[STAT_MAX]
Stat bonuses.
Definition: player.h:192
s32b au_birth
Definition: player.h:525
Definition: cave.h:142
int realm
The magic realm of this book.
Definition: player.h:252
bool autosave
Definition: player.h:400
bool wizard
Definition: player.h:520
struct object ** inven
Definition: player.h:436
int num_blows
Number of blows x100.
Definition: player.h:364
Definition: player.h:121
All the variable state that changes when you put on/take off equipment.
Definition: player.h:354
char * code
Definition: player.h:221
Player history table.
Definition: player-history.h:47
int max_num
Definition: player.h:143
s16b msp
Definition: player.h:484
s16b px
Definition: player.h:459
struct element_info el_info[ELEM_MAX]
Resists.
Definition: player.h:201
bool playing
Definition: player.h:399
char * name
Definition: player.h:163
Object information, for a specific object.
Definition: object.h:393
struct player_state state
Definition: player.h:541
struct equip_slot * slots
Definition: player.h:165
int stat_ind[STAT_MAX]
Indexes into stat tables.
Definition: player.h:356
s32b au
Definition: player.h:468
char * text
Definition: player.h:234
bool is_dead
Definition: player.h:518
bool running_withpathfind
Definition: player.h:432
s32b max_exp
Definition: player.h:476
Player class info.
Definition: player.h:272
int sexp
Encoded experience bonus.
Definition: player.h:243
#define PF_SIZE
Definition: player.h:51
u32b update
Definition: player.h:415
int mod_wgt
Mod weight.
Definition: player.h:186
int ac
Base ac.
Definition: player.h:370
Definition: player.h:122
int ammo_mult
Ammo multiplier.
Definition: player.h:367
Definition: player.h:127
int total_weight
Definition: player.h:437
const char * name
Definition: player.h:173
struct player_class * next
Definition: player.h:273
int running
Definition: player.h:431
int cur_light
Radius of light (if any)
Definition: player.h:377
int roll
Definition: player.h:328
s16b py
Definition: player.h:458
int base_wgt
Base weight.
Definition: player.h:185
s16b age
Definition: player.h:464
int tval
Item type of the book.
Definition: player.h:250
int type
Definition: mon-msg.c:79
s16b mhp
Definition: player.h:480
unsigned int ridx
Definition: player.h:175
s16b csp
Definition: player.h:485
u16b chp_frac
Definition: player.h:482
Definition: player.h:108
Definition: player.h:124
byte unignoring
Definition: player.h:504
struct player_race * races
Definition: player.c:38
struct object_kind * kind
Definition: player.h:209
int stat_use[STAT_MAX]
Current modified stats.
Definition: player.h:357
byte player_hp_attr(struct player *p)
Definition: player.c:298
#define PLAYER_NAME_LEN
Definition: option.h:23
int b_age
Base age.
Definition: player.h:180
int att_multiply
Multiplier for attack calculations.
Definition: player.h:291
const struct player_race * race
Definition: player.h:455
byte confusing
Definition: player.h:503
const char ** p[]
Definition: name.c:40
byte bitflag
Definition: z-bitflag.h:27
char * name
Definition: player.h:153
Definition: object.h:56
s32b exp
Definition: player.h:477
int stat_add[STAT_MAX]
Equipment stat bonuses.
Definition: player.h:355
byte index
Definition: player.h:138
const char * name
Definition: player.h:274
bool cumber_glove
Mana draining gloves.
Definition: player.h:386
Items the player starts with.
Definition: player.h:208
byte * spell_order
Definition: player.h:507
bool generate_level
Definition: player.h:401
byte expfact
Definition: player.h:462
Definition: player.h:332
int16_t s16b
Definition: h-basic.h:170
int skills[SKILL_MAX]
Skills.
Definition: player.h:360
const struct magic_realm * spell_realm
Primary spellcasting realm.
Definition: player.h:263
int body
Race body.
Definition: player.h:190
Temporary, derived, player-related variables used during play but not saved.
Definition: player.h:398
Definition: player.h:56
u16b noscore
Definition: player.h:516
s16b stat_birth[STAT_MAX]
Definition: player.h:526
int num_spells
Number of spells in this book.
Definition: player.h:253
bitflag pflags[PF_SIZE]
Player intrinsic flags.
Definition: player.h:389
unsigned int cidx
Definition: player.h:275
struct start_item * start_items
Starting inventory.
Definition: player.h:296
int stat
Definition: player.h:223
int r_exp
Experience factor.
Definition: player.h:178
Element info type.
Definition: object.h:109
int total_spells
Number of spells for this class.
Definition: player.h:266
bool icky_wield
Icky weapon shooter.
Definition: player.h:383
byte * spell_flags
Definition: player.h:506
bool heavy_shoot
Heavy shooter.
Definition: player.h:382
s16b word_recall
Definition: player.h:494
s16b player_hp[PY_MAX_LEVEL]
Definition: player.h:522
Definition: player.h:123
A structure to hold class-dependent information on spells.
Definition: player.h:232
struct object ** quiver
Definition: player.h:435
bool running_firststep
Definition: player.h:433
int see_infra
Infravision range.
Definition: player.h:375
char * history
Definition: player.h:512
#define OF_SIZE
Definition: obj-properties.h:120
struct object * obj
Definition: player.h:154
int c_exp
Experience factor.
Definition: player.h:285
s16b max_lev
Definition: player.h:473
struct player_history hist
Definition: player.h:531
struct history_info * entries
List of entries.
Definition: player.h:344
int base_hgt
Base height.
Definition: player.h:183
int c_mhp
Hit-dice adjustment.
Definition: player.h:284
Definition: player.h:126
unsigned int guid
Definition: guid.h:22
byte player_sp_attr(struct player *p)
Definition: player.c:312
struct class_magic magic
Magic spells.
Definition: player.h:298
basic object structs and enums
int smana
Required mana (to cast)
Definition: player.h:241
int sense_base
Base pseudo-id value.
Definition: player.h:293
Definition: player.h:120
int r_skills[SKILL_MAX]
Skills.
Definition: player.h:194
byte hitdie
Definition: player.h:461
int speed
Current speed.
Definition: player.h:362
u32b notice
Definition: player.h:413
int ammo_tval
Ammo variety.
Definition: player.h:368
bool player_stat_inc(struct player *p, int stat)
Definition: player.c:142
A single equipment slot.
Definition: player.h:149
bitflag flags[OF_SIZE]
Status flags from race and items.
Definition: player.h:388
Definition: player.h:105
bitflag pflags[PF_SIZE]
(Player) flags
Definition: player.h:287
struct object_kind * object_kind
Definition: player.h:411
Histories are a graph of charts; each chart contains a set of individual entries for that chart...
Definition: player.h:324
bool heavy_wield
Heavy weapon.
Definition: player.h:381
byte searching
Definition: player.h:508
struct object * gear_k
Definition: player.h:536
u32b resting_turn
Definition: player.h:499
bool create_down_stair
Definition: player.h:427
struct magic_realm * realms
Definition: player.c:40
int32_t s32b
Definition: h-basic.h:173
bool player_stat_dec(struct player *p, int stat, bool permanent)
Definition: player.c:168
Effect.
Definition: object.h:52
s16b chp
Definition: player.h:481
bool dropping
Definition: player.h:403
struct class_book * books
Details of spellbooks.
Definition: player.h:265
char * name
Definition: player.h:233
s16b wt
Definition: player.h:466
s16b wt_birth
Definition: player.h:528
s16b depth
Definition: player.h:471
Definition: player.h:118
int min
Minimum starting amount.
Definition: player.h:210
struct player_class * player_id2class(guid id)
Definition: player-class.c:22
struct history_entry * entries
Definition: player.h:334
Intialize random names
Definition: init.c:658
int spell_weight
Max armour weight to avoid mana penalties.
Definition: player.h:262
int m_age
Mod age.
Definition: player.h:181
char * verb
Definition: player.h:224
char * name
Definition: player.h:139
u16b csp_frac
Definition: player.h:486
int resting
Definition: player.h:429
s16b energy
Definition: player.h:497
bool create_up_stair
Definition: player.h:426
Most of the "player" information goes here.
Definition: player.h:454
The option data structures.
Definition: option.h:62
struct start_item * next
Definition: player.h:213
struct player_upkeep * upkeep
Definition: player.h:543
int quiver_cnt
Definition: player.h:440
int mod_hgt
Mod height.
Definition: player.h:184
struct player * player
Pointer to the player struct.
Definition: list-options.h:50
struct quest * next
Definition: player.h:137
struct player_body * bodies
Externs
Definition: player.c:37
int to_a
Bonus to ac.
Definition: player.h:371
#define PY_MAX_LEVEL
Definition: player.h:83
struct class_spell * spells
Spells in the book.
Definition: player.h:254
int sense_div
Pseudo-id divisor.
Definition: player.h:294
struct history_entry * next
Definition: player.h:325
byte level
Definition: player.h:140
int sval
Item sub-type for book (book number)
Definition: player.h:251
int inven_cnt
Definition: player.h:438
int to_h
Bonus to hit.
Definition: player.h:372
Definition: player.h:109
struct chunk * cave
Definition: player.h:539
struct player_race * next
Definition: player.h:172
A player 'body'.
Definition: player.h:160
char * name
Definition: player.h:222
int energy_use
Definition: player.h:405
int c_adj[STAT_MAX]
Stat modifier.
Definition: player.h:279
size_t next
First unused entry.
Definition: player.h:345
bool only_partial
Definition: player.h:402
u16b total_winner
Definition: player.h:514
Definition: player.h:111