Update index.php

This commit is contained in:
James 2022-09-26 14:58:32 +02:00
parent 480407add3
commit abed063028

View File

@ -204,9 +204,10 @@
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <div class="card-content white-text">
<span class="card-title">Health kind</span> <span class="card-title">Health kind</span>
<span>Are we using Average Health or HP Dice?</span><br /> <span>Are we using Max, Average or rolled HP?</span><br />
<label> <input id="mob_hp_type_averages" name="mob_hp_type" type="radio" checked onchange="usingHPDice(false)" /> <span>Averages</span> </label> <label> <input id="mob_hp_type_averages" name="mob_hp_type" type="radio" checked onchange="usingHPDice(false)" /> <span>Averages</span> </label>
<label> <input id="mob_hp_type_rolled" name="mob_hp_type" type="radio" onchange="usingHPDice(true)" /> <span>Hit Dice</span> </label> <label> <input id="mob_hp_type_rolled" name="mob_hp_type" type="radio" onchange="usingHPDice(true)" /> <span>Hit Dice</span> </label>
<label> <input id="mob_hp_type_max" name="mob_hp_type" type="radio" onchange="usingHPDice('max')" /> <span>Max</span> </label>
</div> </div>
</div> </div>
<div class="card black"> <div class="card black">
@ -228,6 +229,12 @@
<input placeholder="42" id="mob_hp_avg" min="1" type="number" class="white-text validate" /> <input placeholder="42" id="mob_hp_avg" min="1" type="number" class="white-text validate" />
</div> </div>
</div> </div>
<div id="HP_max">
<span>What's the max rolled HP of all enemies?</span>
<div class="input-field s1">
<input placeholder="42" id="mob_hp_max" min="1" type="number" class="white-text validate" />
</div>
</div>
</div> </div>
</div> </div>
<div class="card black"> <div class="card black">
@ -249,15 +256,16 @@
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <div class="card-content white-text">
<span class="card-title">Damage kind</span> <span class="card-title">Damage kind</span>
<span>Are we using Rolled or Average Damage?</span><br /> <span>Are we using Max, Rolled or Average Damage?</span><br />
<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_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> <label> <input id="mob_dmg_type_averages" name="mob_dmg_type" type="radio" onchange="usingDMGDice(false)" /> <span>Average Damage</span> </label>
<label> <input id="mob_dmg_type_max" name="mob_dmg_type" type="radio" onchange="usingDMGDice('max')" /> <span>Max Damage</span> </label>
</div> </div>
</div> </div>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <div class="card-content white-text">
<span class="card-title">Damage definition</span> <span class="card-title">Damage definition</span>
<div id="dmg_average"> <div id="dmg_hitdice">
<span>How many Dice are used for the calculation?</span> <span>How many Dice are used for the calculation?</span>
<div class="input-field s1"> <div class="input-field s1">
<input placeholder="[X]d6" id="mob_dmg_dice_ammount" min="1" type="number" class="white-text validate" /> <input placeholder="[X]d6" id="mob_dmg_dice_ammount" min="1" type="number" class="white-text validate" />
@ -267,12 +275,18 @@
<input placeholder=" 4d[Y]" id="mob_dmg_dice_type" min="1" type="number" class="white-text validate" /> <input placeholder=" 4d[Y]" id="mob_dmg_dice_type" min="1" type="number" class="white-text validate" />
</div> </div>
</div> </div>
<div id="dmg_hitdice"> <div id="dmg_average">
<span>What's the average damage of the enemy?</span> <span>What's the average damage of the enemy?</span>
<div class="input-field s1"> <div class="input-field s1">
<input placeholder="The number before the damage dice." id="mob_dmg_avg" min="1" type="number" class="white-text validate" /> <input placeholder="The number before the damage dice." id="mob_dmg_avg" min="1" type="number" class="white-text validate" />
</div> </div>
</div> </div>
<div id="dmg_max">
<span>What's the max rolled damage of the enemy?</span>
<div class="input-field s1">
<input placeholder="x times the hit dieces' sides." id="mob_dmg_max" min="1" type="number" class="white-text validate" />
</div>
</div>
</div> </div>
</div> </div>
<div class="card black"> <div class="card black">
@ -970,14 +984,26 @@
function usingHPDice(e) { function usingHPDice(e) {
if (e) { if (e) {
$("#HP_max").hide("fast");
$("#HP_average").hide("fast"); $("#HP_average").hide("fast");
$("#mob_hp_dice_ammount").val(""); $("#mob_hp_dice_ammount").val("");
$("#mob_hp_dice_type").val(""); $("#mob_hp_dice_type").val("");
$("#HP_hitdice").show("fast"); $("#HP_hitdice").show("fast");
} else { $("#mob_hp_max").val("");
} else if (e = false) {
$("#HP_max").hide("fast");
$("#HP_hitdice").hide("fast"); $("#HP_hitdice").hide("fast");
$("#mob_hp_avg").val(""); $("#mob_hp_avg").val("");
$("#HP_average").show("fast"); $("#HP_average").show("fast");
$("#mob_hp_max").val("");
} else if (e == "max") {
$("#HP_average").hide("fast");
$("#HP_hitdice").hide("fast");
$("#HP_max").show("fast");
$("#mob_hp_avg").val("");
$("#mob_hp_dice_ammount").val("");
$("#mob_hp_dice_type").val("");
} }
calcDiff(); calcDiff();
} }