renamed some files

This commit is contained in:
Frederik Palmø 2022-03-22 14:35:29 +01:00
parent 5400536dcd
commit bdf333a2f1
9 changed files with 4677 additions and 4693 deletions

View File

@ -1,5 +1,4 @@
{
"chestpieces": [
[
{
"id": "no-chestpiece",
"name": "No Item",
@ -1640,5 +1639,4 @@
"poise": 12,
"weight": 8.8
}
]
}
]

View File

@ -1,5 +1,4 @@
{
"gauntlets": [
[
{
"id": "no-gauntlets",
"name": "No Item",
@ -736,5 +735,4 @@
"poise": 1.0,
"weight": 2.3
}
]
}
]

View File

@ -1,5 +1,4 @@
{
"helmets": [
[
{
"id": "no-helmet",
"name": "No Item",
@ -1334,5 +1333,4 @@
"poise": 4,
"weight": 3.8
}
]
}
]

View File

@ -1,5 +1,4 @@
{
"leggings": [
[
{
"id": "no-leggings",
"name": "No Item",
@ -840,5 +839,4 @@
"poise": 7,
"weight": 5.1
}
]
}
]

View File

@ -1,5 +1,4 @@
{
"sets": [
[
{
"id": "alberichs-set",
"name": "Alberich's Set",
@ -10,5 +9,4 @@
"alberichs-trousers"
]
}
]
}
]

View File

@ -1,5 +1,4 @@
{
"classes": [
[
{
"name": "Vagabond",
"level": 9,
@ -50,5 +49,4 @@
"level": 1,
"stats": [10, 10, 10, 10, 10, 10, 10, 10]
}
]
}
]

View File

@ -1,5 +1,4 @@
{
"talismans": [
[
{
"id": "radagons-soreseal",
"name": "Radagon's Soreseal",
@ -46,5 +45,4 @@
"name": "Arrow's Reach Talisman",
"weight": 0.7
}
]
}
]

View File

@ -1,18 +1,14 @@
const HELMETS = fetch("/data/armor/helmets.json")
.then(response => response.json())
.then(data => data.helmets)
.catch(error => console.log(error));
const CHESTPIECES = fetch("/data/armor/chestpieces.json")
.then(response => response.json())
.then(data => data.chestpieces)
.catch(error => console.log(error));
const GAUNTLETS = fetch("/data/armor/gauntlets.json")
.then(response => response.json())
.then(data => data.gauntlets)
.catch(error => console.log(error));
const LEGGINGS = fetch("/data/armor/leggings.json")
.then(response => response.json())
.then(data => data.leggings)
.catch(error => console.log(error));
// armor combination lists
@ -52,7 +48,7 @@ async function init() {
async function update() {
// clamp equip load values to reasonable values
[...document.getElementsByName("equip-load")].forEach(el => el.value = Math.max(el.value, 0));
[...document.getElementsByName("equip-load")].forEach(el => el.value = Math.max(el.value, 0.0));
// get budget and sorting order
let budget = equipLoadBudget();
@ -85,7 +81,12 @@ function equipLoadBudget() {
break;
}
return (parseInt(document.getElementById("max-equip-load").value) || 0 - parseInt(document.getElementById("current-equip-load").value) || 0) * rollModifier;
let max = document.getElementById("max-equip-load").value || 0;
let current = document.getElementById("current-equip-load").value || 0;
let budget = Math.max((max - current) * rollModifier, 0);
return budget;
}
function currentSortBy() {

View File

@ -1,14 +1,11 @@
const CLASSES = fetch("/data/classes.json")
.then(response => response.json())
.then(data => data.classes)
.catch(error => console.log(error));
const TALISMANS = fetch("/data/talismans.json")
.then(response => response.json())
.then(data => data.talismans)
.catch(error => console.log(error));
const HELMETS = fetch("/data/armor/helmets.json")
.then(response => response.json())
.then(data => data.helmets)
.catch(error => console.log(error));
const STAT_SHORT_NAMES = [