fixed calcs
This commit is contained in:
parent
bf3949df07
commit
0ed9943425
14
index.php
14
index.php
@ -211,9 +211,9 @@
|
||||
Damage kind
|
||||
</span>
|
||||
<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('dice')" /> <span>Rolled Damage</span> </label>
|
||||
<label> <input id="mob_dmg_type_averages" name="mob_dmg_type" type="radio" onchange="usingDMGDice('average')" /> <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>
|
||||
<label> <input value="1" id="mob_dmg_type_rolled" name="mob_dmg_type" type="radio" checked onchange="usingDMGDice('dice')" /> <span>Rolled Damage</span> </label>
|
||||
<label> <input value="2" id="mob_dmg_type_averages" name="mob_dmg_type" type="radio" onchange="usingDMGDice('average')" /> <span>Average Damage</span> </label>
|
||||
<label> <input value="3" id="mob_dmg_type_max" name="mob_dmg_type" type="radio" onchange="usingDMGDice('max')" /> <span>Max Damage</span> </label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DMG_hitdice_card" class="card black">
|
||||
@ -719,7 +719,7 @@
|
||||
|
||||
// A modifier, that applies the ratio of Enemies to players
|
||||
|
||||
var global_amount_modifier = encounter_amount / party_amount;
|
||||
var global_amount_modifier = encounter_amount / party_amount * 100;
|
||||
|
||||
// What HP Type is used? 1=average 2=rolled 3=max
|
||||
var encounter_hp_type = $("input[name='mob_hp_type']:checked").val();
|
||||
@ -729,7 +729,7 @@
|
||||
var encounter_hp_type_rolls_added_score = 0;
|
||||
var encounter_hp_type_averages_score = 0;
|
||||
var encounter_hp_type_max_score = 0;
|
||||
if (encounter_hp_type == 1) {
|
||||
if (encounter_hp_type == 2) {
|
||||
|
||||
|
||||
//IF Using Health Rolls
|
||||
@ -741,7 +741,7 @@
|
||||
var encounter_hp_type_rolls_added = encounter_hp_type_rolls_amount + encounter_hp_type_rolls_dice;
|
||||
encounter_hp_type_rolls_added_score = 20 / (encounter_hp_type_rolls_added / party_amount);
|
||||
|
||||
} else if (encounter_hp_type == 2) {
|
||||
} else if (encounter_hp_type == 1) {
|
||||
|
||||
//IF Using Averages
|
||||
var encounter_hp_type_averages = $("#mob_hp_avg").val();
|
||||
@ -759,7 +759,7 @@
|
||||
// CR Calculation
|
||||
var encounter_cr = $("#mob_CR").val();
|
||||
var encounter_cr_per_player = encounter_cr / party_amount;
|
||||
var encounter_cr_score = (encounter_cr_per_player / party_level) / 20;
|
||||
var encounter_cr_score = (encounter_cr_per_player / (party_level*party_amount)) / 20;
|
||||
|
||||
//This sets the AC Score of the encounter.
|
||||
var encounter_ac = $("#mob_ac").val();
|
||||
|
Loading…
Reference in New Issue
Block a user