DungeonCrawl
Loading...
Searching...
No Matches
ability.h
Go to the documentation of this file.
1
5#ifndef ABILITY_H
6#define ABILITY_H
7
8#include "../common.h"
11#include "damage.h"
12
13//index of the different abilities in the table
14typedef enum {
15 BITE,
16 QUICK_SLASH,
17 HEAVY_SWING,
18 SWEEPING_STRIKE,
19 GUARDING_STANCE,
20 HEAVY_CHOP,
21 PIERCING_STRIKE,
22 EXECUTE,
23 BERSERKER_RAGE,
24 QUICK_SHOT,
25 POWER_SHOT,
26 STEADY_SHOT,
27 STEADY_AIM,
28 FIREBLAST,
29 FIREBALL,
30 PYROBLAST,
31 MANA_SHIELD,
32 CHOP,
33 AXE_SWING,
34 BACKSTAB,
35 SINISTER_STRIKE,
36 DEFLECT,
37 SHIELD_WALL,
38 MACE_STRIKE,
39 CRUSHING_BLOW,
40 ARCANE_BOLT,
41 ARCANE_MISSILE,
42 SWORD_SLASH,
43 RIPOSTE,
44 PUNCH,
45 MAX_ABILITIES
46} ability_names_t;
47
48typedef struct ability_t {
49 char name[MAX_NAME_LENGTH];
50 int roll_amount;
51 int accuracy;
52 int resource_cost;
53 dice_size_t dice_size;
54 damage_type_t damage_type;
55} ability_t;
56
57typedef struct {
58 ability_t abilities[MAX_ABILITIES];
60
61
69ability_table_t* init_ability_table(memory_pool_t* memory_pool, const db_connection_t* db_connection);
70
77void free_ability_table(memory_pool_t* memory_pool, ability_table_t* table);
78
79#endif//ABILITY_H
void free_ability_table(memory_pool_t *memory_pool, ability_table_t *table)
Free the ability table, deallocates memory in the memory pool.
Definition ability.c:45
ability_table_t * init_ability_table(memory_pool_t *memory_pool, const db_connection_t *db_connection)
Initialize the ability table, allocates memory and returns the pointer to the table.
Definition ability.c:16
Defines common macros, types, and global variables for color schemes and utilities.
Exposes functions for working with damage.
Exposes functions for working with the database.
Exposes functions for working with the memory management.
This struct is used for the database connection in SQLite.
Definition database.h:22