From 12e274ec30c4fae729afb8656a08489c03302501 Mon Sep 17 00:00:00 2001 From: James <9213561+Gensokian@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:50:09 +0200 Subject: [PATCH] Update index.php --- index.php | 1418 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 1003 insertions(+), 415 deletions(-) diff --git a/index.php b/index.php index dd84d5b..265424d 100644 --- a/index.php +++ b/index.php @@ -1,429 +1,1017 @@ - - - - CRCulator - - - - - - - - - - - - - - - - -
-
-
-
-
-
- James' CR Calculator... or Crculator... whatever -
- -
- -
-
-
- Party Setup -
-
-
-
- About the Players... -
-
- How many Meelee Fighters are in the Party? -
- -
-
-
-
-
- How many Ranged fighters are in the Party? -
- -
-
-
-
-
- How many Spell Fighters are in the Party? -
- -
-
-
-
-
- How many squishy Supports? -
- -
-
-
-
-
- What average level is your party? -
- -
-
-
-
-
-
-
-
-
- Skill calculator -
-
- Have your players played DND before?
-
- -
-
-
-
- Do your players use the enviroment for attacks?
-
-
- -
-
-
-
- Do your players play any strategy games? (Chess counts)
- -
-
-
-
- Do you use rules, which assist in adding damage/advantage? (Flanking, Limb rule , Lingering Injuries, Massive Damage, yadayada)
- - -
    -
  • -
    info_outlineExplanation Flanking
    -
    - - Flanking is an optional rule in DnD 5E, intended to add more tactical depth to combat. The rule itself is straightforward: When a creature and at least - one ally are within 5ft of the same enemy on opposite sides, that enemy is flanked. Each of the creatures flanking has advantage on melee attacks - against it. - -
    -
  • -
  • -
    info_outlineExplanation Limb Rule
    -
    - - Basically like flanking, but instead of standing opposed to the enemy, it's about outnumbering the usable limbs. Basically if there is a normal human, - using two swords/shields, they can block 2 People. If there is a third person, they gain advantage, since they cannot block the third attack. - -
    -
  • -
  • -
    info_outlineExplanation Lingering Injuries
    -
    - - When a creature takes damage from a single source equal to or greater than half its hit point maximum, it must succeed on a Constitution saving throw - with DC 15 or half the damage receive (whichever is higher) or suffer a random effect determined by a roll on the System Shock table.
    - (Table not included) -
    -
    -
  • -
-
-
-
-
-
+ + + + CRCulator + + + + + + + + + + + + + + + + +
+
+
+
+
+
+ James' CR Calculator... or Crculator... whatever + + +
+ +
+
+
+ Party Setup +
+
+
+
+ About the Players... +
+
+ Meelee count + How many Meelee Fighters are in the Party? +
+ +
+
-
-
+
+
+ Ranged count + How many Ranged fighters are in the Party? +
+ +
+
+
+
+
+ Mage count + How many Spell Fighters are in the Party? +
+ +
+
+
+
+
+ Support count + How many squishy Supports? +
+ +
+
+
+
+
+ Level + What average level is your party? +
+ +
+
+
+
+
+ Resources + How healthy are your players?
+
+
+
+ +
+
+
+
+
+
+
+
+ Skill calculator +
+
+ Knowledge + Have your players played DND before?
+
+
+ +
+
+
+
+ Awareness + Do your players use the enviroment for attacks?
+
+
+ +
+
+
+
+ Strategies + Do your players play any strategy games? (Chess counts)
+
+ +
+
+
+
+ Special rules + Do you use rules, which assist in adding damage/advantage? (Flanking, Limb rule , Lingering Injuries, Massive Damage, yadayada)
+
+
+

+
    +
  • +
    info_outlineExplanation Flanking
    +
    + + Flanking is an optional rule in DnD 5E, intended to add more tactical depth to combat. The rule itself is straightforward: When a creature and at least + one ally are within 5ft of the same enemy on opposite sides, that enemy is flanked. Each of the creatures flanking has advantage on melee attacks + against it. + +
    +
  • +
  • +
    info_outlineExplanation Limb Rule
    +
    + + Basically like flanking, but instead of standing opposed to the enemy, it's about outnumbering the usable limbs. Basically if there is a normal human, + using two swords/shields, they can block 2 People. If there is a third person, they gain advantage, since they cannot block the third attack. + +
    +
  • +
  • +
    info_outlineExplanation Lingering Injuries
    +
    + + When a creature takes damage from a single source equal to or greater than half its hit point maximum, it must succeed on a Constitution saving throw + with DC 15 or half the damage receive (whichever is higher) or suffer a random effect determined by a roll on the System Shock table.
    + (Table not included) +
    +
    +
  • +
