Clean up customizer files, fix negtative id
This commit is contained in:
parent
6247ffd7fb
commit
2aaf103d4b
4 changed files with 98 additions and 82 deletions
129
clean3.json
129
clean3.json
|
@ -2,23 +2,23 @@
|
|||
"items": [
|
||||
{
|
||||
"name": "Black Catalyst",
|
||||
"lore": "Even simply looking at these odd rings gives way to a compulsion to wear two of them, despite all better judgement.",
|
||||
"type": "ring",
|
||||
"tier": "Set",
|
||||
"category": "accessory",
|
||||
"displayName": "Black Catalyst",
|
||||
"set": "Black Catalyst",
|
||||
"hp": -325,
|
||||
"lvl": 83,
|
||||
"xpb": -5,
|
||||
"sdPct": 8,
|
||||
"xpb": 15,
|
||||
"str": -2,
|
||||
"dex": -2,
|
||||
"int": -2,
|
||||
"agi": -2,
|
||||
"def": -2,
|
||||
"id": 628,
|
||||
"spRegen": -5,
|
||||
"fixID": true,
|
||||
"id": 628
|
||||
"set": "Black Catalyst"
|
||||
},
|
||||
{
|
||||
"name": "Blue Mask",
|
||||
|
@ -34,6 +34,7 @@
|
|||
"int": 12,
|
||||
"agi": 12,
|
||||
"def": 12,
|
||||
"fixID": true,
|
||||
"id": 393
|
||||
},
|
||||
{
|
||||
|
@ -55,6 +56,7 @@
|
|||
"int": 9,
|
||||
"agi": 9,
|
||||
"def": 9,
|
||||
"fixID": true,
|
||||
"spPct2": -1,
|
||||
"id": 1022
|
||||
},
|
||||
|
@ -83,9 +85,9 @@
|
|||
"aDamPct": -65,
|
||||
"tDamPct": 40,
|
||||
"eDamPct": -65,
|
||||
"fixID": true,
|
||||
"id": 1259,
|
||||
"set": "Fire Hive",
|
||||
"fixID": true,
|
||||
"hideSet": true
|
||||
},
|
||||
{
|
||||
|
@ -94,13 +96,8 @@
|
|||
"tier": "Rare",
|
||||
"category": "weapon",
|
||||
"displayName": "King of Hearts",
|
||||
"poison": -10000000,
|
||||
"slots": 2,
|
||||
"nDam": "0-0",
|
||||
"fDam": "0-0",
|
||||
"wDam": "0-0",
|
||||
"aDam": "0-0",
|
||||
"tDam": "0-0",
|
||||
"eDam": "0-0",
|
||||
"atkSpd": "NORMAL",
|
||||
"lvl": 97,
|
||||
"intReq": 60,
|
||||
|
@ -108,7 +105,10 @@
|
|||
"mr": 3,
|
||||
"hpBonus": 3692,
|
||||
"hprRaw": 200,
|
||||
"sdRaw": -10000000,
|
||||
"mdRaw": -10000000,
|
||||
"wDamPct": 100,
|
||||
"spRaw1": -6,
|
||||
"id": 1533
|
||||
},
|
||||
{
|
||||
|
@ -124,6 +124,8 @@
|
|||
"lvl": 82,
|
||||
"dexReq": 15,
|
||||
"agiReq": 50,
|
||||
"sdPct": -15,
|
||||
"mdPct": -20,
|
||||
"ms": 1,
|
||||
"ref": 30,
|
||||
"dex": 15,
|
||||
|
@ -144,6 +146,7 @@
|
|||
"lvl": 97,
|
||||
"strReq": 70,
|
||||
"dexReq": 70,
|
||||
"mdPct": -45,
|
||||
"ref": 1,
|
||||
"agi": -20,
|
||||
"def": -20,
|
||||
|
@ -165,11 +168,13 @@
|
|||
"tDef": 50,
|
||||
"lvl": 86,
|
||||
"dexReq": 65,
|
||||
"mr": -3,
|
||||
"mdPct": 15,
|
||||
"ms": 3,
|
||||
"dex": 12,
|
||||
"sdRaw": 205,
|
||||
"mdRaw": 230,
|
||||
"wDamPct": -20,
|
||||
"tDamPct": 15,
|
||||
"id": 3160
|
||||
},
|
||||
|
@ -197,17 +202,17 @@
|
|||
"def": -6,
|
||||
"tDamPct": 30,
|
||||
"eDamPct": 30,
|
||||
"fixID": true,
|
||||
"id": 1253,
|
||||
"set": "Earth Hive",
|
||||
"fixID": true,
|
||||
"hideSet": true
|
||||
},
|
||||
{
|
||||
"name": "Breakdown",
|
||||
"displayName": "Nycthemeron",
|
||||
"type": "helmet",
|
||||
"tier": "Unique",
|
||||
"category": "armor",
|
||||
"displayName": "Nychthemeron",
|
||||
"slots": 3,
|
||||
"hp": 2375,
|
||||
"wDef": -50,
|
||||
|
@ -222,6 +227,8 @@
|
|||
"ms": 2,
|
||||
"str": 10,
|
||||
"dex": 10,
|
||||
"atkTier": -10,
|
||||
"spRegen": -15,
|
||||
"tDamPct": 15,
|
||||
"eDamPct": 15,
|
||||
"id": 3595
|
||||
|
@ -232,14 +239,7 @@
|
|||
"tier": "Rare",
|
||||
"category": "weapon",
|
||||
"displayName": "Arkhalis",
|
||||
"basedps": 212,
|
||||
"slots": 3,
|
||||
"nDam": "0-0",
|
||||
"fDam": "0-0",
|
||||
"wDam": "0-0",
|
||||
"aDam": "0-0",
|
||||
"tDam": "127-297",
|
||||
"eDam": "0-0",
|
||||
"atkSpd": "SUPER_FAST",
|
||||
"lvl": 98,
|
||||
"dexReq": 60,
|
||||
|
@ -248,8 +248,10 @@
|
|||
"dex": 15,
|
||||
"spd": 15,
|
||||
"atkTier": -1,
|
||||
"hpBonus": -1350,
|
||||
"mdRaw": 425,
|
||||
"tDamPct": 15,
|
||||
"eDefPct": -30,
|
||||
"id": 145
|
||||
},
|
||||
{
|
||||
|
@ -343,6 +345,8 @@
|
|||
"ls": 300,
|
||||
"ref": 10,
|
||||
"dex": 10,
|
||||
"atkTier": -10,
|
||||
"hpBonus": -800,
|
||||
"mdRaw": 2700,
|
||||
"tDamPct": 23,
|
||||
"id": 2987
|
||||
|
@ -401,10 +405,12 @@
|
|||
"lvl": 96,
|
||||
"dexReq": 55,
|
||||
"intReq": 60,
|
||||
"mdPct": -20,
|
||||
"ms": 2,
|
||||
"int": 5,
|
||||
"expd": 12,
|
||||
"sdRaw": 277,
|
||||
"tDefPct": -20,
|
||||
"id": 3597
|
||||
},
|
||||
{
|
||||
|
@ -419,6 +425,8 @@
|
|||
"lvl": 89,
|
||||
"strReq": 55,
|
||||
"dexReq": 55,
|
||||
"hprPct": -30,
|
||||
"sdPct": -30,
|
||||
"mdPct": 8,
|
||||
"ls": 170,
|
||||
"str": 10,
|
||||
|
@ -433,14 +441,7 @@
|
|||
"tier": "Legendary",
|
||||
"category": "weapon",
|
||||
"displayName": "Hashr Claw",
|
||||
"basedps": 42.5,
|
||||
"slots": 2,
|
||||
"nDam": "10-15",
|
||||
"fDam": "0-0",
|
||||
"wDam": "0-0",
|
||||
"aDam": "0-0",
|
||||
"tDam": "10-50",
|
||||
"eDam": "0-0",
|
||||
"atkSpd": "SUPER_FAST",
|
||||
"lvl": 39,
|
||||
"dexReq": 30,
|
||||
|
@ -467,11 +468,14 @@
|
|||
"intReq": 60,
|
||||
"defReq": 60,
|
||||
"sdPct": 17,
|
||||
"mdPct": -25,
|
||||
"ls": -450,
|
||||
"ms": 3,
|
||||
"int": 6,
|
||||
"def": 6,
|
||||
"spd": 13,
|
||||
"sdRaw": 170,
|
||||
"mdRaw": -225,
|
||||
"id": 3589
|
||||
},
|
||||
{
|
||||
|
@ -490,6 +494,7 @@
|
|||
"sdPct": 19,
|
||||
"ms": 1,
|
||||
"str": 10,
|
||||
"spd": -15,
|
||||
"hprRaw": 155,
|
||||
"mdRaw": 330,
|
||||
"eDamPct": 15,
|
||||
|
@ -576,14 +581,7 @@
|
|||
"tier": "Mythic",
|
||||
"category": "weapon",
|
||||
"displayName": "Collapse",
|
||||
"basedps": 827.5,
|
||||
"slots": 3,
|
||||
"nDam": "40-65",
|
||||
"fDam": "0-310",
|
||||
"wDam": "0-310",
|
||||
"aDam": "0-310",
|
||||
"tDam": "0-310",
|
||||
"eDam": "0-310",
|
||||
"atkSpd": "VERY_SLOW",
|
||||
"lvl": 97,
|
||||
"strReq": 35,
|
||||
|
@ -595,8 +593,36 @@
|
|||
"ms": 4,
|
||||
"str": 45,
|
||||
"expd": 250,
|
||||
"fDefPct": -65,
|
||||
"wDefPct": -65,
|
||||
"aDefPct": -65,
|
||||
"tDefPct": -65,
|
||||
"eDefPct": -65,
|
||||
"id": 1693
|
||||
},
|
||||
{
|
||||
"name": "Singularity",
|
||||
"type": "wand",
|
||||
"tier": "Mythic",
|
||||
"category": "weapon",
|
||||
"displayName": "Singularity",
|
||||
"slots": 15,
|
||||
"atkSpd": "SUPER_SLOW",
|
||||
"lvl": 99,
|
||||
"strReq": 42,
|
||||
"dexReq": 42,
|
||||
"intReq": 42,
|
||||
"agiReq": 42,
|
||||
"defReq": 42,
|
||||
"sdPct": 10,
|
||||
"mdPct": 15,
|
||||
"dex": 35,
|
||||
"spd": -40,
|
||||
"hprRaw": 250,
|
||||
"sdRaw": 222,
|
||||
"mdRaw": 444,
|
||||
"id": 1715
|
||||
},
|
||||
{
|
||||
"name": "Nona",
|
||||
"tier": "Legendary",
|
||||
|
@ -52769,41 +52795,6 @@
|
|||
"spPct3": -55,
|
||||
"id": 1716
|
||||
},
|
||||
{
|
||||
"name": "Singularity",
|
||||
"tier": "Mythic",
|
||||
"type": "wand",
|
||||
"material": "269:19",
|
||||
"category": "weapon",
|
||||
"slots": 15,
|
||||
"lore": "The existence of all things is reflected in the otherworldly jewels of this grand staff, dense enough to have its own gravitational pull. Users have reported their limbs being stretched after usage.",
|
||||
"drop": "NORMAL",
|
||||
"nDam": "0-0",
|
||||
"fDam": "125-275",
|
||||
"wDam": "150-250",
|
||||
"aDam": "100-300",
|
||||
"tDam": "75-375",
|
||||
"eDam": "175-225",
|
||||
"atkSpd": "SUPER_SLOW",
|
||||
"lvl": 99,
|
||||
"strReq": 42,
|
||||
"dexReq": 42,
|
||||
"intReq": 42,
|
||||
"agiReq": 42,
|
||||
"defReq": 42,
|
||||
"sdPct": 10,
|
||||
"mdPct": 15,
|
||||
"str": 0,
|
||||
"dex": 35,
|
||||
"int": 0,
|
||||
"agi": 0,
|
||||
"def": 0,
|
||||
"spd": -40,
|
||||
"hprRaw": 250,
|
||||
"sdRaw": 222,
|
||||
"mdRaw": 444,
|
||||
"id": 1715
|
||||
},
|
||||
{
|
||||
"name": "Stardew",
|
||||
"tier": "Mythic",
|
||||
|
|
File diff suppressed because one or more lines are too long
15
custom.js
15
custom.js
|
@ -222,9 +222,18 @@ class Custom{
|
|||
|
||||
this.statMap.set("custom", true);
|
||||
|
||||
for (const n of ["nDam","eDam","tDam","wDam","fDam","aDam"]) {
|
||||
if (!(this.statMap.has(n) && this.statMap.get(n))) {
|
||||
this.statMap.set(n,"0-0");
|
||||
if (weaponTypes.includes(this.statMap.get("type"))) {
|
||||
for (const n of ["nDam","eDam","tDam","wDam","fDam","aDam"]) {
|
||||
if (!(this.statMap.has(n) && this.statMap.get(n))) {
|
||||
this.statMap.set(n,"0-0");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (const n of ["nDam","eDam","tDam","wDam","fDam","aDam"]) {
|
||||
if (this.statMap.has(n)) {
|
||||
this.statMap.delete(n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -185,12 +185,12 @@ function calculateCustom() {
|
|||
let custom_str = encodeCustom(player_custom_item.statMap, true);
|
||||
location.hash = custom_str;
|
||||
player_custom_item.setHash(custom_str);
|
||||
console.log(player_custom_item.statMap.get("hash"));
|
||||
//console.log(player_custom_item.statMap.get("hash"));
|
||||
|
||||
|
||||
displayExpandedItem(player_custom_item.statMap, "custom-stats");
|
||||
|
||||
console.log(player_custom_item.statMap);
|
||||
//console.log(player_custom_item.statMap);
|
||||
|
||||
}catch (error) {
|
||||
//USE THE ERROR <p>S!
|
||||
|
@ -235,7 +235,7 @@ function decodeCustom(custom_url_tag) {
|
|||
}
|
||||
while (tag !== "") {
|
||||
let id = ci_save_order[Base64.toInt(tag.slice(0,2))];
|
||||
console.log(tag.slice(0, 2) + ": " + id);
|
||||
//console.log(tag.slice(0, 2) + ": " + id);
|
||||
let len = Base64.toInt(tag.slice(2,4));
|
||||
if (rolledIDs.includes(id)) {
|
||||
let sign = parseInt(tag.slice(4,5),10);
|
||||
|
@ -628,7 +628,6 @@ function _init_customizer() {
|
|||
function saveAsJSON() {
|
||||
let CI = {};
|
||||
for (const [id, val] of player_custom_item.statMap) {
|
||||
console.log(id);
|
||||
let skipIds = ["minRolls", "maxRolls", "skillpoints", "reqs", "custom", "crafted", "restrict", "hash",
|
||||
"nDam_", "tDam_", "eDam_", "wDam_", "fDam_", "aDam_",
|
||||
"powders", "durability", "duration" ]
|
||||
|
@ -638,22 +637,33 @@ function saveAsJSON() {
|
|||
val ? CI[reversetranslations.get(id) ? reversetranslations.get(id) : id] = val : "" ;
|
||||
}
|
||||
}
|
||||
let is_fixid = true;
|
||||
if (player_custom_item.statMap.get("minRolls")) {
|
||||
for (const [id, min] of player_custom_item.statMap.get("minRolls")) {
|
||||
const max = player_custom_item.statMap.get("maxRolls").get(id);
|
||||
for (let [id, min] of player_custom_item.statMap.get("minRolls")) {
|
||||
let max = player_custom_item.statMap.get("maxRolls").get(id);
|
||||
if (min && max) {
|
||||
console.log(reversetranslations);
|
||||
let tmp = Math.min(min, max);
|
||||
max = Math.max(min, max);
|
||||
min = tmp;
|
||||
if (min != max) {
|
||||
is_fixid = false;
|
||||
}
|
||||
// console.log(reversetranslations);
|
||||
let base = full_range_to_base(min, max);
|
||||
if (base === null) {
|
||||
CI[reversetranslations.get(id) ? reversetranslations.get(id) : id] = [min,max];
|
||||
} else if (base) {
|
||||
CI[reversetranslations.get(id) ? reversetranslations.get(id) : id] = base;
|
||||
}
|
||||
else {
|
||||
console.log("CONVERSION ERROR: " + id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CI["identified"] = is_fixid
|
||||
|
||||
console.log(CI);
|
||||
console.log(JSON.stringify(CI, null, 0));
|
||||
//yuck
|
||||
copyTextToClipboard(JSON.stringify(CI, null, 0));
|
||||
document.getElementById("json-button").textContent = "Copied!";
|
||||
|
@ -696,6 +706,13 @@ function full_range_to_base(min, max) {
|
|||
} else {
|
||||
//both should be same sign - now do math
|
||||
if (min < 0) {
|
||||
let minPossible = (max - 0.5) / neg_range[1];
|
||||
let maxPossible = (max + 0.5) / neg_range[1];
|
||||
for (let i = Math.floor(minPossible); i < Math.ceil(maxPossible); i++) {
|
||||
if (checkBase(i, min, max)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
let minPossible = (max - 0.5) / pos_range[1];
|
||||
|
@ -712,5 +729,4 @@ function full_range_to_base(min, max) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
load_init(_init_customizer);
|
||||
|
|
Loading…
Reference in a new issue