DungeonCrawl
|
Exposes functions for working with the character. More...
#include "character.h"
Go to the source code of this file.
Macros | |
#define | BASE_XP 100 |
#define | XP_MULTIPLIER 1.5 |
Functions | |
int | calculate_xp_for_next_level (int level) |
Calculates the XP required for the next level. | |
void | add_xp (character_t *player, int xp_earned) |
Adds XP to a character and handles level-up if the XP threshold is reached. | |
void | level_up (character_t *player) |
Handles the level-up process for a character. |
Exposes functions for working with the character.
Definition in file level.h.
void add_xp | ( | character_t * | player, |
int | xp_earned ) |
Adds XP to a character and handles level-up if the XP threshold is reached.
player | Pointer to the character gaining XP |
xp_earned | The amount of XP earned |
Definition at line 17 of file level.c.
int calculate_xp_for_next_level | ( | int | level | ) |
void level_up | ( | character_t * | player | ) |
Handles the level-up process for a character.
player | Pointer to the character leveling up |
Definition at line 27 of file level.c.