thank you )
This commit is contained in:
parent
923d14d5ea
commit
07f3a665c2
185
index.php
185
index.php
@ -924,122 +924,111 @@
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function healingMode(t) {
|
||||
function healingMode(t) {
|
||||
|
||||
if (t) {
|
||||
if ($("#mob_healing_other_touch").is(':checked') || $("#mob_healing_self").is(':checked') || $("#mob_healing_other_aoe").is(':checked')) {
|
||||
if (t) {
|
||||
if ($("#mob_healing_other_touch").is(':checked') || $("#mob_healing_self").is(':checked') || $("#mob_healing_other_aoe").is(':checked')) {
|
||||
$("#mob_healing_noheal").prop("checked", false);
|
||||
}
|
||||
} else {
|
||||
if ($("#mob_healing_noheal").is(':checked')) {
|
||||
}
|
||||
} else {
|
||||
if ($("#mob_healing_noheal").is(':checked')) {
|
||||
$("#mob_healing_other_touch").prop("checked", false);
|
||||
$("#mob_healing_self").prop("checked", false);
|
||||
$("#mob_healing_other_aoe").prop("checked", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function setMobs() {
|
||||
$("#mob_multiattack_ammount").attr("placeholder", "X / " + $("#mob_ammount").val())
|
||||
$("#mob_multiattack_ammount").attr("max", $("#mob_ammount").val())
|
||||
if ($("#mob_ammount").val() > 1) {
|
||||
// FIX HP
|
||||
usingHPDice(false);
|
||||
$("#mob_hp_type_rolled").attr("disabled", true);
|
||||
$("#mob_hp_type_averages").prop("checked", true);
|
||||
usingDMGDice(false);
|
||||
$("#mob_dmg_type_rolled").attr("disabled", true);
|
||||
$("#mob_dmg_type_averages").prop("checked", true);
|
||||
} else {
|
||||
$("#mob_hp_type_rolled").removeAttr("disabled");
|
||||
$("#mob_dmg_type_rolled").removeAttr("disabled");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function setMobs() {
|
||||
$("#mob_multiattack_ammount").attr("placeholder", "X / "+$("#mob_ammount").val())
|
||||
$("#mob_multiattack_ammount").attr("max", $("#mob_ammount").val())
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
if ($("#mob_ammount").val() > 1 {
|
||||
|
||||
// FIX HP
|
||||
usingHPDice(false);
|
||||
$("#mob_hp_type_rolled").attr("disabled", true);
|
||||
$("#mob_hp_type_averages").prop("checked", true);
|
||||
function usingHPDice(e) {
|
||||
if (e) {
|
||||
$("#HP_hitdice").hide("fast");
|
||||
$("#mob_hp_avg").val("");
|
||||
$("#HP_average").show("fast");
|
||||
} else {
|
||||
$("#HP_average").hide("fast");
|
||||
$("#mob_hp_dice_ammount").val("");
|
||||
$("#mob_hp_dice_type").val("");
|
||||
$("#HP_hitdice").show("fast");
|
||||
}
|
||||
calcDiff();
|
||||
}
|
||||
|
||||
|
||||
usingDMGDice(false);
|
||||
$("#mob_dmg_type_rolled").attr("disabled", true);
|
||||
$("#mob_dmg_type_averages").prop("checked", true);
|
||||
|
||||
} else {
|
||||
$("#mob_hp_type_rolled").removeAttr("disabled");
|
||||
$("#mob_dmg_type_rolled").removeAttr("disabled");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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) {
|
||||
if (e) {
|
||||
$("#HP_hitdice").hide("fast");
|
||||
$("#mob_hp_avg").val("");
|
||||
$("#HP_average").show("fast");
|
||||
} else {
|
||||
$("#HP_average").hide("fast");
|
||||
$("#mob_hp_dice_ammount").val("");
|
||||
$("#mob_hp_dice_type").val("");
|
||||
$("#HP_hitdice").show("fast");
|
||||
}
|
||||
calcDiff();
|
||||
}
|
||||
function usingDMGDice(e) {
|
||||
if (e) {
|
||||
$("#dmg_hitdice").hide("fast");
|
||||
$("#mob_dmg_avg").val("");
|
||||
$("#dmg_average").show("fast");
|
||||
} else {
|
||||
$("#dmg_average").hide("fast");
|
||||
$("#mob_dmg_dice_ammount").val("");
|
||||
$("#mob_dmg_dice_type").val("");
|
||||
$("#dmg_hitdice").show("fast");
|
||||
}
|
||||
calcDiff();
|
||||
}
|
||||
|
||||
|
||||
function usingDMGDice(e) {
|
||||
if (e) {
|
||||
$("#dmg_hitdice").hide("fast");
|
||||
$("#mob_dmg_avg").val("");
|
||||
$("#dmg_average").show("fast");
|
||||
} else {
|
||||
$("#dmg_average").hide("fast");
|
||||
$("#mob_dmg_dice_ammount").val("");
|
||||
$("#mob_dmg_dice_type").val("");
|
||||
$("#dmg_hitdice").show("fast");
|
||||
}
|
||||
calcDiff();
|
||||
}
|
||||
function calcDiff() {
|
||||
$("#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_summary").html("#err_notfound");
|
||||
|
||||
}
|
||||
|
||||
|
||||
function calcDiff() {
|
||||
$("#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_summary").html("#err_notfound");
|
||||
function setDiff(difficulty) {
|
||||
$("#diff_image").attr("src", "img/diff_" + difficulty.substring(3, 0) + ".jpg");
|
||||
switch (difficulty) {
|
||||
case "easy":
|
||||
$("#diff_description").html("This fight should be an easy pick for your players. Maybe a scratch wound or two are the most, they take out of this.");
|
||||
$("#diff_summary").html("A simple fight");
|
||||
break;
|
||||
|
||||
case "medium":
|
||||
$("#diff_description").html("Noone <i> should </i> die, but if your party willingly positions themselves in front of the raging barbarian, that's on them.");
|
||||
$("#diff_summary").html("A slightly challenging fight.");
|
||||
break;
|
||||
|
||||
case "hard":
|
||||
$("#diff_description").html("Quite a fight. Could lead to a death. If you want, that your party uses items, go ahead and throw this fight at them.");
|
||||
$("#diff_summary").html("Item usage to prevent death is advised.");
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function setDiff(difficulty) {
|
||||
$("#diff_image").attr("src", "img/diff_" + difficulty.substring(3, 0) + ".jpg");
|
||||
switch (difficulty) {
|
||||
case "easy":
|
||||
$("#diff_description").html("This fight should be an easy pick for your players. Maybe a scratch wound or two are the most, they take out of this.");
|
||||
$("#diff_summary").html("A simple fight");
|
||||
break;
|
||||
|
||||
case "medium":
|
||||
$("#diff_description").html("Noone <i> should </i> die, but if your party willingly positions themselves in front of the raging barbarian, that's on them.");
|
||||
$("#diff_summary").html("A slightly challenging fight.");
|
||||
break;
|
||||
|
||||
case "hard":
|
||||
$("#diff_description").html("Quite a fight. Could lead to a death. If you want, that your party uses items, go ahead and throw this fight at them.");
|
||||
$("#diff_summary").html("Item usage to prevent death is advised.");
|
||||
break;
|
||||
|
||||
case "lunatic":
|
||||
$("#diff_description").html("This is the real deal. You will suffer losses. Maybe your party will die... or enslaved.. or enslaved and then killed... However, there is hope! <b> Okay no, I lied.your Party is dead.");
|
||||
$("#diff_summary").html("");
|
||||
}
|
||||
}
|
||||
case "lunatic":
|
||||
$("#diff_description").html("This is the real deal. You will suffer losses. Maybe your party will die... or enslaved.. or enslaved and then killed... However, there is hope! <b> Okay no, I lied.your Party is dead.");
|
||||
$("#diff_summary").html("");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user