|
TheCOSCGameProject
1.0
|
Implementation of combat functions for the game. More...

Functions | |
| void | printHealth (int playerHealth, int enemyHealth, const std::string &name) |
| Print the current health status of the player and enemy. More... | |
| bool | combatV1 (int *playerHealth, int enemyHealth, int difficulty, const std::string &name, int playerDamage, int enemyDamage, int resistance) |
| First version of the combat system. More... | |
| void | combatV2 (int playerHealth, int enemyHealth) |
| Placeholder for the second version of the combat system. More... | |
Implementation of combat functions for the game.
This file contains two versions of combat systems used in the game. The first version involves quick reflexes to match directional inputs, while the second version is a placeholder for a more strategic combat system.
| bool combatV1 | ( | int * | playerHealth, |
| int | enemyHealth, | ||
| int | difficulty, | ||
| const std::string & | name, | ||
| int | playerDamage, | ||
| int | enemyDamage, | ||
| int | resistance | ||
| ) |
First version of the combat system.
Handles combat mechanics for version 1.
| playerHealth | The initial health of the player. |
| enemyHealth | The initial health of the enemy. |
| difficulty | The difficulty level of the combat, influencing the response time allowed. |
| name | The name of the enemy G. |
This combat system involves the player quickly matching directional inputs to attack the enemy. The enemy's attacks decrease the player's health if the player fails to respond correctly or quickly enough.
| void combatV2 | ( | int | playerHealth, |
| int | enemyHealth | ||
| ) |
Placeholder for the second version of the combat system.
Handles combat mechanics for version 2.
| playerHealth | The initial health of the player. |
| enemyHealth | The initial health of the enemy. |
This version of the combat system is intended to be more strategic, allowing the player to choose different combat styles (Offensive, Sneaky, Defensive). The implementation details are yet to be completed.
| void printHealth | ( | int | playerHealth, |
| int | enemyHealth, | ||
| const std::string & | name | ||
| ) |
Print the current health status of the player and enemy.
Prints the health status of the player and the enemy.
| playerHealth | The current health of the player. |
| enemyHealth | The current health of the enemy. |
| name | The name of the enemy. |
This function prints the player's and enemy's health in a formatted health bar.
1.8.13