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! ๐
- Host: GitHub
- URL: https://github.com/aymen016/role-playing-game
- Owner: Aymen016
- Created: 2024-03-22T16:45:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-02T16:32:22.000Z (about 1 year ago)
- Last Synced: 2025-02-02T17:30:00.904Z (about 1 year ago)
- Topics: python, random-module
- Language: Jupyter Notebook
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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! ๐