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

https://github.com/aymen016/role-playing-game

Embark on a thrilling adventure with this Text-Based RPG System! Battle monsters, level up, and manage your inventory in an engaging, strategic text-based game. Perfect for RPG fans and Python developers diving into game development! ๐Ÿš€
https://github.com/aymen016/role-playing-game

python random-module

Last synced: 11 months ago
JSON representation

Embark on a thrilling adventure with this Text-Based RPG System! Battle monsters, level up, and manage your inventory in an engaging, strategic text-based game. Perfect for RPG fans and Python developers diving into game development! ๐Ÿš€

Awesome Lists containing this project

README

          

# ๐Ÿฐ Advanced Text-Based RPG System

Welcome to the Advanced Text-Based RPG System! โš”๏ธ This Python-based RPG brings thrilling battles, strategic inventory management, and immersive gameplay right to your terminal. ๐ŸŽฎ

## ๐Ÿš€ Features

โœ… **Entity, Player & Monster Classes**: Define characters with health, level, and experience. Players and monsters can attack, take damage, and level up.
โœ… ๐ŸŽฒ **Randomized Damage**: Attacks deal random damage, making every battle unique and engaging!
โœ… ๐Ÿ‘œ **Inventory System**: Collect and use powerful items like potions and weapons.
โœ… ๐Ÿ“ˆ **Experience & Leveling**: Gain XP by defeating monsters and level up for stronger stats!
โœ… ๐Ÿงช **Item Usage**: Use potions to heal and equip weapons for battle enhancements.
โœ… ๐Ÿ•น๏ธ **Example Gameplay**: Engage in epic battles and watch your player grow stronger.

## ๐Ÿ”ง Installation

Make sure you have Python installed (version 3.x recommended). Then, simply run:
```bash
python rpg_game.py
```

## ๐ŸŽฎ How It Works

1๏ธโƒฃ **Create Characters**: Players and monsters are instantiated with health, attack power, and experience.
2๏ธโƒฃ **Battle System**: Players and monsters attack each other with random damage values.
3๏ธโƒฃ **Inventory Management**: Players can collect and use items like potions and weapons.
4๏ธโƒฃ **Level Progression**: Gain experience, level up, and boost your stats!
5๏ธโƒฃ **Dynamic Combat**: Every attack and item usage impacts the battle's outcome.

# ๐Ÿ“ Example Code

### Example Usage
```bash
player = Player("Hero", 100)
monster = Monster("Goblin", 50, 50)
potion = Potion("Healing Potion", 20)
weapon = Weapon("Sword", 15)

player.attack(monster)
monster.attack(player)

player.add_item(potion)
player.use_item(potion, player)

player.add_item(weapon)
player.use_item(weapon, monster)

print(f"{player.name}'s level: {player.level}")
```

### ๐Ÿ† Sample Output
```bash
Hero attacks Goblin!
Goblin takes 10 damage!
Goblin attacks Hero!
Hero takes 5 damage!
Hero obtained Healing Potion!
Hero uses Healing Potion!
Hero obtained Sword!
Hero equips Sword!
Hero's level: 1
```

# ๐Ÿ’ก Contributing

Want to improve the game? Feel free to fork the repo and submit pull requests! ๐Ÿค

# ๐Ÿ“œ License

This project is open-source and free to use. ๐ŸŽ‰

# ๐Ÿ“ฉ Contact

For any questions or suggestions, reach out to me via GitHub! ๐Ÿš€