|
TheCOSCGameProject
1.0
|
Declares combat-related functions for the Valeris game. More...
#include "../lib/dependencies.h"#include <string>#include <iostream>#include <cstdlib>#include <ctime>#include <chrono>

Go to the source code of this file.
Functions | |
| void | printHealth (int playerHealth, int enemyHealth, const std::string &name) |
| Prints the health status of the player and the enemy. More... | |
| bool | combatV1 (int *playerHealth, int enemyHealth, int difficulty, const std::string &name, int playerDamage, int enemyDamage, int resistance) |
| Handles combat mechanics for version 1. More... | |
| void | combatV2 (int playerHealth, int enemyHealth) |
| Handles combat mechanics for version 2. More... | |
Declares combat-related functions for the Valeris game.
This file contains the declarations of functions used to manage and execute combat scenarios in the game, including printing health statuses and handling different versions of combat mechanics.
| bool combatV1 | ( | int * | playerHealth, |
| int | enemyHealth, | ||
| int | difficulty, | ||
| const std::string & | name, | ||
| int | playerDamage, | ||
| int | enemyDamage, | ||
| int | resistance | ||
| ) |
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 (e.g., easy, medium, hard). |
| name | The name of the enemy. |
This function simulates a combat scenario between the player and an enemy, taking into account the difficulty level. The outcome of the combat is determined based on the player's and enemy's health.
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 | ||
| ) |
Handles combat mechanics for version 2.
| playerHealth | The initial health of the player. |
| enemyHealth | The initial health of the enemy. |
This function provides an alternative combat system with potentially different rules or mechanics compared to combatV1.
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 | ||
| ) |
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 displays the current health points of both the player and the enemy, providing an overview of the combat situation.
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