DungeonCrawl
Loading...
Searching...
No Matches
stats.h
Go to the documentation of this file.
1
5
#ifndef STATS_H
6
#define STATS_H
7
8
#include "
../common.h
"
9
10
typedef
enum
{
11
STRENGTH,
12
INTELLIGENCE,
13
DEXTERITY,
14
CONSTITUTION,
15
MAX_STATS
// Used to see how many stats there are
16
} stat_type_t;
17
18
typedef
struct
{
19
int
strength;
// 1 strength = 1 physical damage and 1 stamina
20
int
intelligence;
// 1 intelligence = 1 magic damage and 1 mana
21
int
dexterity;
// Global accuracy and evasion NOT IMPLEMENTED
22
int
constitution;
// 1 constitution = 5 health
23
}
stats_t
;
24
25
typedef
struct
{
26
int
health;
27
int
mana;
28
int
stamina;
29
}
resources_t
;
30
31
typedef
struct
{
32
int
armor;
// reduced physical damage taken
33
int
magic_resist;
// reduced magical damage taken
34
}
defenses_t
;
35
46
void
raise_skill
(
stats_t
* stats, stat_type_t stat,
int
skillpoint);
47
48
#endif
//STATS_H
common.h
Defines common macros, types, and global variables for color schemes and utilities.
raise_skill
void raise_skill(stats_t *stats, stat_type_t stat, int skillpoint)
Raises a specified skill by one point.
Definition
stats.c:10
defenses_t
Definition
stats.h:31
resources_t
Definition
stats.h:25
stats_t
Definition
stats.h:18
src
stats
stats.h
Generated by
1.14.0