Update index.php
This commit is contained in:
parent
06d0dac404
commit
923d14d5ea
25
index.php
25
index.php
@ -195,6 +195,7 @@
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">Amount</span>
|
||||
<span>How many bad guys?</span>
|
||||
<span class="red-text">CHANGING THIS WILL RESET THE HP CALCULATION</span>
|
||||
<div class="input-field s3">
|
||||
<input placeholder="How many eggs for a cake?" onchange="setMobs()" id="mob_ammount" min="1" type="number" class="white-text validate" />
|
||||
</div>
|
||||
@ -204,8 +205,8 @@
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">Health kind</span>
|
||||
<span>Are we using Average Health or HP Dice?</span><br />
|
||||
<label> <input name="mob_hp_type" type="radio" checked onchange="usingHPDice(true)" /> <span>Averages</span> </label>
|
||||
<label> <input name="mob_hp_type" type="radio" onchange="usingHPDice(false)" /> <span>Hit Dice</span> </label>
|
||||
<label> <input id="mob_hp_type_averages" name="mob_hp_type" type="radio" checked onchange="usingHPDice(true)" /> <span>Averages</span> </label>
|
||||
<label> <input id="mob_hp_type_rolled" name="mob_hp_type" type="radio" onchange="usingHPDice(false)" /> <span>Hit Dice</span> </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card black">
|
||||
@ -249,8 +250,8 @@
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">Damage kind</span>
|
||||
<span>Are we using Rolled or Average Damage?</span><br />
|
||||
<label> <input name="mob_dmg_type" type="radio" checked onchange="usingDMGDice(true)" /> <span>Rolled Damage</span> </label>
|
||||
<label> <input name="mob_dmg_type" type="radio" onchange="usingDMGDice(false)" /> <span>Average Damage</span> </label>
|
||||
<label> <input id="mob_dmg_type_rolled" name="mob_dmg_type" type="radio" checked onchange="usingDMGDice(true)" /> <span>Rolled Damage</span> </label>
|
||||
<label> <input id="mob_dmg_type_averages" name="mob_dmg_type" type="radio" onchange="usingDMGDice(false)" /> <span>Average Damage</span> </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card black">
|
||||
@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user