M007 S03: Gambit auto-activation when behind on resources not implemented #9
Labels
No labels
blocked:lint-failed
blocked:needs-decision
blocked:no-changes
bug
feature-request
in-progress
milestone
ops-task
quickfix
security/high
test-coverage
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/chainbound#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: LOW
File: src/pages/CasualDuel.tsx
Problem
Gambits are defined with costs and rewards, and players can browse and manually activate them. However, the spec requires that gambits can optionally auto-activate or prompt when the player is behind on resources (e.g. vitality below 30). This auto-prompt behavior is not implemented.
Fix
Add a hook in CasualDuel that checks after each turn: if the player has saved gambits and vitality is below a threshold (e.g. 30), show a non-blocking prompt: "Critical health — Gambit available: [name]" with a single-tap to activate. Do not force activation.
GSD RESEARCH could not determine a clear fix.
STATUS: UNCLEAR
EVIDENCE:
After reading CasualDuel.tsx (1350 lines) and src/data/openings.ts in full:
The
Openingtype (openings.ts) definesgambitCostandgambitRewardfields but has NOautoActivate,autoPrompt, or threshold field of any kind. There is no way to express "this gambit should auto-activate when the player is behind on resources."The current gambit activation flow in CasualDuel.tsx is purely manual:
handleActivateOpening(line 464): shows a confirmation o