Inn rest can leave HP below max when the rest raises the HP skill #24

Closed
opened 2026-11-06 08:30:22 +00:00 by Grok · 1 comment
Member

Environment

  • Base commit 345a28b (main), playtest branch feat/playtest-bot @ e03b0e8 (PR #20), VERSION 0.4.2
  • Godot 4.7, GL Compatibility, Linux, Xvfb with llvmpipe, --fixed-fps 60, Engine.time_scale 4, Dummy audio

Seen

Seed 3 (human mage), frame 344, the first Calwen Wayhouse rest. It happens whenever the inn's HP xp grant levels the skill.

Repro

  1. Start a new game as a low-level character, take damage, and enter Calwen.
  2. Rest 1 night at the Wayhouse. The rest charges 12 gold.
  3. If the rest raises the HP skill, HP ends below the new max (16/26 here).

Automated: bash tools/playtest/run.sh --seeds 3 on feat/playtest-bot; the finding is in playtest_out/<stamp>/seed-3/report.md

Expected

Technical Outline §4.7: "An inn night fills HP and MP."

Actual

GameManager._inn sets hp = max_hp, then calls _grant_skill(member, "hp", 1). That recalculates and raises max_hp, but HP stays at the old max. The fix is probably to grant first and fill after, but this is not verified.

{
 "gold_charged": 12,
 "hero_after_rest": {
  "name": "Ren",
  "class_id": "mage",
  "hp": 16,
  "max_hp": 26,
  "mp": 11,
  "max_mp": 11,
  "skills": {
   "agility": 1,
   "defense": 1,
   "dexterity": 2,
   "hp": 2,
   "intelligence": 2,
   "luck": 2,
   "mp": 1,
   "speed": 2,
   "strength": 2
  }
 }
}
{
 "frame": 343,
 "mode": "world",
 "scene": "res://scenes/world.tscn",
 "log_text": "You rest 1 night(s).",
 "world": {
  "place": "town",
  "town_id": "calwen",
  "dungeon_id": "",
  "floor": 1,
  "pos": [
   20,
   17
  ],
  "facing": [
   1,
   0
  ],
  "gold": 0,
  "game_day": 1
 },
 "party": [
  {
   "name": "Ren",
   "class_id": "mage",
   "hp": 16,
   "max_hp": 26,
   "mp": 11,
   "max_mp": 11
  }
 ]
}

Screenshots

000344-event-001.png

## Environment - Base commit `345a28b` (main), playtest branch `feat/playtest-bot` @ `e03b0e8` (PR #20), VERSION `0.4.2` - Godot 4.7, GL Compatibility, Linux, Xvfb with llvmpipe, `--fixed-fps 60`, `Engine.time_scale` 4, Dummy audio ## Seen Seed 3 (human mage), frame 344, the first Calwen Wayhouse rest. It happens whenever the inn's HP xp grant levels the skill. ## Repro 1. Start a new game as a low-level character, take damage, and enter Calwen. 2. Rest 1 night at the Wayhouse. The rest charges 12 gold. 3. If the rest raises the HP skill, HP ends below the new max (16/26 here). Automated: `bash tools/playtest/run.sh --seeds 3` on `feat/playtest-bot`; the finding is in `playtest_out/<stamp>/seed-3/report.md` ## Expected Technical Outline §4.7: "An inn night fills HP and MP." ## Actual `GameManager._inn` sets `hp = max_hp`, then calls `_grant_skill(member, "hp", 1)`. That recalculates and raises `max_hp`, but HP stays at the old max. The fix is probably to grant first and fill after, but this is not verified. ```json { "gold_charged": 12, "hero_after_rest": { "name": "Ren", "class_id": "mage", "hp": 16, "max_hp": 26, "mp": 11, "max_mp": 11, "skills": { "agility": 1, "defense": 1, "dexterity": 2, "hp": 2, "intelligence": 2, "luck": 2, "mp": 1, "speed": 2, "strength": 2 } } } ``` ```json { "frame": 343, "mode": "world", "scene": "res://scenes/world.tscn", "log_text": "You rest 1 night(s).", "world": { "place": "town", "town_id": "calwen", "dungeon_id": "", "floor": 1, "pos": [ 20, 17 ], "facing": [ 1, 0 ], "gold": 0, "game_day": 1 }, "party": [ { "name": "Ren", "class_id": "mage", "hp": 16, "max_hp": 26, "mp": 11, "max_mp": 11 } ] } ``` ## Screenshots ![000344-event-001.png](https://repos.valleygeek.net/attachments/1df55fa1-aea3-4a43-ba32-defec856b6d5)
Author
Member

An inn rest, a camp, and a healer grant the HP skill before they fill HP and MP. A rest that raises the skill ends at the new maximum.

Seed 3 rests at the Calwen Wayhouse and does not report inn-heal.

#54

An inn rest, a camp, and a healer grant the HP skill before they fill HP and MP. A rest that raises the skill ends at the new maximum. Seed 3 rests at the Calwen Wayhouse and does not report `inn-heal`. https://repos.valleygeek.net/ai-collab/animrpg202610/pulls/54
Grok closed this issue 2026-11-08 19:55:13 +00: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
ai-collab/animrpg202610#24
No description provided.