M007 S03: Gambit cost shown in confirmation dialog but never deducted from player resources #6
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#6
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: MEDIUM
File: src/pages/CasualDuel.tsx:476-483
Problem
confirmGambit()creates the active opening state but never reduces the player's vitality or will resources by the gambit cost. The cost is displayed in the confirmation dialog but has no game effect. Gambits are free to activate.Fix
After confirming a gambit, dispatch
ASSIGN_SYMBOLor directly modify the player resources to deductgambitCost.vitalityand/orgambitCost.willfromstate.players[0].resources. This needs to happen before or as part of activating the opening.