A console-based RPG survival game built in C++. Fight monsters, collect gold, and level up your way to victory — or die trying!
Monster Fighter is a turn-based console RPG. You create a character and face randomly generated monsters. Each victory earns you gold and a level-up. Reach level 20 to win — but watch your HP!
You can also attempt to flee from a fight, though success is never guaranteed.
| Monster | Symbol | HP | Damage | Gold |
|---|---|---|---|---|
| Dragon | D |
20 | 4 | 100 |
| Orc | o |
4 | 2 | 25 |
| Slime | s |
1 | 1 | 10 |
- You start with 10 HP, 1 damage, and 0 gold
- Each turn: choose to (F)ight or (R)un
- Winning a fight gives you the monster's gold and +1 level / +1 damage
- Running has a 50% chance of failure — the monster attacks if you fail
- Reach level 20 to win the game
- C++
- OOP:
Creaturebase class withPlayerandMonsterinheritance rand()/srand(): randomized monster generation and flee outcomesfriendfunctions:attackMonster/attackPlayerfor combat logic- Static data: monster stats stored in a static
MonsterDataarray
Enter your name: Alex
Welcome, Alex.
You have 10 health, 1 damage and are carrying 0 gold.
You met a slime (s).
Do you want (R)un or (F)ight?: F
You hit the slime for 1. Now monster has 0 hp.
A slime is dead now. You earn 10 gold.
Level up! Your level now: 2
You met a dragon (D).
Do you want (R)un or (F)ight?: R
Running failed. You must to fight!
Monster hit you for 4. Now you have 6 hp.
- Replace
rand()withstd::mt19937for better randomness - Add healing items or potions
- More monster types and special abilities
- Save/load game progress
- Difficulty settings
Oleksandr Kopii GitHub: @SamuraiSanch
⭐ If you enjoyed this project, feel free to leave a star!