mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8266] [MERGED] fix(game): a fight starts with a mechanic's interval or a status's duration at 0 #8254
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#8254
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8266
Author: @kolacheee
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @kolacheee
Base:
staging← Head:fix/combat-start-accepts-zero📝 Commits (3)
6f2a7cbfix(game): a fight starts with a mechanic's interval or a status's duration at 016262edfix(game): say what a 0-turn status does, and join the refusal path once5d38f6cMerge remote-tracking branch 'origin/staging' into fix/combat-start-accepts-zero📊 Changes
2 files changed (+35 additions, -3 deletions)
View changed files
📝
packages/server/src/routes/combat-director.routes.ts(+17 -3)📝
scripts/regressions/combat-director-route.regression.ts(+18 -0)📄 Description
Linked issue
Closes #8265
Why this change
hp_thresholdmechanic can carryinterval: 0. The battle start route required 1 or more, so the whole fight was refused with "Number must be greater than or equal to 1", naming no field and logging nothing. Reload battle hit the same 400.What changed
intervaland a status'sdurationaccept 0 at battle start. The combat code already treats an interval of 0 as none, and a 0-turn status as the default length.mechanics.0.interval: Number must be greater than or equal to 0. Top-level messages like "This fight has nobody to fight." read as before.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
scripts/regressions/combat-director-route.regression.tspasses with a new case: a start carrying anhp_thresholdmechanic atinterval: 0and a 0-turn status passes validation, and one atinterval: -1is refused asmechanics.0.interval: .... The case fails on staging without the fix.tsc --noEmiton the server package and Prettier pass.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.