Fix split monster with 0 max hp

A gremlin first hit a fire trap, reducing its max hp to 1, and
then it plunged into water, making the split gremlin have 0 max hp.
This commit is contained in:
Pasi Kallinen
2024-05-25 18:32:34 +03:00
parent 4217eee07b
commit 9df851d5da

View File

@@ -2834,7 +2834,7 @@ split_mon(
disp.botl = TRUE;
You("multiply%s!", reason);
}
} else {
} else if (mon->mhpmax > 1) {
mtmp2 = clone_mon(mon, 0, 0);
if (mtmp2) {
mtmp2->mhpmax = mon->mhpmax / 2;