Adventure Quest RPG is a console-based role-playing game where players explore different locations, battle monsters, and collect items. The game features a variety of monsters, including powerful boss monsters, and allows players to manage their inventory and equip items to enhance their abilities.
- Player and Monster Battles: Engage in turn-based combat with various monsters.
- Boss Monsters: Face challenging boss monsters with high stats.
- Inventory System: Collect and manage items like weapons, armor, and potions.
- Exploration: Discover new locations and choose your actions.
- Random Encounters: Encounter different types of monsters randomly.
- Name: The name of the character or monster.
- Health: Represents the current health points. When it reaches zero, the character or monster is defeated.
- AttackPower: Determines the amount of damage dealt to an opponent.
- Defense: Reduces the damage received from an opponent’s attack.
- Initiation: A battle begins when the player encounters a monster.
- Turns: Battles are turn-based. The player and the monster take turns to attack each other.
- Attack Calculation:
- The damage dealt during an attack is calculated as:
Damage = AttackPower - Defense
. - If
Defense
is greater than or equal toAttackPower
, the minimum damage dealt is 1.
- The damage dealt during an attack is calculated as:
- Health Reduction: The calculated damage is subtracted from the defender's
Health
. - Defeat: If a character or monster's
Health
reaches zero, they are defeated.
- IBattleStates.cs: Defines the
IBattleStates
interface with propertiesName
,Health
,AttackPower
, andDefense
. - Player.cs: Implements the
IBattleStates
interface and contains player-specific attributes and methods. - Monster.cs: Implements the
IBattleStates
interface and contains monster-specific attributes and methods. - BossMonster.cs: Inherits from
Monster
with enhanced stats for a greater challenge. - BattleSystem.cs: Manages the battle logic and processes attacks between entities implementing
IBattleStates
. - Adventure.cs: Manages the game loop, player actions, location exploration, and random monster encounters.
- Inventory.cs: Manages the collection of items, including methods to add items and display inventory contents.
- Items.cs: Defines the base
Item
class and derived classesWeapon
,Armor
, andPotion
. - Program.cs: The main entry point of the application.
- Starting the Game: The game initializes with the player and a list of monsters.
- Exploring Locations: The player can move between different locations like forests, caves, and towns.
- Encountering Monsters: The player may encounter monsters randomly in different locations.
- Battling Monsters: Engage in turn-based combat with monsters. Use the
Attack
method to deal damage. - Managing Inventory: After defeating monsters, collect items and manage them in the inventory. Equip weapons and armor or use potions to enhance abilities.
- Game Over: The game ends when the player chooses to end the game or if the player's health reaches zero.
- Random Item Drops: After defeating a monster, there is a small chance it will drop items like weapons, armor, or potions.
- Inventory Usage: Before encountering any monster, the player can view and use items from the inventory.
- XUnit Tests: The game includes tests for scenarios such as finding and encountering a boss monster and moving to new locations correctly.
- Clone the repository.
- Open the solution in your preferred IDE.
- Build the solution to restore dependencies and compile the code.
- Run the application from the
Program.cs
file.
Enjoy your adventure in the Adventure Quest RPG!