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
10typedef 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
18typedef 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
25typedef struct {
26 int health;
27 int mana;
28 int stamina;
30
31typedef struct {
32 int armor; // reduced physical damage taken
33 int magic_resist;// reduced magical damage taken
35
46void raise_skill(stats_t* stats, stat_type_t stat, int skillpoint);
47
48#endif//STATS_H
Defines common macros, types, and global variables for color schemes and utilities.
void raise_skill(stats_t *stats, stat_type_t stat, int skillpoint)
Raises a specified skill by one point.
Definition stats.c:10