From ac4fef4db30926d022544d90593fc6c39a94c145 Mon Sep 17 00:00:00 2001 From: James <9213561+Gensokian@users.noreply.github.com> Date: Thu, 29 Sep 2022 16:17:28 +0200 Subject: [PATCH] Update index.php --- index.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 2e2bd03..4bf6d24 100644 --- a/index.php +++ b/index.php @@ -864,12 +864,17 @@ //Party Points: var final_score = (encounter_final_score * modifier_encounter) - (party_final_score * modifier_party); - var party_variables = [,party_skill_strategies_score,party_skill_attention_score,party_skill_knowledge_score,party_health_score]; + var party_variables = [party_skill_strategies_score,party_skill_attention_score,party_skill_knowledge_score,party_health_score]; + var party_variables_name = ["party_skill_strategies_score","party_skill_attention_score","party_skill_knowledge_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"]; + party_variables.forEach((element, i) => console.log("" + party_variables_name[i] + "" + "" + element + "")); + encounter_variables.forEach((element, i) => console.log("" + encounter_variables_name[i] + "" + "" + element + "")); + //Fill the tables - document.getElementById("totalscard").innerHTML = ""+party_variables.forEach(element => console.log("" + Object.keys(element)[0] + "" + "" + element + ""))+encounter_variables.forEach(element => console.log("" + Object.keys(element)[0] + "" + "" + element + ""))+"
VariablePts
" +document.getElementById("totalscard").innerHTML = ""+"
VariablePts
" ); }