mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #551] [Issue]: Game Mode combat ignores persona/character HP, invents new values #251
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#251
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?
Originally created by @Romuromylus on GitHub (May 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/551
Summary
When entering combat in Game Mode, the persona's and party characters' configured HP is ignored. The AI generates fresh HP values for everyone (persona + allies + enemies), so a persona configured with e.g. Max HP 1000 can enter combat at 100 HP or some unrelated value.
Expected behavior
When the GM transitions to combat (
[state: combat]), party combatants should enter the fight with their configured Max HP from the persona's stat bars / RPG stats and from each ally character card'sextensions.rpgStats. Combat should start at full health.Actual behavior
Party HP and Max HP are both replaced with values made up by the AI. Even with frontier models (so it's not model hallucination — it's a code bug). Affected combatants:
Steps to reproduce
personaStats.barscontaining an HP bar (or withpersonaStats.rpgStats.enabled = trueandhp.max = N)extensions.rpgStats.enabled = trueandhp.max = M[state: combat]to enter combatEnvironment
Logs, screenshots, or video
The combat-init AI call was returning
"hp": X, "maxHp": Xfor the player and party with values not matching the configured persona/character HP.Additional context
Root cause is in
packages/server/src/routes/encounter.routes.ts:buildPersonaContextbuilds the persona block sent to the combat-init AI but skips bothpersonaStats.barsandpersonaStats.rpgStats, so the AI never sees the user-defined HP.buildCharacterContextlikewise skipsdata.extensions.rpgStatsfor ally character cards.buildInitPromptinstructs the AI to fill"hp": X, "maxHp": Xand only nudges with a vague "Use the player's stats/inventory from the context" — and even tells it to "Ensure HP values are realistic for the setting", which encourages invention.Without HP context to copy from, the AI is forced to invent values for every combatant on every encounter.
Template check