Update index.php

Update index.php

Update index.php

Update index.php

mathnt

Update index.php

Update index.php
This commit is contained in:
James 2022-09-30 09:49:12 +02:00
parent 16973993f7
commit d0d501edb6

View File

@ -110,7 +110,7 @@
<div class="card black">
<div class="card-content white-text"> <span class="card-title">Strategies</span>
<span>Do your players play any strategy games? (Chess counts)</span> <br />
<label> <input name="party_strategies" value="1" type="radio" checked /> <span>No</span> </label>
<label> <input name="party_strategies" value="1" type="radio" checked /> <span>No</span> </label> <br />
<label> <input name="party_strategies" value="2" type="radio" /> <span>Yes, league</span> </label> <br />
<label> <input name="party_strategies" value="3" type="radio" /> <span>Yes</span> </label> <br />
</div>
@ -151,7 +151,7 @@
<div class="card-content white-text"> <span class="card-title">Basics</span>
<div class="card black">
<div class="card-content white-text"> <span class="card-title">Amount (EXPERIMENTAL)</span> <span>How many bad guys? Anything above 1 will enforce average calculations</span><br> <b class="red-text">Changing this will reset the HP and Damage calculations and deactivate dice rolled HP.</b>
<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>
<div class="input-field s3"> <input placeholder="How many eggs for a cake?" value="1" onchange="setMobs()" id="mob_ammount" min="1" type="number" class="white-text validate" /> </div>
</div>
</div>
<div class="card black">
@ -478,15 +478,6 @@
</div>
</div>
</div>
<div class="row">
<div class="col s12">
<div class="card black">
<div class="card-content white-text"> <span class="card-title">Calculation for nerds</span>
<p>This is where the calculation stats would be, IF I HAD ONE.</p>
</div>
</div>
</div>
</div>
</div>
<div id="Bonus" class="col s12">
<div class="row">
@ -718,6 +709,9 @@
var encounter_amount = $("input[name='mob_ammount']:checked").val();
// A modifier, that applies the ratio of Enemies to players
console.log(encounter_amount);
console.log(party_amount);
var global_amount_modifier = encounter_amount / party_amount;
// What HP Type is used? 1=average 2=rolled 3=max
@ -798,13 +792,18 @@
var encounter_dmgtype_points = 0;
$.each($("input[name='dmgtype']:checked"), function() {
encounter_dmgtype_points++;
console.log("dmgtype_points = " + encounter_dmgtype_points);
//selected_dmgtypes.push($(this).val());
});
$.each($("input[name='dmgtype']"), function() {
encounter_dmgtype_possibilities++;
console.log("encounter_dmgtype_possibilities = " + encounter_dmgtype_possibilities);
});
var encounter_dmgtype_score = (20 - encounter_dmgtype_possibilities) + encounter_dmgtype_points * global_amount_modifier;
var encounter_dmgtype_score = 20 - encounter_dmgtype_possibilities + encounter_dmgtype_points * global_amount_modifier;
console.log(encounter_dmgtype_score);
var encounter_onehit_score = $("input[name='mob_onehits']:checked").val();