Skip to content

[core, sql] Fix HP Latent Calculations and Minstrel's Ring#8751

Open
9001-Sols wants to merge 1 commit intoLandSandBoat:basefrom
9001-Solutions:9001/fix-hp-latents
Open

[core, sql] Fix HP Latent Calculations and Minstrel's Ring#8751
9001-Sols wants to merge 1 commit intoLandSandBoat:basefrom
9001-Solutions:9001/fix-hp-latents

Conversation

@9001-Sols
Copy link
Contributor

@9001-Sols 9001-Sols commented Nov 21, 2025

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

This PR fixes latent HP and MP calculations to use total HP/MP after gear and buffs, instead of total Base HP/MP. It also changes the Minstrel's Ring to match the Sorcerer's Ring, which activates when HP < 76%, JP wiki source: https://wiki.ffo.jp/html/7159.html

Steps to test these changes

  • Set HP on BRD to 75% with a bunch of HP up gear equipped
  • Verify Minstrel's Ring is cutting spellcasting time by 20%

Unable to test HP_OVER_TP_UNDER_100

  • I didn't see any items that used this latent effect, so I was unable to test it

@9001-Sols 9001-Sols changed the title [cpp] [sql] Fix HP Latent Calculations and Minstrel's Ring [core, sql] Fix HP Latent Calculations and Minstrel's Ring Nov 22, 2025
@9001-Sols 9001-Sols marked this pull request as ready for review November 23, 2025 15:55
@LandSandBoat LandSandBoat deleted a comment from github-actions bot Nov 24, 2025

-- Minstrel's Ring
INSERT INTO `item_latents` VALUES (13295,455,25,2,75); -- Song Spellcast -25% while HP <=75% and TP <=100%
INSERT INTO `item_latents` VALUES (13295,455,25,2,76); -- Song Spellcast -25% while HP <76% and TP <=100%
Copy link
Contributor

@Xaver-DaRed Xaver-DaRed Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X <= 75 is the same as X < 76
The calculations use <= so the number needed is 75
Revert this

Copy link
Contributor Author

@9001-Sols 9001-Sols Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The calculations aren't flooring the result though, they're cast to a float.

((float)m_POwner->health.hp / m_POwner->GetMaxHP()) * 100

That prevents 75.01 from triggering the latent, when the JP wiki states it should be active while the HP % is between 75 and 76.

image

https://wiki.ffo.jp/html/7159.html

なお、[HP]が76%未満かつ75%よりも多ければ[HP]白色状態のまま[潜在能力]が発動する。

I pattern matched the Sorc Ring implementation already in LSB - although the more proper implementation would likely be to floor the result. But this has implications as some gear hasn't been proven to use the floor value (Carapace set I think?)

@sruon sruon added hold On hold, pending further action/info audit Confirmation / Citation Needed™ labels Nov 24, 2025
@sruon
Copy link
Contributor

sruon commented Nov 24, 2025

This is going to need a round of retail testing accounting for all types of HP based latents because I'm not convinced they all work the same way (evidenced by the fact these rings are documented in multiple different ways on each wiki).

@9001-Sols 9001-Sols closed this Nov 24, 2025
@Xaver-DaRed Xaver-DaRed reopened this Nov 24, 2025
@Xaver-DaRed
Copy link
Contributor

Keep this open for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit Confirmation / Citation Needed™ hold On hold, pending further action/info

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants