Update index.php

finalized calculation

Update index.php

Update index.php

fixed errors

Update index.php

fiexed floatuing button

fixed varname

we fixed now

lets try this then

Update index.php

Update index.php
This commit is contained in:
James 2022-09-29 13:40:28 +02:00
parent 87738ed91c
commit 4111a0c903

617
index.php
View File

@ -23,6 +23,11 @@
<body> <body>
<div class "container"> <div class "container">
<div onclick="calcDiff()" class="fixed-action-btn">
<a class="btn-floating btn-large indigo">
<i class="large material-icons">sync</i>
</a>
</div>
<div class="row"> <div class="row">
<div class="col s12 l8 offset-l2"> <div class="col s12 l8 offset-l2">
<div class="blurry"> <div class="blurry">
@ -226,19 +231,19 @@
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title"> Damage Types </span> <span>What damagetype is beeing used?</span><br> <div class="card-content white-text"> <span class="card-title"> Damage Types </span> <span>What damagetype is beeing used?</span><br>
<div class="row"> <div class="row">
<div class="col s6"> <label> <input id="dmgtype_acid" type="checkbox" /> <span>Acid</span> </label> </div> <div class="col s6"> <label> <input Name="dmgtype" id="dmgtype_acid" type="checkbox" /> <span>Acid</span> </label> </div>
<div class="col s6"> <label> <input id="dmgtype_bludgeoning" type="checkbox" /> <span>Bludgeoning</span> </label> </div> <div class="col s6"> <label> <input Name="dmgtype" id="dmgtype_bludgeoning" type="checkbox" /> <span>Bludgeoning</span> </label> </div>
<div class="col s6"> <label> <input id="dmgtype_cold" type="checkbox" /> <span>Cold</span> </label> </div> <div class="col s6"> <label> <input Name="dmgtype" id="dmgtype_cold" type="checkbox" /> <span>Cold</span> </label> </div>
<div class="col s6"> <label> <input id="dmgtype_fire" type="checkbox" /> <span>Fire</span> </label> </div> <div class="col s6"> <label> <input Name="dmgtype" id="dmgtype_fire" type="checkbox" /> <span>Fire</span> </label> </div>
<div class="col s6"> <label> <input id="dmgtype_force" type="checkbox" /> <span>Force</span> </label> </div> <div class="col s6"> <label> <input Name="dmgtype" id="dmgtype_force" type="checkbox" /> <span>Force</span> </label> </div>
<div class="col s6"> <label> <input id="dmgtype_lightning" type="checkbox" /> <span>Lightning</span> </label> </div> <div class="col s6"> <label> <input Name="dmgtype" id="dmgtype_lightning" type="checkbox" /> <span>Lightning</span> </label> </div>
<div class="col s6"> <label> <input id="dmgtype_necrotic" type="checkbox" /> <span>Necrotic</span> </label> </div> <div class="col s6"> <label> <input Name="dmgtype" id="dmgtype_necrotic" type="checkbox" /> <span>Necrotic</span> </label> </div>
<div class="col s6"> <label> <input id="dmgtype_piercing" type="checkbox" /> <span>Piercing</span> </label> </div> <div class="col s6"> <label> <input Name="dmgtype" id="dmgtype_piercing" type="checkbox" /> <span>Piercing</span> </label> </div>
<div class="col s6"> <label> <input id="dmgtype_poison" type="checkbox" /> <span>Poison</span> </label> </div> <div class="col s6"> <label> <input Name="dmgtype" id="dmgtype_poison" type="checkbox" /> <span>Poison</span> </label> </div>
<div class="col s6"> <label> <input id="dmgtype_psychic" type="checkbox" /> <span>Psychic</span> </label> </div> <div class="col s6"> <label> <input Name="dmgtype" id="dmgtype_psychic" type="checkbox" /> <span>Psychic</span> </label> </div>
<div class="col s6"> <label> <input id="dmgtype_radiant" type="checkbox" /> <span>Radiant</span> </label> </div> <div class="col s6"> <label> <input Name="dmgtype" id="dmgtype_radiant" type="checkbox" /> <span>Radiant</span> </label> </div>
<div class="col s6"> <label> <input id="dmgtype_slashing" type="checkbox" /> <span>Slashing</span> </label> </div> <div class="col s6"> <label> <input Name="dmgtype" id="dmgtype_slashing" type="checkbox" /> <span>Slashing</span> </label> </div>
<div class="col s6"> <label> <input id="dmgtype_thunder" type="checkbox" /> <span>Thunder</span> </label> </div> <div class="col s6"> <label> <input Name="dmgtype" id="dmgtype_thunder" type="checkbox" /> <span>Thunder</span> </label> </div>
</div> </div>
</div> </div>
</div> </div>
@ -252,83 +257,109 @@
<div class="card indigo darken-4"> <div class="card indigo darken-4">
<div class="card-content white-text"> <span class="card-title">Abilities</span> <div class="card-content white-text"> <span class="card-title">Abilities</span>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title"> One-Hitting </span> <span>Can this mob one-hit someone? (Above double max HP or any spell like "Power Word: KILL")</span><br> <label> <input name="mob_onehits" type="radio" checked /> <span>Nope</span> </label><br /> <label> <input name="mob_onehits" type="radio" /> <span>Yes :)</span> </label> </div> <div class="card-content white-text"> <span class="card-title"> One-Hitting </span>
<span>Can this mob one-hit someone? (Above double max HP or any spell like "Power Word: KILL")</span><br>
<label> <input value="0" name="mob_onehits" type="radio" checked /> <span>Nope</span> </label><br />
<label> <input value="20" name="mob_onehits" type="radio" /> <span>Yes :)</span> </label>
</div>
</div> </div>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title"> Multiattack </span> <span>Do your mobs have multiattack?</span><br> <label> <input name="mob_multiattack" onchange="setMobMultiattack('hidden')" type="radio" checked /> <span>Nope</span> </label><br /> <label> <input name="mob_multiattack" onchange="setMobMultiattack('some')" type="radio" /> <span>Some</span> </label><br /> <label> <input name="mob_multiattack" onchange="setMobMultiattack('all')" type="radio" /> <span>Yes, all of them</span> </label> </div> <div class="card-content white-text">
</div> <span class="card-title"> Multiattack </span>
<div id="mob_multiattack_card" class="card black"> <span>Do your mobs have multiattack?</span><br>
<div class="card-content white-text"> <span class="card-title">Multiattack </span> <span>How many mobs have multiattack?</span><br> <input placeholder="1 / 1" id="mob_multiattack_ammount" min="1" max="1" type="number" class="white-text validate" /> </div> <label> <input value="0" name="mob_multiattack" onchange="setMobMultiattack('hidden')" type="radio" checked /> <span>Nope</span> </label><br />
<label> <input value="10" name="mob_multiattack" onchange="setMobMultiattack('some')" type="radio" /> <span>Some</span> </label><br />
<label> <input value="20" name="mob_multiattack" onchange="setMobMultiattack('all')" type="radio" /> <span>Yes, all of them</span> </label>
</div>
</div> </div>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title">Strategy</span> <span>How many braincells do your enemies have?</span><br> <label> <input name="mob_strategy" type="radio" checked /> <span>My mobs are dumb as bread</span> </label> <label> <input name="mob_strategy" type="radio" /> <span>My mobs are slightly clever and attack the biggest threat</span> </label><br /> <label> <input name="mob_strategy" type="radio" /> <span>My mobs are clever, they use custom rules like flanking</span> </label> <br /> <label> <input name="mob_strategy" type="radio" /> <span>My mobs are working in a pack!</span> </label> <br /> </div> <div class="card-content white-text"> <span class="card-title">Strategy</span>
<span>How many braincells do your enemies have?</span><br>
<label> <input value="1" name="mob_strategy" type="radio" checked /> <span>My mobs are dumb as bread</span> </label> <br />
<label> <input value="2" name="mob_strategy" type="radio" /> <span>My mobs are slightly clever and attack the biggest threat</span> </label><br />
<label> <input value="3" name="mob_strategy" type="radio" /> <span>My mobs are clever, they use custom rules like flanking</span> </label> <br />
<label> <input value="4" name="mob_strategy" type="radio" /> <span>My mobs are working in a pack!</span> </label>
</div>
</div> </div>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title"> Lair actions </span> <span>Can this mob use Lair Actions?</span><br> <label> <input name="mob_lair_action" type="radio" checked /> <span>Nein</span> </label><br /> <label> <input name="mob_lair_action" type="radio" /> <span>Yes</span> </label> </div> <div class="card-content white-text"> <span class="card-title"> Lair actions </span>
<span>Can this mob use Lair Actions?</span><br>
<label> <input value="0" name="mob_lair_action" type="radio" checked /> <span>Nein</span> </label><br />
<label> <input value="10" name="mob_lair_action" type="radio" /> <span>Yes</span> </label>
</div>
</div> </div>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title">Legendary Actions</span> <span>Can this mob use Legendary Actions?</span><br> <label> <input name="mob_legendary_action" type="radio" checked /> <span>Nah dude</span> </label><br /> <label> <input name="mob_legendary_action" type="radio" /> <span>Hell yeah!</span> </label> </div> <div class="card-content white-text"> <span class="card-title">Legendary Actions</span>
<span>Can this mob use Legendary Actions?</span><br>
<label> <input value="0" name="mob_legendary_action" type="radio" checked /> <span>Nah dude</span> </label><br />
<label> <input value="10" name="mob_legendary_action" type="radio" /> <span>Hell yeah!</span> </label>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col s12 l6"> <div class="col s12 l6">
<div class="card indigo darken-4"> <div class="card indigo darken-4">
<div class="card-content white-text"> <span class="card-title"> About the defence </span> <div class="card-content white-text">
<span class="card-title"> About the defence </span>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title"> Immunities </span> <span>What immunities does your dudes have?</span> <div class="card-content white-text">
<span class="card-title"> Immunities </span>
<span>What immunities does your encounter have?</span>
<div class="row"> <div class="row">
<div class="col s6"> <label> <input id="immunity_acid" type="checkbox" /> <span>Acid</span> </label> </div> <div class="col s6"> <label> <input name="mob_immunities" id="immunity_acid" type="checkbox" /> <span>Acid</span> </label> </div>
<div class="col s6"> <label> <input id="immunity_bludgeoning" type="checkbox" /> <span>Bludgeoning</span> </label> </div> <div class="col s6"> <label> <input name="mob_immunities" id="immunity_bludgeoning" type="checkbox" /> <span>Bludgeoning</span> </label> </div>
<div class="col s6"> <label> <input id="immunity_cold" type="checkbox" /> <span>Cold</span> </label> </div> <div class="col s6"> <label> <input name="mob_immunities" id="immunity_cold" type="checkbox" /> <span>Cold</span> </label> </div>
<div class="col s6"> <label> <input id="immunity_fire" type="checkbox" /> <span>Fire</span> </label> </div> <div class="col s6"> <label> <input name="mob_immunities" id="immunity_fire" type="checkbox" /> <span>Fire</span> </label> </div>
<div class="col s6"> <label> <input id="immunity_force" type="checkbox" /> <span>Force</span> </label> </div> <div class="col s6"> <label> <input name="mob_immunities" id="immunity_force" type="checkbox" /> <span>Force</span> </label> </div>
<div class="col s6"> <label> <input id="immunity_lightning" type="checkbox" /> <span>Lightning</span> </label> </div> <div class="col s6"> <label> <input name="mob_immunities" id="immunity_lightning" type="checkbox" /> <span>Lightning</span> </label> </div>
<div class="col s6"> <label> <input id="immunity_necrotic" type="checkbox" /> <span>Necrotic</span> </label> </div> <div class="col s6"> <label> <input name="mob_immunities" id="immunity_necrotic" type="checkbox" /> <span>Necrotic</span> </label> </div>
<div class="col s6"> <label> <input id="immunity_piercing" type="checkbox" /> <span>Piercing</span> </label> </div> <div class="col s6"> <label> <input name="mob_immunities" id="immunity_piercing" type="checkbox" /> <span>Piercing</span> </label> </div>
<div class="col s6"> <label> <input id="immunity_poison" type="checkbox" /> <span>Poison</span> </label> </div> <div class="col s6"> <label> <input name="mob_immunities" id="immunity_poison" type="checkbox" /> <span>Poison</span> </label> </div>
<div class="col s6"> <label> <input id="immunity_psychic" type="checkbox" /> <span>Psychic</span> </label> </div> <div class="col s6"> <label> <input name="mob_immunities" id="immunity_psychic" type="checkbox" /> <span>Psychic</span> </label> </div>
<div class="col s6"> <label> <input id="immunity_radiant" type="checkbox" /> <span>Radiant</span> </label> </div> <div class="col s6"> <label> <input name="mob_immunities" id="immunity_radiant" type="checkbox" /> <span>Radiant</span> </label> </div>
<div class="col s6"> <label> <input id="immunity_slashing" type="checkbox" /> <span>Slashing</span> </label> </div> <div class="col s6"> <label> <input name="mob_immunities" id="immunity_slashing" type="checkbox" /> <span>Slashing</span> </label> </div>
<div class="col s6"> <label> <input id="immunity_thunder" type="checkbox" /> <span>Thunder</span> </label> </div> <div class="col s6"> <label> <input name="mob_immunities" id="immunity_thunder" type="checkbox" /> <span>Thunder</span> </label> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title"> Resistance </span> <span>What resistances does your dudes have?</span> <div class="card-content white-text">
<span class="card-title">Resistance</span>
<span>What resistances does your dudes have?</span>
<div class="row"> <div class="row">
<div class="col s6"> <label> <input id="resistance_acid" type="checkbox" /> <span>Acid</span> </label> </div> <div class="col s6"> <label> <input name="mob_resitances" id="resistance_acid" type="checkbox" /> <span>Acid</span> </label> </div>
<div class="col s6"> <label> <input id="resistance_bludgeoning" type="checkbox" /> <span>Bludgeoning</span> </label> </div> <div class="col s6"> <label> <input name="mob_resitances" id="resistance_bludgeoning" type="checkbox" /> <span>Bludgeoning</span> </label> </div>
<div class="col s6"> <label> <input id="resistance_cold" type="checkbox" /> <span>Cold</span> </label> </div> <div class="col s6"> <label> <input name="mob_resitances" id="resistance_cold" type="checkbox" /> <span>Cold</span> </label> </div>
<div class="col s6"> <label> <input id="resistance_fire" type="checkbox" /> <span>Fire</span> </label> </div> <div class="col s6"> <label> <input name="mob_resitances" id="resistance_fire" type="checkbox" /> <span>Fire</span> </label> </div>
<div class="col s6"> <label> <input id="resistance_force" type="checkbox" /> <span>Force</span> </label> </div> <div class="col s6"> <label> <input name="mob_resitances" id="resistance_force" type="checkbox" /> <span>Force</span> </label> </div>
<div class="col s6"> <label> <input id="resistance_lightning" type="checkbox" /> <span>Lightning</span> </label> </div> <div class="col s6"> <label> <input name="mob_resitances" id="resistance_lightning" type="checkbox" /> <span>Lightning</span> </label> </div>
<div class="col s6"> <label> <input id="resistance_necrotic" type="checkbox" /> <span>Necrotic</span> </label> </div> <div class="col s6"> <label> <input name="mob_resitances" id="resistance_necrotic" type="checkbox" /> <span>Necrotic</span> </label> </div>
<div class="col s6"> <label> <input id="resistance_piercing" type="checkbox" /> <span>Piercing</span> </label> </div> <div class="col s6"> <label> <input name="mob_resitances" id="resistance_piercing" type="checkbox" /> <span>Piercing</span> </label> </div>
<div class="col s6"> <label> <input id="resistance_poison" type="checkbox" /> <span>Poison</span> </label> </div> <div class="col s6"> <label> <input name="mob_resitances" id="resistance_poison" type="checkbox" /> <span>Poison</span> </label> </div>
<div class="col s6"> <label> <input id="resistance_psychic" type="checkbox" /> <span>Psychic</span> </label> </div> <div class="col s6"> <label> <input name="mob_resitances" id="resistance_psychic" type="checkbox" /> <span>Psychic</span> </label> </div>
<div class="col s6"> <label> <input id="resistance_radiant" type="checkbox" /> <span>Radiant</span> </label> </div> <div class="col s6"> <label> <input name="mob_resitances" id="resistance_radiant" type="checkbox" /> <span>Radiant</span> </label> </div>
<div class="col s6"> <label> <input id="resistance_slashing" type="checkbox" /> <span>Slashing</span> </label> </div> <div class="col s6"> <label> <input name="mob_resitances" id="resistance_slashing" type="checkbox" /> <span>Slashing</span> </label> </div>
<div class="col s6"> <label> <input id="resistance_thunder" type="checkbox" /> <span>Thunder</span> </label> </div> <div class="col s6"> <label> <input name="mob_resitances" id="resistance_thunder" type="checkbox" /> <span>Thunder</span> </label> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title"> Vounerabilities </span> <span>What vounerabilities does your dudes have?</span> <div class="card-content white-text"> <span class="card-title"> Vounerabilities </span> <span>What vounerabilities does your dudes have?</span>
<div class="row"> <div class="row">
<div class="col s6"> <label> <input id="vounerability_acid" type="checkbox" /> <span>Acid</span> </label> </div> <div class="col s6"> <label> <input name="mob_vounerabilities" id="vounerability_acid" type="checkbox" /> <span>Acid</span> </label> </div>
<div class="col s6"> <label> <input id="vounerability_bludgeoning" type="checkbox" /> <span>Bludgeoning</span> </label> </div> <div class="col s6"> <label> <input name="mob_vounerabilities" id="vounerability_bludgeoning" type="checkbox" /> <span>Bludgeoning</span> </label> </div>
<div class="col s6"> <label> <input id="vounerability_cold" type="checkbox" /> <span>Cold</span> </label> </div> <div class="col s6"> <label> <input name="mob_vounerabilities" id="vounerability_cold" type="checkbox" /> <span>Cold</span> </label> </div>
<div class="col s6"> <label> <input id="vounerability_fire" type="checkbox" /> <span>Fire</span> </label> </div> <div class="col s6"> <label> <input name="mob_vounerabilities" id="vounerability_fire" type="checkbox" /> <span>Fire</span> </label> </div>
<div class="col s6"> <label> <input id="vounerability_force" type="checkbox" /> <span>Force</span> </label> </div> <div class="col s6"> <label> <input name="mob_vounerabilities" id="vounerability_force" type="checkbox" /> <span>Force</span> </label> </div>
<div class="col s6"> <label> <input id="vounerability_lightning" type="checkbox" /> <span>Lightning</span> </label> </div> <div class="col s6"> <label> <input name="mob_vounerabilities" id="vounerability_lightning" type="checkbox" /> <span>Lightning</span> </label> </div>
<div class="col s6"> <label> <input id="vounerability_necrotic" type="checkbox" /> <span>Necrotic</span> </label> </div> <div class="col s6"> <label> <input name="mob_vounerabilities" id="vounerability_necrotic" type="checkbox" /> <span>Necrotic</span> </label> </div>
<div class="col s6"> <label> <input id="vounerability_piercing" type="checkbox" /> <span>Piercing</span> </label> </div> <div class="col s6"> <label> <input name="mob_vounerabilities" id="vounerability_piercing" type="checkbox" /> <span>Piercing</span> </label> </div>
<div class="col s6"> <label> <input id="vounerability_poison" type="checkbox" /> <span>Poison</span> </label> </div> <div class="col s6"> <label> <input name="mob_vounerabilities" id="vounerability_poison" type="checkbox" /> <span>Poison</span> </label> </div>
<div class="col s6"> <label> <input id="vounerability_psychic" type="checkbox" /> <span>Psychic</span> </label> </div> <div class="col s6"> <label> <input name="mob_vounerabilities" id="vounerability_psychic" type="checkbox" /> <span>Psychic</span> </label> </div>
<div class="col s6"> <label> <input id="vounerability_radiant" type="checkbox" /> <span>Radiant</span> </label> </div> <div class="col s6"> <label> <input name="mob_vounerabilities" id="vounerability_radiant" type="checkbox" /> <span>Radiant</span> </label> </div>
<div class="col s6"> <label> <input id="vounerability_slashing" type="checkbox" /> <span>Slashing</span> </label> </div> <div class="col s6"> <label> <input name="mob_vounerabilities" id="vounerability_slashing" type="checkbox" /> <span>Slashing</span> </label> </div>
<div class="col s6"> <label> <input id="vounerability_thunder" type="checkbox" /> <span>Thunder</span> </label> </div> <div class="col s6"> <label> <input name="mob_vounerabilities" id="vounerability_thunder" type="checkbox" /> <span>Thunder</span> </label> </div>
</div> </div>
</div> </div>
</div> </div>
@ -342,13 +373,27 @@
<div class="card indigo darken-4"> <div class="card indigo darken-4">
<div class="card-content white-text"> <span class="card-title">Powers</span> <div class="card-content white-text"> <span class="card-title">Powers</span>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title">Healing</span> <span>Can your encounter heal?</span><br> <label> <input name="mob_healing" onchange="healingMode(false)" id="mob_healing_noheal" type="checkbox" /> <span>No, my guys cannot heal</span> </label><br /> <label> <input name="mob_healing" onchange="healingMode(true)" id="mob_healing_self" type="checkbox" /> <span>Yes, some or all of my mobs can heal THEMSELVES</span> </label><br /> <label> <input name="mob_healing" onchange="healingMode(true)" id="mob_healing_other_touch" type="checkbox" /> <span>Yes, some or all of my mobs can heal OTHERS on TOUCH</span> </label><br /> <label> <input name="mob_healing" onchange="healingMode(true)" id="mob_healing_other_aoe" type="checkbox" /> <span>Yes, some or all of my mobs can heal OTHERS with AOE</span> </label><br /> </div> <div class="card-content white-text"> <span class="card-title">Healing</span>
<span>Can your encounter heal?</span><br>
<label> <input name="mob_healing" value="0" onchange="healingMode(false)" id="mob_healing_noheal" type="checkbox" /> <span>No, my guys cannot heal</span> </label><br />
<label> <input name="mob_healing" value="5" onchange="healingMode(true)" id="mob_healing_self" type="checkbox" /> <span>Yes, some or all of my mobs can heal THEMSELVES</span> </label><br />
<label> <input name="mob_healing" value="10" onchange="healingMode(true)" id="mob_healing_other_touch" type="checkbox" /> <span>Yes, some or all of my mobs can heal OTHERS on TOUCH</span> </label><br />
<label> <input name="mob_healing" value="20" onchange="healingMode(true)" id="mob_healing_other_aoe" type="checkbox" /> <span>Yes, some or all of my mobs can heal OTHERS with AOE</span> </label><br />
</div>
</div> </div>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title">Summoning new Enemies</span> <span>Can they make more problems?</span><br> <label> <input name="mob_summon" type="radio" checked /> <span>No, they can't and never will</span> </label><br /> <label> <input name="mob_summon" type="radio" /> <span>I am evil. (yes)</span> </label> </div> <div class="card-content white-text"> <span class="card-title">Summoning new Enemies</span>
<span>Can they make more problems?</span><br>
<label><input name="mob_summon" value="0" type="radio" checked /> <span>No, they can't and never will</span></label><br />
<label><input name="mob_summon" value="15" type="radio" /> <span>I am evil. (yes)</span> </label>
</div>
</div> </div>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title">Stunning</span> <span>Can your people stun or slow or otherwise annoy the party?</span><br> <label> <input name="mob_stun" type="radio" checked /> <span>No they can't</span> </label><br /> <label> <input name="mob_stun" type="radio" /> <span>My players should suffer >:) </span> </label> </div> <div class="card-content white-text"> <span class="card-title">Stunning</span>
<span>Can your people stun or slow or otherwise annoy the party?</span><br>
<label> <input name="mob_stun" value="0" type="radio" checked /> <span>No they can't</span> </label><br />
<label> <input name="mob_stun" value="15" type="radio" /> <span>My players should suffer >:) </span> </label>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -357,44 +402,46 @@
<div class="card indigo darken-4"> <div class="card indigo darken-4">
<div class="card-content white-text"> <span class="card-title">Conditions</span> <div class="card-content white-text"> <span class="card-title">Conditions</span>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title">Choose your conditions</span> <span>What conditions are applied to your (some of your) enemies</span><br> <div class="card-content white-text"> <span class="card-title">Choose your conditions</span>
<span>What conditions are applied to your (some of your) enemies</span><br>
<div class="row"> <div class="row">
<div class="col s6"> <label> <input id="contype_Blinded" type="checkbox" /> <span> Blinded </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Blinded" type="checkbox" /> <span> Blinded </label> </div>
<div class="col s6"> <label> <input id="contype_Charmed" type="checkbox" /> <span> Charmed </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Charmed" type="checkbox" /> <span> Charmed </label> </div>
<div class="col s6"> <label> <input id="contype_Deafened" type="checkbox" /> <span> Deafened </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Deafened" type="checkbox" /> <span> Deafened </label> </div>
<div class="col s6"> <label> <input id="contype_Exhaustion" type="checkbox" /> <span> Exhaustion </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Exhaustion" type="checkbox" /> <span> Exhaustion </label> </div>
<div class="col s6"> <label> <input id="contype_Frightened" type="checkbox" /> <span> Frightened </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Frightened" type="checkbox" /> <span> Frightened </label> </div>
<div class="col s6"> <label> <input id="contype_Grappled" type="checkbox" /> <span> Grappled </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Grappled" type="checkbox" /> <span> Grappled </label> </div>
<div class="col s6"> <label> <input id="contype_Incapacitated" type="checkbox" /> <span> Incapacitated </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Incapacitated" type="checkbox" /> <span> Incapacitated </label> </div>
<div class="col s6"> <label> <input id="contype_Invisible" type="checkbox" /> <span> Invisible </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Invisible" type="checkbox" /> <span> Invisible </label> </div>
<div class="col s6"> <label> <input id="contype_Paralyzed" type="checkbox" /> <span> Paralyzed </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Paralyzed" type="checkbox" /> <span> Paralyzed </label> </div>
<div class="col s6"> <label> <input id="contype_Petrified" type="checkbox" /> <span> Petrified </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Petrified" type="checkbox" /> <span> Petrified </label> </div>
<div class="col s6"> <label> <input id="contype_Poisoned" type="checkbox" /> <span> Poisoned </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Poisoned" type="checkbox" /> <span> Poisoned </label> </div>
<div class="col s6"> <label> <input id="contype_Prone" type="checkbox" /> <span> Prone </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Prone" type="checkbox" /> <span> Prone </label> </div>
<div class="col s6"> <label> <input id="contype_Restrained" type="checkbox" /> <span> Restrained </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Restrained" type="checkbox" /> <span> Restrained </label> </div>
<div class="col s6"> <label> <input id="contype_Stunned" type="checkbox" /> <span> Stunned </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Stunned" type="checkbox" /> <span> Stunned </label> </div>
<div class="col s6"> <label> <input id="contype_Unconscious" type="checkbox" /> <span> Unconscious </label> </div> <div class="col s6"> <label> <input name="conditions" id="contype_Unconscious" type="checkbox" /> <span> Unconscious </label> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title">Choose applying conditions</span> <span>What conditions can your players get from this encounter</span><br> <div class="card-content white-text"> <span class="card-title">Choose applying conditions</span>
<span>What conditions can your players get from this encounter</span><br>
<div class="row"> <div class="row">
<div class="col s6"> <label> <input id="contype_apply_Blinded" type="checkbox" /> <span> Blinded </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Blinded" type="checkbox" /> <span> Blinded </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Charmed" type="checkbox" /> <span> Charmed </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Charmed" type="checkbox" /> <span> Charmed </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Deafened" type="checkbox" /> <span> Deafened </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Deafened" type="checkbox" /> <span> Deafened </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Exhaustion" type="checkbox" /> <span> Exhaustion </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Exhaustion" type="checkbox" /> <span> Exhaustion </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Frightened" type="checkbox" /> <span> Frightened </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Frightened" type="checkbox" /> <span> Frightened </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Grappled" type="checkbox" /> <span> Grappled </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Grappled" type="checkbox" /> <span> Grappled </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Incapacitated" type="checkbox" /> <span> Incapacitated </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Incapacitated" type="checkbox" /> <span> Incapacitated </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Invisible" type="checkbox" /> <span> Invisible </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Invisible" type="checkbox" /> <span> Invisible </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Paralyzed" type="checkbox" /> <span> Paralyzed </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Paralyzed" type="checkbox" /> <span> Paralyzed </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Petrified" type="checkbox" /> <span> Petrified </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Petrified" type="checkbox" /> <span> Petrified </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Poisoned" type="checkbox" /> <span> Poisoned </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Poisoned" type="checkbox" /> <span> Poisoned </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Prone" type="checkbox" /> <span> Prone </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Prone" type="checkbox" /> <span> Prone </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Restrained" type="checkbox" /> <span> Restrained </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Restrained" type="checkbox" /> <span> Restrained </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Stunned" type="checkbox" /> <span> Stunned </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Stunned" type="checkbox" /> <span> Stunned </label> </div>
<div class="col s6"> <label> <input id="contype_apply_Unconscious" type="checkbox" /> <span> Unconscious </label> </div> <div class="col s6"> <label> <input name="applying_conditions" id="contype_apply_Unconscious" type="checkbox" /> <span> Unconscious </label> </div>
</div> </div>
</div> </div>
</div> </div>
@ -410,6 +457,8 @@
<div class="col s12"> <div class="col s12">
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <span class="card-title">Results</span> <div class="card-content white-text"> <span class="card-title">Results</span>
<div class="row">
</div>
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<div class="card horizontal grey darken-4"> <div class="card horizontal grey darken-4">
@ -467,89 +516,8 @@
<div class="card white"> <div class="card white">
<div class="card-content white-text"> <span class="card-title black-text">Your choices</span> <div class="card-content white-text"> <span class="card-title black-text">Your choices</span>
<div class="card black"> <div class="card black">
<div class="card-content white-text"> <div id="totalscard" class="card-content white-text">
<table> <p> :D </p>
<thead>
<tr>
<th>Name</th>
<th>Pts</th>
</tr>
</thead>
<tbody>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
<tr>
<td>Meelee Fighters</td>
<td>3</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>
@ -560,6 +528,7 @@
<script type="text/javascript" src="js/materialize.min.js"></script> <script type="text/javascript" src="js/materialize.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
$('.fixed-action-btn').floatingActionButton();
$(".tabs").tabs(); $(".tabs").tabs();
$(".collapsible").collapsible(); $(".collapsible").collapsible();
$("#HP_max_card").hide(); $("#HP_max_card").hide();
@ -567,7 +536,6 @@
$("#DMG_max_card").hide(); $("#DMG_max_card").hide();
$("#DMG_average_card").hide(); $("#DMG_average_card").hide();
$("#dmg_hitdice").hide(); $("#dmg_hitdice").hide();
$("#mob_multiattack_card").hide("fast");
}); });
</script> </script>
<script type="text/javascript"> <script type="text/javascript">
@ -583,12 +551,12 @@
$("#mob_healing_other_aoe").prop("checked", false); $("#mob_healing_other_aoe").prop("checked", false);
} }
} }
} }
function setMobs() { function setMobs() {
$("#mob_multiattack_ammount").attr("placeholder", "X / " + $("#mob_ammount").val())
$("#mob_multiattack_ammount").attr("max", $("#mob_ammount").val())
if ($("#mob_ammount").val() > 1) { if ($("#mob_ammount").val() > 1) {
// FIX HP // FIX HP
usingHPDice("average"); usingHPDice("average");
@ -603,17 +571,6 @@
} }
} }
function setMobMultiattack(p) {
if (p === "hidden") {
$("#mob_multiattack_card").hide("fast");
} else if (p === "all") {
$("#mob_multiattack_card").hide("fast");
} else {
$("#mob_multiattack_card").show("fast");
}
}
function usingHPDice(e) { function usingHPDice(e) {
switch (e) { switch (e) {
case "dice": case "dice":
@ -651,7 +608,7 @@
break; break;
} }
calcDiff();
} }
@ -692,105 +649,233 @@
break; break;
} }
calcDiff();
} }
function calcDiff() { function calcDiff() {
$("#diff_image").attr("src", "img/notfound.jpg"); $("#diff_image").attr("src", "img/notfound.jpg");
$("#diff_description").html("I was unable to find a calculation with those parameters.... or any programming at all... give me some time, i'm still working on this app, after all."); $("#diff_description").html("I was unable to find a calculation with those parameters.... or any programming at all... give me some time, i'm still working on this app, after all.");
$("#diff_summary").html("#err_notfound"); $("#diff_summary").html("#err_notfound");
//MODIFIERS //MODIFIERS
//These are to influence how STRONK the weighting of the different //These are to influence how STRONK the weighting of the different
// thins are.... yes that helps... // thins are.... yes that helps...
//Set the Mob Modifier //Set the Mob Modifier
modifier_encounter = 1 modifier_encounter = 1;
modifier_player = 1 modifier_party = 1;
//All Player Stats //All Player Stats
//The Party itself, each variable can range form 1 to infinity //The Party itself, each variable can range form 1 to infinity
var party_meelee_fighters = $("#party_meelee").val(); var party_meelee_fighters = $("#party_meelee").val();
var party_range_fighters = $("#party_long_range").val(); var party_range_fighters = $("#party_long_range").val();
var party_magic_fighters = $("#party_magic").val(); var party_magic_fighters = $("#party_magic").val();
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 = party_meelee_fighters + party_range_fighters + party_magic_fighters + 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
//between two categories is a certain amount, they automatically //between two categories is a certain amount, they automatically
//get weightet with more power or something. Somethingsomething //get weightet with more power or something. Somethingsomething
//balance. //balance.
//Party Levels (1-20) //Party Levels (1-20)
var party_level = $("#party_level").val(); var party_level = $("#party_level").val();
//Party Health (1-4) 1=healthy 4=almost dead //Party Health (1-4) 1=healthy 4=almost dead
var party_health = $("input[name='party_health']:checked").val(); var party_health = $("input[name='party_health']:checked").val();
var party_health_score = party_health * 5 var party_health_score = party_health * 5;
//Party Skill //Party Skill
var party_skill_knowledge = $("input[name='party_dndknowledge']:checked").val(); var party_skill_knowledge = $("input[name='party_dndknowledge']:checked").val();
var party_skill_knowledge_score = Math.round(party_skill_knowledge * 6.666666666666666666); var party_skill_knowledge_score = Math.round(party_skill_knowledge * 6.666666666666666666);
var party_skill_attention = $("input[name='party_attention']:checked").val(); var party_skill_attention = $("input[name='party_attention']:checked").val();
var party_skill_attention_score = Math.round(party_skill_attention * 6.666666666666666666); var party_skill_attention_score = Math.round(party_skill_attention * 6.666666666666666666);
var party_skill_strategies = $("input[name='party_strategies']:checked").val(); var party_skill_strategies = $("input[name='party_strategies']:checked").val();
var party_skill_strategies_score = Math.round(party_skill_attention * 6.666666666666666666); var party_skill_strategies_score = Math.round(party_skill_strategies * 6.666666666666666666);
var party_final_score = party_skill_strategies_score + party_skill_attention_score + party_skill_knowledge_score + party_health_score var party_final_score = party_skill_strategies_score + party_skill_attention_score + party_skill_knowledge_score + party_health_score;
//Monster Setup //Monster Setup
//Monster amount //Monster amount
var encounter_amount = $("input[name='mob_ammount']:checked").val(); var encounter_amount = $("input[name='mob_ammount']:checked").val();
// 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;
// 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();
if (encounter_hp_type == 1) {
//IF Using Health Rolls
var encounter_hp_type_rolls_amount = $("#mob_hp_dice_ammount").val();
var encounter_hp_type_rolls_dice = $("#mob_hp_dice_type").val();
//Evaluate by adding the two scores.
//I Debated multiplying the points but that would just be the max HP value.
//In the end, it's always hard to give a fair result.
var encounter_hp_type_rolls_added = encounter_hp_type_rolls_amount + encounter_hp_type_rolls_dice
var encounter_hp_type_rolls_added_score = 20/(encounter_hp_type_rolls_added / party_amount)
} else if (encounter_hp_type == 2) {
//IF Using Averages
var encounter_hp_type_averages = $("#mob_hp_avg").val();
var encounter_hp_type_averages_score = 20/(encounter_hp_type_averages / party_amount)
} else if (encounter_hp_type == 3) {
//IF Using Averages
var encounter_hp_type_max = $("#mob_hp_max").val();
var encounter_hp_type_max_score = 20/(encounter_hp_type_max / party_amount)
} //reset scores
var encounter_hp_type_rolls_added_score = 0;
// CR Calculation var encounter_hp_type_averages_score = 0;
var encounter_cr = $("#mob_CR").val(); var encounter_hp_type_max_score = 0;
var encounter_cr_per_player = encounter_cr / party_amount if (encounter_hp_type == 1) {
var encounter_cr_score = (encounter_cr_per_player / party_level) / 20
//This sets the AC Score of the encounter. The AC Percentage defines the "Fair" Ammount of AC per Mob
var encounter_ac = $("#mob_ac").val();
var encounter_ac_score = (encounter_ac - 2) * global_amount_modifier;
//IF Using Health Rolls
var encounter_hp_type_rolls_amount = $("#mob_hp_dice_ammount").val();
var encounter_hp_type_rolls_dice = $("#mob_hp_dice_type").val();
//Evaluate by adding the two scores.
//I Debated multiplying the points but that would just be the max HP value.
//In the end, it's always hard to give a fair result.
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);
} else if (encounter_hp_type == 2) {
//IF Using Averages
var encounter_hp_type_averages = $("#mob_hp_avg").val();
encounter_hp_type_averages_score = 20 / (encounter_hp_type_averages / party_amount);
} else if (encounter_hp_type == 3) {
//IF Using Averages
var encounter_hp_type_max = $("#mob_hp_max").val();
encounter_hp_type_max_score = 20 / (encounter_hp_type_max / party_amount);
}
var encounter_hp_score = encounter_hp_type_rolls_added_score + encounter_hp_type_averages_score + encounter_hp_type_max_score;
// CR Calculation
var encounter_cr = $("#mob_CR").val();
var encounter_cr_per_player = encounter_cr / party_amount;
var encounter_cr_score = (encounter_cr_per_player / party_level) / 20;
//This sets the AC Score of the encounter.
var encounter_ac = $("#mob_ac").val();
var encounter_ac_score = (encounter_ac - 2) * global_amount_modifier;
// What Damage Type is used? 1=average 2=rolled 3=max
var encounter_dmg_type = $("input[name='mob_dmg_type']:checked").val();
//reset scores
var encounter_dmg_type_rolls_added_score = 0;
var encounter_dmg_type_averages_score = 0;
var encounter_dmg_type_max_score = 0;
if (encounter_dmg_type == 1) {
//IF Using Health Rolls
var encounter_dmg_type_rolls_amount = $("#mob_dmg_dice_ammount").val();
var encounter_dmg_type_rolls_dice = $("#mob_dmg_dice_type").val();
//Evaluate by adding the two scores.
//I Debated multiplying the points but that would just be the max dmg value.
//In the end, it's always hard to give a fair result.
var encounter_dmg_type_rolls_added = encounter_dmg_type_rolls_amount + encounter_dmg_type_rolls_dice;
encounter_dmg_type_rolls_added_score = 20 / (encounter_dmg_type_rolls_added / party_amount);
} else if (encounter_dmg_type == 2) {
//IF Using Averages
var encounter_dmg_type_averages = $("#mob_dmg_avg").val();
encounter_dmg_type_averages_score = 20 / (encounter_dmg_type_averages / party_amount);
} else if (encounter_dmg_type == 3) {
//IF Using Averages
var encounter_dmg_type_max = $("#mob_dmg_max").val();
encounter_dmg_type_max_score = 20 / (encounter_dmg_type_max / party_amount);
}
var encounter_dmg_score = encounter_dmg_type_rolls_added_score + encounter_dmg_type_averages_score + encounter_dmg_type_max_score;
var encounter_dmgtype_possibilities = 0;
var encounter_dmgtype_points = 0;
$.each($("input[name='dmgtype']:checked"), function() {
encounter_dmgtype_points++;
//selected_dmgtypes.push($(this).val());
});
$.each($("input[name='dmgtype']"), function() {
encounter_dmgtype_possibilities++;
});
var encounter_dmgtype_score = (20 - encounter_dmgtype_possibilities) + encounter_dmgtype_points * global_amount_modifier;
var encounter_onehit_score = $("input[name='mob_onehits']:checked").val();
var encounter_multiattack_score = $("input[name='mob_multiattack']:checked").val() * global_amount_modifier;
var encounter_strategy = $("input[name='mob_strategy']:checked").val();
var encounter_strategy_score = Math.round(encounter_strategy * 5);
var encounter_lair_action_score = $("input[name='mob_lair_action']:checked").val();
var encounter_legendairy_action_score = $("input[name='mob_legendary_action']:checked").val();
// Immunity Resistances and Vounerabilities
var encounter_immunities = 0;
var encounter_resistances = 0;
var encounter_vounerabilities = 0;
$.each($("input[name='mob_immunities']:checked"), function() {
encounter_resistances++;
//selected_dmgtypes.push($(this).val());
});
$.each($("input[name='mob_resitances']:checked"), function() {
encounter_immunities++;
//selected_dmgtypes.push($(this).val());
});
$.each($("input[name='mob_vounerabilities']:checked"), function() {
encounter_vounerabilities++;
//selected_dmgtypes.push($(this).val());
});
var encounter_status_score = global_amount_modifier * (encounter_resistances + (encounter_immunities * 2)) - encounter_vounerabilities;
var encounter_healing_score = 0;
$.each($("input[name='mob_healing']:checked"), function() {
encounter_healing_score = encounter_healing_score + $(this).val();
});
var encounter_stunning_score = $("input[name='mob_stun']:checked").val();
var encounter_conditions = 0;
var encounter_apply_conditions = 0;
$.each($("input[name='mob_resitances']:checked"), function() {
encounter_conditions++;
//selected_dmgtypes.push($(this).val());
});
$.each($("input[name='applying_conditions']:checked"), function() {
encounter_apply_conditions++;
//selected_dmgtypes.push($(this).val());
});
encounter_condition_score = encounter_apply_conditions * 5 - encounter_conditions * 3;
//Clamp the score
if (encounter_condition_score > 20) {
encounter_condition_score = 20;
} else if (encounter_condition_score < -20) {
encounter_condition_score = -20;
}
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);
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];
party_variables.forEach(element => console.log("<tr>" + Object.keys(element)[0] + "</tr>" + "<tr>" + element + "</tr>"));
encounter_variables.forEach(element => console.log("<tr>" + Object.keys(element)[0] + "</tr>" + "<tr>" + element + "</tr>"));
//Fill the tables
console.log(
"<table><thead><tr><th>Variable</th><th>Pts</th></tr></thead><tbody>"+"</tbody></table>"
);
} }