DungeonCrawl
Loading...
Searching...
No Matches
combat_mode.h
Go to the documentation of this file.
1
5#ifndef COMBAT_MODE_H
6#define COMBAT_MODE_H
7
9#include "../item/potion.h"
10#include "ability_fw.h"
11
12typedef enum {
13 COMBAT_MENU,
14 ABILITY_MENU,
15 POTION_MENU,
16 EVALUATE_COMBAT,// checks if the combat reached an end
17 COMBAT_EXIT // exit combat & game
18} internal_combat_state_t;
19
20typedef enum {
21 CONTINUE_COMBAT,
22 PLAYER_WON,
23 PLAYER_LOST,
24 EXIT_GAME
25} combat_result_t;
26
39combat_result_t start_combat(character_t* player, character_t* monster);
45internal_combat_state_t combat_menu(const character_t* player, const character_t* monster);
51internal_combat_state_t ability_menu(character_t* player, character_t* monster);
57internal_combat_state_t potion_menu(character_t* player, character_t* monster);
63void invoke_potion_effect(character_t* character, potion_t* potion);
64
65
71void shutdown_combat_mode(void);
72
73#endif//COMBAT_MODE_H
Exposes a forward struct for abilites.
Exposes a forward strucht for the character type.
internal_combat_state_t combat_menu(const character_t *player, const character_t *monster)
Collects the menu options for the ability menu.
int init_combat_mode()
Initialize the combat mode.
Definition combat_mode.c:67
void invoke_potion_effect(character_t *character, potion_t *potion)
Invoke the effect of a potion on a character.
internal_combat_state_t ability_menu(character_t *player, character_t *monster)
Collects the menu options for the ability menu.
internal_combat_state_t potion_menu(character_t *player, character_t *monster)
Collects the menu options for the potion menu.
void shutdown_combat_mode(void)
Shuts down the combat mode and frees allocated memory resources.
combat_result_t start_combat(character_t *player, character_t *monster)
Starts the loop for combat between the player and the monster.
Exposes functions for working with potions.