thank you )
This commit is contained in:
parent
923d14d5ea
commit
07f3a665c2
185
index.php
185
index.php
@ -924,122 +924,111 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function healingMode(t) {
|
function healingMode(t) {
|
||||||
|
|
||||||
if (t) {
|
if (t) {
|
||||||
if ($("#mob_healing_other_touch").is(':checked') || $("#mob_healing_self").is(':checked') || $("#mob_healing_other_aoe").is(':checked')) {
|
if ($("#mob_healing_other_touch").is(':checked') || $("#mob_healing_self").is(':checked') || $("#mob_healing_other_aoe").is(':checked')) {
|
||||||
$("#mob_healing_noheal").prop("checked", false);
|
$("#mob_healing_noheal").prop("checked", false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($("#mob_healing_noheal").is(':checked')) {
|
if ($("#mob_healing_noheal").is(':checked')) {
|
||||||
$("#mob_healing_other_touch").prop("checked", false);
|
$("#mob_healing_other_touch").prop("checked", false);
|
||||||
$("#mob_healing_self").prop("checked", false);
|
$("#mob_healing_self").prop("checked", false);
|
||||||
$("#mob_healing_other_aoe").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() {
|
function setMobMultiattack(p) {
|
||||||
$("#mob_multiattack_ammount").attr("placeholder", "X / "+$("#mob_ammount").val())
|
if (p === "hidden") {
|
||||||
$("#mob_multiattack_ammount").attr("max", $("#mob_ammount").val())
|
$("#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 {
|
function usingHPDice(e) {
|
||||||
|
if (e) {
|
||||||
// FIX HP
|
$("#HP_hitdice").hide("fast");
|
||||||
usingHPDice(false);
|
$("#mob_hp_avg").val("");
|
||||||
$("#mob_hp_type_rolled").attr("disabled", true);
|
$("#HP_average").show("fast");
|
||||||
$("#mob_hp_type_averages").prop("checked", true);
|
} else {
|
||||||
|
$("#HP_average").hide("fast");
|
||||||
|
$("#mob_hp_dice_ammount").val("");
|
||||||
|
$("#mob_hp_dice_type").val("");
|
||||||
|
$("#HP_hitdice").show("fast");
|
||||||
|
}
|
||||||
|
calcDiff();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
usingDMGDice(false);
|
function usingDMGDice(e) {
|
||||||
$("#mob_dmg_type_rolled").attr("disabled", true);
|
if (e) {
|
||||||
$("#mob_dmg_type_averages").prop("checked", true);
|
$("#dmg_hitdice").hide("fast");
|
||||||
|
$("#mob_dmg_avg").val("");
|
||||||
} else {
|
$("#dmg_average").show("fast");
|
||||||
$("#mob_hp_type_rolled").removeAttr("disabled");
|
} else {
|
||||||
$("#mob_dmg_type_rolled").removeAttr("disabled");
|
$("#dmg_average").hide("fast");
|
||||||
}
|
$("#mob_dmg_dice_ammount").val("");
|
||||||
|
$("#mob_dmg_dice_type").val("");
|
||||||
}
|
$("#dmg_hitdice").show("fast");
|
||||||
|
}
|
||||||
function setMobMultiattack(p) {
|
calcDiff();
|
||||||
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) {
|
function calcDiff() {
|
||||||
if (e) {
|
$("#diff_image").attr("src", "img/notfound.jpg");
|
||||||
$("#dmg_hitdice").hide("fast");
|
$("#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.");
|
||||||
$("#mob_dmg_avg").val("");
|
$("#diff_summary").html("#err_notfound");
|
||||||
$("#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() {
|
function setDiff(difficulty) {
|
||||||
$("#diff_image").attr("src", "img/notfound.jpg");
|
$("#diff_image").attr("src", "img/diff_" + difficulty.substring(3, 0) + ".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.");
|
switch (difficulty) {
|
||||||
$("#diff_summary").html("#err_notfound");
|
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("");
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
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("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user