+
+
+
+
+
-
-
-
- Mob Setup -
-
-
-
- Health and Armor -
-
- Are we using Average Health or HP Dice?
- - -
-
-
- How many Dice are used for the calculation? -
- -
-
- Which kind of die is used? -
- -
-
+
+
+
+
+
+
+ Mob Setup +
+
+
+
+ Basics +
+
+ Ammount + How many bad guys? +
+ +
+
+
+
+
+ Health kind + Are we using Average Health or HP Dice?
+ + +
+
+
+
+ Health definition +
+ How many Dice are used for the calculation? +
+ +
+ Which kind of die is used? +
+ +
+
+
+ What's the average HP of the Enemy? +
+ +
+
+
+
+
+
+ Armor Class + What's the average Armorclass? +
+ +
+
+
+
+
+
+
+
+
+ Hurting the player +
+
+ Damage kind + Are we using Rolled or Average Damage?
+ + +
+
+
+
+ Damage definition +
+ How many Dice are used for the calculation? +
+ +
+ Which kind of die is used? +
+ +
+
+
+ What's the average damage of the enemy? +
+ +
+
+
+
+
+
+ Damage Types + What damagetype is beeing used?
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ Abilities +
+
+ One-Hitting + Can this mob one-hit someone? (Above double max HP or any spell like "Power Word: KILL")
+
+ +
+
+
+
+ Multiattack + Do your mobs have multiattack?
+
+
+ +
+
+
+
+ Multiattack + How many mobs have multiattack?
+ +
+
+
+
+ Strategy + How many braincells do your enemies have?
+ +
+
+
+
+
+
+
+ Lair actions + Can this mob use Lair Actions?
+
+ +
+
+
+
+ Legendary Actions + Can this mob use Legendary Actions?
+
+ +
+
+
+
+
+
+
+
+ About the defence +
+
+ Immunities +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+ Resistances +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+ Vounerabilities +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ Powers +
+
+ Healing + Can your encounter heal?
+
+
+
+
+
+
+
+
+ Summoning new Enemies + Can they make more problems?
+
+ +
+
+
+
+ Stunning + Can your people stun or slow or otherwise annoy the party?
+
+ +
+
+
+
+
+
+
+
+ Conditions +
+
+ Choose your conditions + What conditions are applied to your (some of your) enemies
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
-
-
- What's the average HP of the Enemy? -
- -
-
-
-
-
-
-
-
-
-
- Abilities -
-
-
-
-
+ + +
+
+ Choose applying conditions + What conditions can your players get from this encounter
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+ Results +
+
+
+
+ +
+
+
+

I was unable to calculate the difficulty.

+
+
+

Too drunk to calculate

+
+
-
-
-
-
- Resistances -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-
-
-
- Vounerabilities -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
- Results -
-
-
-
- -
-
-

I was unable to calculate the difficulty.

-

Too drunk to calculate

-
-
-
-
-
-
-
-
-
-
-
-
- Calculation for nerds -

This is where the calculation stats would be, IF I HAD ONE.

-
-
-
-
+
+
+
+
+
+
+ Calculation for nerds +

This is where the calculation stats would be, IF I HAD ONE.

+
-
-
-
- [DEBUG] Set the current status! [DEBUG]
- - - - - -
-
-
-
- Do you intend to wipe the party?
- -
-
-
-
- - +
+
+
+
+
+
+ [DEBUG] Set the current status! [DEBUG]
+ + + + + +
+
+
+
+ Do you intend to wipe the party?
+ +
+
+
-
-
+ + +
+
-
- - - + + - + } + } + + + function setMobs() { + $("#mob_multiattack_ammount").attr("placeholder", "X / "+$("#mob_ammount").val()) + $("#mob_multiattack_ammount").attr("max", $("#mob_ammount").val()) + if ($("#mob_ammount").val() < $("#mob_multiattack_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"); + } + + } + + 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 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 should 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! Okay no, I lied.your Party is dead."); + $("#diff_summary").html(""); + } + } + +