Skip to content

Repository files navigation

Turn-Based-Battle-Simulator-using-Java

Battle of Legends: Thor vs Loki

A text-based battle simulation game built in Java where the Norse legends Thor and Loki clash in an epic duel of strategy and skill.


🎮 Gameplay Overview

This game pits two iconic characters, Thor and Loki, against each other in a turn-based battle. Each character has unique abilities, stats, and strategies for victory. Choose actions like attacking, defending, healing, or using special abilities to outsmart your opponent!


📚 Features

  • Thor's Abilities: Use Mjolnir to attack, summon lightning, and charge devastating strikes.
  • Loki's Abilities: Create illusions to confuse the enemy and boost defense.
  • Turn-Based Combat: Players alternate turns choosing actions like attack, defend, heal, or use special abilities.
  • Dynamic Stats: Health, mana, defense, and attack power dynamically change during the game.

📂 Technologies Used

  • Programming Language: Java
  • Topics Covered:
    • Object-Oriented Programming (OOP) principles
    • Abstract classes and inheritance
    • Encapsulation and polymorphism
    • Dynamic behavior through overridden methods

💻 Installation

  1. Ensure Java JDK is Installed:
    Download and install the Java JDK (v8 or later) if not already installed.
    Verify installation by running:
    java -version
    javac -version
    
  2. Clone the GitHub repository to your local machine:
 git clone https://github.com/yourusername/battle-of-legends-thor-vs-loki.git
 cd battle-of-legends-thor-vs-loki
  1. Compile the Java Files:
  javac *.java
  1. Run the Game:
  java Game

🎮 How to Play

At the start of the game, you will control Thor or Loki. Choose from the following actions on your turn: Attack: Deal damage based on your character’s strength and opponent’s defense. Defend: Boost your defense temporarily for the next turn. Heal: Restore a portion of your health (uses mana). Special Ability: Use your character's unique abilities to turn the tide of battle. The game ends when one character’s health reaches 0.

🖼️ Gameplay Images

image

image

🤝 Contributing

Contributions are welcome! If you have ideas for improvements or want to fix bugs:

Fork the repository. Create a new branch for your feature:

git checkout -b feature-name

Commit your changes:

git commit -m "Add feature-name"

Push the branch:

git push origin feature-name

Open a pull request

📜 License

This project is licensed under the MIT License. See LICENSE for details.

🛠️ Future Features

Add multiplayer support. Include AI-based opponents. Implement graphical user interface (GUI). Create advanced combat mechanics.

🔗 Author

Developed by Sejuti Sarker Tinny

About

A text-based battle simulation game built in Java where the Norse legends Thor and Loki clash in an epic duel of strategy and skill.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages