DungeonCrawl
Loading...
Searching...
No Matches
level.h
Go to the documentation of this file.
1
5#ifndef XP_LEVEL_H
6#define XP_LEVEL_H
7#include "character.h"
8
9
10// Define constants for XP progression
11#define BASE_XP 100
12#define XP_MULTIPLIER 1.5
13
14// Function prototypes
20int calculate_xp_for_next_level(int level);
26void add_xp(character_t* player, int xp_earned);
31void level_up(character_t* player);
32
33#endif// XP_LEVEL_H
Exposes functions for working working with the character.
void level_up(character_t *player)
Handles the level-up process for a character.
Definition level.c:27
int calculate_xp_for_next_level(int level)
Calculates the XP required for the next level.
Definition level.c:11
void add_xp(character_t *player, int xp_earned)
Adds XP to a character and handles level-up if the XP threshold is reached.
Definition level.c:17