offsetting!

Revert "offsetting!"

This reverts commit 3be76439e3.

fixed calcs

added party amount

typo

mathnt

Update index.php
This commit is contained in:
James 2022-09-30 12:26:14 +02:00
parent c0cf19741d
commit 26c9d5efde

View File

@ -211,9 +211,9 @@
Damage kind Damage kind
</span> </span>
<span>Are we using Max, 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('dice')" /> <span>Rolled 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 id="mob_dmg_type_averages" name="mob_dmg_type" type="radio" onchange="usingDMGDice('average')" /> <span>Average 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 id="mob_dmg_type_max" name="mob_dmg_type" type="radio" onchange="usingDMGDice('max')" /> <span>Max 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> </div>
<div id="DMG_hitdice_card" class="card black"> <div id="DMG_hitdice_card" class="card black">
@ -682,7 +682,7 @@
var party_support_fighters = $("#party_support").val(); var party_support_fighters = $("#party_support").val();
//This counts the amount of Party Members for convenience //This counts the amount of Party Members for convenience
var party_amount = party_meelee_fighters + party_range_fighters + party_magic_fighters + party_support_fighters; var party_amount = parseInt(party_meelee_fighters) + parseInt(party_range_fighters) + parseInt(party_magic_fighters) + parseInt(party_support_fighters);
//Party Weighting //Party Weighting
//Too Lazy. I could add something like when the difference //Too Lazy. I could add something like when the difference
@ -719,7 +719,7 @@
// A modifier, that applies the ratio of Enemies to players // 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 // What HP Type is used? 1=average 2=rolled 3=max
var encounter_hp_type = $("input[name='mob_hp_type']:checked").val(); 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_rolls_added_score = 0;
var encounter_hp_type_averages_score = 0; var encounter_hp_type_averages_score = 0;
var encounter_hp_type_max_score = 0; var encounter_hp_type_max_score = 0;
if (encounter_hp_type == 1) { if (encounter_hp_type == 2) {
//IF Using Health Rolls //IF Using Health Rolls
@ -741,7 +741,7 @@
var encounter_hp_type_rolls_added = encounter_hp_type_rolls_amount + encounter_hp_type_rolls_dice; 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); 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 //IF Using Averages
var encounter_hp_type_averages = $("#mob_hp_avg").val(); var encounter_hp_type_averages = $("#mob_hp_avg").val();
@ -759,7 +759,7 @@
// CR Calculation // CR Calculation
var encounter_cr = $("#mob_CR").val(); var encounter_cr = $("#mob_CR").val();
var encounter_cr_per_player = encounter_cr / party_amount; 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. //This sets the AC Score of the encounter.
var encounter_ac = $("#mob_ac").val(); var encounter_ac = $("#mob_ac").val();
@ -888,6 +888,7 @@
filltable("party_range_fighters", party_range_fighters) filltable("party_range_fighters", party_range_fighters)
filltable("party_magic_fighters", party_magic_fighters) filltable("party_magic_fighters", party_magic_fighters)
filltable("party_support_fighters", party_support_fighters) filltable("party_support_fighters", party_support_fighters)
filltable("party_amount", party_amount)
filltable("party_health", party_health) filltable("party_health", party_health)
filltable("party_health_score", party_health_score) filltable("party_health_score", party_health_score)
filltable("party_skill_knowledge", party_skill_knowledge) filltable("party_skill_knowledge", party_skill_knowledge)