A comprehensive Magic: The Gathering Chaos RPG implementation featuring cooperative gameplay, dynamic encounters, and integration with the Scryfall API and Perchance generators.
- Modular Design: Clean separation of concerns with dedicated modules for API, generators, and game logic
- Observer Pattern: Real-time UI updates through state change notifications
- Persistent State: Game state management with save/load capabilities (foundation implemented)
- Rate-Limited Requests: Respects Scryfall's API guidelines with built-in rate limiting
- Intelligent Caching: Reduces API calls and improves performance
- Card Search: Powerful search functionality using Scryfall's syntax
- Fallback System: Graceful degradation when API is unavailable
- Dynamic Content: Procedural generation of encounters, quests, and loot
- Nested Generators: Support for complex template patterns
[generatorName]
- Extensible: Easy to add new generator categories and content
- History Tracking: Generation history for debugging and analysis
- Responsive Design: Mobile-friendly interface that adapts to different screen sizes
- Accessibility Features: ARIA labels, keyboard navigation, focus management
- Dark Theme: MTG-inspired color scheme with gold accents
- Interactive Cards: Drag-and-drop ready card system with hover effects
- 8 Master Bosses: Unique bosses with different abilities and weaknesses
- Dynamic Encounters: Procedurally generated encounters with varying difficulty
- Quest System: Multi-objective quests with progress tracking
- Inventory Management: Loot and reward system
- MTG Card Integration: Real Magic cards with proper formatting
- Hand Management: Draw, play, and manage cards
- Battlefield Tracking: Visual representation of played cards
- Turn Management: Structured turn-based gameplay
- Start New Game: Initialize player, draw starting hand
- Explore: Discover new locations and encounters
- Combat: Use MTG cards to overcome challenges
- Progression: Complete quests, defeat bosses, collect loot
- Victory: Defeat all 8 Master Bosses to win
- Modern web browser with ES6 module support
- Node.js 18+ (for development)
- Internet connection (for Scryfall API, optional)
-
Clone the repository:
git clone https://github.com/adamf9898/9898-MTG-Chaos-RPG.git cd 9898-MTG-Chaos-RPG
-
Install dependencies:
npm install
-
Start development server:
npm run serve
-
Open in browser: Navigate to
http://localhost:8000
- Click "New Game" to begin
- Use "Explore" to discover encounters
- Click on cards to view details
- Play cards to the battlefield
- Use "End Turn" to progress
- TTS Mod: Steam Workshop
- Perchance Generator: 9898-MTG Chaos RPG
- Facebook Group: MTG Community
- Discord: Join Server
- Original TTS: MTG RPG Original
- Team up with other players (multiplayer foundation ready)
- Share resources and strategies
- Coordinate attacks against bosses
- Each boss has unique abilities and weaknesses
- Health tracking and damage calculation
- Special boss mechanics and phases
- Procedurally generated using Perchance system
- Varying difficulty levels (1-5)
- Environmental effects and special conditions
- Rewards and consequences
- Dynamic quest generation
- Objective tracking and progress
- Rewards upon completion
- Multiple quest types
- Real MTG card data and images
- Advanced search capabilities
- Card legality and format checking
- Set and expansion support
- Foundation for user-generated cards
- Custom boss abilities
- Unique encounter mechanics
- Homebrew content support
- Vanilla JavaScript ES6+: No framework dependencies
- CSS Grid & Flexbox: Modern layout techniques
- Web Standards: ARIA, semantic HTML, progressive enhancement
- Scryfall API: MTG card data and search
- Rate Limiting: Respectful API usage
- Error Handling: Graceful degradation
User Interaction → Game State → UI Update
↓
Perchance Generator → Content
↓
Scryfall API → Card Data
src/
├── api/
│ └── scryfall.js # Scryfall API client
├── core/
│ └── gameState.js # Game state management
├── generators/
│ └── perchance.js # Content generators
└── ui/
└── main.js # UI controller
npm test
- ✅ Game State Management
- ✅ Perchance Generator Logic
- ✅ Scryfall API Integration
- ✅ Boss Battle Mechanics
- ✅ Player Management
- ✅ Encounter Generation
- ✅ Quest System
- ✅ Inventory Management
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
npm test
- Submit a pull request
MIT License - See LICENSE file for details.
Built with ❤️ for the Magic: The Gathering community