Skip to content

feat(quests): gems ride on generated tray pieces, not pre-placed (#17) - #18

Merged
uhmin99 merged 1 commit into
mainfrom
dev
Jul 15, 2026
Merged

uhmin99 merged 1 commit into
mainfrom
dev

Conversation

@uhmin99

@uhmin99 uhmin99 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

User feedback: pre-placing every gem on the grid made stages swingy and kept goals small. Now gems spawn on generated tray pieces — assignGems attaches gems (~50% of pieces, big pieces sometimes two) drawing only colors still needed; a fully-collected color stops appearing; a placed gem is collected when a line through it clears; over-collecting is fine.

  • Model: GameState.trayGems (per-slot cell->color) + gemGoal; placement.stampWithGems; engine threads gems through place/refill; quest controller passes the goal.
  • Render: placed gems keep the piece color (pre-placed stay light); tray pieces show their gems (shared paintGemStar).
  • Validator: dropped the obsolete 'board must contain the gems' rule, added a gem-count range. All 20 gem stages stripped of board gems, goals raised (single 8 / two 6 / three 5).

Tests: engine gem collection + needed-only refill + over-collect; assignGems needed-only/deterministic; trayGems/gemGoal save round-trip.

What & why

Checklist

  • dart format . and flutter analyze are clean
  • flutter test is green (new logic has new tests)
  • Ran it on a device/emulator and exercised the affected flow
  • One logical change; title is a valid conventional commit
  • Nothing from the never-list (ads, IAP, analytics, tracking,
    locked content, extra network calls — see CONTRIBUTING.md)

Quest content only

  • dart run tool/validate_quests.dart --update then
    dart run tool/validate_quests.dart prints OK
  • Playtested the new stages (opening break feels good)
  • I understand this ships to players as soon as dev is promoted
    to main (fast for content merges)

Screenshots

User feedback: pre-placing every gem on the grid made stages swingy and
kept goals small. Now gems spawn on generated tray pieces — assignGems
attaches gems (~50% of pieces, big pieces sometimes two) drawing only
colors still needed; a fully-collected color stops appearing; a placed
gem is collected when a line through it clears; over-collecting is fine.

- Model: GameState.trayGems (per-slot cell->color) + gemGoal;
  placement.stampWithGems; engine threads gems through place/refill;
  quest controller passes the goal.
- Render: placed gems keep the piece color (pre-placed stay light);
  tray pieces show their gems (shared paintGemStar).
- Validator: dropped the obsolete 'board must contain the gems' rule,
  added a gem-count range. All 20 gem stages stripped of board gems,
  goals raised (single 8 / two 6 / three 5).

Tests: engine gem collection + needed-only refill + over-collect;
assignGems needed-only/deterministic; trayGems/gemGoal save round-trip.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@uhmin99
uhmin99 merged commit a5462d1 into main Jul 15, 2026
6 checks passed
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.

1 participant