set defaults and fixed textfields

This commit is contained in:
James 2022-09-30 11:21:14 +02:00
parent 9b9a0c252a
commit 9abaede948

View File

@ -116,7 +116,11 @@
</div>
</div>
<div class="card black">
<div class="card-content white-text"> <span class="card-title">Special rules</span> <span>Do you use rules, which assist in adding damage/advantage? (Flanking, Limb rule , Lingering Injuries, Massive Damage, yadayada)</span> <br /> <label> <input name="group4" type="radio" checked /> <span>Yes</span> </label><br /> <label> <input name="group4" type="radio" /> <span>Multiple</span> </label><br /> <label> <input name="group4" type="radio" /> <span>No</span> </label><br /><br />
<div class="card-content white-text"> <span class="card-title">Special rules</span>
<span>Do you use rules, which assist in adding damage/advantage? (Flanking, Limb rule , Lingering Injuries, Massive Damage, yadayada)</span> <br />
<label> <input value="3" name="party_special_rules" type="radio" checked /> <span>Yes</span> </label><br />
<label> <input value="2" name="party_special_rules" type="radio" /> <span>Multiple</span> </label><br />
<label> <input value="1" name="party_special_rules" type="radio" /> <span>No</span> </label><br /><br />
<ul class="collapsible">
<li>
<div class="collapsible-header black"><i class="material-icons">info_outline</i>Explanation Flanking</div>
@ -158,7 +162,7 @@
<div class="card-content white-text"> <span class="card-title">Total CR</span>
<span>Whats the TOTAL CR Of all the mobs?</span>
<div class="input-field s3">
<input placeholder="Basically the enemies Level?" id="mob_CR" min="1" type="number" class="white-text validate" />
<input placeholder="Basically the enemies Level?" id="mob_CR" value="0" min="1" type="number" class="white-text validate" />
</div>
</div>
</div>
@ -171,27 +175,27 @@
</div>
<div class="card black" id="HP_hitdice_card">
<div class="card-content white-text"> <span class="card-title">Health Rolls</span> <span>How many Dice are used for the calculation?</span>
<div class="input-field s1"> <input placeholder="[X]d10" id="mob_hp_dice_ammount" min="1" type="number" class="white-text validate" /> </div> <span>Which kind of die is used?</span>
<div class="input-field s3"> <input placeholder=" 4d[Y]" id="mob_hp_dice_type" min="1" type="number" class="white-text validate" /> </div>
<div class="input-field s1"> <input placeholder="[X]d10" id="mob_hp_dice_ammount" value="0" min="1" type="number" class="white-text validate" /> </div> <span>Which kind of die is used?</span>
<div class="input-field s3"> <input placeholder=" 4d[Y]" id="mob_hp_dice_type" value="0" min="1" type="number" class="white-text validate" /> </div>
</div>
</div>
<div class="card black" id="HP_average_card">
<div class="card-content white-text"> <span class="card-title">Health Averages</span>
<span>What's the average HP of the Enemy?</span>
<div class="input-field s1"> <input placeholder="42" id="mob_hp_avg" min="1" type="number" class="white-text validate" />
<div class="input-field s1"> <input placeholder="42" id="mob_hp_avg" value="0" min="1" type="number" class="white-text validate" />
</div>
</div>
</div>
<div class="card black" id="HP_max_card">
<div class="card-content white-text"> <span class="card-title">Health Maxes</span> <span>What's the max rolled HP of all enemies?</span>
<div class="input-field s1"> <input placeholder="42" id="mob_hp_max" min="1" type="number" class="white-text validate" /> </div>
<div class="input-field s1"> <input placeholder="42" value="0" id="mob_hp_max" min="1" type="number" class="white-text validate" /> </div>
</div>
</div>
<div class="card black">
<div class="card-content white-text"> <span class="card-title">Armor Class</span>
<span>What's the average Armorclass?</span>
<div class="input-field s3">
<input placeholder="Should be at least 1" id="mob_ac" min="1" type="number" class="white-text validate" />
<input placeholder="Should be at least 1" id="mob_ac" value="1" min="1" type="number" class="white-text validate" />
</div>
</div>
</div>
@ -214,18 +218,18 @@
</div>
<div id="DMG_hitdice_card" class="card black">
<div class="card-content white-text"> <span class="card-title">Hitdice Damage</span> <span>How many Dice are used for the calculation?</span>
<div class="input-field s1"> <input placeholder="[X]d6" id="mob_dmg_dice_ammount" min="1" type="number" class="white-text validate" /> </div> <span>Which kind of die is used?</span>
<div class="input-field s3"> <input placeholder=" 4d[Y]" id="mob_dmg_dice_type" min="1" type="number" class="white-text validate" /> </div>
<div class="input-field s1"> <input placeholder="[X]d6" id="mob_dmg_dice_ammount" value="0" min="1" type="number" class="white-text validate" /> </div> <span>Which kind of die is used?</span>
<div class="input-field s3"> <input placeholder=" 4d[Y]" id="mob_dmg_dice_type" value="0" min="1" type="number" class="white-text validate" /> </div>
</div>
</div>
<div id="DMG_average_card" class="card black">
<div class="card-content white-text"> <span class="card-title">Average Damage</span> <span>What's the average damage of the enemy?</span>
<div class="input-field s1"> <input placeholder="The number before the damage dice." id="mob_dmg_avg" min="1" type="number" class="white-text validate" /> </div>
<div class="input-field s1"> <input placeholder="The number before the damage dice." id="mob_dmg_avg" value="0" min="1" type="number" class="white-text validate" /> </div>
</div>
</div>
<div id="DMG_max_card" class="card black">
<div class="card-content white-text"> <span class="card-title">Max Damage</span> <span>What's the max ammount of damage the enemy can deal?</span>
<div class="input-field s1"> <input placeholder="x times the hit dieces' sides." id="mob_dmg_max" min="1" type="number" class="white-text validate" /> </div>
<div class="input-field s1"> <input placeholder="x times the hit dieces' sides." id="mob_dmg_max" value="0" min="1" type="number" class="white-text validate" /> </div>
</div>
</div>
<div class="card black">
@ -527,6 +531,8 @@
<script type="text/javascript" src="js/materialize.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
M.updateTextFields();
$('.fixed-action-btn').floatingActionButton();
$(".tabs").tabs();
$(".collapsible").collapsible();
@ -577,20 +583,20 @@
$("#HP_average_card").hide("fast");
$("#HP_hitdice_card").show("fast");
$("#mob_hp_avg").val("");
$("#mob_hp_dice_ammount").val("");
$("#mob_hp_dice_type").val("");
$("#mob_hp_max").val("");
$("#mob_hp_avg").val("0");
$("#mob_hp_dice_ammount").val("0");
$("#mob_hp_dice_type").val("0");
$("#mob_hp_max").val("0");
break;
case "average":
$("#HP_max_card").hide("fast");
$("#HP_hitdice_card").hide("fast");
$("#HP_average_card").show("fast");
$("#mob_hp_avg").val("");
$("#mob_hp_dice_ammount").val("");
$("#mob_hp_dice_type").val("");
$("#mob_hp_max").val("");
$("#mob_hp_avg").val("0");
$("#mob_hp_dice_ammount").val("0");
$("#mob_hp_dice_type").val("0");
$("#mob_hp_max").val("0");
break;
case "max":
@ -600,10 +606,10 @@
$("#HP_hitdice_card").hide("fast");
$("#HP_average_card").hide("fast");
$("#mob_hp_avg").val("");
$("#mob_hp_dice_ammount").val("");
$("#mob_hp_dice_type").val("");
$("#mob_hp_max").val("");
$("#mob_hp_avg").val("0");
$("#mob_hp_dice_ammount").val("0");
$("#mob_hp_dice_type").val("0");
$("#mob_hp_max").val("0");
break;
}
@ -618,20 +624,20 @@
$("#DMG_average_card").hide("fast");
$("#DMG_max_card").hide("fast");
$("#mob_dmg_avg").val("");
$("#mob_dmg_dice_ammount").val("");
$("#mob_dmg_dice_type").val("");
$("#mob_dmg_max").val("");
$("#mob_dmg_avg").val("0");
$("#mob_dmg_dice_ammount").val("0");
$("#mob_dmg_dice_type").val("0");
$("#mob_dmg_max").val("0");
break;
case "average":
$("#DMG_max_card").hide("fast");
$("#DMG_hitdice_card").hide("fast");
$("#DMG_average_card").show("fast");
$("#mob_dmg_avg").val("");
$("#mob_dmg_dice_ammount").val("");
$("#mob_dmg_dice_type").val("");
$("#mob_dmg_max").val("");
$("#mob_dmg_avg").val("0");
$("#mob_dmg_dice_ammount").val("0");
$("#mob_dmg_dice_type").val("0");
$("#mob_dmg_max").val("0");
break;
case "max":
@ -641,10 +647,10 @@
$("#DMG_hitdice_card").hide("fast");
$("#DMG_average_card").hide("fast");
$("#mob_dmg_avg").val("");
$("#mob_dmg_dice_ammount").val("");
$("#mob_dmg_dice_type").val("");
$("#mob_dmg_max").val("");
$("#mob_dmg_avg").val("0");
$("#mob_dmg_dice_ammount").val("0");
$("#mob_dmg_dice_type").val("0");
$("#mob_dmg_max").val("0");
break;
}
@ -701,8 +707,11 @@
var party_skill_strategies = $("input[name='party_strategies']:checked").val();
var party_skill_strategies_score = Math.round(party_skill_strategies * 6.666666666666666666);
var party_skill_rules = $("input[name='party_special_rules']:checked").val();
var party_skill_rules_score = Math.round(party_skill_rules * 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_rules_score + party_skill_attention_score + party_skill_knowledge_score + party_health_score;
//Monster Setup
//Monster amount
@ -871,8 +880,8 @@
//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_name = ["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_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"];