Skip to content

Conversation

@Trantion897
Copy link
Contributor

Pull Request Description

Adds an option to reset HP for creatures where the HP is not equal to current_max
Uses the "undo" icon for this, and also changes the icon for the existing "Reset AC" option to "undo" because I think using the HP icon twice in the same menu was potentially confusing

Changes Proposed

  • Add option to reset creature HP
  • Change Reset AC option to use "undo" icon

Related Issues

None

Checklist

  • I have read the contribution guidelines and code of conduct.
  • I have tested the changes locally and they are working as expected. (see Additional Notes)
  • I have added appropriate comments and documentation for the code changes.
  • My code follows the coding style and standards of this project.
  • I have rebased my branch on the latest main (or master) branch.
  • All tests (if applicable) have passed successfully.
  • I have run linters and fixed any issues.
  • I have checked for any potential security issues or vulnerabilities.

Screenshots (if applicable)

image

Additional Notes

Tested:

  • Using PC and NPC
  • Reset HP option does not appear at full health, or full health + temporary HP
  • Reset HP option appears when below full health
  • Reset HP option appears when below full health + temporary HP, and correctly resets to full health + temporary HP
  • Reset HP option respects changes to max HP, including resetting to changed max HP

@SondreElg
Copy link
Contributor

SondreElg commented Mar 30, 2025

I do like the change, but I'm unsure if we want to reset HP to creature.current_max, as that value can be affected by changes to max HP. It might be nice in the event you have players under the effect of something like Heroes' Feast, and want to reset their damage taken without resetting the change to their max HP. However, I do imagine a common use of a "HP reset" being someone healing damage done to a player's max HP, in which case this implementation wouldn't do as expected.

We might actually want to provide two options, in the form of a "hard" and a "soft" HP reset option to account for both scenarios. If we do provide that though, we should probably add that as an alternative in the encounter menu as well.

@valentine195
Copy link
Member

We might actually want to provide two options, in the form of a "hard" and a "soft" HP reset option to account for both scenarios. If we do provide that though, we should probably add that as an alternative in the encounter menu as well.

I agree, and I would recommend making HP open a submenu.

@Trantion897 Trantion897 force-pushed the Add-reset-HP-option branch from bb6021f to 99e140c Compare April 2, 2025 16:19
@Trantion897
Copy link
Contributor Author

Trantion897 commented Apr 2, 2025

You're right, you would usually want to reset max HP at the same time as HP (at least in D&D, and probably PF2 - not sure about all other systems). Looking a bit more, the existing Reset HP/Status option in the encounter menu does what I was looking for, which is resetting the PCs after they've healed & rested during a session.

I have implemented both options on the creature menu as shown below. Would you like the same option(s) on the encounter menu too, or is that basically the same as Reset HP/Status? I think there are a few statuses that don't go away on a long rest, like D&D's Exhaustion and PF2e's Doomed, but I'd be tracking those outside of an initiative tracker anyway

image

@Trantion897 Trantion897 force-pushed the Add-reset-HP-option branch from 99e140c to 71bce09 Compare April 2, 2025 16:27
@SondreElg
Copy link
Contributor

Looks great!

It would be nice to have both options in the encounter menu as well though. Effects that reduce max HP until a long rest aren't that uncommon in 5e, not to mention other systems, but a short rest for players usually means they all heal to their current max.

It'd be nice to be able to heal everyone at once instead of doing it one player at a time.

@SondreElg
Copy link
Contributor

Hey, have you had time to look at this, and do you have any questions you'd like my help with?

@Trantion897
Copy link
Contributor Author

I only noticed that you'd suggested this change would still be helpful when I pushed my new PR a couple of days ago. I'll have a look at the changes next time I'm working on it, but I'm not sure when that'll be at the moment

Instead of resetting everything, this lets you choose:

* Reset current HP only
* Reset current HP and statuses (e.g. short rest)
* Reset statuses only (e.g. between encounters)
* Reset current HP, max HP and statuses (e.g. long rest)

AC is always reset, as before
It wasn't clear that the 'm' prefix reduces max HP, rather than setting
it to the entered value. This makes that clearer.
Marks max HP in bold and shows normal max HP as a tooltip where a
creature's current max HP is different from their normal max HP.
The same as how creatures with temporary HP are highlighted.
@Trantion897
Copy link
Contributor Author

I've pushed a version with various different options to reset current HP, max HP and statuses. AC is always reset as before - I didn't want to make the submenu too big. But if you have any other suggestions, let me know. I also changed the reset icon in the per-creature menu to be the same as in the encounter menu.

image

I also threw in a couple of small UI changes. Firstly, creatures where the max HP has been changed are highlighted in the same way that creatures with temporary HP already were:

image

Secondly, while testing this I kept thinking that the 'm' prefix in the apply damage sets the current_max HP instead of reducing it. So I changed the label to make it clearer:

image

These are both separate commits if you don't want either of them.

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.

3 participants