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.
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!
- 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.
- Programming Language: Java
- Topics Covered:
- Object-Oriented Programming (OOP) principles
- Abstract classes and inheritance
- Encapsulation and polymorphism
- Dynamic behavior through overridden methods
- 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
- 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
- Compile the Java Files:
javac *.java
- Run the Game:
java Game
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.
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
This project is licensed under the MIT License. See LICENSE for details.
Add multiplayer support. Include AI-based opponents. Implement graphical user interface (GUI). Create advanced combat mechanics.
Developed by Sejuti Sarker Tinny