Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HP display should show break-down #4

Open
ediosyncratic opened this issue Jun 9, 2021 · 2 comments
Open

HP display should show break-down #4

ediosyncratic opened this issue Jun 9, 2021 · 2 comments

Comments

@ediosyncratic
Copy link
Owner

The HP at present just shows current HP.
That's base HP (from all the hit-die rolls per level) plus con * level plus any temporary minus any damage; if it were presented as such, it could auto-update on changes to Con and level and it'd be easier to keep track of what we're restoring to when healed. Ideally the HP section would have

  • an input box for base
  • text showing + level * con
  • an input box for temp HP
  • an input box for lethal damage
  • text displaying the current total
  • an input box for non-lethal damage (if this gets above the total above, character falls over).

It currently has a box for the base + level * con, a wide box for the current total and a wide box for non-lethal; there's also a box for DR to the right of that.
That's ample space to rearrange into the form above.

@ediosyncratic
Copy link
Owner Author

Preliminary investigation.
This is complicated by the fact that $DATA['HP'] holds the max HP (strictly full HP, since temp HP can take one higher) which presently appears as one field in the sheet, which this change would replace with "HD rolls" (base) and "HD×Con", only showing their value (as the current total, $DATA['HPWounds']) when no temp or damage are in effect.
The new organisation will also need (analogous to those for the AC row) onchanged triggers for the editable fields.

That ties in to the fact that existing saved sheets have $DATA['HP'], which is one of the fields to be displayed in a campaign summary table only the campaign owner (i.e. DM) gets to see. I think it'll make sense to change that table to use a new HPFull, in place of HP, that gets set by the onchanged of HPHitDice or Con.
When HP is set (coming from legacy save) and the new HPHitDice isn't, the code is going to need to infer the latter from the former and initialize HPFull, clearing HP while it's about it.

@ediosyncratic
Copy link
Owner Author

Between the current total and the non-lethal box, where there's space for one character (it's how this table is organised), I guess it'd make sense to have a > (grey), = or < sign (the latter two red, bold, generally visible) to indicate whether the character is still standing, staggered or unconscious.

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

No branches or pull requests

1 participant