summaryrefslogtreecommitdiff
path: root/src/player_race.hpp
blob: 36c9109ea82e3769f6916009bd6ee5d85fb95600 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once

#include "h-basic.h"
#include "body.hpp"
#include "object_flag_set.hpp"
#include "object_proto.hpp"
#include "player_defs.hpp"
#include "player_level_flag.hpp"
#include "player_race_ability_type.hpp"
#include "player_race_flag_set.hpp"
#include "skills_defs.hpp"
#include "skill_modifiers.hpp"

#include <array>
#include <vector>

/**
 * Player racial descriptior.
 */
struct player_race
{
	const char *title = nullptr;                            /* Type of race */
	char *desc = nullptr;

	s16b r_adj[6] { };                                      /* Racial stat bonuses */

	char luck = '\0';                                       /* Luck */

	byte r_mhp = 0;                                         /* Race hit-dice modifier */
	u16b r_exp = 0;                                         /* Race experience factor */

	byte infra = 0;                                         /* Infra-vision range */

	u32b choice[2] { };                                     /* Legal class choices */

	s16b powers[4] { };                                     /* Powers of the race */

	byte body_parts[BODY_MAX] { };                          /* To help to decide what to use when body changing */

	s16b chart = 0;                                         /* Chart history */

	player_race_flag_set flags;

	std::array<player_level_flag, PY_MAX_LEVEL+1> lflags;

	struct skill_modifiers skill_modifiers;

	std::vector<object_proto> object_protos;

	std::vector<player_race_ability_type> abilities;        /* Abilities to be gained by level; ignores prereqs */
};