Fixes monster hp calculation so the first hit die is averaged like the others. Characters rolled as players will need to use custom HP.

This commit is contained in:
2021-04-17 13:54:25 -07:00
parent f9129296aa
commit 50efc34c22

View File

@@ -371,6 +371,9 @@ public class Monster {
int hitDice = getHitDice();
int dieSize = getHitDieForSize(getSize());
int conMod = getConstitutionModifier();
// For PC style calculations use this
//int hpTotal = (int) Math.max(1, Math.ceil(dieSize + conMod + (hitDice - 1) * ((dieSize + 1) / 2.0 + conMod)));
// For monster style calculations use this
int hpTotal = (int) Math.max(1, Math.ceil(hitDice * ((dieSize + 1) / 2.0 + conMod)));
return String.format(Locale.US, "%d (%dd%d %+d)", hpTotal, hitDice, dieSize, conMod * hitDice);
}