DungeonCrawl
|
This file contains functions for initializing and managing abilities. More...
Go to the source code of this file.
Functions | |
void | init_ability (ability_t *ability, char *name, const int roll_amount, const int accuracy, const int resource_cost, const dice_size_t dice_size, const damage_type_t damage_type) |
Initializes an ability with the given parameters. | |
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. | |
void | free_ability_table (memory_pool_t *memory_pool, ability_table_t *table) |
Free the ability table, deallocates memory in the memory pool. |
This file contains functions for initializing and managing abilities.
Definition in file ability.c.
void free_ability_table | ( | memory_pool_t * | memory_pool, |
ability_table_t * | table ) |
Free the ability table, deallocates memory in the memory pool.
memory_pool | Pointer to the memory pool for deallocation. |
table | Pointer to the ability table to be freed. |
Definition at line 45 of file ability.c.
void init_ability | ( | ability_t * | ability, |
char * | name, | ||
const int | roll_amount, | ||
const int | accuracy, | ||
const int | resource_cost, | ||
const dice_size_t | dice_size, | ||
const damage_type_t | damage_type ) |
Initializes an ability with the given parameters.
ability | Pointer to the ability to be initialized. |
name | Name of the ability. |
roll_amount | Number of dice to roll. |
accuracy | Accuracy of the ability. |
resource_cost | Resource cost of the ability. |
dice_size | Size of the dice used for rolling damage. |
damage_type | Type of damage dealt by the ability. |
Definition at line 62 of file ability.c.
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.
memory_pool | Pointer to the memory pool for allocation. |
db_connection | Pointer to the database connection |
Definition at line 16 of file ability.c.