### Legend of Advanced Programming (please forgive for this stupid name although it's better than JAVA KNIGHT) #### Description : LAP is a simple TUI, rogue-like, turn-based game written in Java programming language this is one of my assignments for AP course at SBU-CS bachelors degree. #### Inspiration : as i know this assignment is a tradition in this course and all of my seniors have done such assignment passing this course. it's an assignment to test your OOP abilities therefore the game is developed object oriented. ### The lore You are a warrior in *Javanest*, a town that is under attack of *The Dragon* and its minions. you have to fight the minions in order to get *Minion Keys* (There is three of them : one for each minion). Dragon lives in the castle that has a door with three lock, in order to unlock them you need all three keys. ### How to play At first you choose your character. you have three choices : 1. The knight : A brave warrior with a strong armor and a sharp sword 2. The assassin : A powerful warrior with a Green light saber 3. The Wizard : A Warrior with fire balls! after you made your choice you teleport into a random spot every time ypu move to a spot a random enemy gets spawned. after the enemy spawned you have three choices : 1. Stay at the spot and fight 2. Move to another spot 3. Go to the Castle and fight the Dragon >Note : option three is only available if you have all the keys (Keys drop randomly when you kill an Enemy.) > otherwise you get a *Locked!* message. #### The combat You have five options in the combat : 1. Light Attack (Free attack) 2. Heavy attack (MP Cost may vary based on the character) 3. Defend 4. Heal 5. Special ability #### Warriors special abilities : | Warrior | Special Ability | Effect | |-------------|-----------------|--------| | Knight | Shield Bash | Stun enemy + heavy damage | | Assassin | Invisibility | Dodge + guaranteed critical hit | | Wizard | Life Steal Spell | Damage enemy + heal | #### Minions special abilities : | Minion | Ability | Description | |------------|---------|-------------| | Goblin | Critical Strike | 80% chance to crit | | Skeleton | Resurrection | Revives once with 50% HP | | Vampire | Life Steal | Drains health from player | | Dragon | Fiery Breath | Ignores defense, unblockable | #### End Gane Once you defeat the dragon the Javanest gets freed and you win the game. ### Object orientation description any Entity we have discussed obeys from a class hierarchy structure : ```Class Hierarchy Entity (abstract) │ ├── Player (abstract) │ ├── Knight │ ├── Assassin │ └── Wizard │ └── Enemy (abstract) ├── Goblin ├── Skeleton ├── Vampire └── Dragon ``` Items do the same only difference being there is no parent class/interface for items : ```Class Hierarchy Items (not a Parent class/Interface) │ ├── Weapon (abstract) │ ├── Bite (Vampire) │ ├── Dagger (Goblin) │ ├── DragonBreath (Dragon) │ ├── FireBall (Wizard) │ ├── LightSaber (Assassin) │ └── Sword (Knight) │ └── Armor (abstract) ├── AssassinArmor ├── KnightArmor └── WizardArmor ``` ### How to run if you use IntelliJ or Eclipse IDE you can clone the repo and just run Main.java otherwise you have two approaches : 1. Painfully compile every class 2. Use the JAR build : ```Powershell/Shell git clone https://github.com/farnam-jhn/Legend-of-AP cd Legend-of-Ap java -jar out/artifacts/HW_04_JAVA_KNIGHT.jar ```