An open API service indexing awesome lists of open source software.

https://github.com/sejuti-sarker-tinny/turn-based-battle-simulator-using-java

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.
https://github.com/sejuti-sarker-tinny/turn-based-battle-simulator-using-java

abstraction game game-development java oops-in-java

Last synced: 11 months ago
JSON representation

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.

Awesome Lists containing this project

README

          

# 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:
```bash
java -version
javac -version

2. **Clone the GitHub repository to your local machine:**
```bash
git clone https://github.com/yourusername/battle-of-legends-thor-vs-loki.git
cd battle-of-legends-thor-vs-loki
```
3. **Compile the Java Files:**
```bash
javac *.java
```

4. **Run the Game:**
```bash
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](https://github.com/user-attachments/assets/8b840f72-127b-4a82-a273-6c0b80cee954)

![image](https://github.com/user-attachments/assets/51d4f938-1615-435c-ab76-85ccd1d96172)

## 🤝 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:
```bash
git checkout -b feature-name
```
**Commit your changes:**
```bash
git commit -m "Add feature-name"
```
**Push the branch:**
```bash
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