mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #4391] [CLOSED] feat(game): expand Classic & Tactical combat — server-authoritative sessions, maneuvers that always resolve, objectives & bosses #6358
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#6358
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/4391
Author: @Romuromylus
Created: 8/1/2026
Status: ❌ Closed
Base:
staging← Head:feat/game-mode-combat-expansion📝 Commits (6)
4620197feat(game): expand Classic and Tactical combat5cf27c4fix(game): make combat maneuvers always resolvee85d6affix(game): dedupe activeChatIdRef after staging rebase65c5424fix(game): release combat aftermath guard after it resolves4f2bb3ffix(game): never hydrate a completed combat session as a live battleaa1ac51fix(game): don't unwind combat state while a combat declaration is pending📊 Changes
33 files changed (+7505 additions, -597 deletions)
View changed files
📝
CHANGELOG.md(+13 -1)➕
COMBAT_EXPANSION_IMPLEMENTATION_PLAN.md(+214 -0)📝
docs/game/combat.md(+20 -9)📝
docs/game/getting-started.md(+18 -16)➕
docs/game/tactical-combat.md(+92 -0)📝
package.json(+2 -1)📝
packages/client/src/components/game/GameCombatUI.tsx(+449 -120)📝
packages/client/src/components/game/GameSurface.tsx(+519 -110)📝
packages/client/src/components/game/TacticalCombatUI.tsx(+854 -177)📝
packages/client/src/hooks/use-game.ts(+109 -7)📝
packages/client/src/localization/locales/en.json(+10 -0)📝
packages/server/src/db/file-backed-store.ts(+2 -0)➕
packages/server/src/db/schema/game-combat-sessions.ts(+21 -0)📝
packages/server/src/db/schema/index.ts(+1 -0)📝
packages/server/src/routes/encounter.routes.ts(+6 -2)📝
packages/server/src/routes/game.routes.ts(+840 -46)➕
packages/server/src/services/game/combat-session.service.ts(+1073 -0)📝
packages/server/src/services/game/combat.service.ts(+118 -38)📝
packages/server/src/services/game/loot.service.ts(+21 -13)➕
packages/server/src/services/game/maneuver-proposal.ts(+379 -0)...and 13 more files
📄 Description
Linked issue
No linked issue yet — this grew out of my own game-mode testing (the maneuver no-op below was found while playing a paladin run). I can open a tracking issue for the expansion if we want one on the board.
Why this change
.strict()zod schema, so one malformed key (e.g. flatx/yinstead of a nestedtile) rejected the entire proposal and the player got an invalid-maneuver toast with their turn consumed. Confirmed in production logs (ZodError: unrecognized_keys ["x","y"]).What changed
combat-session.service.ts, newcombat-sessionshared types): seeded RNG, per-action cursors, objectives and boss phases, for BOTH Classic and Tactical styles.maneuver-proposal.tsnormalizer salvages near-miss adjudicator output (flat coords,duration→turnsLeft, name/"self"→unit id, percent difficulties, tile-less cover→defense buff), drops only unusable effects with player-readable reasons, and reports what was coerced.nullinstead of throwing, so the engine's deterministic keyword resolvers take over as the last rung. A maneuver can no longer 400.rollManeuver, self-target defaults for heal/guard,nearestReachableFoe, partial-application notes ("Part of the maneuver could not take effect: …"), and keyword fallback reusing the same roll when every proposed effect is dropped.Shieldedstatus, move/terrain narrate instead of vanishing, self-target defaults.GameSurface.tsxand related components.regression:combatlane (combat-session.regression.ts,tactical-combat.regression.ts) with adversarial fixtures including the exact production payload that used to 400; wired into the aggregateregressionscript.docs/game/combat.md+docs/game/tactical-combat.mddocument the resolution ladder and reach limits; CHANGELOG entries under[Unreleased].ea70ba89fintroduced its ownactiveChatIdRefinGameSurface.tsxalongside this branch's; deduped to a single declaration keeping upstream's render-time assignment semantics (d5edfb6aa).33 files, +7451/−597 against current
staging(ed0e2422b).Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Runs already performed on this exact head (boxes left unchecked until I re-verify and sign off):
pnpm checkgreen (impeccable, localization, lint 0 warnings, full build),pnpm regression:combat2/2,pnpm regression:docs1/1, lockfile unchanged.activeChatIdRefdedupe.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Note:
docs/game/combat.mdanddocs/game/tactical-combat.mdchanged, so a[docs-i18n]follow-up is needed before merge.UI evidence (if applicable)
To be attached after the in-browser test pass.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.