diff --git a/index.php b/index.php index 1813188..d55c549 100644 --- a/index.php +++ b/index.php @@ -864,16 +864,19 @@ //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_names =["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_names = ["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() + ""); + $.each(party_variables, function(i) { + console.log("" + party_variables_names[i] + "" + "" + $(this).val() + ""); }); - $.each(encounter_variables, function() { - console.log("" + Object.keys($(this))[0] + "" + "" + $(this).val() + ""); + $.each(encounter_variables, function(i) { + console.log("" + encounter_variables_names[i] + "" + "" + $(this).val() + ""); });