Skip to content

Commit

Permalink
updated d4 tools for S4
Browse files Browse the repository at this point in the history
  • Loading branch information
fquirin committed May 30, 2024
1 parent 11a4023 commit 0033a00
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
6 changes: 3 additions & 3 deletions apps/d4/damage.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link rel="stylesheet" href="common.css">
<script src="dragdrop.js"></script>
<script defer src="common.js?v=0.13.2"></script>
<script defer src="damage.js?v=0.13.2"></script>
<script defer src="damage.js?v=0.14.0"></script>
<script defer src="data/additive-damage-labels.js"></script>
<script defer src="data/multiplicative-damage-labels.js"></script>

Expand All @@ -35,8 +35,8 @@

<script>
var d4cType = "dmgcalc"; //TODO: this is added to the storage key and can in theory be in conflict with calc name
var d4cVersion = "0.13.2";
var d4season = "3";
var d4cVersion = "0.14.0";
var d4season = "4";
</script>
</head>
<body>
Expand Down
3 changes: 1 addition & 2 deletions apps/d4/data/additive-damage-labels.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var additiveDamageLabelsList = [
{label: "All Damage", group: "", types: []},
{label: "Crit. Damage vs Vulnerable", group: "", types: []},
{label: "Crit. Damage with Bone", group: "", types: []},
{label: "Bone Crit. Damage", group: "", types: []},
{label: "Damage vs Bleeding", group: "", types: []},
{label: "Damage vs Burning", group: "", types: []},
{label: "Damage vs Chilled", group: "", types: []},
Expand Down
11 changes: 9 additions & 2 deletions apps/d4/data/multiplicative-damage-labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var multiplicativeDamageLabelsList = [
{label: "Item: Banished Lords", group: "All", types: ["crit", "overpower"]},
{label: "Item: Grandfather", group: "All", types: ["crit"]},
{label: "Item: Ring of Starless Sk.", group: "All", types: []},
{label: "Item: Tal Rasha's", group: "All", types: []},
{label: "Item: Tibaults Will", group: "All", types: []},
//Barbarian
{label: "Aspect: Ancestral Force", group: "Barbarian", types: []},
Expand All @@ -17,8 +18,8 @@ var multiplicativeDamageLabelsList = [
{label: "Glyph: Might", group: "Barbarian", types: []},
{label: "Glyph: Rumble", group: "Barbarian", types: []},
{label: "Glyph: Twister", group: "Barbarian", types: []},
{label: "Item: Tuskhelm", group: "Barbarian", types: []},
{label: "Item: Ring of Red Furor", group: "Barbarian", types: ["crit"]},
{label: "Item: Tuskhelm", group: "Barbarian", types: []},
{label: "Key Pass.: Unbridled Rage", group: "Barbarian", types: []},
{label: "Key Pass.: Unconstrained", group: "Barbarian", types: []},
{label: "Key Pass.: Walking Arsenal", group: "Barbarian", types: []},
Expand All @@ -29,8 +30,8 @@ var multiplicativeDamageLabelsList = [
{label: "Pass.: Heavy Handed", group: "Barbarian", types: ["crit"]},
{label: "Pass.: Pit Fighter", group: "Barbarian", types: []},
{label: "Pass.: Wallop", group: "Barbarian", types: ["vulnerable"]},
{label: "Skill: Wrath o.t. Berserker", group: "Barbarian", types: []},
{label: "Skill: War Cry", group: "Barbarian", types: []},
{label: "Skill: Wrath o.t. Berserker", group: "Barbarian", types: []},
{label: "Weapon Expertise: Axe", group: "Barbarian", types: ["crit", "vulnerable"]},
{label: "Weapon Expertise: Mace", group: "Barbarian", types: ["vulnerable"]},
//Sorc
Expand Down Expand Up @@ -65,5 +66,11 @@ var multiplicativeDamageLabelsList = [
{label: "Pass.: Inner Flames", group: "Sorc", types: []},
{label: "Pass.: Permafrost", group: "Sorc", types: []},
{label: "Pass.: Shocking Impact", group: "Sorc", types: []},
//Necro
//...
//Rogue
//...
//Druid
//...
]
//TODO: add more
6 changes: 3 additions & 3 deletions apps/d4/defense.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link rel="stylesheet" href="common.css">
<script src="dragdrop.js"></script>
<script defer src="common.js?v=0.13.2"></script>
<script defer src="defense.js?v=0.3.0"></script>
<script defer src="defense.js?v=0.4.0"></script>

<title>D4 Defense Calculator</title>
<!-- open graph settings -->
Expand All @@ -33,8 +33,8 @@

<script>
var d4cType = "defcalc"; //TODO: this is added to the storage key and can in theory be in conflict with calc name
var d4cVersion = "0.3.0";
var d4season = "3";
var d4cVersion = "0.4.0";
var d4season = "4";
</script>
</head>
<body>
Expand Down
4 changes: 3 additions & 1 deletion apps/d4/defense.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function buildCalculator(containerEle, options){
undefined, armorItemColor, "Physical damage reduction based on total armor and enemy level.");
var armorDiffToCap = calculateMissingOrExcessArmor(totalArmor, data.enemyLevel);
addResult("Armor required for 85% cap", "approx. " + Math.round(armorDiffToCap).toLocaleString(),
undefined, armorItemColorAlt, "Approx. armor required to reach 85% DR cap vs given monster level.\nBased on findings and formula by SkyLineOW.", true);
undefined, armorItemColorAlt, "Approx. armor required to reach 85% DR cap vs given monster level.\nBased on S4 cap and findings and formula by SkyLineOW.", true);
addCustom("<hr>", "flat");

//life
Expand Down Expand Up @@ -282,6 +282,8 @@ function buildCalculator(containerEle, options){
}

function calculateArmorDr(playerArmor, monsterLevel){
//season 4 armor cap is 9230
if (playerArmor >= 9230) return 0.85;
//Reference by SkyLineOW:
//https://www.reddit.com/r/Diablo/comments/152gd9u/i_mostly_cracked_the_d4_armor_formula_and_made_a/
var w0 = 24.95675343;
Expand Down

0 comments on commit 0033a00

Please sign in to comment.