DungeonCrawl
|
Declares combat mode state machine, including menus and combat operations. More...
Go to the source code of this file.
Enumerations | |
enum | internal_combat_state_t { COMBAT_MENU , ABILITY_MENU , POTION_MENU , EVALUATE_COMBAT , COMBAT_EXIT } |
enum | combat_result_t { CONTINUE_COMBAT , PLAYER_WON , PLAYER_LOST , EXIT_GAME } |
Functions | |
int | init_combat_mode () |
Initialize the combat mode. | |
combat_result_t | start_combat (character_t *player, character_t *monster) |
Starts the loop for combat between the player and the monster. | |
internal_combat_state_t | combat_menu (const character_t *player, const character_t *monster) |
Collects the menu options for the ability menu. | |
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 | invoke_potion_effect (character_t *character, potion_t *potion) |
Invoke the effect of a potion on a character. | |
void | shutdown_combat_mode (void) |
Shuts down the combat mode and frees allocated memory resources. |
Declares combat mode state machine, including menus and combat operations.
Definition in file combat_mode.h.
enum combat_result_t |
Definition at line 20 of file combat_mode.h.
enum internal_combat_state_t |
Definition at line 12 of file combat_mode.h.
internal_combat_state_t ability_menu | ( | character_t * | player, |
character_t * | monster ) |
Collects the menu options for the ability menu.
abilities | Pointer to the player character. |
monster | Pointer to the monster character. |
Definition at line 209 of file combat_mode.c.
internal_combat_state_t combat_menu | ( | const character_t * | player, |
const character_t * | monster ) |
Collects the menu options for the ability menu.
player | Pointer to the player character. |
monster | Pointer to the monster character. |
Definition at line 156 of file combat_mode.c.
int init_combat_mode | ( | ) |
Initialize the combat mode.
Definition at line 67 of file combat_mode.c.
void invoke_potion_effect | ( | character_t * | character, |
potion_t * | potion ) |
Invoke the effect of a potion on a character.
character | Pointer to the character which uses the potion. |
potion | Pointer to which potion to be used. |
Definition at line 387 of file combat_mode.c.
internal_combat_state_t potion_menu | ( | character_t * | player, |
character_t * | monster ) |
Collects the menu options for the potion menu.
abilities | Pointer to the player character. |
monster | Pointer to the monster character. |
Definition at line 262 of file combat_mode.c.
void shutdown_combat_mode | ( | void | ) |
Shuts down the combat mode and frees allocated memory resources.
Definition at line 511 of file combat_mode.c.
combat_result_t start_combat | ( | character_t * | player, |
character_t * | monster ) |
Starts the loop for combat between the player and the monster.
player | Pointer to the player character. |
monster | Pointer to the monster character. |
Definition at line 107 of file combat_mode.c.