Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FarzadHayat/monster-fighter

Repository files navigation

Monster Fighter

A turn-based monster battling game built in Java. Build your team, fight opponents, visit the shop, and survive as many days as possible to achieve the highest score.

Available in two versions: a graphical (GUI) edition and a command-line (CMD) edition.


Table of Contents


Gameplay

  • Choose a difficulty (Easy, Normal, or Hard) and a game length (5–15 days).
  • Start with a roster of monsters and use gold to buy new monsters and items from the Shop.
  • Each day, fight battles against opponent teams to earn gold and score points.
  • At the end of each day, Sleep to advance to the next day — the shop refreshes, your monsters heal, and random events may occur.
  • The game ends when the final day is reached. Aim for the highest score!

Monsters

Monster Play Style
Average Joe Balanced stats — a safe all-rounder
Chunky High HP, built to tank hits
Lanky Fast attacker with high damage output
Shanny Specialises in healing
Raka High critical-hit rate
Zap Unique electric-type abilities

Items

Item Effect
Health Potion Restores a monster's health
Damage Potion Permanently increases a monster's damage
Crit Potion Permanently increases a monster's critical-hit rate
Level Potion Instantly levels up a monster

Requirements

Verify your installation by running:

java -version

Expected output (version 17 or higher):

java version "17.0.2" 2022-01-18 LTS
Java(TM) SE Runtime Environment (build 17.0.2+8-LTS-86)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.2+8-LTS-86, mixed mode, sharing)

Running the Game

  1. Extract the ZIP file.

  2. Open a terminal and navigate to the extracted folder:

    cd /path/to/extracted-folder
  3. Run the desired version:

    GUI version:

    java -jar fha62_zrc13_MonsterFighter_GUI.jar

    Command-line version:

    java -jar fha62_zrc13_MonsterFighter_CMD.jar

Opening the Source Code in Eclipse

  1. Open Eclipse and go to File → Import.
  2. Under General, double-click Existing Projects into Workspace.
  3. Click Browse and navigate to the extracted folder.
  4. Select the MonsterFighter folder and click Select Folder.
  5. Ensure MonsterFighter is checked in the Projects list.
  6. Click Finish.

Project layout

src/
├── main/         # Core game logic (GameEnvironment, Shop, Battle, Player, …)
├── monsters/     # Monster classes (AverageJoe, Chunky, Lanky, Shanny, Raka, Zap)
├── items/        # Item classes (HealthPotion, DamagePotion, CritPotion, LevelPotion)
├── gui/          # Swing-based GUI screens
├── exceptions/   # Custom exceptions
└── test/         # Unit tests
diagrams/         # UML diagrams
doc/              # Javadoc
Report.pdf        # Project report

Resources

  • UML diagrams — diagrams/ folder
  • Project report — Report.pdf
  • Javadoc — doc/ folder

Credits

About

A player vs computer game created using Java for the SENG201 project.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages