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 
74 #define STAT_RANGE 38
75 
79 #define PY_MAX_EXP 99999999L /* Maximum exp */
80 #define PY_KNOW_LEVEL 30 /* Level to know all runes */
81 #define PY_MAX_LEVEL 50 /* Maximum level */
82 
86 #define PY_SPELL_LEARNED 0x01 /* Spell has been learned */
87 #define PY_SPELL_WORKED 0x02 /* Spell has been successfully tried */
88 #define PY_SPELL_FORGOTTEN 0x04 /* Spell has been forgotten */
89 
90 #define BTH_PLUS_ADJ 3 /* Adjust BTH per plus-to-hit */
91 
95 #define NOSCORE_WIZARD 0x0002
96 #define NOSCORE_DEBUG 0x0008
97 #define NOSCORE_JUMPING 0x0010
98 
102 enum {
108 
110 };
111 
115 enum {
116  SKILL_DISARM_PHYS, /* Disarming - physical */
117  SKILL_DISARM_MAGIC, /* Disarming - magical */
118  SKILL_DEVICE, /* Magic Devices */
119  SKILL_SAVE, /* Saving throw */
120  SKILL_SEARCH, /* Searching ability */
121  SKILL_STEALTH, /* Stealth factor */
122  SKILL_TO_HIT_MELEE, /* To hit (normal) */
123  SKILL_TO_HIT_BOW, /* To hit (shooting) */
124  SKILL_TO_HIT_THROW, /* To hit (throwing) */
125  SKILL_DIGGING, /* Digging */
126 
128 };
129 
133 struct quest
134 {
135  struct quest *next;
137  char *name;
138  byte level; /* Dungeon level */
139  struct monster_race *race; /* Monster race */
140  int cur_num; /* Number killed (unused) */
141  int max_num; /* Number required (unused) */
142 };
143 
147 struct equip_slot {
148  struct equip_slot *next;
149 
151  char *name;
152  struct object *obj;
153 };
154 
158 struct player_body {
159  struct player_body *next;
160 
161  char *name;
163  struct equip_slot *slots;
164 };
165 
169 struct player_race {
170  struct player_race *next;
171  const char *name;
172 
173  unsigned int ridx;
174 
175  int r_mhp;
176  int r_exp;
178  int b_age;
179  int m_age;
181  int base_hgt;
182  int mod_hgt;
183  int base_wgt;
184  int mod_wgt;
186  int infra;
188  int body;
198 
199  struct element_info el_info[ELEM_MAX];
200 };
201 
205 struct player_blow {
206  struct player_blow *next;
207  char *name;
208 };
209 
213 struct player_shape {
215  const char *name;
216 
217  int sidx;
218 
219  int to_a;
220  int to_h;
221  int to_d;
227  struct element_info el_info[ELEM_MAX];
229  struct effect *effect;
233 };
234 
239 struct start_item {
240  int tval;
241  int sval;
242  int min;
243  int max;
245  struct start_item *next;
246 };
247 
251 struct magic_realm {
252  struct magic_realm *next;
253  char *code;
254  char *name;
255  int stat;
256  char *verb;
257  char *spell_noun;
258  char *book_noun;
259 };
260 
264 struct class_spell {
265  char *name;
266  char *text;
267 
268  struct effect *effect;
269  const struct magic_realm *realm;
271  int sidx;
272  int bidx;
273  int slevel;
274  int smana;
275  int sfail;
276  int sexp;
277 };
278 
282 struct class_book {
283  int tval;
284  int sval;
285  bool dungeon;
287  const struct magic_realm *realm;
288  struct class_spell *spells;
289 };
290 
294 struct class_magic {
297  int num_books;
298  struct class_book *books;
300 };
301 
305 struct player_class {
307  const char *name;
308  unsigned int cidx;
309 
310  const char *title[10];
317  int c_mhp;
318  int c_exp;
329  struct class_magic magic;
330 };
331 
358  int isucc;
359  int roll;
360  char *text;
361 };
362 
366  unsigned int idx;
367 };
368 
376  size_t next;
377  size_t length;
378 };
379 
385 struct player_state {
386  int stat_add[STAT_MAX];
387  int stat_ind[STAT_MAX];
388  int stat_use[STAT_MAX];
389  int stat_top[STAT_MAX];
391  int skills[SKILL_MAX];
393  int speed;
395  int num_blows;
396  int num_shots;
397  int num_moves;
399  int ammo_mult;
400  int ammo_tval;
402  int ac;
403  int dam_red;
404  int to_a;
405  int to_h;
406  int to_d;
408  int see_infra;
410  int cur_light;
412  bool heavy_wield;
413  bool heavy_shoot;
414  bool bless_wield;
419  bitflag pflags[PF_SIZE];
420  struct element_info el_info[ELEM_MAX];
421 };
422 
423 #define player_has(p, flag) (pf_has(p->state.pflags, (flag)))
424 
431  bool playing; /* True if player is playing */
432  bool autosave; /* True if autosave is pending */
433  bool generate_level; /* True if level needs regenerating */
434  bool only_partial; /* True if only partial updates are needed */
435  bool dropping; /* True if auto-drop is in progress */
436 
437  int energy_use; /* Energy use this turn */
438  int new_spells; /* Number of spells available */
439 
440  struct monster *health_who; /* Health bar trackee */
441  struct monster_race *monster_race; /* Monster race trackee */
442  struct object *object; /* Object trackee */
443  struct object_kind *object_kind; /* Object kind trackee */
444 
445  u32b notice; /* Bit flags for pending actions such as
446  * reordering inventory, ignoring, etc. */
447  u32b update; /* Bit flags for recalculations needed
448  * such as HP, or visible area */
449  u32b redraw; /* Bit flags for things that /have/ changed,
450  * and just need to be redrawn by the UI,
451  * such as HP, Speed, etc.*/
452 
453  int command_wrk; /* Used by the UI to decide whether
454  * to start off showing equipment or
455  * inventory listings when offering
456  * a choice. See obj-ui.c */
457 
458  bool create_up_stair; /* Create up stair on next level */
459  bool create_down_stair; /* Create down stair on next level */
460  bool light_level; /* Level is to be lit on creation */
461  bool arena_level; /* Current level is an arena */
462 
463  int resting; /* Resting counter */
464 
465  int running; /* Running counter */
466  bool running_withpathfind; /* Are we using the pathfinder ? */
467  bool running_firststep; /* Is this our first step running? */
468 
469  struct object **quiver; /* Quiver objects */
470  struct object **inven; /* Inventory objects */
471  int total_weight; /* Total weight being carried */
472  int inven_cnt; /* Number of items in inventory */
473  int equip_cnt; /* Number of items in equipment */
474  int quiver_cnt; /* Number of items in the quiver */
475  int recharge_pow; /* Power of recharge effect */
476 };
477 
489 struct player {
490  const struct player_race *race;
491  const struct player_class *class;
492 
493  struct loc grid;/* Player location */
494 
495  byte hitdie; /* Hit dice (sides) */
496  byte expfact; /* Experience factor */
497 
498  s16b age; /* Characters age */
499  s16b ht; /* Height */
500  s16b wt; /* Weight */
501 
502  s32b au; /* Current Gold */
503 
504  s16b max_depth; /* Max depth */
505  s16b recall_depth; /* Recall depth */
506  s16b depth; /* Cur depth */
507 
508  s16b max_lev; /* Max level */
509  s16b lev; /* Cur level */
510 
511  s32b max_exp; /* Max experience */
512  s32b exp; /* Cur experience */
513  u16b exp_frac; /* Cur exp frac (times 2^16) */
514 
515  s16b mhp; /* Max hit pts */
516  s16b chp; /* Cur hit pts */
517  u16b chp_frac; /* Cur hit frac (times 2^16) */
518 
519  s16b msp; /* Max mana pts */
520  s16b csp; /* Cur mana pts */
521  u16b csp_frac; /* Cur mana frac (times 2^16) */
522 
523  s16b stat_max[STAT_MAX]; /* Current "maximal" stat values */
524  s16b stat_cur[STAT_MAX]; /* Current "natural" stat values */
525  s16b stat_map[STAT_MAX]; /* Tracks remapped stats from temp stat swap */
526 
527  s16b *timed; /* Timed effects */
528 
529  s16b word_recall; /* Word of recall counter */
530  s16b deep_descent; /* Deep Descent counter */
531 
532  s16b energy; /* Current energy */
533  u32b total_energy; /* Total energy used (including resting) */
534  u32b resting_turn; /* Number of player turns spent resting */
535 
536  s16b food; /* Current nutrition */
537 
538  byte unignoring; /* Unignoring */
539 
540  byte *spell_flags; /* Spell flags */
541  byte *spell_order; /* Spell order */
542  byte searching; /* Currently searching */
543 
544  char full_name[PLAYER_NAME_LEN]; /* Full name */
545  char died_from[80]; /* Cause of death */
546  char *history; /* Player history */
547  struct quest *quests; /* Quest history */
548  u16b total_winner; /* Total winner */
549 
550  u16b noscore; /* Cheating flags */
551 
552  bool is_dead; /* Player is dead */
553 
554  bool wizard; /* Player is in wizard mode */
555 
556  s16b player_hp[PY_MAX_LEVEL]; /* HP gained per level */
557 
558  /* Saved values for quickstart */
559  s32b au_birth; /* Birth gold when option birth_money is false */
560  s16b stat_birth[STAT_MAX]; /* Birth "natural" stat values */
561  s16b ht_birth; /* Birth Height */
562  s16b wt_birth; /* Birth Weight */
563 
564  struct player_options opts; /* Player options */
565  struct player_history hist; /* Player history (see player-history.c) */
566 
567  struct player_body body; /* Equipment slots available */
568  struct player_shape *shape; /* Current player shape */
569 
570  struct object *gear; /* Real gear */
571  struct object *gear_k; /* Known gear */
572 
573  struct object *obj_k; /* Object knowledge ("runes") */
574  struct chunk *cave; /* Known version of current level */
575 
576  struct player_state state; /* Calculatable state */
577  struct player_state known_state; /* What the player can know of the above */
578  struct player_upkeep *upkeep; /* Temporary player-related values */
579 };
580 
581 
587 extern struct player_body *bodies;
588 extern struct player_race *races;
589 extern struct player_shape *shapes;
590 extern struct player_class *classes;
591 extern struct magic_realm *realms;
592 
593 extern const s32b player_exp[PY_MAX_LEVEL];
594 extern struct player *player;
595 
596 /* player-class.c */
597 struct player_class *player_id2class(guid id);
598 
599 /* player.c */
600 int stat_name_to_idx(const char *name);
601 const char *stat_idx_to_name(int type);
602 const struct magic_realm *lookup_realm(const char *code);
603 bool player_stat_inc(struct player *p, int stat);
604 bool player_stat_dec(struct player *p, int stat, bool permanent);
605 void player_exp_gain(struct player *p, s32b amount);
606 void player_exp_lose(struct player *p, s32b amount, bool permanent);
607 void player_flags(struct player *p, bitflag f[OF_SIZE]);
608 byte player_hp_attr(struct player *p);
609 byte player_sp_attr(struct player *p);
610 bool player_restore_mana(struct player *p, int amt);
611 void player_safe_name(char *safe, size_t safelen, const char *name, bool strip_suffix);
612 
613 /* player-race.c */
614 struct player_race *player_id2race(guid id);
615 
616 #endif /* !PLAYER_H */
struct quest * quests
Definition: player.h:547
struct monster * health_who
Definition: player.h:440
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:348
struct object * obj_k
Definition: player.h:573
int bidx
The index into the player's books array.
Definition: player.h:272
int infra
Infra-vision range.
Definition: player.h:186
const char * title[10]
Titles.
Definition: player.h:310
struct history_chart * history
Definition: player.h:197
int to_d
Bonus to dam.
Definition: player.h:406
struct object * object
Definition: player.h:442
struct object * gear
Definition: player.h:570
Definition: player.h:105
int to_d
Plusses to damage.
Definition: player.h:221
struct player_body * next
Definition: player.h:159
const char * stat_idx_to_name(int type)
Definition: player.c:120
definitions and functions for object flags and modifiers
Definition: player.h:127
Monster "race" information, including racial memories.
Definition: monster.h:307
int sval
Object sub-type.
Definition: player.h:241
Player race info.
Definition: player.h:169
struct history_chart * next
Definition: player.h:364
int sidx
The index of this spell for this class.
Definition: player.h:271
u32b total_energy
Definition: player.h:533
int cur_num
Definition: player.h:140
char * name
Definition: player.h:207
struct monster_race * monster_race
Definition: player.h:441
int equip_cnt
Definition: player.h:473
A structure to hold class-dependent information on spell books.
Definition: player.h:282
char * spell_noun
Definition: player.h:257
int command_wrk
Definition: player.h:453
int isucc
Definition: player.h:358
int sfail
Base chance of failure.
Definition: player.h:275
Structure for magic realms.
Definition: player.h:251
struct history_chart * succ
Definition: player.h:357
struct magic_realm * next
Definition: player.h:252
Monster information, for a specific monster.
Definition: monster.h:369
s16b lev
Definition: player.h:509
int new_spells
Definition: player.h:438
uint32_t u32b
Definition: h-basic.h:172
struct effect * effect
The spell's effect.
Definition: player.h:268
Player history information.
Definition: player.h:374
Definition: z-type.h:24
int num_shots
Number of shots x10.
Definition: player.h:396
Information about object kinds, including player knowledge.
Definition: object.h:163
char * book_noun
Definition: player.h:258
bool arena_level
Definition: player.h:461
void player_exp_lose(struct player *p, s32b amount, bool permanent)
Definition: player.c:275
u32b redraw
Definition: player.h:449
struct player_race * player_id2race(guid id)
Definition: player-race.c:21
s16b ht_birth
Definition: player.h:561
keycode_t code
Definition: ui-event.c:25
void player_flags(struct player *p, bitflag f[OF_SIZE])
Obtain object flags for the player.
Definition: player.c:288
int num_books
Number of spellbooks.
Definition: player.h:297
int x_skills[SKILL_MAX]
Extra skills.
Definition: player.h:315
Definition: player.h:104
Information about class magic knowledge.
Definition: player.h:294
Definition: player.h:117
bool player_restore_mana(struct player *p, int amt)
Definition: player.c:329
struct player_class * classes
Definition: player.c:40
Definition: player.h:79
u16b type
Definition: player.h:150
struct equip_slot * next
Definition: player.h:148
u16b exp_frac
Definition: player.h:513
int r_mhp
Hit-dice modifier.
Definition: player.h:175
s16b ht
Definition: player.h:499
void player_exp_gain(struct player *p, s32b amount)
Definition: player.c:267
Entity guids.
png_infop png_uint_16p * hist
Definition: libpng12/png.h:2332
player race and class flags
s16b * timed
Definition: player.h:527
Structure for the "quests".
Definition: player.h:133
const struct magic_realm * lookup_realm(const char *code)
Definition: player.c:128
struct monster_race * race
Definition: player.h:139
bitflag pflags[PF_SIZE]
Racial (player) flags.
Definition: player.h:195
int c_skills[SKILL_MAX]
Class skills.
Definition: player.h:314
int stat_name_to_idx(const char *name)
Definition: player.c:109
s16b food
Definition: player.h:536
uint8_t byte
Definition: h-basic.h:167
s16b max_depth
Definition: player.h:504
int max
Maximum starting amount.
Definition: player.h:243
char * text
Definition: player.h:360
int tval
General object type (see TV_ macros)
Definition: player.h:240
bool cumber_armor
Mana draining armor.
Definition: player.h:416
int spell_first
Level of first spell.
Definition: player.h:295
Options table and definitions.
u16b count
Definition: player.h:162
struct player_shape * shapes
Definition: player.c:39
int max_attacks
Maximum possible attacks.
Definition: player.h:323
Blow names for shapechanged players.
Definition: player.h:205
const s32b player_exp[PY_MAX_LEVEL]
Base experience levels, may be adjusted up for race and/or class.
Definition: player.c:46
size_t length
Current length.
Definition: player.h:377
Definition: player.h:123
int min_weight
Minimum weapon weight for calculations.
Definition: player.h:324
unsigned int idx
Definition: player.h:366
const s16 modifiers[]
Definition: main-nds.c:61
s16b deep_descent
Definition: player.h:530
Write value lines for a set of modifiers.
int slevel
Required level (to learn)
Definition: player.h:273
int r_adj[STAT_MAX]
Stat bonuses.
Definition: player.h:190
s32b au_birth
Definition: player.h:559
Definition: cave.h:178
bool autosave
Definition: player.h:432
bool wizard
Definition: player.h:554
struct object ** inven
Definition: player.h:470
int num_blows
Number of blows x100.
Definition: player.h:395
Definition: player.h:119
int num_blows
Definition: player.h:232
struct player_shape * next
Definition: player.h:214
All the variable state that changes when you put on/take off equipment.
Definition: player.h:385
char * code
Definition: player.h:253
Player history table.
Definition: player-history.h:47
int max_num
Definition: player.h:141
s16b msp
Definition: player.h:519
bool dungeon
Whether this is a dungeon book.
Definition: player.h:285
bool playing
Definition: player.h:431
char * name
Definition: player.h:161
Object information, for a specific object.
Definition: object.h:399
struct equip_slot * slots
Definition: player.h:163
s32b au
Definition: player.h:502
char * text
Definition: player.h:266
bool is_dead
Definition: player.h:552
bool running_withpathfind
Definition: player.h:466
s32b max_exp
Definition: player.h:511
Player class info.
Definition: player.h:305
int sexp
Encoded experience bonus.
Definition: player.h:276
struct effect * effect
Effect on taking this shape (effects.c)
Definition: player.h:229
#define PF_SIZE
Definition: player.h:51
u32b update
Definition: player.h:447
int mod_wgt
Mod weight.
Definition: player.h:184
int ac
Base ac.
Definition: player.h:402
Definition: player.h:120
int ammo_mult
Ammo multiplier.
Definition: player.h:399
const struct magic_realm * realm
The magic realm of this book.
Definition: player.h:287
Definition: player.h:125
int total_weight
Definition: player.h:471
const char * name
Definition: player.h:171
struct player_class * next
Definition: player.h:306
int running
Definition: player.h:465
int cur_light
Radius of light (if any)
Definition: player.h:410
int roll
Definition: player.h:359
int base_wgt
Base weight.
Definition: player.h:183
s16b age
Definition: player.h:498
int tval
Item type of the book.
Definition: player.h:283
int type
Definition: mon-msg.c:80
s16b mhp
Definition: player.h:515
png_uint_32 int flags
Definition: libpng12/png.h:1681
unsigned int ridx
Definition: player.h:173
s16b csp
Definition: player.h:520
u16b chp_frac
Definition: player.h:517
Definition: player.h:106
struct player_shape * shape
Definition: player.h:568
Definition: player.h:122
byte unignoring
Definition: player.h:538
struct player_race * races
Definition: player.c:38
byte player_hp_attr(struct player *p)
Definition: player.c:301
#define PLAYER_NAME_LEN
Definition: option.h:23
const struct magic_realm * realm
The magic realm of this spell.
Definition: player.h:269
int b_age
Base age.
Definition: player.h:178
int att_multiply
Multiplier for attack calculations.
Definition: player.h:325
const struct player_race * race
Definition: player.h:490
const char ** p[]
Definition: name.c:40
byte bitflag
Definition: z-bitflag.h:27
char * name
Definition: player.h:151
s32b exp
Definition: player.h:512
byte index
Definition: player.h:136
const char * name
Definition: player.h:307
Items the player starts with.
Definition: player.h:239
byte * spell_order
Definition: player.h:541
bool generate_level
Definition: player.h:433
int skills[SKILL_MAX]
Skills.
Definition: player.h:223
byte expfact
Definition: player.h:496
Definition: player.h:363
int16_t s16b
Definition: h-basic.h:170
bitflag pflags[PF_SIZE]
Shape (player) flags.
Definition: player.h:225
int body
Race body.
Definition: player.h:188
Temporary, derived, player-related variables used during play but not saved.
Definition: player.h:430
Definition: player.h:56
u16b noscore
Definition: player.h:550
int num_spells
Number of spells in this book.
Definition: player.h:286
unsigned int cidx
Definition: player.h:308
struct start_item * start_items
Starting inventory.
Definition: player.h:327
int stat
Definition: player.h:255
int r_exp
Experience factor.
Definition: player.h:176
Element info type.
Definition: object.h:114
int total_spells
Number of spells for this class.
Definition: player.h:299
byte * spell_flags
Definition: player.h:540
bool heavy_shoot
Heavy shooter.
Definition: player.h:413
int dam_red
Damage reduction.
Definition: player.h:403
s16b word_recall
Definition: player.h:529
Definition: player.h:121
A structure to hold class-dependent information on spells.
Definition: player.h:264
struct object ** quiver
Definition: player.h:469
Definition: object.h:56
bool running_firststep
Definition: player.h:467
int see_infra
Infravision range.
Definition: player.h:408
char * history
Definition: player.h:546
#define OF_SIZE
Definition: obj-properties.h:121
Player shapechange shape info.
Definition: player.h:213
int num_moves
Number of movement actions.
Definition: player.h:397
s16b recall_depth
Definition: player.h:505
struct object * obj
Definition: player.h:152
int c_exp
Experience factor.
Definition: player.h:318
Definition: obj-properties.h:114
s16b max_lev
Definition: player.h:508
struct history_info * entries
List of entries.
Definition: player.h:375
int base_hgt
Base height.
Definition: player.h:181
int c_mhp
Hit-dice adjustment.
Definition: player.h:317
Definition: player.h:124
unsigned int guid
Definition: guid.h:22
byte player_sp_attr(struct player *p)
Definition: player.c:315
struct player_blow * next
Definition: player.h:206
basic object structs and enums
int smana
Required mana (to cast)
Definition: player.h:274
struct player_blow * blows
Definition: player.h:231
Definition: player.h:118
int r_skills[SKILL_MAX]
Skills.
Definition: player.h:192
byte hitdie
Definition: player.h:495
int speed
Current speed.
Definition: player.h:393
u32b notice
Definition: player.h:445
int ammo_tval
Ammo variety.
Definition: player.h:400
bool player_stat_inc(struct player *p, int stat)
Definition: player.c:143
A single equipment slot.
Definition: player.h:147
const char * name
Definition: player.h:215
Definition: player.h:103
bitflag pflags[PF_SIZE]
(Player) flags
Definition: player.h:321
struct object_kind * object_kind
Definition: player.h:443
Histories are a graph of charts; each chart contains a set of individual entries for that chart...
Definition: player.h:355
bool heavy_wield
Heavy weapon.
Definition: player.h:412
bool light_level
Definition: player.h:460
byte searching
Definition: player.h:542
struct object * gear_k
Definition: player.h:571
u32b resting_turn
Definition: player.h:534
bool create_down_stair
Definition: player.h:459
struct magic_realm * realms
Definition: player.c:41
int32_t s32b
Definition: h-basic.h:173
bool player_stat_dec(struct player *p, int stat, bool permanent)
Definition: player.c:169
Effect.
Definition: object.h:52
s16b chp
Definition: player.h:516
bool dropping
Definition: player.h:435
struct class_book * books
Details of spellbooks.
Definition: player.h:298
char * name
Definition: player.h:265
s16b wt
Definition: player.h:500
s16b wt_birth
Definition: player.h:562
s16b depth
Definition: player.h:506
Definition: player.h:116
int min
Minimum starting amount.
Definition: player.h:242
struct player_class * player_id2class(guid id)
Definition: player-class.c:22
struct history_entry * entries
Definition: player.h:365
Intialize random names
Definition: init.c:847
int spell_weight
Max armor weight to avoid mana penalties.
Definition: player.h:296
int m_age
Mod age.
Definition: player.h:179
char * verb
Definition: player.h:256
int sidx
Definition: player.h:217
char * name
Definition: player.h:137
u16b csp_frac
Definition: player.h:521
int resting
Definition: player.h:463
s16b energy
Definition: player.h:532
bool create_up_stair
Definition: player.h:458
Most of the "player" information goes here.
Definition: player.h:489
The option data structures.
Definition: option.h:62
struct start_item * next
Definition: player.h:245
struct player_upkeep * upkeep
Definition: player.h:578
int quiver_cnt
Definition: player.h:474
int mod_hgt
Mod height.
Definition: player.h:182
struct player * player
Pointer to the player struct.
Definition: list-options.h:50
int recharge_pow
Definition: player.h:475
struct quest * next
Definition: player.h:135
struct player_body * bodies
Externs
Definition: player.c:37
int to_a
Bonus to ac.
Definition: player.h:404
#define PY_MAX_LEVEL
Definition: player.h:81
struct class_spell * spells
Spells in the book.
Definition: player.h:288
int to_a
Plusses to AC.
Definition: player.h:219
struct history_entry * next
Definition: player.h:356
byte level
Definition: player.h:138
int sval
Item sub-type for book.
Definition: player.h:284
int inven_cnt
Definition: player.h:472
int to_h
Bonus to hit.
Definition: player.h:405
Definition: player.h:107
int to_h
Plusses to hit.
Definition: player.h:220
struct chunk * cave
Definition: player.h:574
struct player_race * next
Definition: player.h:170
bool bless_wield
Blessed (or blunt) weapon.
Definition: player.h:414
A player 'body'.
Definition: player.h:158
char * name
Definition: player.h:254
int energy_use
Definition: player.h:437
int c_adj[STAT_MAX]
Stat modifier.
Definition: player.h:312
size_t next
First unused entry.
Definition: player.h:376
bool only_partial
Definition: player.h:434
u16b total_winner
Definition: player.h:548
Definition: player.h:109