Welcome to the Discord Card Game Bot! This project is a card-based RPG adventure where players can duel, explore dungeons, and strategize with a variety of cards and monsters on a dynamic battlefield. Built for use in a Discord server, the bot offers immersive gameplay that combines strategic depth, card mechanics, and RPG features.
- Features
- How to Set Up
- How to Play
- Game Mechanics
- Future Considerations
- Contributing
- License
- Multiplayer Card-Based Combat: Engage in duels or dungeon raids using unique cards that feature attacks, spells, and monster summons.
- RPG Elements: Manage your deck, earn rewards, and upgrade cards in the store or blacksmith.
- 3x3 Monster Grid: Deploy monsters and strategize your battlefield placement.
- Dungeon Mode: Team up with others to conquer dungeons and earn rewards.
- Market System: Trade cards with other players and expand your collection.
To get started, follow these steps to install and run the Discord bot:
-
Clone the Repository:
git clone https://github.com/yourusername/discord-card-game-bot.git cd discord-card-game-bot -
Install Dependencies: Ensure you have Python 3.x installed, then run:
pip install -r requirements.txt
-
Create a Discord Bot:
- Go to the Discord Developer Portal, create a new application, and generate a bot token.
- Add your bot to your server.
-
Configure the Bot:
- In the root folder, create a
.envfile with the following:
DISCORD_TOKEN=your-bot-token-here
- In the root folder, create a
-
Run the Bot:
python main.py
- Start a Game:
!startgame— Begin a new card game match. - Join a Game:
!joingame— Join an active game lobby. - Play a Card:
!play [card_name]— Play a card from your hand.
Players take turns drawing cards and playing them on a 3x3 monster grid. The game ends when one player's health drops to 0.
!draw: Draw a card from your deck.!play [card_name]: Play a card from your hand.!attack [position]: Attack a monster on the battlefield.!endturn: End your turn.
The battlefield is a 3x3 grid where monsters are deployed:
- Each slot holds one monster.
- Monsters have attack and defense stats (e.g., 3/3 for 3 attack and 3 defense).
Cards are central to the game and come in various types:
- Monsters: Summon creatures to the grid that can attack and defend.
- Spells: Cast spells that affect the battlefield or enemy creatures.
- Example card: Fireball:
- The Fireball deals damage in a cross pattern:
010 121 010- The player can choose the cast location, dealing damage to adjacent slots.
- Turn 1: Player 1 casts a Fireball at position (1,1). The center of the Fireball hits the grid, dealing 2 damage, while adjacent positions take 1 damage.
- Turn 2: Player 2 summons a Dragon with 3/3 stats at position (2,2).
The bot also includes RPG-like features that enhance the gameplay:
- Deck Management: Players can view and organize their deck of cards.
- Dungeon Mode: Players can enter dungeons, face monster challenges, and earn rare cards.
- Store: Purchase new cards and upgrades using in-game currency.
- Blacksmith: Upgrade existing cards with collected resources.
- Market: A trading system for players to exchange cards.
The project has a roadmap for future development:
- Mana System: Introduce mana costs for playing cards to add resource management.
- More Card Effects: Design complex damage patterns and unique card abilities.
- Expanded Store: Implement rarity systems for cards and player-to-player trading.
- Multiplayer Modes: Add more modes such as cooperative dungeons and player duels.
Contributions are welcome! Feel free to submit a pull request or open an issue for discussion. Please ensure your code adheres to the style guide and is well-documented.
- Fork the repository.
- Create a new branch for your feature or bugfix:
git checkout -b feature/new-feature
- Commit your changes:
git commit -m "Add new feature" - Push to your forked repository and open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
Enjoy your adventure in the world of cards, and may you build the ultimate deck!