Skip to content

Updated Base & Food health gain modifier#29

Open
Zoruea wants to merge 1 commit into
txnimc:masterfrom
Zoruea:master
Open

Updated Base & Food health gain modifier#29
Zoruea wants to merge 1 commit into
txnimc:masterfrom
Zoruea:master

Conversation

@Zoruea

@Zoruea Zoruea commented Jul 23, 2024

Copy link
Copy Markdown

Instead of calculating hp by capturing the entire health bar, we now calculate health provided by food and apply it using attributes to increase compatibility with other mods that modify player health.

Instead of calculating hp by capturing the entire health bar, we now calculate health provided by food and apply it using attributes to increase compatibility with other mods that modify player health.
@Zoruea

Zoruea commented Jul 23, 2024

Copy link
Copy Markdown
Author

This should also help fix issue #25

@MarioSMB

MarioSMB commented Aug 16, 2024

Copy link
Copy Markdown

Just a heads up, maxhp is still referenced around line 130, not sure if that's intended.

@Zoruea

Zoruea commented Aug 20, 2024

Copy link
Copy Markdown
Author

Ahh, that's not intended.
Unfortunately, that chunk from 127-134 I couldn't get working properly in testing with the changes to health calculation so I left it as is. Using the Player.getHealth() method didn't seem to be working no matter what solution I tried to apply the speed boost at full health so I gave up on it.
In theory all it would take to get it working is swapping the maxhp variable with one that gets the player's current hp and compares it to their maxhp, everything else there already uses the attribute system properly and works.

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.

2 participants