Skip to content

Row 3025: a scroll that destroys a worn equip brings HP and MP down to the new max - #1521

Merged
neeerp merged 1 commit into
masterfrom
v83/scroll-fit-1
Nov 9, 2026
Merged

neeerp merged 1 commit into
masterfrom
v83/scroll-fit-1

Conversation

@neeerp

@neeerp neeerp commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Found by hand in P436 (Clean Slate on worn gear): when a cursed scroll destroyed a worn equip that raised max MP, HP and MP stayed above the new max (the client showed 9311/9305 MP).

Cosmic's ScrollHandler calls `equipChanged()` after a success or curse on a worn equip, and `updateLocalStats` then runs `enforceMaxHpMp`. `use_scroll` now calls `Player::fit_hp_mp` after a non-failed scroll on a worn equip (the Legendary Spirit Equip-tab path is unaffected), and the handler sends HP and MP when they changed.

  • unit: `destroying_a_worn_equip_brings_hp_and_mp_down_to_the_new_max` (and the cursed test checks no refit without HP/MP gear); `cargo test -p net --lib scroll` 21 pass
  • by hand on the lane world: worn cap at +500 MP destroyed by a Clean Slate → MP 9317/9805 became 9305/9305 at once

…it, brings HP and MP down to the new max

Found by hand in P436 (Clean Slate): destroying a worn Time Traveler's Circle (+120 MP) left the client at 9311/9305 MP. Cosmic's ScrollHandler calls equipChanged after a success or a curse on a worn equip, and its updateLocalStats enforces the max; use_scroll now does the same with Player::fit_hp_mp and the handler sends HP and MP.
@neeerp
neeerp merged commit 8a583f6 into master Nov 9, 2026
1 check passed
@neeerp
neeerp deleted the v83/scroll-fit-1 branch November 9, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant