# Java Knight
A turn-based RPG with Roguelike elements which can be run in the terminal.
An assignment for AP course.

The goal of this assignment is to demonstrate OOP concepts in Java.

### **Game Story**
*You are stock in land of Javanest where is under attack of a magical dragon and his little monsters (Goblin, Skeleton and Vampire).
Each monster holds a key with itself, and you are supposed to fight them and gain their key.
Once you got all 3 keys, you go to the ashen peaks where the dragon is waiting for you for the final battle.
If you kill the dragon, Javanest is rescued.*

### **How to play**
First, you choose a character to play with. The characters are as followed:
1. **Knight** : Uses a sword and has a high base damage
2. **Assassin** : Uses dual daggers and is a die hard
3. **Wizard** : Uses his magic staff and has high stamina

After you chose your character, you fight little monsters. It is your call which one.
1. **Goblin** : Uses a dagger and is located in the whispering forest
2. **Skeleton** : Uses his bone club and is located in the forgotten catacombs
3. **Vampire** : Bites and is located in the crimson castle
4. **Dragon (Final Boss)** : Breathes fire and is in the ashen peak

In each battle you and your enemy take turns to choose among five options:
1. **Light Attack:** Deals moderate damage and costs **NO Mana**. (Note: If the player runs out of Mana/Stamina, this is the ONLY action they can perform.)
2. **Heavy Attack:** Deals high damage, medium Mana cost.
3. **Defend:** Completely blocks or significantly reduces the damage of the enemy's *next* strike. Medium Mana cost.
4. **Heal:** Restores a portion of the player's HP. Medium-high Mana cost.
5. **Special Ability:** A unique class-based ultimate move (Highest Mana cost):
    - **Wizard** : Casts a devastating spell that damages the enemy while simultaneously replenishing some HP.
    - **Assassin** : Turns invisible, dodging the next incoming attack completely and guaranteeing a *Critical Hit* on their next turn.
    - **Knight** : Performs a shield bash that stuns the enemy, forcing them to skip their next turn while dealing heavy damage.

After defeating each monster, there is a 50 percent chance that it will drop its key.
You can only fight the dragon if you gain all 3 keys.

![](https://git.meshcomp.ir/Matin-Ardestani/HW-04-JAVA-KNIGHT/raw/branch/main/Readme_Pictures/image.png)

### **OOP Structure**
**Entities**
```Class Hierarchy
Entity (abstract)
│
├── Player (abstract)
│   ├── Knight
│   ├── Assassin
│   └── Wizard
│
└── Enemy (abstract)
     ├── Goblin
     ├── Skeleton
     ├── Vampire
     └── Dragon
```
**Items**
```Class Hierarchy
Item (abstract)
│
└── Weapon (abstract)
    ├── Sword
    ├── MagicStaff
    ├── DualDagger
    ├── Dagger
    ├── BoneClub
    ├── Bite
    └── Flame
```