diff --git a/atlas.html b/atlas.html new file mode 100644 index 0000000..dd41f3e --- /dev/null +++ b/atlas.html @@ -0,0 +1,61 @@ + + +
+ + + + + + + + + +Atlas???
+WynnCustom
+
+ + + + |
+ ||
+ + + + |
+ ||
+ + + + + |
+ ||
+ + + + |
+ ||
+ + + + + |
+ ||
+ + + + |
+ ||
+ + + + |
+ ||
+ + + + | +||
+ Requirements + |
+ ||
+ + + + + |
+ ||
+ + + + |
+ ||
+ + + + |
+ ||
+ + + + |
+ ||
+ + + + |
+ ||
+ + + + |
+ ||
+ + + + |
+ ||
+ Extra + |
+ ||
+ +
|
+ ||
+ +
|
+ ||
+ + | +
+ + + + |
+
+ + + + |
+
+ + + + |
+
+ + + + |
+
+ + + + |
+
+ Weapon Stats + |
+
+ + + + |
+
+ + + + |
+
+ + + + |
+
+ + + + |
+
+ + + + |
+
+ + + + |
+
+ + + + + |
+
+ Armor/Accessory Stats + |
+
+ + + + |
+
+ + + + |
+
+ + + + |
+
+ + + + |
+
+ + + + |
+
+ + + + |
+
+ Consumable Stats + |
+
+ + + + |
+
+ + + + |
+
+ + + + |
+
+ Damage Stats + |
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+ Defensive Stats + |
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+ Utility + |
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+ Spell Costs + |
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+ Miscellaneous + |
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+ |||
+
+
+ +
|
+
+
S! + + let msg = error.stack; + let lines = msg.split("\n"); + let header = document.getElementById("header"); + header.textContent = ""; + for (const line of lines) { + let p = document.createElement("p"); + p.classList.add("itemp"); + p.textContent = line; + header.appendChild(p); + } + let p2 = document.createElement("p"); + p2.textContent = "If you believe this is an error, contact hppeng on forums or discord."; + header.appendChild(p2); + } + +} + +function encodeCustom(custom) { + + return ""; +} + +function decodeCustom(custom_url_tag) { + if (custom_url_tag) { + console.log(custom_url_tag); + let version = custom_url_tag.charAt(0); + let tag = custom_url_tag.substring(1); + if (version === "1") { + //do the things + + calculateCustom(); + } + } +} + +function populateFields() { + /*Ex + let recipe_list = document.getElementById("recipe-choices"); + for (const recipe of recipeTypes) { + let el = document.createElement("option"); + el.value = recipe.charAt(0) + recipe.substring(1).toLowerCase(); + recipe_list.appendChild(el); + } + */ + let tier_list = document.getElementById("tier-list"); + for (const tier of tiers) { + let el = document.createElement("option"); + el.value = tier; + tier_list.appendChild(el); + } + let type_list = document.getElementById("type-list"); + for (const type of types) { + let el = document.createElement("option"); + el.value = type; + type_list.appendChild(el); + } + let atkSpd_list = document.getElementById("atkSpd-list"); + for (const atkSpd of attackSpeeds) { + let el = document.createElement("option"); + el.value = atkSpd; + atkSpd_list.appendChild(el); + } + let class_list = document.getElementById("class-list"); + for (const className of classes) { + let el = document.createElement("option"); + el.value = className; + class_list.appendChild(el); + } + let item_list = document.getElementById("base-list"); + for (const [baseItem,value] of itemMap) { + let el = document.createElement("option"); + el.value = baseItem; + item_list.appendChild(el); + } +} + +/* Toggles ONE button +*/ +function toggleButton(buttonId) { + let elem = document.getElementById(buttonId); + if (elem.classList.contains("toggleOn")) { + elem.classList.remove("toggleOn"); + } else{ + elem.classList.add("toggleOn"); + } +} + +/* Changes an element's text content from yes to no or vice versa +*/ +function toggleYN(elemId) { + let elem = document.getElementById(elemId); + if (elem.textContent && elem.textContent === "no") { + elem.textContent = "yes"; + } else if (elem.textContent === "yes") { + elem.textContent = "no"; + } else { + elem.textContent = "no"; + } +} + +/** + * @param fixed : a boolean for the state of the fixID button. True -> make all the variable IDs 2 inputs, False -> make them all 1 input + */ +function toggleFixed(fixed) { + for (const id of rolledIDs) { + let elem = document.getElementById(id); + if (elem) { + if (fixed.textContent === "yes") { //now fixed IDs -> go to 1 input + document.getElementById(id+"-choice-fixed-container").style = ""; + document.getElementById(id+"-choice-container").style = "display:none"; + } else { //now rollable -> go to 2 inputs + document.getElementById(id+"-choice-fixed-container").style = "display:none"; + document.getElementById(id+"-choice-container").style = ""; + } + } + } +} + +/** Make a custom item + * + * @param {elem} : The elem with value item to base off of. A string input. + */ +function useBaseItem(elem) { + let itemName = getValue(elem); + let baseItem; + + //Check items db. + for (const [name,itemObj] of itemMap) { + if (itemName === name) { + baseItem = expandItem(itemObj, []); + break; + } + } + + //If it starts with CR-, try creating a craft + if(!baseItem) { + baseItem = getCraftFromHash(itemName).statMap; + console.log(baseItem); + } + //If it starts with CI-, try creating a custom (TODO) + + //If the item exists, go through stats and assign to values! + if(baseItem) { + resetFields(); + + //Rolled IDs + if (document.getElementById("fixID-choice").textContent === "yes") { //fixed IDs + for (const id of rolledIDs) { //use maxrolls + if (baseItem.get("maxRolls").get(id) && document.getElementById(id+"-choice-fixed")) { + setValue(id+"-choice-fixed", baseItem.get("maxRolls").get(id)); + setValue(id+"-choice-min", baseItem.get("maxRolls").get(id)); + setValue(id+"-choice-max", baseItem.get("maxRolls").get(id)); + } + } + } else { //use both + for (const id of rolledIDs) { + if (baseItem.get("maxRolls").get(id) && document.getElementById(id+"-choice-fixed")) { + setValue(id+"-choice-fixed", baseItem.get("maxRolls").get(id)); + setValue(id+"-choice-min", baseItem.get("minRolls").get(id)); + setValue(id+"-choice-max", baseItem.get("maxRolls").get(id)); + } + } + } + + //Static IDs + for (const id of nonRolledIDs) { + if (baseItem.get(id) && document.getElementById(id+"-choice")) { + setValue(id+"-choice", baseItem.get(id)); + } + } + //Take care of durability, duration, and charges. + if (baseItem.get("tier") === "Crafted") { + let specialIDs = ["duration", "durability"]; + setValue("charges-choice", baseItem.get("charges")); + for (const id of specialIDs) { + setValue(id+"-choice", baseItem.get(id)[0]+"-"+baseItem.get(id)[1]); + } + } + + + } + + //Don't do anything if nothing is met + calculateCustom(); +} + +/* Copy the link +*/ +function copyCustom(){ + if (player_custom_item) { + copyTextToClipboard(custom_url_base+location.hash); + document.getElementById("copy-button").textContent = "Copied!"; + } +} + + + +/* Reset all fields +*/ +function resetFields() { + let inputs = document.getElementsByTagName('input'); + for (const input of inputs) { + input.textContent = ""; + input.value = ""; + } + + let elem = document.getElementById("fixID-choice") + if (elem.textContent === "yes") { + elem.textContent = "no"; + elem.classList.remove("toggleOn"); + } +} + +/** Takes the base value for an id and attempts to autofill the corresponding min and maxes. + * + * @param {String} id - the id to do the math for (ex: hprPct) + */ +function base_to_range(id) { + let base = parseFloat(getValue(id+"-choice-base")); + if(base) { + //This version allows overriding of min and max. + if (base < 0) { + setValue(id+"-choice-min", Math.min(Math.round(neg_range[0]*base),-1)); + } else { + setValue(id+"-choice-min", Math.max(Math.round(pos_range[0]*base),1)); + } + if (base < 0) { + setValue(id+"-choice-max", Math.min(Math.round(neg_range[1]*base),-1)); + } else { + setValue(id+"-choice-max", Math.max(Math.round(pos_range[1]*base),1)); + } + /* No overiding min/max version + if (!getValue(id+"-choice-min")) { + if (base < 0) { + setValue(id+"-choice-min", Math.min(Math.round(neg_range[0]*base),-1)); + } else { + setValue(id+"-choice-min", Math.max(Math.round(pos_range[0]*base),1)); + } + } + if (!getValue(id+"-choice-max")) { + if (base < 0) { + setValue(id+"-choice-max", Math.min(Math.round(neg_range[1]*base),-1)); + } else { + setValue(id+"-choice-max", Math.max(Math.round(pos_range[1]*base),1)); + } + } + */ + } +} + +/** Takes min/max value(s) and attempts to autofill the corresponding base and min/max + * + * @param {String} id - the id to do the math for (ex: hprPct) + * @param {String} mode - the tabbed value (min or max) + */ +function range_to_base(id, mode) { + let value; + try { + value = parseFloat(getValue(id+"-choice-"+mode)); + } catch (error) { + console.log("Error in range_to_base."); + console.log(error); + } + + if (mode === "min") { //base and max + if (value && !getValue(id+"-choice-base")) { + if (value < 0) { + setValue(id+"-choice-base", Math.min(Math.round(1/neg_range[0]*value),-1)); + } else { + setValue(id+"-choice-base", Math.max(Math.round(1/pos_range[0]*value),1)); + } + } + if (value && !getValue(id+"-choice-max")) { + if (value < 0) { + setValue(id+"-choice-max", Math.min(Math.round(neg_range[1]/neg_range[0]*value),-1)); + } else { + setValue(id+"-choice-max", Math.max(Math.round(pos_range[1]/pos_range[0]*value),1)); + } + } + } else if (mode === "max") { //min and base + if (value && !getValue(id+"-choice-base")) { + if (value < 0) { + setValue(id+"-choice-base", Math.min(Math.round(1/neg_range[1]*value),-1)); + } else { + setValue(id+"-choice-base", Math.max(Math.round(1/pos_range[1]*value),1)); + } + } + if (value && !getValue(id+"-choice-min")) { + if (value < 0) { + setValue(id+"-choice-min", Math.min(Math.round(neg_range[0]/neg_range[1]*value),-1)); + } else { + setValue(id+"-choice-min", Math.max(Math.round(pos_range[0]/pos_range[1]*value),1)); + } + } + } +} + +/** Uses the base value input fields and changes the base values. + * + */ +function changeBaseValues() { + for (const id of roll_range_ids) { + if (getValue(id)) { + if (id.includes("neg")) { + if (id.includes("min")) { + neg_range[0] = parseFloat(getValue(id)); + } else { + neg_range[1] = parseFloat(getValue(id)); + } + } else { + if (id.includes("min")) { + pos_range[0] = parseFloat(getValue(id)); + } else { + pos_range[1] = parseFloat(getValue(id)); + } + } + } + } + for (const identification of rolledIDs) { + if (document.getElementById(identification)) { + base_to_range(identification); + } + } +} + +function resetBaseValues() { + pos_range = [0.3,1.3]; + neg_range = [1.3,0.7]; + for (const id of roll_range_ids) { + setValue(id,""); + } +} + +load_init(init); +load_ing_init(init); diff --git a/customnarrow.css b/customnarrow.css new file mode 100644 index 0000000..b56292d --- /dev/null +++ b/customnarrow.css @@ -0,0 +1,33 @@ +.container{ + width: 95%; + border: 3px solid #BCBCBC; + border-radius: 3px; + padding: 2% 4% 4%; +} +.overall-container { + padding: 2%; +} +.customchoices{ + display: grid; + grid-template-columns: repeat(1, 1fr); + gap: 5px; + grid-auto-rows: minmax(60px, auto); +} +.button-container { + display: grid; + grid-template-columns: 1fr 1fr 1fr; + gap: 5px; + grid-auto-rows: minmax(30px, auto); + margin-bottom: 5px; + padding-bottom: 5px; +} +.title{ + text-align: center; + font-size: 150%; +} +.smalltitle{ + text-align: center; + font-size: 125%; + margin-top: 10px; + margin-bottom: 4px; +} \ No newline at end of file diff --git a/customwide.css b/customwide.css new file mode 100644 index 0000000..74aeb1f --- /dev/null +++ b/customwide.css @@ -0,0 +1,46 @@ +.container { + width: 95%; + border: 3px solid #BCBCBC; + border-radius: 3px; +} +.overall-container { + width: 100%; + display: grid; + grid-template-columns: 2.3fr 1fr; + gap: 5px; + grid-auto-rows: minmax(60px, auto); +} +.customchoices { + width: 100%; + display: grid; + grid-template-columns: 1fr 1fr 1fr; + gap: 5px; + grid-auto-rows: minmax(60px, auto); +} + +.title{ + text-align: center; + font-size: 150%; +} +.smalltitle{ + text-align: center; + font-size: 125%; + margin-top: 10px; + margin-bottom: 4px; +} +.button-container { + display: grid; + grid-template-columns: 1fr 1fr 1fr; + gap: 5px; + grid-auto-rows: minmax(30px, auto); + margin-bottom: 5px; + padding-bottom: 5px; +} +.button { + padding: 2%; +} +.sticky-box { + position: -webkit-sticky; /* Safari */ + position: sticky; + top: 10px; +} \ No newline at end of file diff --git a/display.js b/display.js index 734ed82..3c42986 100644 --- a/display.js +++ b/display.js @@ -1,4 +1,4 @@ -let nonRolledIDs = ["name", "displayName", "tier", "set", "slots", "type", "material", "drop", "quest", "restrict", "nDam", "fDam", "wDam", "aDam", "tDam", "eDam", "atkSpd", "hp", "fDef", "wDef", "aDef", "tDef", "eDef", "lvl", "classReq", "strReq", "dexReq", "intReq", "defReq", "agiReq","str", "dex", "int", "agi", "def", "fixID", "category", "id", "skillpoints", "reqs", "nDam_", "fDam_", "wDam_", "aDam_", "tDam_", "eDam_", "majorIds"]; +let nonRolledIDs = ["name", "lore", "displayName", "tier", "set", "slots", "type", "material", "drop", "quest", "restrict", "nDam", "fDam", "wDam", "aDam", "tDam", "eDam", "atkSpd", "hp", "fDef", "wDef", "aDef", "tDef", "eDef", "lvl", "classReq", "strReq", "dexReq", "intReq", "defReq", "agiReq","str", "dex", "int", "agi", "def", "fixID", "category", "id", "skillpoints", "reqs", "nDam_", "fDam_", "wDam_", "aDam_", "tDam_", "eDam_", "majorIds"]; let rolledIDs = ["hprPct", "mr", "sdPct", "mdPct", "ls", "ms", "xpb", "lb", "ref", "thorns", "expd", "spd", "atkTier", "poison", "hpBonus", "spRegen", "eSteal", "hprRaw", "sdRaw", "mdRaw", "fDamPct", "wDamPct", "aDamPct", "tDamPct", "eDamPct", "fDefPct", "wDefPct", "aDefPct", "tDefPct", "eDefPct", "spPct1", "spRaw1", "spPct2", "spRaw2", "spPct3", "spRaw3", "spPct4", "spRaw4", "rainbowRaw", "sprint", "sprintReg", "jh", "lq", "gXp", "gSpd"]; let reversedIDs = [ "spPct1", "spRaw1", "spPct2", "spRaw2", "spPct3", "spRaw3", "spPct4", "spRaw4" ]; let colorMap = new Map( @@ -139,8 +139,8 @@ function idRound(id){ } //Used for item IDs and ingredient id field IDs -let idPrefixes = {"displayName": "", "lvl":"Combat Level Min: ", "classReq":"Class Req: ","strReq":"Strength Min: ","dexReq":"Dexterity Min: ","intReq":"Intelligence Min: ","defReq":"Defense Min: ","agiReq":"Agility Min: ", "nDam_":"Neutral Damage: ", "eDam_":"Earth Damage: ", "tDam_":"Thunder Damage: ", "wDam_":"Water Damage: ", "fDam_":"Fire Damage: ", "aDam_":"Air Damage: ", "atkSpd":"Attack Speed: ", "hp":"Health : ", "eDef":"Earth Defense: ", "tDef":"Thunder Defense: ", "wDef":"Water Defense: ", "fDef":"Fire Defense: ", "aDef":"Air Defense: ", "str":"Strength: ", "dex":"Dexterity: ", "int":"Intelligence: ", "def":"Defense: ","agi":"Agility: ", "hpBonus":"Health Bonus: ", "hprRaw":"Health Regen Raw: ", "hprPct":"Health Regen %: ", "sdRaw":"Raw Spell Damage: ", "sdPct":"Spell Damage %: ", "mdRaw":"Raw Melee Damage: ", "mdPct":"Melee Damage %: ", "mr":"Mana Regen: ", "ms":"Mana Steal: ", "ref":"Reflection: ", "ls":"Life Steal: ", "poison":"Poison: ", "thorns":"Thorns: ", "expd":"Exploding: ", "spd":"Walk Speed Bonus: ", "atkTier":"Attack Speed Bonus: ", "eDamPct":"Earth Damage %: ", "tDamPct":"Thunder Damage %: ", "wDamPct":"Water Damage %: ", "fDamPct":"Fire Damage %: ", "aDamPct":"Air Damage %: ", "eDefPct":"Earth Defense %: ", "tDefPct":"Thunder Defense %: ", "wDefPct":"Water Defense %: ", "fDefPct":"Fire Defense %: ", "aDefPct":"Air Defense %: ", "spPct1":"1st Spell Cost %: ", "spRaw1":"1st Spell Cost Raw: ", "spPct2":"2nd Spell Cost %: ", "spRaw2":"2nd Spell Cost Raw: ", "spPct3":"3rd Spell Cost %: ", "spRaw3":"3rd Spell Cost Raw: ", "spPct4":"4th Spell Cost %: ", "spRaw4":"4th Spell Cost Raw: ", "rainbowRaw":"Rainbow Spell Damage Raw: ", "sprint":"Sprint Bonus: ", "sprintReg":"Sprint Regen Bonus: ", "jh":"Jump Height: ", "xpb":"Combat XP Bonus: ", "lb":"Loot Bonus: ", "lq":"Loot Quality: ", "spRegen":"Soul Point Regen: ", "eSteal":"Stealing: ", "gXp":"Gathering XP Bonus: ", "gSpd":"Gathering Speed Bonus: ", "slots":"Powder Slots: ", "set":"Set: ", "quest":"Quest Req: ", "restrict":""}; -let idSuffixes = {"displayName": "", "lvl":"", "classReq":"","strReq":"","dexReq":"","intReq":"","defReq":"","agiReq":"", "nDam_":"", "eDam_":"", "tDam_":"", "wDam_":"", "fDam_":"", "aDam_":"", "atkSpd":"", "hp":"", "eDef":"", "tDef":"", "wDef":"", "fDef":"", "aDef":"", "str":"", "dex":"", "int":"", "def":"","agi":"", "hpBonus":"", "hprRaw":"", "hprPct":"%", "sdRaw":"", "sdPct":"%", "mdRaw":"", "mdPct":"%", "mr":"/4s", "ms":"/4s", "ref":"%", "ls":"/4s", "poison":"/3s", "thorns":"%", "expd":"%", "spd":"%", "atkTier":" tier", "eDamPct":"%", "tDamPct":"%", "wDamPct":"%", "fDamPct":"%", "aDamPct":"%", "eDefPct":"%", "tDefPct":"%", "wDefPct":"%", "fDefPct":"%", "aDefPct":"%", "spPct1":"%", "spRaw1":"", "spPct2":"%", "spRaw2":"", "spPct3":"%", "spRaw3":"", "spPct4":"%", "spRaw4":"", "rainbowRaw":"", "sprint":"%", "sprintReg":"%", "jh":"", "xpb":"%", "lb":"%", "lq":"%", "spRegen":"%", "eSteal":"%", "gXp":"%", "gSpd":"%", "slots":"", "set":" set.", "quest":"", "restrict":""}; +let idPrefixes = {"displayName": "", "lvl":"Combat Level Min: ", "classReq":"Class Req: ","strReq":"Strength Min: ","dexReq":"Dexterity Min: ","intReq":"Intelligence Min: ","defReq":"Defense Min: ","agiReq":"Agility Min: ", "nDam_":"Neutral Damage: ", "eDam_":"Earth Damage: ", "tDam_":"Thunder Damage: ", "wDam_":"Water Damage: ", "fDam_":"Fire Damage: ", "aDam_":"Air Damage: ", "atkSpd":"Attack Speed: ", "hp":"Health : ", "eDef":"Earth Defense: ", "tDef":"Thunder Defense: ", "wDef":"Water Defense: ", "fDef":"Fire Defense: ", "aDef":"Air Defense: ", "str":"Strength: ", "dex":"Dexterity: ", "int":"Intelligence: ", "def":"Defense: ","agi":"Agility: ", "hpBonus":"Health Bonus: ", "hprRaw":"Health Regen Raw: ", "hprPct":"Health Regen %: ", "sdRaw":"Raw Spell Damage: ", "sdPct":"Spell Damage %: ", "mdRaw":"Raw Melee Damage: ", "mdPct":"Melee Damage %: ", "mr":"Mana Regen: ", "ms":"Mana Steal: ", "ref":"Reflection: ", "ls":"Life Steal: ", "poison":"Poison: ", "thorns":"Thorns: ", "expd":"Exploding: ", "spd":"Walk Speed Bonus: ", "atkTier":"Attack Speed Bonus: ", "eDamPct":"Earth Damage %: ", "tDamPct":"Thunder Damage %: ", "wDamPct":"Water Damage %: ", "fDamPct":"Fire Damage %: ", "aDamPct":"Air Damage %: ", "eDefPct":"Earth Defense %: ", "tDefPct":"Thunder Defense %: ", "wDefPct":"Water Defense %: ", "fDefPct":"Fire Defense %: ", "aDefPct":"Air Defense %: ", "spPct1":"1st Spell Cost %: ", "spRaw1":"1st Spell Cost Raw: ", "spPct2":"2nd Spell Cost %: ", "spRaw2":"2nd Spell Cost Raw: ", "spPct3":"3rd Spell Cost %: ", "spRaw3":"3rd Spell Cost Raw: ", "spPct4":"4th Spell Cost %: ", "spRaw4":"4th Spell Cost Raw: ", "rainbowRaw":"Rainbow Spell Damage Raw: ", "sprint":"Sprint Bonus: ", "sprintReg":"Sprint Regen Bonus: ", "jh":"Jump Height: ", "xpb":"Combat XP Bonus: ", "lb":"Loot Bonus: ", "lq":"Loot Quality: ", "spRegen":"Soul Point Regen: ", "eSteal":"Stealing: ", "gXp":"Gathering XP Bonus: ", "gSpd":"Gathering Speed Bonus: ", "slots":"Powder Slots: ", "set":"Set: ", "quest":"Quest Req: ", "restrict":"", "lore": ""}; +let idSuffixes = {"displayName": "", "lvl":"", "classReq":"","strReq":"","dexReq":"","intReq":"","defReq":"","agiReq":"", "nDam_":"", "eDam_":"", "tDam_":"", "wDam_":"", "fDam_":"", "aDam_":"", "atkSpd":"", "hp":"", "eDef":"", "tDef":"", "wDef":"", "fDef":"", "aDef":"", "str":"", "dex":"", "int":"", "def":"","agi":"", "hpBonus":"", "hprRaw":"", "hprPct":"%", "sdRaw":"", "sdPct":"%", "mdRaw":"", "mdPct":"%", "mr":"/4s", "ms":"/4s", "ref":"%", "ls":"/4s", "poison":"/3s", "thorns":"%", "expd":"%", "spd":"%", "atkTier":" tier", "eDamPct":"%", "tDamPct":"%", "wDamPct":"%", "fDamPct":"%", "aDamPct":"%", "eDefPct":"%", "tDefPct":"%", "wDefPct":"%", "fDefPct":"%", "aDefPct":"%", "spPct1":"%", "spRaw1":"", "spPct2":"%", "spRaw2":"", "spPct3":"%", "spRaw3":"", "spPct4":"%", "spRaw4":"", "rainbowRaw":"", "sprint":"%", "sprintReg":"%", "jh":"", "xpb":"%", "lb":"%", "lq":"%", "spRegen":"%", "eSteal":"%", "gXp":"%", "gSpd":"%", "slots":"", "set":" set.", "quest":"", "restrict":"", "lore": ""}; //Used for ingredient IDs - name, lvl, tier. As of now, not used. /*let ingPrefixes = {"name": "", "lvl": "", "tier": ""}; let ingSuffixes = {"name": "", "lvl": "", "tier": ""}*/ @@ -504,6 +504,7 @@ function displayExpandedItem(item, parent_id){ "majorIds", "slots", "set", + "lore", "quest", "restrict" ]; @@ -536,7 +537,7 @@ function displayExpandedItem(item, parent_id){ // TODO: This is sooo incredibly janky..... if (command === "!elemental") { elemental_format = !elemental_format; - } + } } else { let id = command; //warp @@ -610,6 +611,8 @@ function displayExpandedItem(item, parent_id){ bckgrd.classList.add("itemp"); active_elem.appendChild(bckgrd); bckgrd.appendChild(img); + } else if (id === "lore") { + p_elem.style = "font-style: italic"; } else if (skp_order.includes(id)) { //id = str, dex, int, def, or agi if ( item.get("tier") !== "Crafted" && active_elem.nodeName === "DIV") { p_elem.textContent = ""; diff --git a/index.html b/index.html index e8e4cf8..a3418e3 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ - +