From c1d34c73ddcfd57f625d43445fb206dc364e1dd5 Mon Sep 17 00:00:00 2001 From: James <9213561+Gensokian@users.noreply.github.com> Date: Thu, 29 Sep 2022 15:17:16 +0200 Subject: [PATCH] Update index.php --- index.php | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/index.php b/index.php index d8feb57..819f3a0 100644 --- a/index.php +++ b/index.php @@ -864,34 +864,12 @@ //Party Points: var final_score = (encounter_final_score * modifier_encounter) - (party_final_score * modifier_party); - var party_variables = []; - party_variables.push(party_skill_strategies_score); - party_variables.push(party_skill_attention_score); - party_variables.push(party_skill_knowledge_score); - party_variables.push(party_health_score); - var encounter_variables = []; - encounter_variables.push(encounter_hp_score); - encounter_variables.push(encounter_cr_score); - encounter_variables.push(encounter_ac_score); - encounter_variables.push(encounter_dmg_score); - encounter_variables.push(encounter_dmgtype_score); - encounter_variables.push(encounter_onehit_score); - encounter_variables.push(encounter_multiattack_score); - encounter_variables.push(encounter_strategy_score); - encounter_variables.push(encounter_lair_action_score); - encounter_variables.push(encounter_legendairy_action_score); - encounter_variables.push(encounter_status_score); - encounter_variables.push(encounter_healing_score); - encounter_variables.push(encounter_stunning_score); - encounter_variables.push(encounter_condition_score); + var party_variables = [,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]; - $.each(party_variables, function() { - console.log("" + Object.keys($(this))[0] + "" + "" + $(this).val() + ""); - }); + party_variables.forEach(element => console.log("" + Object.keys(element)[0]] + "" + "" + element + "")); + encounter_variables.forEach(element => console.log("" + Object.keys(element)[0]] + "" + "" + element + "")); - $.each(encounter_variables, function() { - console.log("" + Object.keys($(this)[0]) + "" + "" + $(this).val() + ""); - }); //Fill the tables