A text-based adventure game, coded entirely in Java.
You are trapped in a dungeon and there is no way out. Enemies are spawning one after the other. It is your goal is to kill as many as you can, without dying yourself.
Throughout the game you are given a certain number of options. Type the corresponding number as your choice to select that option. The following is a brief description of what each of the options accomplish.
1. Attack: You deal a random amount of damage to the enemy, as it also deals damage to you. 2. Use Potion: Drink a potion that restores your health by a certain amount. 3. Run Away: Flee from the enemy and spawn a new enemy. 4. Store: Visit the store to buy new equipment for your journey. 5. Exit: Quit the game with or without saving your progress.
$ git clone https://github.com/Maaslalaniii/Dungeon.git
$ cd Dungeon
$ javac @sources.txt
$ java src/TheDungeon
The game will start after those commands are run.
For a better playing experience use the BlueJ IDE and run the main method found in TheDungeon class.
If you add any new files, re-generate sources.txt by running the following command:
On Linux/macOS:
$ find . -type f -name "*.java" > sources.txt
On Windows:
> dir /s /B *.java > sources.txt
- Enemies drop swords, armour, and health potions upon defeat.
- Swords and armour come in different varieties.
- Ability to load and save state of the game.
- Gold coins as currency.
- Store to purchase various game items.
Add currency such as gold coins.Add a store to purchase swords and armour.Penalty for running away.- Add more names to the enemy list.
- Give enemies special abilities.
- Give player special power-ups.
Keep track of highest enemies killed.Encrypted data.- Implement a graphical user interface.
Contributions that enhance gameplay are always welcome!