@@ -1215,29 +1218,29 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/crafter.html b/crafter.html
deleted file mode 100644
index 029b4c8..0000000
--- a/crafter.html
+++ /dev/null
@@ -1,229 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
WynnCrafter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
-
- |
-
-
- |
-
-
-
-
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/crafter/index.html b/crafter/index.html
new file mode 100644
index 0000000..be20acd
--- /dev/null
+++ b/crafter/index.html
@@ -0,0 +1,314 @@
+
+
+
+
WynnCrafter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attack Speed (Weapons Only)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/crafter/temp.html b/crafter/temp.html
new file mode 100644
index 0000000..e69de29
diff --git a/css/sidebar.css b/css/sidebar.css
new file mode 100644
index 0000000..1986cdb
--- /dev/null
+++ b/css/sidebar.css
@@ -0,0 +1,41 @@
+
+/* sidebar stuff */
+.sidebar {
+ height: 100%; /* 100% Full-height */
+ width: 3.5vw; /* 0 width - change this with JavaScript */
+ position: fixed; /* Stay in place */
+ top: 0;
+ left: 0;
+ overflow-x: hidden; /* Disable horizontal scroll */
+ transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */
+}
+
+.sidebar:hover {
+ width: 11vw;
+}
+
+.sidebar a {
+ padding: .4vw .4vw .4vw .4vw;
+ display: block;
+ color: white;
+ white-space: nowrap;
+ text-decoration: none;
+}
+
+.sidebar a img {
+ margin-right: .6vw;
+ width: 2.5vw;
+}
+
+.sidebar a b {
+ font-size: .85vw;
+}
+
+.sidebar a:hover {
+ background-color: hsl(0, 0%, 8%);
+ color: rgb(210, 210, 210);
+}
+
+@media screen and (max-width: 992px) {
+ .sidebar {display: none;}
+}
diff --git a/sq2bs.css b/css/sq2bs.css
similarity index 72%
rename from sq2bs.css
rename to css/sq2bs.css
index 8fad12d..91c449a 100644
--- a/sq2bs.css
+++ b/css/sq2bs.css
@@ -2,131 +2,13 @@
font-family: 'Nunito', sans-serif;
}
-/* sidebar stuff */
-.sidebar {
- height: 100%; /* 100% Full-height */
- width: 3.5vw; /* 0 width - change this with JavaScript */
- position: fixed; /* Stay in place */
- top: 0;
- left: 0;
- overflow-x: hidden; /* Disable horizontal scroll */
- transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */
-}
-
-.sidebar:hover {
- width: 11vw;
-}
-
-.sidebar a {
- padding: .4vw .4vw .4vw .4vw;
- display: block;
- color: white;
- white-space: nowrap;
- text-decoration: none;
-}
-
-.sidebar a img {
- margin-right: .6vw;
- width: 2.5vw;
-}
-
-.sidebar a b {
- font-size: .8vw;
-}
-
-.sidebar a:hover {
- background-color: hsl(0, 0%, 8%);
- color: rgb(210, 210, 210);
-}
-
-@media screen and (max-width: 992px) {
- .sidebar {display: none;}
+#body {
+ background-color: #121212;
}
/* builder containers */
-/* wynn-related css(es) */
-.positive {
- color: #5f5;
-}
-.negative {
- color: #f55;
-}
-
-.Health {
- color: #AA0000
-}
-
-.Health:before {
- content: "\2764" ' ';
-}
-
-.lvl:before {
- content: 'Lv. '
-}
-
-.Damage {
- color: rgb(255, 198, 85)
-}
-
-.Normal {
- color: #FFFFFF !important;
-}
-
-.Unique {
- color: #FFFF55 !important;
-}
-
-.Rare {
- color: #FF55FF !important;
-}
-
-.Legendary {
- color: #55FFFF !important;
-}
-
-.Fabled {
- color: #FF5555 !important;
-}
-
-.Mythic {
- color: #AA00AA !important;
-}
-
-.Set {
- color: #5f5 !important;
-}
-
-.eDam, .Earth, .Earth_powder {
- color: #00AA00;
-}
-
-.eDam:before, .Earth:before, .Earth_powder:before { content: "\2724" ' '; }
-
-.tDam, .Thunder, .Thunder_powder {
- color: #FFFF55;
-}
-
-.tDam:before, .Thunder:before, .Thunder_powder:before { content: "\2726" ' '; }
-
-.wDam, .Water, .Water_powder {
- color: #55FFFF
-}
-
-.wDam:before, .Water:before, .Water_powder:before { content: "\2749" ' '; }
-
-.fDam, .Fire, .Fire_powder {
- color: #FF5555;
-}
-
-.fDam:before, .Fire:before, .Fire_powder:before { content: "\2739" ' '; }
-
-.aDam, .Air, .Air_powder {
- color: #FFFFFF
-}
-
-.aDam:before, .Air:before, .Air_powder:before { content: "\274b" ' '; }
.e_slider, .t_slider, .w_slider, .f_slider, .a_slider {
-webkit-appearance: none;
@@ -168,23 +50,6 @@ input[type=range]:focus {
}
-.nDam, .Neutral {
- color: #FFAA00;
-}
-
-.nDam:before, .Neutral:before {
- content: "\2724" ' ';
-}
-
-
-.Mana {
- color: #5ff;
-}
-
-.Mana:after {
- content: "\273A"
-}
-
/* equipment field specifics */
/* inputs and dropdowns */
.form-control {
@@ -215,10 +80,11 @@ li.search-item:hover {
background-color: rgba(255, 255, 255, .1);
}
-.toggleOn {
+button.toggleOn {
background-color: #0a0 !important;
}
+
/* floating tooltip styles */
.float-tooltip {
background-color: hsl(0, 0%, 16%);
@@ -466,6 +332,11 @@ input.equipment-input {
background-color: hsl(0, 0%, 16%);
}
+.border-dark-7 {
+ border-color:hsl(0, 0%, 14%) !important;
+}
+
+/* BOX SHADOW STYLES */
.dark-shadow {
box-shadow: 0rem 0rem 0.5rem 0.075rem black;
}
@@ -474,6 +345,7 @@ input.equipment-input {
box-shadow: 0rem 0rem 0.25rem 0.05rem black;
}
-.border-dark-7 {
- border-color:hsl(0, 0%, 14%) !important;
+.box-title {
+ text-align: center;
+ font-size: 1.25rem;
}
\ No newline at end of file
diff --git a/css/styles.css b/css/styles.css
index 186237f..2fabe8c 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -356,43 +356,6 @@ input {
::placeholder{
color: #aaa;
}
-/* Tier colors tier colors */
-.none {
- color: #aaa;
-}
-.lore {
- color: #555;
-}
-.Normal{
- color: #fff;
-}
-.Unique{
- color:#ff5;
-}
-.Rare{
- color:#f5f;
-}
-.Legendary{
- color:#5ff;
-}
-.Fabled{
- color:#f55;
-}
-.Mythic{
- color:#a0a;
-}
-.Crafted {
- color: #0aa;
-}
-.Custom {
- color: #0aa;
-}
-.Set{
- color:#5f5;
-}
-.restrict, .warning {
- color: #ff8180;
-}
button.toggleOn{
background-color:#0a0;
@@ -411,40 +374,11 @@ button.toggleOn:hover {
}
-.Star {
- color:rgb(255, 198, 85);
-}
-.Star:after {
- content: "\272B";
-}
.externalBuffs {
width: 100%;
}
-.T0 {
- color: #555;
-}
-.T1 {
- color: #ff5;
-}
-.T2 {
- color: #f5f;
-}
-.T3 {
- color: #5ff;
-}
-.T0-bracket {
- color: #555;
-}
-.T1-bracket {
- color: #fa0;
-}
-.T2-bracket {
- color: #a0a;
-}
-.T3-bracket {
- color: #0aa;
-}
+
.hide-container-block, .hide-container-grid, .set-info-div, .fade-in {
animation-duration: 0.5s;
animation-name: fadeInFromNone;
diff --git a/css/wynnstyles.css b/css/wynnstyles.css
new file mode 100644
index 0000000..4c207b5
--- /dev/null
+++ b/css/wynnstyles.css
@@ -0,0 +1,175 @@
+/*
+Wynn-Related CSS
+*/
+
+
+
+/* Misc/Util Colors */
+.positive {
+ color: #5f5;
+}
+
+.negative {
+ color: #f55;
+}
+
+.Health {
+ color: #AA0000
+}
+
+.Health:before {
+ content: "\2764" ' ';
+}
+
+.Mana {
+ color: #5ff;
+}
+
+.Mana:after {
+ content: "\273A"
+}
+
+.lvl:before {
+ content: 'Lv. '
+}
+
+
+/* Tier Colors */
+
+.Normal {
+ color: #FFFFFF !important;
+}
+
+.Unique {
+ color: #FFFF55 !important;
+}
+
+.Rare {
+ color: #FF55FF !important;
+}
+
+.Legendary {
+ color: #55FFFF !important;
+}
+
+.Fabled {
+ color: #FF5555 !important;
+}
+
+.Mythic {
+ color: #AA00AA !important;
+}
+
+.Set {
+ color: #5f5 !important;
+}
+.Crafted, .Custom {
+ color: #0aa !important;
+}
+
+/* Tier Shadows */
+.Normal-shadow {
+ box-shadow: 0rem 0rem 0.25rem 0.05rem #fff;
+}
+
+.Unique-shadow {
+ box-shadow: 0rem 0rem 0.25rem 0.05rem #ff5;
+}
+.Rare-shadow {
+ box-shadow: 0rem 0rem 0.25rem 0.05rem #f5f;
+}
+.Legendary-shadow {
+ box-shadow: 0rem 0rem 0.25rem 0.05rem #5ff;
+}
+.Fabled-shadow {
+ box-shadow: 0rem 0rem 0.25rem 0.05rem #f55;
+}
+.Mythic-shadow {
+ box-shadow: 0rem 0rem 0.25rem 0.05rem #a0a;
+}
+.Crafted-shadow {
+ box-shadow: 0rem 0rem 0.25rem 0.05rem #0aa;
+}
+.Custom-shadow {
+ box-shadow: 0rem 0rem 0.25rem 0.05rem #0aa;
+}
+.Set-shadow {
+ box-shadow: 0rem 0rem 0.25rem 0.05rem #5f5;
+}
+
+/* CR Styles */
+
+.Star {
+ color:rgb(255, 198, 85);
+}
+.Star:after {
+ content: "\272B";
+}
+.T0 {
+ color: #555;
+}
+.T1 {
+ color: #ff5;
+}
+.T2 {
+ color: #f5f;
+}
+.T3 {
+ color: #5ff;
+}
+.T0-bracket {
+ color: #555;
+}
+.T1-bracket {
+ color: #fa0;
+}
+.T2-bracket {
+ color: #a0a;
+}
+.T3-bracket {
+ color: #0aa;
+}
+
+/* Damages */
+
+.Damage {
+ color: rgb(255, 198, 85)
+}
+
+.nDam, .Neutral {
+ color: #FFAA00;
+}
+
+.nDam:before, .Neutral:before {
+ content: "\2724" ' ';
+}
+
+.eDam, .Earth, .Earth_powder {
+ color: #00AA00;
+}
+
+.eDam:before, .Earth:before, .Earth_powder:before { content: "\2724" ' '; }
+
+.tDam, .Thunder, .Thunder_powder {
+ color: #FFFF55;
+}
+
+.tDam:before, .Thunder:before, .Thunder_powder:before { content: "\2726" ' '; }
+
+.wDam, .Water, .Water_powder {
+ color: #55FFFF
+}
+
+.wDam:before, .Water:before, .Water_powder:before { content: "\2749" ' '; }
+
+.fDam, .Fire, .Fire_powder {
+ color: #FF5555;
+}
+
+.fDam:before, .Fire:before, .Fire_powder:before { content: "\2739" ' '; }
+
+.aDam, .Air, .Air_powder {
+ color: #FFFFFF
+}
+
+.aDam:before, .Air:before, .Air_powder:before { content: "\274b" ' '; }
\ No newline at end of file
diff --git a/index.html b/index.html
index fa75fc6..0f2a215 100644
--- a/index.html
+++ b/index.html
@@ -1,1031 +1,3 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
WynnBuilder
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
- |
-
-
-
- |
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
- Manually Assigned: 0
-
-
- Original Value: 0
-
-
-
-
-
-
-
-
-
-
- Manually Assigned: 0
-
-
- Original Value: 0
-
-
-
-
-
-
-
-
-
-
- Manually Assigned: 0
-
-
- Original Value: 0
-
-
-
-
-
-
-
-
-
-
- Manually Assigned: 0
-
-
- Original Value: 0
-
-
-
-
-
-
-
-
-
-
- Manually Assigned: 0
-
-
- Original Value: 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Damage values:
- |
-
-
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
- Defense values:
- |
-
-
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
- Utility values:
- |
-
-
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
- Original Value: 0
-
-
-
- |
-
-
-
-
-
-
-
-
-
- Spell Boosts & Powder Specials:
-
-
-
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
-
-
-
-
-
-
- Quake
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Chain Lightning
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Curse
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Courage
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Wind Prison
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/js/atlas.js b/js/atlas.js
index 5bba6a3..7724c93 100644
--- a/js/atlas.js
+++ b/js/atlas.js
@@ -6,25 +6,33 @@ function setTitle() {
}
setTitle();
-const flavortexts = ["JALA?? \n ATLAS?? \n ANYONE??",
- "this really do be a bruh moment.",
- "OH, LOOK AT YOU. YOU FOUND THE FUNNY BUILDER GUILDER MEME PAGE. AREN'T YOU PROUD OF YOURSELF?",
- "Downloading Atlas Inc Virus 2.0...",
- "Any WynnBuilders in the chat?",
- ":sunglaso:",
- "This says a lot about our society.",
- "WynnCraft is overrated. Stay on this page forever!",
- "Now trading Smash invite letters for Atlas Inc invites!",
- "You have reached the customer support page of Wynnbuilder. Please call [REDACTED] to get your problems solved!",
- "",
- "Isn't this like that one game Amogus?",
- "Mom, what does 'hppeng' mean?",
- "hpgbegg",
- "| |I || |_",
- "",
- ];
+const flavortexts = [
+ "JALA?? \n ATLAS?? \n ANYONE??",
+ "this really do be a bruh moment.",
+ "OH, LOOK AT YOU. YOU FOUND THE FUNNY BUILDER GUILDER MEME PAGE. AREN'T YOU PROUD OF YOURSELF?",
+ "Downloading Atlas Inc Virus 2.0...",
+ "Any WynnBuilders in the chat?",
+ ":sunglaso:",
+ "This says a lot about our society.",
+ "WynnCraft is overrated. Stay on this page forever!",
+ "Now trading Smash invite letters for Atlas Inc invites!",
+ "You have reached the customer support page of Wynnbuilder. Please call [REDACTED] to get your problems solved!",
+ "Mom, what does 'hppeng' mean?",
+ "hpgbegg",
+ "| |I || |_",
+ "Wynn was so good they made Wynn 2",
+ "Join Monumenta today!",
+ "do NOT look up the 25th largest island of Greece",
+ "whatever you do, don't search for lego piece 26047.",
+ "guys what does perbromic acid look like",
+ "Hello Chat",
+ "Goodbye Chat",
+ "Look up. Now look down. Now look up again. Spin your head 3 times clockwise. You look real silly.",
+ "There\'s \'guillble\' written on the ceiling",
+ "when the pretender is conspicuous...",
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"];
const dt = 10; //millis
-const PIX_PER_SEC = 1000;
+const PIX_PER_SEC = 1337;
const EPSILON = 1E-7 * dt;
let atli = [];
@@ -32,11 +40,13 @@ let atli = [];
function atlasClick() {
let atlas = document.createElement("div");
let atlas_img = document.createElement("img");
- atlas_img.src = "favicon.png";
+ atlas.style.maxWidth = "64px";
+ atlas.style.maxHeight = "64px";
+ atlas_img.src = "../atlas/favicon.png";
atlas_img.style.width = "100%";
atlas_img.style.height = "100%";
- atlas_img.style.maxWidth = "48px";
- atlas_img.style.maxHeight = "48px";
+ atlas_img.style.maxWidth = "64px";
+ atlas_img.style.maxHeight = "64px";
atlas_img.style.zIndex = 1;
atlas.classList.add("atlas");
let roll = Math.random();
@@ -44,7 +54,7 @@ function atlasClick() {
let rollList = ["lmoa","doom","agony","enraged","sunglaso","thonk","unglaso"];
for (let i = rollList.length-1; i > -1; i--) {
if (roll < (i+1) * rollchance) {
- atlas_img.src = "./media/memes/" + rollList[i] + ".png";
+ atlas_img.src = "../media/memes/" + rollList[i] + ".png";
}
}
atlas.appendChild(atlas_img);
@@ -52,7 +62,8 @@ function atlasClick() {
atlas.style.position = "absolute";
rect = document.getElementById("bodydiv").getBoundingClientRect(); //use rect.top, rect.left, rect.bottom, and rect.top
-
+ console.log(rect)
+
atlasrect = atlas.getBoundingClientRect();
atlas.style.left = Math.floor((rect.right - rect.left - 2*(atlasrect.right - atlasrect.left) ) * Math.random() + rect.left + (atlasrect.right - atlasrect.left) )+ "px";
atlas.style.top = Math.floor((rect.bottom - rect.top - 2*(atlasrect.bottom - atlasrect.top) ) * Math.random() + rect.top + (atlasrect.bottom - atlasrect.top) ) + "px";
diff --git a/js/crafter.js b/js/crafter.js
index aa8ac3c..8cda770 100644
--- a/js/crafter.js
+++ b/js/crafter.js
@@ -22,10 +22,10 @@ const ING_BUILD_VERSION = "7.0.1";
*/
let player_craft;
-function setTitle() {
- document.getElementById("header").textContent = "WynnCrafter version "+ING_BUILD_VERSION+" (ingredient db version "+ING_DB_VERSION+")";
- document.getElementById("header").classList.add("funnynumber");
-}
+// function setTitle() {
+// document.getElementById("header").textContent = "WynnCrafter version "+ING_BUILD_VERSION+" (ingredient db version "+ING_DB_VERSION+")";
+// document.getElementById("header").classList.add("funnynumber");
+// }
@@ -51,7 +51,6 @@ function init_crafter() {
populateFields();
decodeCraft(ing_url_tag);
- setTitle();
} catch (error) {
console.log("If you are seeing this while building, do not worry. Oherwise, panic! (jk contact ferricles)");
console.log(error);
@@ -117,7 +116,8 @@ function calculateCraft() {
}
let ingreds = [];
for (i = 1; i < 7; i++) {
- console.log(getValue("ing-choice-"+i));
+ console.log("ing-choice-"+i);
+ // console.log(getValue("ing-choice-"+i));
getValue("ing-choice-" + i) === "" ? ingreds.push(expandIngredient(ingMap.get("No Ingredient"))) : ingreds.push(expandIngredient(ingMap.get(getValue("ing-choice-" + i))));
}
let atkSpd = "NORMAL"; //default attack speed will be normal.
@@ -138,19 +138,21 @@ function calculateCraft() {
console.log(levelrange)
console.log(mat_tiers)
console.log(ingreds)*/
+
document.getElementById("mat-1").textContent = recipe.get("materials")[0].get("item").split(" ").slice(1).join(" ") + " Tier:";
document.getElementById("mat-2").textContent = recipe.get("materials")[1].get("item").split(" ").slice(1).join(" ") + " Tier:";
//Display Recipe Stats
- displayRecipeStats(player_craft, "recipe-stats");
- for(let i = 0; i < 6; i++) {
- displayExpandedIngredient(player_craft["ingreds"][i],"tooltip-" + i);
- }
+ displaysq2RecipeStats(player_craft, "recipe-stats");
+
//Display Craft Stats
- displayCraftStats(player_craft, "craft-stats");
+ // displayCraftStats(player_craft, "craft-stats");
+ let mock_item = player_craft.statMap;
+ displaysq2ExpandedItem(mock_item, "craft-stats");
+
//Display Ingredients' Stats
for (let i = 1; i < 7; i++) {
- displayExpandedIngredient(player_craft.ingreds[i-1] , "ing-"+i+"-stats");
+ displaysq2ExpandedIngredient(player_craft.ingreds[i-1] , "ing-"+i+"-stats");
}
//Display Warnings - only ingred type warnings for now
let warning_elem = document.getElementById("craft-warnings");
diff --git a/js/display.js b/js/display.js
index 08732eb..c4882aa 100644
--- a/js/display.js
+++ b/js/display.js
@@ -519,7 +519,7 @@ function displayExpandedItem(item, parent_id){
active_elem.appendChild(p_elem);
let img = document.createElement("img");
if (item && item.has("type")) {
- img.src = "./media/items/" + (newIcons ? "new/":"old/") + "generic-" + item.get("type") + ".png";
+ img.src = "../media/items/" + (newIcons ? "new/":"old/") + "generic-" + item.get("type") + ".png";
img.alt = item.get("type");
img.style = " z=index: 1;max-width: 64px; max-height: 64px; position: relative; top: 50%; transform: translateY(-50%);";
let bckgrd = document.createElement("p");
diff --git a/sq2bs.js b/js/sq2bs.js
similarity index 97%
rename from sq2bs.js
rename to js/sq2bs.js
index 793fa43..c9df44b 100644
--- a/sq2bs.js
+++ b/js/sq2bs.js
@@ -107,7 +107,8 @@ function doSearchSchedule(){
function update_field(field) {
// built on the assumption of no one will type in CI/CR letter by letter
// resets
- document.querySelector("#"+field+"-choice").classList.remove("text-light", "is-invalid", 'Normal', 'Unique', 'Rare', 'Legendary', 'Fabled', 'Mythic', 'Set');
+ document.querySelector("#"+field+"-choice").classList.remove("text-light", "is-invalid", 'Normal', 'Unique', 'Rare', 'Legendary', 'Fabled', 'Mythic', 'Set', 'Crafted', 'Custom');
+ document.querySelector("#" + field + "-img").classList.remove('Normal-shadow', 'Unique-shadow', 'Rare-shadow', 'Legendary-shadow', 'Fabled-shadow', 'Mythic-shadow', 'Set-shadow', 'Crafted-shadow', 'Custom-shadow');
item = document.querySelector("#"+field+"-choice").value
let powder_slots;
@@ -160,6 +161,8 @@ function update_field(field) {
// set item color
document.querySelector("#"+field+"-choice").classList.add(tier);
+ document.querySelector("#"+field+"-img").classList.add(tier + "-shadow");
+
if (powderable_keys.includes(field)) {
@@ -175,9 +178,11 @@ function update_field(field) {
// set weapon img
if (category == 'weapon') {
- document.querySelector("#weapon-img").setAttribute('src', 'media/items/new/generic-'+type+'.png');
+ document.querySelector("#weapon-img").setAttribute('src', '../media/items/new/generic-'+type+'.png');
}
+
+
// call calc build
}
/* tabulars | man i hate this code but too lazy to fix /shrug */
@@ -402,4 +407,5 @@ function init_autocomplete() {
}
}));
}
-}
\ No newline at end of file
+}
+
diff --git a/sq2build.js b/js/sq2build.js
similarity index 100%
rename from sq2build.js
rename to js/sq2build.js
diff --git a/sq2builder.js b/js/sq2builder.js
similarity index 100%
rename from sq2builder.js
rename to js/sq2builder.js
diff --git a/sq2display.js b/js/sq2display.js
similarity index 83%
rename from sq2display.js
rename to js/sq2display.js
index 82b9b72..7594de9 100644
--- a/sq2display.js
+++ b/js/sq2display.js
@@ -238,7 +238,7 @@ function displaysq2ExpandedItem(item, parent_id){
}
} else if (id === "lvl" && item.get("tier") === "Crafted") {
let p_elem = document.createElement("div");
- p_elems.classList.add("col");
+ p_elem.classList.add("col");
p_elem.textContent = "Combat Level Min: " + item.get("lvlLow") + "-" + item.get(id);
parent_div.appendChild(p_elem);
} else if (id === "displayName") {
@@ -275,7 +275,7 @@ function displaysq2ExpandedItem(item, parent_id){
let img = document.createElement("img");
if (item && item.has("type")) {
- img.src = "./media/items/" + (newIcons ? "new/":"old/") + "generic-" + item.get("type") + ".png";
+ img.src = "../media/items/" + (newIcons ? "new/":"old/") + "generic-" + item.get("type") + ".png";
img.alt = item.get("type");
img.style = " z=index: 1; position: relative;";
let container = document.createElement("div");
@@ -561,7 +561,7 @@ function displaysq2WeaponStats(build) {
document.getElementById("weapon-lv").textContent = item.get("lvl");
if (item.get("type")) {
- document.getElementById("weapon-img").src = "./media/items/" + (newIcons ? "new/":"old/") + "generic-" + item.get("type") + ".png";
+ document.getElementById("weapon-img").src = "../media/items/" + (newIcons ? "new/":"old/") + "generic-" + item.get("type") + ".png";
}
}
@@ -1531,5 +1531,353 @@ function updatePowders(elem_id) {
// elem.value = elem.value.substring(0, i) + powder_chars['etwfa'.indexOf(elem.value.charAt(i))] + elem.value.substring(i + 2);
// }
// }
+}
+
+/*
+* Displays stats about a recipe that are NOT displayed in the craft stats.
+* Includes: mat name and amounts, ingred names in an "array" with ingred effectiveness
+*/
+function displaysq2RecipeStats(craft, parent_id) {
+ let elem = document.getElementById(parent_id);
+ if (!elem.classList.contains("col")) {
+ elem.classList.add("col");
+ }
+
+ //local vars
+ elem.textContent = "";
+ recipe = craft["recipe"];
+ mat_tiers = craft["mat_tiers"];
+ ingreds = [];
+ for (const n of craft["ingreds"]) {
+ ingreds.push(n.get("name"));
+ }
+ let effectiveness = craft["statMap"].get("ingredEffectiveness");
+
+ let title = document.createElement("div");
+ title.classList.add("row", "box-title", "fw-bold", "justify-content-center");
+ title.textContent = "Recipe Stats";
+ elem.appendChild(title);
+
+ let mats = document.createElement("div");
+ mats.classList.add("row");
+ mats.textContent = "Crafting Materials: ";
+ elem.appendChild(mats);
+
+ for (let i = 0; i < 2; i++) {
+ let tier = mat_tiers[i];
+ let row = document.createElement("div");
+ row.classList.add("row", "px-0", "mx-0");
+ let b = document.createElement("div");
+ let mat = recipe.get("materials")[i];
+ b.textContent = "- " + mat.get("amount") + "x " + mat.get("item").split(" ").slice(1).join(" ");
+ b.classList.add("col");
+ row.appendChild(b);
+
+ let starsB = document.createElement("div");
+ starsB.classList.add("T1-bracket", "col-auto", "px-0");
+ starsB.textContent = "[";
+ row.appendChild(starsB);
+ for(let j = 0; j < 3; j ++) {
+ let star = document.createElement("div");
+ star.classList.add("col-auto", "px-0");
+ star.textContent = "\u272B";
+ if(j < tier) {
+ star.classList.add("T1");
+ } else {
+ star.classList.add("T0");
+ }
+ row.append(star);
+ }
+ let starsE = document.createElement("div");
+ starsE.classList.add("T1-bracket", "col-auto", "px-0");
+ starsE.textContent = "]";
+ row.appendChild(starsE);
+
+ elem.appendChild(row);
+ }
+
+ let ingredTable = document.createElement("div");
+ ingredTable.classList.add("row");
+
+ for (let i = 0; i < 3; i++) {
+ let row = document.createElement("div");
+ row.classList.add("row", "g-1", "justify-content-center");
+
+
+ for (let j = 0; j < 2; j++) {
+ if (j == 1) {
+ let spacer = document.createElement("div");
+ spacer.classList.add("col-1");
+ row.appendChild(spacer);
+ }
+ let ingredName = ingreds[2 * i + j];
+ let col = document.createElement("div");
+ col.classList.add("col-5", "rounded", "dark-6", "border", "border-3", "dark-shadow");
+
+ let temp_row = document.createElement("div");
+ temp_row.classList.add("row");
+ col.appendChild(temp_row);
+
+ let ingred_div = document.createElement("div");
+ ingred_div.classList.add("col");
+ ingred_div.textContent = ingredName;
+ temp_row.appendChild(ingred_div);
+
+ let eff_div = document.createElement("div");
+ eff_div.classList.add("col-auto");
+ let e = effectiveness[2 * i + j];
+ if (e > 0) {
+ eff_div.classList.add("positive");
+ } else if (e < 0) {
+ eff_div.classList.add("negative");
+ }
+ eff_div.textContent = "[" + e + "%]";
+
+ temp_row.appendChild(eff_div);
+
+ row.appendChild(col);
+ }
+ ingredTable.appendChild(row);
+ }
+ elem.appendChild(ingredTable);
+}
+
+/*
+* Displays an ingredient in item format.
+* However, an ingredient is too far from a normal item to display as one.
+*/
+function displaysq2ExpandedIngredient(ingred, parent_id) {
+ let parent_elem = document.getElementById(parent_id);
+ parent_elem.textContent = "";
+ let item_order = [
+ "dura",
+ "strReq",
+ "dexReq",
+ "intReq",
+ "defReq",
+ "agiReq"
+ ]
+ let consumable_order = [
+ "dura",
+ "charges"
+ ]
+ let posMods_order = [
+ "above",
+ "under",
+ "left",
+ "right",
+ "touching",
+ "notTouching"
+ ];
+ let id_display_order = [
+ "eDefPct",
+ "tDefPct",
+ "wDefPct",
+ "fDefPct",
+ "aDefPct",
+ "eDamPct",
+ "tDamPct",
+ "wDamPct",
+ "fDamPct",
+ "aDamPct",
+ "str",
+ "dex",
+ "int",
+ "agi",
+ "def",
+ "hpBonus",
+ "mr",
+ "ms",
+ "ls",
+ "hprRaw",
+ "hprPct",
+ "sdRaw",
+ "sdPct",
+ "mdRaw",
+ "mdPct",
+ "xpb",
+ "lb",
+ "lq",
+ "ref",
+ "thorns",
+ "expd",
+ "spd",
+ "atkTier",
+ "poison",
+ "spRegen",
+ "eSteal",
+ "spRaw1",
+ "spRaw2",
+ "spRaw3",
+ "spRaw4",
+ "spPct1",
+ "spPct2",
+ "spPct3",
+ "spPct4",
+ "jh",
+ "sprint",
+ "sprintReg",
+ "gXp",
+ "gSpd",
+ ];
+ let active_elem;
+ let elemental_format = false;
+ let style;
+ for (const command of sq2_ing_display_order) {
+ if (command.charAt(0) === "!") {
+ // TODO: This is sooo incredibly janky.....
+ if (command === "!elemental") {
+ elemental_format = !elemental_format;
+ }
+ else if (command === "!spacer") {
+ let spacer = document.createElement('div');
+ spacer.classList.add("row", "my-2");
+ parent_elem.appendChild(spacer);
+ continue;
+ }
+ } else {
+ let div = document.createElement("div");
+ div.classList.add("row");
+ if (command === "displayName") {
+ div.classList.add("box-title");
+ let title_elem = document.createElement("div");
+ title_elem.classList.add("col-auto", "justify-content-center", "pr-1");
+ title_elem.textContent = ingred.get("displayName");
+ div.appendChild(title_elem);
+
+ let tier = ingred.get("tier"); //tier in [0,3]
+ let begin = document.createElement("b");
+ begin.classList.add("T"+tier+"-bracket", "col-auto", "px-0");
+ begin.textContent = "[";
+ div.appendChild(begin);
+
+ for (let i = 0; i < 3; i++) {
+ let tier_elem = document.createElement("b");
+ if (i < tier) {
+ tier_elem.classList.add("T"+tier);
+ } else {
+ tier_elem.classList.add("T0");
+ }
+ tier_elem.classList.add("px-0", "col-auto");
+ tier_elem.textContent = "\u272B";
+ div.appendChild(tier_elem);
+ }
+ let end = document.createElement("b");
+ end.classList.add("T"+tier+"-bracket", "px-0", "col-auto");
+ end.textContent = "]";
+ div.appendChild(end);
+ }else if (command === "lvl") {
+ div.textContent = "Crafting Lvl Min: " + ingred.get("lvl");
+ }else if (command === "posMods") {
+ for (const [key,value] of ingred.get("posMods")) {
+ let posModRow = document.createElement("div");
+ posModRow.classList.add("row");
+ if (value != 0) {
+ let posMod = document.createElement("div");
+ posMod.classList.add("col-auto");
+ posMod.textContent = posModPrefixes[key];
+ posModRow.appendChild(posMod);
+
+ let val = document.createElement("div");
+ val.classList.add("col-auto", "px-0");
+ val.textContent = value + posModSuffixes[key];
+ if(value > 0) {
+ val.classList.add("positive");
+ } else {
+ val.classList.add("negative");
+ }
+ posModRow.appendChild(val);
+ div.appendChild(posModRow);
+ }
+ }
+ } else if (command === "itemIDs") { //dura, reqs
+ for (const [key,value] of ingred.get("itemIDs")) {
+ let idRow = document.createElement("div");
+ idRow.classList.add("row");
+ if (value != 0) {
+ let title = document.createElement("div");
+ title.classList.add("col-auto");
+ title.textContent = itemIDPrefixes[key];
+ idRow.appendChild(title);
+ }
+ let desc = document.createElement("div");
+ desc.classList.add("col-auto");
+ if(value > 0) {
+ if(key !== "dura") {
+ desc.classList.add("negative");
+ } else{
+ desc.classList.add("positive");
+ }
+ desc.textContent = "+"+value;
+ } else if (value < 0){
+ if(key !== "dura") {
+ desc.classList.add("positive");
+ } else{
+ desc.classList.add("negative");
+ }
+ desc.textContent = value;
+ }
+ if(value != 0){
+ idRow.appendChild(desc);
+ }
+ div.appendChild(idRow);
+ }
+ } else if (command === "consumableIDs") { //dura, charges
+ for (const [key,value] of ingred.get("consumableIDs")) {
+ let idRow = document.createElement("div");
+ idRow.classList.add("row");
+ if (value != 0) {
+ let title = document.createElement("div");
+ title.classList.add("col-auto");
+ title.textContent = consumableIDPrefixes[key];
+ idRow.appendChild(title);
+ }
+ let desc = document.createElement("div");
+ desc.classList.add("col-auto");
+ if(value > 0) {
+ desc.classList.add("positive");
+ desc.textContent = "+"+value;
+ } else if (value < 0){
+ desc.classList.add("negative");
+ desc.textContent = value;
+ }
+ if(value != 0){
+ idRow.appendChild(desc);
+ let suffix = document.createElement("div");
+ suffix.classList.add("col-auto");
+ suffix.textContent = consumableIDSuffixes[key];
+ idRow.appendChild(suffix);
+ }
+ div.appendChild(idRow);
+ }
+ }else if (command === "skills") {
+ let row = document.createElement("div");
+ row.classList.add("row");
+ let title = document.createElement("div");
+ title.classList.add("row");
+ title.textContent = "Used in:";
+ row.appendChild(title);
+ for(const skill of ingred.get("skills")) {
+ let skill_div = document.createElement("div");
+ skill_div.classList.add("row");
+ skill_div.textContent = skill.charAt(0) + skill.substring(1).toLowerCase();
+ row.appendChild(skill_div);
+ }
+ div.appendChild(row);
+ } else if (command === "ids") { //warp
+ for (let [key,value] of ingred.get("ids").get("maxRolls")) {
+ if (value !== undefined && value != 0) {
+ let row = displaysq2RolledID(ingred.get("ids"), key, elemental_format);
+ row.classList.remove("col");
+ row.classList.remove("col-12");
+ div.appendChild(row);
+ }
+ }
+ } else {//this shouldn't be happening
+ }
+
+ parent_elem.appendChild(div);
+ }
+ }
}
\ No newline at end of file
diff --git a/sq2display_constants.js b/js/sq2display_constants.js
similarity index 92%
rename from sq2display_constants.js
rename to js/sq2display_constants.js
index 73106c0..aa45706 100644
--- a/sq2display_constants.js
+++ b/js/sq2display_constants.js
@@ -145,4 +145,15 @@ let sq2_item_display_commands = [
"restrict"
];
-
+let sq2_ing_display_order = [
+ "displayName", //tier will be displayed w/ name
+ "!spacer",
+ "ids",
+ "!spacer",
+ "posMods",
+ "itemIDs",
+ "consumableIDs",
+ "!spacer",
+ "lvl",
+ "skills",
+]
\ No newline at end of file
diff --git a/sq2icons.js b/js/sq2icons.js
similarity index 100%
rename from sq2icons.js
rename to js/sq2icons.js
diff --git a/sq2items.js b/js/sq2items.js
similarity index 100%
rename from sq2items.js
rename to js/sq2items.js
diff --git a/js/utils.js b/js/utils.js
index 0428d2f..bdac748 100644
--- a/js/utils.js
+++ b/js/utils.js
@@ -381,6 +381,6 @@ async function hardReload() {
const dbs = await window.indexedDB.databases();
await dbs.forEach(db => { window.indexedDB.deleteDatabase(db.name) });
- location.reload();
+ location.reload(true);
}
diff --git a/sq2.css b/sq2/sq2.css
similarity index 100%
rename from sq2.css
rename to sq2/sq2.css
diff --git a/sq2.html b/sq2/sq2.html
similarity index 98%
rename from sq2.html
rename to sq2/sq2.html
index 59f2aa2..4d4d430 100644
--- a/sq2.html
+++ b/sq2/sq2.html
@@ -1129,27 +1129,25 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
-
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sq2.js b/sq2/sq2.js
similarity index 100%
rename from sq2.js
rename to sq2/sq2.js