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  bool heavy_wield;
380  bool heavy_shoot;
381  bool icky_wield;
389 };
390 
397  bool playing; /* True if player is playing */
398  bool autosave; /* True if autosave is pending */
399  bool generate_level; /* True if level needs regenerating */
400  bool only_partial; /* True if only partial updates are needed */
401  bool dropping; /* True if auto-drop is in progress */
402 
403  int energy_use; /* Energy use this turn */
404  int new_spells; /* Number of spells available */
405 
406  struct monster *health_who; /* Health bar trackee */
407  struct monster_race *monster_race; /* Monster race trackee */
408  struct object *object; /* Object trackee */
409  struct object_kind *object_kind; /* Object kind trackee */
410 
411  u32b notice; /* Bit flags for pending actions such as
412  * reordering inventory, ignoring, etc. */
413  u32b update; /* Bit flags for recalculations needed
414  * such as HP, or visible area */
415  u32b redraw; /* Bit flags for things that /have/ changed,
416  * and just need to be redrawn by the UI,
417  * such as HP, Speed, etc.*/
418 
419  int command_wrk; /* Used by the UI to decide whether
420  * to start off showing equipment or
421  * inventory listings when offering
422  * a choice. See obj-ui.c */
423 
424  bool create_up_stair; /* Create up stair on next level */
425  bool create_down_stair; /* Create down stair on next level */
426 
427  int resting; /* Resting counter */
428 
429  int running; /* Running counter */
430  bool running_withpathfind; /* Are we using the pathfinder ? */
431  bool running_firststep; /* Is this our first step running? */
432 
433  struct object **quiver; /* Quiver objects */
434  struct object **inven; /* Inventory objects */
435  int total_weight; /* Total weight being carried */
436  int inven_cnt; /* Number of items in inventory */
437  int equip_cnt; /* Number of items in equipment */
438  int quiver_cnt; /* Number of items in the quiver */
439 };
440 
452 struct player {
453  const struct player_race *race;
454  const struct player_class *class;
455 
456  s16b py; /* Player location */
457  s16b px; /* Player location */
458 
459  byte hitdie; /* Hit dice (sides) */
460  byte expfact; /* Experience factor */
461 
462  s16b age; /* Characters age */
463  s16b ht; /* Height */
464  s16b wt; /* Weight */
465 
466  s32b au; /* Current Gold */
467 
468  s16b max_depth; /* Max depth */
469  s16b depth; /* Cur depth */
470 
471  s16b max_lev; /* Max level */
472  s16b lev; /* Cur level */
473 
474  s32b max_exp; /* Max experience */
475  s32b exp; /* Cur experience */
476  u16b exp_frac; /* Cur exp frac (times 2^16) */
477 
478  s16b mhp; /* Max hit pts */
479  s16b chp; /* Cur hit pts */
480  u16b chp_frac; /* Cur hit frac (times 2^16) */
481 
482  s16b msp; /* Max mana pts */
483  s16b csp; /* Cur mana pts */
484  u16b csp_frac; /* Cur mana frac (times 2^16) */
485 
486  s16b stat_max[STAT_MAX]; /* Current "maximal" stat values */
487  s16b stat_cur[STAT_MAX]; /* Current "natural" stat values */
488  s16b stat_map[STAT_MAX]; /* Tracks remapped stats from temp stat swap */
489 
490  s16b *timed; /* Timed effects */
491 
492  s16b word_recall; /* Word of recall counter */
493  s16b deep_descent; /* Deep Descent counter */
494 
495  s16b energy; /* Current energy */
496  u32b total_energy; /* Total energy used (including resting) */
497  u32b resting_turn; /* Number of player turns spent resting */
498 
499  s16b food; /* Current nutrition */
500 
501  byte confusing; /* Glowing hands */
502  byte unignoring; /* Unignoring */
503 
504  byte *spell_flags; /* Spell flags */
505  byte *spell_order; /* Spell order */
506  byte searching; /* Currently searching */
507 
508  char full_name[PLAYER_NAME_LEN]; /* Full name */
509  char died_from[80]; /* Cause of death */
510  char *history; /* Player history */
511  struct quest *quests; /* Quest history */
512  u16b total_winner; /* Total winner */
513 
514  u16b noscore; /* Cheating flags */
515 
516  bool is_dead; /* Player is dead */
517 
518  bool wizard; /* Player is in wizard mode */
519 
520  s16b player_hp[PY_MAX_LEVEL]; /* HP gained per level */
521 
522  /* Saved values for quickstart */
523  s32b au_birth; /* Birth gold when option birth_money is false */
524  s16b stat_birth[STAT_MAX]; /* Birth "natural" stat values */
525  s16b ht_birth; /* Birth Height */
526  s16b wt_birth; /* Birth Weight */
527 
528  struct player_options opts; /* Player options */
529  struct player_history hist; /* Player history (see player-history.c) */
530 
531  struct player_body body; /* Equipment slots available */
532 
533  struct object *gear; /* Real gear */
534  struct object *gear_k; /* Known gear */
535 
536  struct object *obj_k; /* Object knowledge ("runes") */
537  struct chunk *cave; /* Known version of current level */
538 
539  struct player_state state; /* Calculatable state */
540  struct player_state known_state; /* What the player can know of the above */
541  struct player_upkeep *upkeep; /* Temporary player-related values */
542 };
543 
544 
550 extern struct player_body *bodies;
551 extern struct player_race *races;
552 extern struct player_class *classes;
553 extern struct magic_realm *realms;
554 
555 extern const s32b player_exp[PY_MAX_LEVEL];
556 extern struct player *player;
557 
558 /* player-class.c */
559 struct player_class *player_id2class(guid id);
560 
561 /* player.c */
562 int stat_name_to_idx(const char *name);
563 const char *stat_idx_to_name(int type);
564 const struct magic_realm *lookup_realm(const char *code);
565 bool player_stat_inc(struct player *p, int stat);
566 bool player_stat_dec(struct player *p, int stat, bool permanent);
567 void player_exp_gain(struct player *p, s32b amount);
568 void player_exp_lose(struct player *p, s32b amount, bool permanent);
569 void player_flags(struct player *p, bitflag f[OF_SIZE]);
570 byte player_hp_attr(struct player *p);
571 byte player_sp_attr(struct player *p);
572 bool player_restore_mana(struct player *p, int amt);
573 void player_safe_name(char *safe, size_t safelen, const char *name, bool strip_suffix);
574 
575 /* player-race.c */
576 struct player_race *player_id2race(guid id);
577 
578 #endif /* !PLAYER_H */
struct quest * quests
Definition: player.h:511
struct monster * health_who
Definition: player.h:406
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:536
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:408
struct object * gear
Definition: player.h:533
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:266
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:496
int cur_num
Definition: player.h:142
s16b stat_max[STAT_MAX]
Definition: player.h:486
s16b stat_cur[STAT_MAX]
Definition: player.h:487
struct monster_race * monster_race
Definition: player.h:407
int equip_cnt
Definition: player.h:437
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:419
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:324
s16b lev
Definition: player.h:472
int new_spells
Definition: player.h:404
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:540
int num_shots
Number of shots.
Definition: player.h:365
Information about object kinds, including player knowledge.
Definition: object.h:158
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:415
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:388
s16b ht_birth
Definition: player.h:525
keycode_t code
Definition: ui-event.c:25
char full_name[PLAYER_NAME_LEN]
Definition: player.h:508
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:509
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:476
int r_mhp
Hit-dice modifier.
Definition: player.h:177
s16b ht
Definition: player.h:463
void player_exp_gain(struct player *p, s32b amount)
Definition: player.c:266
s16b stat_map[STAT_MAX]
Definition: player.h:488
struct player_body body
Definition: player.h:531
Entity guids.
player race and class flags
s16b * timed
Definition: player.h:490
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:499
uint8_t byte
Definition: h-basic.h:167
s16b max_depth
Definition: player.h:468
int max
Maximum starting amount.
Definition: player.h:211
char * text
Definition: player.h:329
bool cumber_armor
Mana draining armor.
Definition: player.h:383
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:493
struct player_options opts
Definition: player.h:528
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:523
Definition: cave.h:147
int realm
The magic realm of this book.
Definition: player.h:252
bool autosave
Definition: player.h:398
bool wizard
Definition: player.h:518
struct object ** inven
Definition: player.h:434
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:482
s16b px
Definition: player.h:457
struct element_info el_info[ELEM_MAX]
Resists.
Definition: player.h:201
bool playing
Definition: player.h:397
char * name
Definition: player.h:163
Object information, for a specific object.
Definition: object.h:394
struct player_state state
Definition: player.h:539
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:466
char * text
Definition: player.h:234
bool is_dead
Definition: player.h:516
bool running_withpathfind
Definition: player.h:430
s32b max_exp
Definition: player.h:474
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:413
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:435
const char * name
Definition: player.h:173
struct player_class * next
Definition: player.h:273
int running
Definition: player.h:429
int cur_light
Radius of light (if any)
Definition: player.h:377
int roll
Definition: player.h:328
s16b py
Definition: player.h:456
int base_wgt
Base weight.
Definition: player.h:185
s16b age
Definition: player.h:462
int tval
Item type of the book.
Definition: player.h:250
int type
Definition: mon-msg.c:80
s16b mhp
Definition: player.h:478
unsigned int ridx
Definition: player.h:175
s16b csp
Definition: player.h:483
u16b chp_frac
Definition: player.h:480
Definition: player.h:108
Definition: player.h:124
byte unignoring
Definition: player.h:502
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:453
byte confusing
Definition: player.h:501
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:475
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:384
Items the player starts with.
Definition: player.h:208
byte * spell_order
Definition: player.h:505
bool generate_level
Definition: player.h:399
byte expfact
Definition: player.h:460
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:396
Definition: player.h:56
u16b noscore
Definition: player.h:514
s16b stat_birth[STAT_MAX]
Definition: player.h:524
int num_spells
Number of spells in this book.
Definition: player.h:253
bitflag pflags[PF_SIZE]
Player intrinsic flags.
Definition: player.h:387
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:381
byte * spell_flags
Definition: player.h:504
bool heavy_shoot
Heavy shooter.
Definition: player.h:380
s16b word_recall
Definition: player.h:492
s16b player_hp[PY_MAX_LEVEL]
Definition: player.h:520
Definition: player.h:123
A structure to hold class-dependent information on spells.
Definition: player.h:232
struct object ** quiver
Definition: player.h:433
bool running_firststep
Definition: player.h:431
int see_infra
Infravision range.
Definition: player.h:375
char * history
Definition: player.h:510
#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:471
struct player_history hist
Definition: player.h:529
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:459
int speed
Current speed.
Definition: player.h:362
u32b notice
Definition: player.h:411
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:386
Definition: player.h:105
bitflag pflags[PF_SIZE]
(Player) flags
Definition: player.h:287
struct object_kind * object_kind
Definition: player.h:409
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:379
byte searching
Definition: player.h:506
struct object * gear_k
Definition: player.h:534
u32b resting_turn
Definition: player.h:497
bool create_down_stair
Definition: player.h:425
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:479
bool dropping
Definition: player.h:401
struct class_book * books
Details of spellbooks.
Definition: player.h:265
char * name
Definition: player.h:233
s16b wt
Definition: player.h:464
s16b wt_birth
Definition: player.h:526
s16b depth
Definition: player.h:469
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:656
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:484
int resting
Definition: player.h:427
s16b energy
Definition: player.h:495
bool create_up_stair
Definition: player.h:424
Most of the "player" information goes here.
Definition: player.h:452
The option data structures.
Definition: option.h:62
struct start_item * next
Definition: player.h:213
struct player_upkeep * upkeep
Definition: player.h:541
int quiver_cnt
Definition: player.h:438
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:436
int to_h
Bonus to hit.
Definition: player.h:372
Definition: player.h:109
struct chunk * cave
Definition: player.h:537
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:403
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:400
u16b total_winner
Definition: player.h:512
Definition: player.h:111