removed all C-style casts

This commit is contained in:
2024-07-18 17:56:00 -04:00
parent 8f00e903e8
commit 1a9c04ad5a
36 changed files with 212 additions and 92 deletions

View File

@ -46,39 +46,46 @@ enum game_command : int {game_command_terminate = 0,
};
// Character generation related
static const int RACE_CNT = 17;
static const int RACE_CNT = 23;
enum race : int {rshade = 0, rdrow, rvampire, rtroll,
rgoblin, rhuman, rdwarf, relf,
rorc, rmerchant, rdragon, rhalfling,
rt_800, rmr_goose, rmonk, rbrawler,
rassassin
rassassin, rviking, rswordsman,
rleprechaun, rwitch, rhacker, rbaby_dragon
};
static const char CHAR_REP[RACE_CNT] = {
's', 'd', 'v', 't', 'g', 'H', 'W', 'E', 'O', 'M', 'D', 'L',
't', 'g', 'm', 'b', 'a'
't', 'g', 'm', 'b', 'a',
'V', 'S', 'l', 'W', 'h', 'B'
};
static const int MAX_HP[RACE_CNT] = {
125, 150, INF, 120, 110, 140, 100, 140, 180, 30, 150, 100,
800, 130, 150, 120, 100
800, 130, 150, 120, 100,
150, 100, 60, 100, 90, 140
};
static const int STARTING_HP[RACE_CNT] = {
125, 150, 50, 120, 110, 140, 100, 140, 180, 30, 150, 100,
800, 130, 150, 120, 100
800, 130, 150, 120, 100,
150, 100, 60, 100, 90, 140
};
static const int STARTING_ATK[RACE_CNT] = {
25, 25, 25, 25, 15, 20, 20, 30, 30, 70, 20, 15,
40, 25, 80, 15, 30
40, 25, 80, 15, 30,
30, 25, 10, 20, 15, 25
};
static const int STARTING_DEF[RACE_CNT] = {
25, 15, 25, 15, 20, 20, 30, 10, 25, 5, 20, 20,
50, 20, 0, 20, 10
50, 20, 0, 20, 10,
25, 15, 15, 15, 30, 40
};
static const fraction STARTING_HR[RACE_CNT] = {
{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1},
{1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
{1, 1}, {1, 1}, {100, 1}, {3, 4}, {1, 1}
{1, 1}, {1, 1}, {100, 1}, {3, 4}, {1, 1},
{1, 3}, {1, 1}, {1, 2}, {1, 2}, {1, 2}, {1, 3}
};