Skip to content

Restore HP/MP to max on level up - #268

Merged
ErwinsExpertise merged 2 commits into
masterfrom
copilot/reset-hp-mp-on-level-up
Mar 31, 2026
Merged

ErwinsExpertise merged 2 commits into
masterfrom
copilot/reset-hp-mp-on-level-up

Conversation

Copilot AI commented Mar 30, 2026 •

Copy link
Copy Markdown
Contributor

HP and MP should reset to 100% when a player levels up, matching original MapleStory behavior.

  • channel/player.go: In levelUp(), set HP/MP to new max values instead of partially healing by the gain amount
// Before: partial heal
newHP := int16(math.Min(float64(newMaxHP), float64(d.hp+hpGain)))
newMP := int16(math.Min(float64(newMaxMP), float64(d.mp+mpGain)))

// After: full restore
d.setHP(newMaxHP)
d.setMP(newMaxMP)

Copilot AI linked an issue Mar 30, 2026 that may be closed by this pull request
Agent-Logs-Url: https://github.com/Hucaru/Valhalla/sessions/96e76ded-530e-43dc-9bfb-3041d106786f

Co-authored-by: ErwinsExpertise <44278151+ErwinsExpertise@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix HP/MP not resetting to 100% on level up Restore HP/MP to max on level up Mar 30, 2026
@ErwinsExpertise
ErwinsExpertise marked this pull request as ready for review March 30, 2026 21:14
Copilot AI requested a review from ErwinsExpertise March 30, 2026 21:14
@ErwinsExpertise
ErwinsExpertise requested a review from Hucaru March 30, 2026 21:14
@ErwinsExpertise
ErwinsExpertise merged commit 4f2bb5d into master Mar 31, 2026
3 checks passed
@ErwinsExpertise
ErwinsExpertise deleted the copilot/reset-hp-mp-on-level-up branch March 31, 2026 15:03
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.

Level Up Healing

3 participants