diff --git a/css/styles.css b/css/styles.css
index abe423a..d77e2e6 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -82,3 +82,7 @@ pre code {
.pinned {
position: fixed !important;
}
+.totalrow {
+ border-top: 5px solid;
+ border-bottom: 10px double;
+}
diff --git a/index.php b/index.php
index 1d84226..55cbe59 100644
--- a/index.php
+++ b/index.php
@@ -719,8 +719,6 @@
// A modifier, that applies the ratio of Enemies to players
- console.log("encounter_amount = " + encounter_amount);
- console.log("party_amount = " + party_amount);
var global_amount_modifier = encounter_amount / party_amount;
// What HP Type is used? 1=average 2=rolled 3=max
@@ -811,7 +809,7 @@
- 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();
@@ -865,7 +863,9 @@
//selected_dmgtypes.push($(this).val());
});
- encounter_condition_score = encounter_apply_conditions * 5 - encounter_conditions * 3;
+ var encounter_condition_score = encounter_apply_conditions * 5 - encounter_conditions * 3;
+
+
//Clamp the score
if (encounter_condition_score > 20) {
@@ -876,27 +876,97 @@
encounter_final_score = encounter_hp_score + encounter_cr_score + encounter_ac_score + encounter_dmg_score + encounter_dmgtype_score + encounter_onehit_score + encounter_multiattack_score + encounter_strategy_score + encounter_lair_action_score + encounter_legendairy_action_score + encounter_status_score + encounter_healing_score + encounter_stunning_score + encounter_condition_score;
+
//FINAL CALCULATION
//Party Points:
var final_score = (encounter_final_score * modifier_encounter) - (party_final_score * modifier_party);
+ //Fill the tables
+ $("#totalscard").html('
');
+
+ filltable("final_score", party_meelee_fighters)
+ filltable("final_score", party_range_fighters)
+ filltable("final_score", party_magic_fighters)
+ filltable("final_score", party_support_fighters)
+ filltable("final_score", party_health)
+ filltable("final_score", party_health_score)
+ filltable("final_score", party_skill_knowledge)
+ filltable("final_score", party_skill_knowledge_score)
+ filltable("final_score", party_skill_attention)
+ filltable("final_score", party_skill_attention_score)
+ filltable("final_score", party_skill_strategies)
+ filltable("final_score", party_skill_strategies_score)
+ filltable("final_score", party_skill_rules)
+ filltable("final_score", party_skill_rules_score)
+ filltable("final_score", party_final_score)
+ filltable("final_score", encounter_amount)
+ filltable("final_score", global_amount_modifier)
+ filltable("final_score", encounter_hp_type)
+ filltable("final_score", encounter_hp_type_rolls_added_score)
+ filltable("final_score", encounter_hp_type_averages_score)
+ filltable("final_score", encounter_hp_type_max_score)
+ filltable("final_score", encounter_hp_type_rolls_amount)
+ filltable("final_score", encounter_hp_type_rolls_dice)
+ filltable("final_score", encounter_hp_type_rolls_added)
+ filltable("final_score", encounter_hp_type_averages)
+ filltable("final_score", encounter_hp_type_max)
+ filltable("final_score", encounter_hp_score)
+ filltable("final_score", encounter_cr)
+ filltable("final_score", encounter_cr_per_player)
+ filltable("final_score", encounter_cr_score)
+ filltable("final_score", encounter_ac)
+ filltable("final_score", encounter_ac_score)
+ filltable("final_score", encounter_dmg_type)
+ filltable("final_score", encounter_dmg_type_rolls_added_score)
+ filltable("final_score", encounter_dmg_type_averages_score)
+ filltable("final_score", encounter_dmg_type_max_score)
+ filltable("final_score", encounter_dmg_type_rolls_amount)
+ filltable("final_score", encounter_dmg_type_rolls_dice)
+ filltable("final_score", encounter_dmg_type_rolls_added)
+ filltable("final_score", encounter_dmg_type_averages)
+ filltable("final_score", encounter_dmg_type_max)
+ filltable("final_score", encounter_dmg_score)
+ filltable("final_score", encounter_dmgtype_possibilities)
+ filltable("final_score", encounter_dmgtype_points)
+ filltable("final_score", encounter_dmgtype_score)
+ filltable("final_score", encounter_onehit_score)
+ filltable("final_score", encounter_multiattack_score)
+ filltable("final_score", encounter_strategy)
+ filltable("final_score", encounter_strategy_score)
+ filltable("final_score", encounter_lair_action_score)
+ filltable("final_score", encounter_legendairy_action_score)
+ filltable("final_score", encounter_immunities)
+ filltable("final_score", encounter_resistances)
+ filltable("final_score", encounter_vounerabilities)
+ filltable("final_score", encounter_status_score)
+ filltable("final_score", encounter_healing_score)
+ filltable("final_score", encounter_stunning_score)
+ filltable("final_score", encounter_conditions)
+ filltable("final_score", encounter_apply_conditions)
+ filltable("final_score", encounter_condition_score)
+ filltable("final_score", final_score, true)
+
+
+/* This used to be the old code for the Tablevariables
var party_variables = [party_skill_strategies_score,party_skill_attention_score,party_skill_knowledge_score,party_skill_rules_score,party_health_score];
var party_variables_name = ["party_skill_strategies_score","party_skill_attention_score","party_skill_knowledge_score","party_skill_rules_score","party_health_score"];
var encounter_variables = [encounter_hp_score,encounter_cr_score,encounter_ac_score,encounter_dmg_score,encounter_dmgtype_score,encounter_onehit_score,encounter_multiattack_score,encounter_strategy_score,encounter_lair_action_score,encounter_legendairy_action_score,encounter_status_score,encounter_healing_score,encounter_stunning_score,encounter_condition_score];
var encounter_variables_name = ["encounter_hp_score","encounter_cr_score","encounter_ac_score","encounter_dmg_score","encounter_dmgtype_score","encounter_onehit_score","encounter_multiattack_score","encounter_strategy_score","encounter_lair_action_score","encounter_legendairy_action_score","encounter_status_score","encounter_healing_score","encounter_stunning_score","encounter_condition_score"];
-
- //Fill the tables
- $("#totalscard").html('');
-
- party_variables.forEach((element, i) => filltable(party_variables_name, element, i));
- encounter_variables.forEach((element, i) => filltable(encounter_variables_name, element, i));
+ party_variables.forEach((element, i) => filltable(party_variables_name, element[i]));
+ encounter_variables.forEach((element, i) => filltable(encounter_variables_name, element[i]));
//encounter_variables.forEach((element, i) => document.getElementById("totalscard").innerHTML += "" + encounter_variables_name[i] + "
" + "" + element + "
");
-
+*/
}
- function filltable(namespace, element, i) {
- $("#totalsdata").append("" + namespace[i] + " | " + element + " |
");
+ function filltable(variablename, element, istotal) {
+
+ if (istotal) {
+ $("#totalsdata").append("" + variablename + " | " + element + " |
");
+ } else {
+ $("#totalsdata").append("" + variablename + " | " + element + " |
");
+ }
+
}
function setDiff(difficulty) {