From 923d14d5eab116498481a9a5931543f2394b42f8 Mon Sep 17 00:00:00 2001 From: James <9213561+Gensokian@users.noreply.github.com> Date: Mon, 26 Sep 2022 14:37:57 +0200 Subject: [PATCH] Update index.php --- index.php | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 0f4a5fb..61f60eb 100644 --- a/index.php +++ b/index.php @@ -195,6 +195,7 @@
Amount How many bad guys? + CHANGING THIS WILL RESET THE HP CALCULATION
@@ -204,8 +205,8 @@
Health kind Are we using Average Health or HP Dice?
- - + +
@@ -249,8 +250,8 @@
Damage kind Are we using Rolled or Average Damage?
- - + +
@@ -942,8 +943,22 @@ function setMobs() { $("#mob_multiattack_ammount").attr("placeholder", "X / "+$("#mob_ammount").val()) $("#mob_multiattack_ammount").attr("max", $("#mob_ammount").val()) - if ($("#mob_ammount").val() < $("#mob_multiattack_ammount").val()) { + if ($("#mob_ammount").val() > 1 { + + // FIX HP + usingHPDice(false); + $("#mob_hp_type_rolled").attr("disabled", true); + $("#mob_hp_type_averages").prop("checked", true); + + + usingDMGDice(false); + $("#mob_dmg_type_rolled").attr("disabled", true); + $("#mob_dmg_type_averages").prop("checked", true); + + } else { + $("#mob_hp_type_rolled").removeAttr("disabled"); + $("#mob_dmg_type_rolled").removeAttr("disabled"); } }