Skip to content

Implement 6 new mini-game backends: Potion Brewing, Quiz, Dungeon Crawler, Creature Taming, Whispering Walls, Wizard Chess#4

Draft
Copilot wants to merge 7 commits intomainfrom
copilot/implement-game-ideas-docs
Draft

Implement 6 new mini-game backends: Potion Brewing, Quiz, Dungeon Crawler, Creature Taming, Whispering Walls, Wizard Chess#4
Copilot wants to merge 7 commits intomainfrom
copilot/implement-game-ideas-docs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

Implements the backend for all 6 unbuilt mini-games from docs/GAME_IDEAS.md. Spell Duel Arena and Broom Racing were already implemented; this adds the remaining games following identical patterns (Model → DTO → Service → Controller → Seed Data).

New Games

  • Potion Brewing Lab — Crafting system with ingredient costs, recipe discovery, wisdom-based success chance (Math.Min(90, 50 + wisdom - difficulty * 8)). 6 ingredients, 4 recipes seeded.
  • Enchanted Library Quiz — Timed trivia with difficulty-scaled rewards (gold 10/20/30, XP 15/25/40). 12 seed questions across 4 categories.
  • Dungeon Crawler — Roguelike with procedural room generation (seeded by runId + floor), stat-based combat, permadeath per run. No DB-stored rooms.
  • Magical Creature Taming — Explore (50g, rarity-weighted drops), care actions with cooldown enforcement, loyalty-gated passive bonuses. 8 seed creatures.
  • Whispering Walls — Branching interactive fiction with item/stat-gated choices. "The Forbidden Corridor" arc: 7 chapters, 4 endings.
  • Wizard Chess — 6x6 board with simplified piece movement, PvE random AI, gold betting. Board state stored as JSON.

Per-game structure (consistent across all 6)

Models/{Game}.cs          — Entities + enums
DTOs/{Game}/{Game}Dtos.cs — Record request/response types  
Services/{Game}Service.cs — Interface + implementation
Controllers/{Game}Controller.cs — REST endpoints

Shared file changes

  • Player.cs — Added nav properties: BrewAttempts, QuizAttempts, DungeonRuns, PlayerCreatures, StoryProgress
  • AppDbContext.cs — 12 new DbSets with FK relationships, cascade/restrict delete config
  • Program.cs — 6 new scoped service registrations
  • SeedData.cs — Conditional seeding for ingredients, recipes, quiz questions, creatures, story chapters

Not included

Frontend (views, stores, API modules, routes) is not yet implemented. This PR covers backend only.

Copilot AI and others added 6 commits March 31, 2026 22:05
Add complete backend implementation for the Potion Brewing Lab mini-game:

- Model: PotionRecipe, PotionIngredient, RecipeIngredient, BrewAttempt
- DTOs: request/response records following existing BroomGame pattern
- Service: IPotionBrewingService with recipe listing, ingredient listing,
  brew attempts with success formula based on wisdom/difficulty, and history
- Controller: PotionBrewingController with auth/anon endpoints
- DbContext: new DbSets and entity configurations with proper FKs
- Program.cs: DI registration for the new service
- SeedData: 6 ingredients and 4 recipes with varying difficulty
- Player model: added BrewAttempts navigation property

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: jwraats <3438726+jwraats@users.noreply.github.com>
- Add QuizQuestion and QuizAttempt models with enums for difficulty/category
- Add Quiz DTOs (QuizQuestionResponse, SubmitQuizRequest, QuizResultResponse, etc.)
- Add IQuizService/QuizService with question retrieval, answer validation, scoring, and leaderboard
- Add QuizController with GET questions, POST submit, GET history, GET leaderboard endpoints
- Update AppDbContext with QuizQuestion/QuizAttempt DbSets and entity configurations
- Update Player model with QuizAttempts navigation property
- Register IQuizService in Program.cs DI container
- Seed 12 quiz questions (3 per category: SpellLore, MagicalCreatures, PotionIngredients, WizardHistory)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: jwraats <3438726+jwraats@users.noreply.github.com>
Add roguelike dungeon exploration mini-game with:
- DungeonRun model with floor/HP/gold/XP tracking and permadeath
- Procedural room generation (Monster/Treasure/Trap/Merchant/Rest/Boss)
- Player stat-based choice resolution (strength, magic, wisdom, speed)
- Risk/reward mechanics with escape-with-loot or push-deeper gameplay
- RESTful API endpoints for start/action/escape/history
- Full EF Core integration with Player navigation property

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: jwraats <3438726+jwraats@users.noreply.github.com>
Add creature taming system with explore, tame, and care mechanics:
- Creature and PlayerCreature models with mood/loyalty system
- CreatureTamingService with explore (50g cost, rarity-weighted drops),
  tame, care (feed/train/rest with cooldowns), and bonus calculation
- CreatureTamingController with 6 endpoints matching existing patterns
- 8 seed creatures (2 each: common, uncommon, rare, legendary)
- Creatures with loyalty >50 provide passive stat bonuses scaled by level
- Uses Random.Shared for thread-safe random number generation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: jwraats <3438726+jwraats@users.noreply.github.com>
Add interactive fiction / choose-your-own-adventure mini-game with:
- StoryChapter, StoryChoice, PlayerStoryProgress models
- WhisperingWallsService with story arc management, choice processing,
  item/stat requirement checks, and gold/xp rewards
- WhisperingWallsController with REST endpoints
- DTOs for all request/response types
- EF Core configuration with proper relationships
- Seed data for 'The Forbidden Corridor' story arc (7 chapters, 5 endings)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: jwraats <3438726+jwraats@users.noreply.github.com>
…eature Taming, Whispering Walls, Wizard Chess - backend complete

Agent-Logs-Url: https://github.com/jwraats/Wizard-RPG/sessions/303adc6f-769d-408c-aa1d-ea28fea4f9f5

Co-authored-by: jwraats <3438726+jwraats@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement game ideas from documentation in backend and frontend Implement 6 new mini-game backends: Potion Brewing, Quiz, Dungeon Crawler, Creature Taming, Whispering Walls, Wizard Chess Mar 31, 2026
Copilot AI requested a review from jwraats March 31, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants