fucking what google

This commit is contained in:
Frederik Palmø 2022-04-30 22:15:01 +02:00
parent 4bc062c464
commit dc58742aac
13 changed files with 3198 additions and 134 deletions

View File

@ -30,7 +30,7 @@
<h3><a href="/">Home</a></h3>
<h3><a href="/class.html">Starting Class</a></h3>
<h3><a href="/armor.html" class="current">Armor Optimizer</a></h3>
<h3><a href="/weapon.html">Weapon Finder</a></h3>
<h3><a href="/weapons.html">Weapon Finder</a></h3>
<h3><a href="/planner.html">Build Planner</a></h3>
</nav>
<header>
@ -186,7 +186,6 @@
<!-- sort -->
<article style="flex-basis: 60%; min-width: 320px">
<b>Results</b>
<div>
<table id="results"></table>
</div>

View File

@ -30,7 +30,7 @@
<h3><a href="/">Home</a></h3>
<h3><a href="/class.html" class="current">Starting Class</a></h3>
<h3><a href="/armor.html">Armor Optimizer</a></h3>
<h3><a href="/weapon.html">Weapon Finder</a></h3>
<h3><a href="/weapons.html">Weapon Finder</a></h3>
<h3><a href="/planner.html">Build Planner</a></h3>
</nav>
<header>

View File

@ -22,7 +22,7 @@
<priority>1.00</priority>
</url>
<url>
<loc>https://erdtree.palmoe.dk/weapon</loc>
<loc>https://erdtree.palmoe.dk/weapons</loc>
<lastmod>2022-04-11T20:44:52+00:00</lastmod>
<priority>1.00</priority>
</url>

File diff suppressed because it is too large Load Diff

View File

@ -1,95 +1,93 @@
<!DOCTYPE html>
<html>
<head>
<!-- metadata -->
<meta charset="utf-8" />
<meta name="language" content="english" />
<meta http-equiv="content-language" content="en-us" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="msvalidate.01" content="F5D21B696FD2830A4E6329F257394DBC" />
<link rel="stylesheet" href="style/main.css" />
<!-- title and description -->
<title>Elden Ring Build Tools - Erdtree</title>
<link rel="icon" type="image/x-icon " href="/resource/favicon.ico" />
<meta name="description" content="Elden Ring Build Tools - Armor, Weapon and Class Optimizer" />
<meta name="author" content="vodofrede" />
<meta property="og:title" content="Elden Ring Build Tools - Erdtree" />
<meta
property="og:description"
content="Erdtree - Elden Ring build planner, armor optimizer, weapon finder and more!"
/>
<meta property="og:url" content="https://erdtree.palmoe.dk" />
</head>
<head>
<!-- metadata -->
<meta charset="utf-8" />
<meta name="language" content="english" />
<meta http-equiv="content-language" content="en-us" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="msvalidate.01" content="F5D21B696FD2830A4E6329F257394DBC" />
<link rel="stylesheet" href="style/main.css" />
<!-- title and description -->
<title>Elden Ring Build Tools - Erdtree</title>
<link rel="icon" type="image/x-icon " href="/resource/favicon.ico" />
<meta name="description"
content="Elden Ring Build Tools - Armor, Weapon and Class Optimizer" />
<meta name="author" content="vodofrede" />
<meta property="og:title" content="Elden Ring Build Tools - Erdtree" />
<meta property="og:description"
content="Erdtree - Elden Ring build planner, armor optimizer, weapon finder and more!" />
<meta property="og:url" content="https://erdtree.palmoe.dk" />
</head>
<body>
<nav>
<h3><a href="/" class="current">Home</a></h3>
<h3><a href="/class.html">Starting Class</a></h3>
<h3><a href="/armor.html">Armor Optimizer</a></h3>
<h3><a href="/weapon.html">Weapon Finder</a></h3>
<h3><a href="/planner.html">Build Planner</a></h3>
</nav>
<header>
<h1>Create, view and optimize builds for Elden Ring.</h1>
</header>
<main>
<div class="cards">
<a href="/class.html">
<article>
<h2>Starting Class</h2>
<span>
<p>Find the optimal starting class for your build.</p>
</span>
</article>
</a>
<a href="/armor.html">
<article>
<h2>Armor Optimizer</h2>
<span>
<p>Maximize defensive stats.</p>
</span>
</article>
</a>
<a href="/weapon.html">
<article>
<h2>Weapon Finder</h2>
<span>
<p>Get suggestions for usable weapons.</p>
</span>
</article>
</a>
<a href="/planner.html">
<article>
<h2>Build Planner (in progress)</h2>
<span>
<p>Create a new build.</p>
</span>
</article>
</a>
<div>
<h3>News</h3>
<ul>
<li>Updated for patch 1.04, regulation 1.04.1</li>
</ul>
<h3>Credits</h3>
<p>
This page was heavily inspired by the awesome
<a href="https://mugenmonkey.com"
class="highlight">MugenMonkey</a>
website.
</p>
<body>
<nav>
<h3><a href="/" class="current">Home</a></h3>
<h3><a href="/class.html">Starting Class</a></h3>
<h3><a href="/armor.html">Armor Optimizer</a></h3>
<h3><a href="/weapons.html">Weapon Finder</a></h3>
<h3><a href="/planner.html">Build Planner</a></h3>
</nav>
<header>
<h1>Create, view and optimize builds for Elden Ring.</h1>
</header>
<main>
<div class="cards">
<a href="/class.html">
<article>
<h2>Starting Class</h2>
<span>
<p>Find the optimal starting class for your build.</p>
</span>
</article>
</a>
<a href="/armor.html">
<article>
<h2>Armor Optimizer</h2>
<span>
<p>Maximize defensive stats.</p>
</span>
</article>
</a>
<a href="/weapons.html">
<article>
<h2>Weapon Finder</h2>
<span>
<p>Get suggestions for usable weapons.</p>
</span>
</article>
</a>
<a href="/planner.html">
<article>
<h2>Build Planner (in progress)</h2>
<span>
<p>Create a new build.</p>
</span>
</article>
</a>
<div>
<h3>News</h3>
<ul>
<li>Updated for patch 1.04, regulation 1.04.1</li>
</ul>
<h3>Credits</h3>
<p>
This page was heavily inspired by the awesome
<a href="https://mugenmonkey.com" class="highlight">MugenMonkey</a>
website.
</p>
</div>
<div></div>
</div>
<div></div>
</div>
</main>
<footer>
<h5>
Erdtree Planner (<a
href="https://git.palmoe.dk/vodofrede/erdtree">available under
BSD-3-Clause license</a>)
</h5>
<h5>© 2022 vodofrede</h5>
</footer>
</body>
</html>
</main>
<footer>
<h5>
Erdtree Planner (<a href="https://git.palmoe.dk/vodofrede/erdtree"
>available under BSD-3-Clause license</a
>)
</h5>
<h5>© 2022 vodofrede</h5>
</footer>
</body>
</html>

View File

@ -24,7 +24,7 @@
<h3><a href="/">Home</a></h3>
<h3><a href="/class.html">Starting Class</a></h3>
<h3><a href="/armor.html">Armor Optimizer</a></h3>
<h3><a href="/weapon.html">Weapon Finder</a></h3>
<h3><a href="/weapons.html">Weapon Finder</a></h3>
<h3><a href="/planner.html" class="current">Build Planner</a></h3>
</nav>
<header>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -2,8 +2,8 @@ let WEAPONS;
let INFUSIONS;
let CORRECTIONS;
let order = "max";
let ascending = true;
let dmgSortOrder = "max";
let dmgSortAscending = true;
async function init() {
WEAPONS = await fetch("/data/weapons.json").then(response => response.json());
@ -27,17 +27,10 @@ function update() {
.map(elem => elem.value);
let categories = [...document.getElementsByName("category")].filter(el => el.checked).map(el => el.id);
let onlyBuffable = document.getElementById("buffable").checked;
// get upgrade level
let upgraded = document.getElementById("max-upgrade").checked;
// get current stats
if (twoHanding) {
stats[0] = Math.floor(stats[0] * 1.5);
}
let infIndex = Object.values(INFUSIONS).findIndex(inf => inf.id == order);
let upgraded = document.getElementById("max-upgrade").checked;
// update result table header to only include allowed infusions
[...document.getElementsByName("damage-result")].forEach(ty => {
@ -48,8 +41,9 @@ function update() {
let destination = document.getElementById("weapons");
destination.innerHTML = "";
// fill table
// fill damage table
let template = document.getElementById("weapon");
let infIndex = Object.values(INFUSIONS).findIndex(inf => inf.id == dmgSortOrder);
Object.values(WEAPONS)
.filter(weapon => {
// filter out weapons that don't fit the current parameters
@ -80,9 +74,9 @@ function update() {
// sort based on current sort order
if (infIndex == -1) {
// sort by max
return ascending ? m2 - m1 : m1 - m2;
return dmgSortAscending ? m2 - m1 : m1 - m2;
} else {
return ascending ? ar2[infIndex] - ar1[infIndex] : ar1[infIndex] - ar2[infIndex];
return dmgSortAscending ? ar2[infIndex] - ar1[infIndex] : ar1[infIndex] - ar2[infIndex];
}
})
.forEach(([weapon, attackRatings, max]) => {
@ -99,7 +93,11 @@ function update() {
tr.children[1].innerHTML = max || "-";
attackRatings.forEach((ar, i) => {
tr.children[i + 2].innerHTML = ar || "-";
let elem = tr.children[i + 2];
elem.innerHTML = ar || "-";
if (ar == max) {
elem.style.fontWeight = "900";
}
});
destination.appendChild(clone);
@ -123,8 +121,8 @@ function setAll(name, state) {
}
function changeSort(newSort) {
ascending = order == newSort ? !ascending : true;
order = newSort;
dmgSortAscending = dmgSortOrder == newSort ? !dmgSortAscending : true;
dmgSortOrder = newSort;
update();
}
@ -139,25 +137,40 @@ function damage(weapon, infusion, upgraded, stats) {
let scalingDmg = stats.some((stat, i) => stat < weapon.requirements[i])
? baseDmg.map(dmg => dmg * -0.4)
: baseDmg.map((dmg, ty) => {
let statCorrection = corrections(
let calcCorrect = corrections(
CORRECTIONS[weaponInfusion.corrections[ty]],
stats,
weaponInfusion.masks[ty],
);
let statScaling = weaponInfusion.scaling.map(scaling => {
return (
let statScaling = weaponInfusion.scaling.map(
scaling =>
infusion.scaling[ty] *
(scaling + scaling * infusion.growth[ty] * upgLevel * (weapon.unique ? 4.0 : 1.0))
);
});
(scaling + scaling * infusion.growth[ty] * upgLevel * (weapon.unique ? 4.0 : 1.0)),
);
return statScaling
.map((scaling, statIndex) => (dmg * scaling * statCorrection[statIndex]) / 100.0)
.map((scaling, statIndex) => (dmg * scaling * calcCorrect[statIndex]) / 100.0)
.reduce((sum, n) => sum + n);
});
return Math.floor(baseDmg.reduce((sum, n) => sum + n) + scalingDmg.reduce((sum, n) => sum + n));
}
function auxiliary(weapon, infusion, upgraded, stats) {
const weaponInfusion = weapon.infusions[infusion.id];
const upgLevel = upgraded ? (weapon.unique ? 10 : 25) : 0;
let baseAux = Object.entries(weaponInfusion.aux).map(([ty, [a, b]]) => [ty, Math.floor(a * upgLevel + b)]);
let calcCorrect = corrections(CORRECTIONS["6"], stats, [0, 0, 0, 0, 1])[4] / 100.0;
let statScaling =
weaponInfusion.scaling[4] +
weaponInfusion.scaling[4] * infusion.growth[4] * upgLevel * (weapon.unique ? 4.0 : 1.0);
let extraAux = stats[4] >= weapon.requirements[4] ? baseAux.map(([_, aux]) => aux * calcCorrect * statScaling) : 0;
return baseAux.map(([ty, aux], i) => [ty, aux + extraAux[i]]);
}
function corrections(calc, stats, masks) {
return stats.map((stat, ty) => {
if (!masks[ty]) {

View File

@ -30,7 +30,7 @@
<h3><a href="/">Home</a></h3>
<h3><a href="/class.html">Starting Class</a></h3>
<h3><a href="/armor.html">Armor Optimizer</a></h3>
<h3><a href="/weapon.html" class="current">Weapon Finder</a></h3>
<h3><a href="/weapons.html" class="current">Weapon Finder</a></h3>
<h3><a href="/planner.html">Build Planner</a></h3>
</nav>
<header>
@ -242,6 +242,19 @@
<label for="magic-infusion">Magic</label>
</span>
</div>
<div>
<span>
<input
id="occult-infusion"
value="occult"
type="checkbox"
name="infusion"
onchange="update()"
checked
/>
<label for="occult-infusion">Occult</label>
</span>
</div>
<div>
<span>
<input
@ -281,19 +294,6 @@
<label for="blood-infusion">Blood</label>
</span>
</div>
<div>
<span>
<input
id="occult-infusion"
value="occult"
type="checkbox"
name="infusion"
onchange="update()"
checked
/>
<label for="occult-infusion">Occult</label>
</span>
</div>
<hr />
<!-- damage types -->
<b>Damage Types</b>
@ -330,7 +330,7 @@
</article>
<!-- results -->
<article style="flex-basis: 55%">
<b>Results</b>
<b>Damage</b>
<template id="weapon">
<tr>
<td>