[PR #8280] [MERGED] fix(combat): a long effect carried into a fight lasts the rest of it #8262

Closed
opened 2026-10-26 04:04:11 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8280
Author: @kolacheee
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @kolacheee

Base: staging ← Head: fix/fight-start-long-effects


📝 Commits (2)

  • 43f5efb fix(combat): a long effect carried into a fight lasts the rest of it
  • 9ebe1fa fix(combat): name the most item power; prove the clamped status and a long mechanic interval

📊 Changes

2 files changed (+64 additions, -6 deletions)

View changed files

📝 packages/server/src/routes/combat-director.routes.ts (+18 -6)
📝 scripts/regressions/combat-director-route.regression.ts (+46 -0)

📄 Description

Linked issue

Closes #8279

Why this change

  • Before: a party carrying an item whose status lasts longer than 100 rounds (a potion that lasts an hour is 600) could not start any fight. The start was refused with "itemEffects.1.status.duration: Number must be less than or equal to 100". A long status, cooldown or boss mechanic interval carried in, or an item effect's power above 100, did the same.

  • After: anything that counts more rounds than a fight's most lasts the rest of the fight, and the fight starts.

What changed

  • The fight start reads every round count it is given (an item status's duration, a status's turns left, a skill's cooldown, a mechanic's interval) as at most 100, the most a fight counts down from, instead of refusing the fight.
  • An item effect's power above 100 is read as 100.
  • How: one rounds schema in combat-director.routes.ts clamps instead of capping, used by every round count the start reads.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • New case in combat-director-route.regression.ts: a start carrying a 600-round potion status, a 600-turn status and a 250-round cooldown is accepted. Without the fix it is refused with the 400 above.
  • combat-director-route and ruleset-combat-director-route regressions pass; server typecheck clean.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/8280 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `fix/fight-start-long-effects` --- ### 📝 Commits (2) - [`43f5efb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/43f5efb3860c0409ee91893568a08f93851f4434) fix(combat): a long effect carried into a fight lasts the rest of it - [`9ebe1fa`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9ebe1fa3848b2b1d4add5fddb1ea66990a5ea81d) fix(combat): name the most item power; prove the clamped status and a long mechanic interval ### 📊 Changes **2 files changed** (+64 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/combat-director.routes.ts` (+18 -6) 📝 `scripts/regressions/combat-director-route.regression.ts` (+46 -0) </details> ### 📄 Description ## Linked issue Closes #8279 ## Why this change - Before: a party carrying an item whose status lasts longer than 100 rounds (a potion that lasts an hour is 600) could not start any fight. The start was refused with "itemEffects.1.status.duration: Number must be less than or equal to 100". A long status, cooldown or boss mechanic interval carried in, or an item effect's power above 100, did the same. - After: anything that counts more rounds than a fight's most lasts the rest of the fight, and the fight starts. ## What changed - The fight start reads every round count it is given (an item status's duration, a status's turns left, a skill's cooldown, a mechanic's interval) as at most 100, the most a fight counts down from, instead of refusing the fight. - An item effect's power above 100 is read as 100. - How: one `rounds` schema in `combat-director.routes.ts` clamps instead of capping, used by every round count the start reads. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - New case in `combat-director-route.regression.ts`: a start carrying a 600-round potion status, a 600-turn status and a 250-round cooldown is accepted. Without the fix it is refused with the 400 above. - `combat-director-route` and `ruleset-combat-director-route` regressions pass; server typecheck clean. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 04:04:11 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8262
No description provided.