mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3586] [MERGED] feat(game-mode): Combat Preference — classic or tactical grid battles #6005
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#6005
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/3586
Author: @Romuromylus
Created: 7/13/2026
Status: ✅ Merged
Merged: 7/14/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/game-mode-tactical-combat📝 Commits (10+)
d903264feat(game-mode): Combat Preference setting with tactical grid-battle stylecc25a3dfeat(game-mode): tactical combat playtest fixes — movement UX, scene backdrops, formations, painted tiles7f49e6afeat(game-mode): tactical combat classes + action-race fix7c7e605feat(game-mode): tactical combat QoL — draggable inspector, restart, themingc92b3f4feat(game-mode): surface Combat Style as its own Chat Settings sectionb45d8dafix(game-mode): tactical combat overlay fixes — HUD overlap + draggable action menu5e921d1fix(game-mode): tactical combat — seamless move animation + impassable mountainsf484ed5fix(game-mode): tactical combat — review-round fixes (snapshot lifecycle, endpoint hardening, classic prompt purity)8278cc4fix(game-mode): tactical combat — review round 2 (log cap, start bounds, stale-snapshot clear)cdec711fix(game-mode): tactical combat — KO'd units leave the board, staged moves read as previews📊 Changes
30 files changed (+4827 additions, -30 deletions)
View changed files
📝
CHANGELOG.md(+4 -0)➕
packages/client/public/tactical/forest.webp(+0 -0)➕
packages/client/public/tactical/mountain.webp(+0 -0)➕
packages/client/public/tactical/plains.webp(+0 -0)➕
packages/client/public/tactical/ruin.webp(+0 -0)➕
packages/client/public/tactical/wall.webp(+0 -0)➕
packages/client/public/tactical/water.webp(+0 -0)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+16 -1)📝
packages/client/src/components/game/GameSetupWizard.tsx(+36 -0)📝
packages/client/src/components/game/GameSurface.tsx(+200 -24)➕
packages/client/src/components/game/TacticalCombatUI.tsx(+2160 -0)➕
packages/client/src/features/chat-settings/sections/CombatStyleSection.tsx(+38 -0)📝
packages/client/src/hooks/use-game.ts(+33 -0)📝
packages/client/src/lib/game-setup-share.ts(+1 -0)📝
packages/server/src/routes/encounter.routes.ts(+29 -1)📝
packages/server/src/routes/game.routes.ts(+193 -1)📝
packages/server/src/services/game/gm-prompts.ts(+11 -3)📝
packages/server/src/services/generation/game-gm-prompt-runtime.ts(+4 -0)➕
packages/shared/src/features/tactical-combat/ai.ts(+192 -0)➕
packages/shared/src/features/tactical-combat/classes.ts(+81 -0)...and 10 more files
📄 Description
Linked issue
No linked issue — I built and playtested this directly as maintainer work. Happy to open a retroactive feature request if we want it on the board.
Why this change
What changed
packages/shared/src/features/tactical-combat/— a deterministic, seed-driven battle engine (engine.ts), enemy-phase AI (ai.ts), unit classes (classes.ts), procedural terrain/grid generation (grid-gen.ts), plus RNG/math helpers and types. All combat resolution happens in the engine and is reproducible from a seed; the LLM only supplies the encounter blueprint (units, flavor, scene), never dice outcomes.game.routes.tsgains tactical encounter start/action endpoints. Combat state round-trips through the client and is validated on every action; the enemy phase runs server-side through the same engine.encounter.routes.tsand GM prompts were touched only to branch on the preference, so classic-combat prompt assembly is unchanged when tactical is off.TacticalCombatUI.tsx: painted terrain grid with per-scene backdrops, movement/attack range overlays, animated unit movement, floating damage/heal/miss popups, a draggable unit inspector and action menu, staged moves rendered as translucent dashed previews until confirmed ("Confirm Move"), KO'd units exit-fading off the battlefield, encounter restart, and a mobile-friendly layout.GameSetupWizardgets the Combat Preference selector; Chat Settings gets a Combat Style section so the preference can be changed mid-game;GameSurfacehandles encounter lifecycle, formations, and background generation.packages/client/public/tactical/(webp).[Unreleased].Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm checkexits 0 on the current head; 25 local engine tests pass (node:testvia tsx).Docs and release impact
CHANGELOG.md was updated in this branch; no other docs are affected and there is no version bump.
UI evidence (if applicable)
https://github.com/user-attachments/assets/c7e877aa-11ea-465f-b0ab-fbe62dba810e
Summary by CodeRabbit
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.