diff --git a/DV/dv0.jpg b/DV/dv0.jpg new file mode 100644 index 0000000..5fe73f1 Binary files /dev/null and b/DV/dv0.jpg differ diff --git a/DV/dv1.jpg b/DV/dv1.jpg new file mode 100644 index 0000000..b8c0aaf Binary files /dev/null and b/DV/dv1.jpg differ diff --git a/DV/dv10.jpg b/DV/dv10.jpg new file mode 100644 index 0000000..ba495d8 Binary files /dev/null and b/DV/dv10.jpg differ diff --git a/DV/dv11.jpg b/DV/dv11.jpg new file mode 100644 index 0000000..057163a Binary files /dev/null and b/DV/dv11.jpg differ diff --git a/DV/dv15.jpg b/DV/dv15.jpg new file mode 100644 index 0000000..57eaa24 Binary files /dev/null and b/DV/dv15.jpg differ diff --git a/DV/dv16.jpg b/DV/dv16.jpg new file mode 100644 index 0000000..7f52909 Binary files /dev/null and b/DV/dv16.jpg differ diff --git a/DV/dv17.jpg b/DV/dv17.jpg new file mode 100644 index 0000000..0318e6f Binary files /dev/null and b/DV/dv17.jpg differ diff --git a/DV/dv18.jpg b/DV/dv18.jpg new file mode 100644 index 0000000..56f30ee Binary files /dev/null and b/DV/dv18.jpg differ diff --git a/DV/dv19.jpg b/DV/dv19.jpg new file mode 100644 index 0000000..9c24087 Binary files /dev/null and b/DV/dv19.jpg differ diff --git a/DV/dv2.jpg b/DV/dv2.jpg new file mode 100644 index 0000000..100e007 Binary files /dev/null and b/DV/dv2.jpg differ diff --git a/DV/dv20.jpg b/DV/dv20.jpg new file mode 100644 index 0000000..eb955d9 Binary files /dev/null and b/DV/dv20.jpg differ diff --git a/DV/dv21.jpg b/DV/dv21.jpg new file mode 100644 index 0000000..9c65cb3 Binary files /dev/null and b/DV/dv21.jpg differ diff --git a/DV/dv22.jpg b/DV/dv22.jpg new file mode 100644 index 0000000..be95385 Binary files /dev/null and b/DV/dv22.jpg differ diff --git a/DV/dv23.jpg b/DV/dv23.jpg new file mode 100644 index 0000000..95e0392 Binary files /dev/null and b/DV/dv23.jpg differ diff --git a/DV/dv24.jpg b/DV/dv24.jpg new file mode 100644 index 0000000..7666b42 Binary files /dev/null and b/DV/dv24.jpg differ diff --git a/DV/dv25.jpg b/DV/dv25.jpg new file mode 100644 index 0000000..9a6c174 Binary files /dev/null and b/DV/dv25.jpg differ diff --git a/DV/dv26.jpg b/DV/dv26.jpg new file mode 100644 index 0000000..b38eba2 Binary files /dev/null and b/DV/dv26.jpg differ diff --git a/DV/dv27.jpg b/DV/dv27.jpg new file mode 100644 index 0000000..0ddd378 Binary files /dev/null and b/DV/dv27.jpg differ diff --git a/DV/dv28.jpg b/DV/dv28.jpg new file mode 100644 index 0000000..9728abb Binary files /dev/null and b/DV/dv28.jpg differ diff --git a/DV/dv29.jpg b/DV/dv29.jpg new file mode 100644 index 0000000..19f36df Binary files /dev/null and b/DV/dv29.jpg differ diff --git a/DV/dv3.jpg b/DV/dv3.jpg new file mode 100644 index 0000000..38f9cab Binary files /dev/null and b/DV/dv3.jpg differ diff --git a/DV/dv30.jpg b/DV/dv30.jpg new file mode 100644 index 0000000..028a582 Binary files /dev/null and b/DV/dv30.jpg differ diff --git a/DV/dv4.jpg b/DV/dv4.jpg new file mode 100644 index 0000000..e45848c Binary files /dev/null and b/DV/dv4.jpg differ diff --git a/DV/dv5.jpg b/DV/dv5.jpg new file mode 100644 index 0000000..1236073 Binary files /dev/null and b/DV/dv5.jpg differ diff --git a/DV/dv6.jpg b/DV/dv6.jpg new file mode 100644 index 0000000..db65d52 Binary files /dev/null and b/DV/dv6.jpg differ diff --git a/DV/dv7.jpg b/DV/dv7.jpg new file mode 100644 index 0000000..04f3a3a Binary files /dev/null and b/DV/dv7.jpg differ diff --git a/DV/dv8.jpg b/DV/dv8.jpg new file mode 100644 index 0000000..8e9ad00 Binary files /dev/null and b/DV/dv8.jpg differ diff --git a/DV/dv9.jpg b/DV/dv9.jpg new file mode 100644 index 0000000..870e1a7 Binary files /dev/null and b/DV/dv9.jpg differ diff --git a/DV/dvBack.png b/DV/dvBack.png new file mode 100644 index 0000000..16a1d24 Binary files /dev/null and b/DV/dvBack.png differ diff --git a/bt10-backup.png b/bt10-backup.png new file mode 100644 index 0000000..afe8c07 Binary files /dev/null and b/bt10-backup.png differ diff --git a/bt10.png b/bt10.png index afe8c07..232120f 100644 Binary files a/bt10.png and b/bt10.png differ diff --git a/bt12-backup.png b/bt12-backup.png new file mode 100644 index 0000000..8563de6 Binary files /dev/null and b/bt12-backup.png differ diff --git a/bt12.png b/bt12.png index 8563de6..b16a4ed 100644 Binary files a/bt12.png and b/bt12.png differ diff --git a/dvPerks/dvCurseRolling.png b/dvPerks/dvCurseRolling.png new file mode 100644 index 0000000..c818860 Binary files /dev/null and b/dvPerks/dvCurseRolling.png differ diff --git a/dvPerks/dvHeal1SelfRolling.png b/dvPerks/dvHeal1SelfRolling.png new file mode 100644 index 0000000..aa558f0 Binary files /dev/null and b/dvPerks/dvHeal1SelfRolling.png differ diff --git a/dvPerks/dvPlus1.png b/dvPerks/dvPlus1.png new file mode 100644 index 0000000..a3c1838 Binary files /dev/null and b/dvPerks/dvPlus1.png differ diff --git a/dvPerks/dvPlus1Heal2Ally.png b/dvPerks/dvPlus1Heal2Ally.png new file mode 100644 index 0000000..4edb1f3 Binary files /dev/null and b/dvPerks/dvPlus1Heal2Ally.png differ diff --git a/dvPerks/dvPlus1Shield1Ally.png b/dvPerks/dvPlus1Shield1Ally.png new file mode 100644 index 0000000..ded35ae Binary files /dev/null and b/dvPerks/dvPlus1Shield1Ally.png differ diff --git a/dvPerks/dvPlus2Curse.png b/dvPerks/dvPlus2Curse.png new file mode 100644 index 0000000..77685fd Binary files /dev/null and b/dvPerks/dvPlus2Curse.png differ diff --git a/dvPerks/dvPlus2Dark.png b/dvPerks/dvPlus2Dark.png new file mode 100644 index 0000000..7fc1472 Binary files /dev/null and b/dvPerks/dvPlus2Dark.png differ diff --git a/dvPerks/dvPlus2Muddle.png b/dvPerks/dvPlus2Muddle.png new file mode 100644 index 0000000..899917c Binary files /dev/null and b/dvPerks/dvPlus2Muddle.png differ diff --git a/dvPerks/dvPlus2RegenerateSelf.png b/dvPerks/dvPlus2RegenerateSelf.png new file mode 100644 index 0000000..b9ac534 Binary files /dev/null and b/dvPerks/dvPlus2RegenerateSelf.png differ diff --git a/dvPerks/dvPlus2Sun.png b/dvPerks/dvPlus2Sun.png new file mode 100644 index 0000000..8f1db22 Binary files /dev/null and b/dvPerks/dvPlus2Sun.png differ diff --git a/dvPerks/dvPlus3Shield1Self.png b/dvPerks/dvPlus3Shield1Self.png new file mode 100644 index 0000000..e66961f Binary files /dev/null and b/dvPerks/dvPlus3Shield1Self.png differ diff --git a/dvProfile.png b/dvProfile.png new file mode 100644 index 0000000..d5b112a Binary files /dev/null and b/dvProfile.png differ diff --git a/html5sortable.min.js b/html5sortable.min.js new file mode 100644 index 0000000..aedeafc --- /dev/null +++ b/html5sortable.min.js @@ -0,0 +1,2 @@ +var sortable=function(){"use strict";function c(e,t,n){if(void 0===n)return e&&e.h5s&&e.h5s.data&&e.h5s.data[t];e.h5s=e.h5s||{},e.h5s.data=e.h5s.data||{},e.h5s.data[t]=n}var v=function(e,t){if(!(e instanceof NodeList||e instanceof HTMLCollection||e instanceof Array))throw new Error("You must provide a nodeList/HTMLCollection/Array of elements to be filtered.");return"string"!=typeof t?Array.from(e):Array.from(e).filter(function(e){return 1===e.nodeType&&e.matches(t)})},y=new Map,t=function(){function e(){this._config=new Map,this._placeholder=void 0,this._data=new Map}return Object.defineProperty(e.prototype,"config",{get:function(){var n={};return this._config.forEach(function(e,t){n[t]=e}),n},set:function(e){if("object"!=typeof e)throw new Error("You must provide a valid configuration object to the config setter.");var t=Object.assign({},e);this._config=new Map(Object.entries(t))},enumerable:!1,configurable:!0}),e.prototype.setConfig=function(e,t){if(!this._config.has(e))throw new Error("Trying to set invalid configuration item: "+e);this._config.set(e,t)},e.prototype.getConfig=function(e){if(!this._config.has(e))throw new Error("Invalid configuration item requested: "+e);return this._config.get(e)},Object.defineProperty(e.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){if(!(e instanceof HTMLElement)&&null!==e)throw new Error("A placeholder must be an html element or null.");this._placeholder=e},enumerable:!1,configurable:!0}),e.prototype.setData=function(e,t){if("string"!=typeof e)throw new Error("The key must be a string.");this._data.set(e,t)},e.prototype.getData=function(e){if("string"!=typeof e)throw new Error("The key must be a string.");return this._data.get(e)},e.prototype.deleteData=function(e){if("string"!=typeof e)throw new Error("The key must be a string.");return this._data.delete(e)},e}(),E=function(e){if(!(e instanceof HTMLElement))throw new Error("Please provide a sortable to the store function.");return y.has(e)||y.set(e,new t),y.get(e)};function i(e,t,n){if(e instanceof Array)for(var r=0;r':t=document.createElement("div")),"string"==typeof n&&(r=t.classList).add.apply(r,n.split(" ")),t},L=function(e){if(!(e instanceof HTMLElement))throw new Error("You must provide a valid dom element");var n=window.getComputedStyle(e);return"border-box"===n.getPropertyValue("box-sizing")?parseInt(n.getPropertyValue("height"),10):["height","padding-top","padding-bottom"].map(function(e){var t=parseInt(n.getPropertyValue(e),10);return isNaN(t)?0:t}).reduce(function(e,t){return e+t})},x=function(e){if(!(e instanceof HTMLElement))throw new Error("You must provide a valid dom element");var n=window.getComputedStyle(e);return["width","padding-left","padding-right"].map(function(e){var t=parseInt(n.getPropertyValue(e),10);return isNaN(t)?0:t}).reduce(function(e,t){return e+t})},s=function(e,t){if(!(e instanceof Array))throw new Error("You must provide a Array of HTMLElements to be filtered.");return"string"!=typeof t?e:e.filter(function(e){return e.querySelector(t)instanceof HTMLElement||e.shadowRoot&&e.shadowRoot.querySelector(t)instanceof HTMLElement}).map(function(e){return e.querySelector(t)||e.shadowRoot&&e.shadowRoot.querySelector(t)})},p=function(e){return e.composedPath&&e.composedPath()[0]||e.target},m=function(e,t,n){return{element:e,posX:n.pageX-t.left,posY:n.pageY-t.top}},g=function(e,t,n){if(!(e instanceof Event))throw new Error("setDragImage requires a DragEvent as the first argument.");if(!(t instanceof HTMLElement))throw new Error("setDragImage requires the dragged element as the second argument.");if(n||(n=m),e.dataTransfer&&e.dataTransfer.setDragImage){var r=n(t,w(t),e);if(!(r.element instanceof HTMLElement)||"number"!=typeof r.posX||"number"!=typeof r.posY)throw new Error("The customDragImage function you provided must return and object with the properties element[string], posX[integer], posY[integer].");e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setData("text/plain",p(e).id),e.dataTransfer.setDragImage(r.element,r.posX,r.posY)}},M=function(e,t){if(!0===e.isSortable){var n=E(e).getConfig("acceptFrom");if(null!==n&&!1!==n&&"string"!=typeof n)throw new Error('HTML5Sortable: Wrong argument, "acceptFrom" must be "null", "false", or a valid selector string.');if(null!==n)return!1!==n&&0=parseInt(r.maxItems)&&H.parentElement!==n||(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=!0===E(n).getConfig("copy")?"copy":"move",o(n,t,e.pageX,e.pageY))}};i(t.concat(s),"dragover",r),i(t.concat(s),"dragenter",r)}),e)}return U.destroy=function(e){var t,n,r,o;n=c(t=e,"opts")||{},r=v(t.children,n.items),o=s(r,n.handle),a(t,"dragover"),a(t,"dragenter"),a(t,"dragstart"),a(t,"dragend"),a(t,"drop"),F(t),a(o,"mousedown"),h(r),q(r),W(S,P),t.isSortable=!1},U.enable=function(e){B(e)},U.disable=function(e){var t,n,r,o;n=c(t=e,"opts"),r=v(t.children,n.items),o=s(r,n.handle),l(t,"aria-dropeffect","none"),c(t,"_disabled","true"),l(o,"draggable","false"),a(o,"mousedown")},U.__testing={_data:c,_removeItemEvents:h,_removeItemData:q,_removeSortableData:F,_removeContainerEvents:W},U}(); +//# sourceMappingURL=html5sortable.min.js.map diff --git a/index.html b/index.html index 84aa658..5320a55 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ -
+

Select Your Character

@@ -23,6 +23,11 @@

Select Your Charact

+ + + + +

"Spiky Face"


"Eclipse"


"Diviner"

Select Your Level

@@ -627,6 +632,79 @@

Select Your Perks

+
+
+
+
+
+
+

Remove Two -1 Cards

+
+
+
+
+

Remove One -2 Card

+
+
+
+
+
+
+

Replace Two +1 Cards with One +3 Shield 1 Self Card

+
+
+
+
+

Replace One +0 Card with One +1 Shield 1 Any Ally Card

+
+
+
+
+

Replace One +0 Card with One +2 Dark Card

+
+
+
+
+

Replace One +0 Card with One +2 Sun Card

+
+
+
+
+

Replace One +0 Card with One +2 Muddle Card

+
+
+
+
+

Replace One +0 Card with One +2 Curse Card

+
+
+
+
+

Replace One +0 Card with One +2 Regenerate Self Card

+
+
+
+
+

Replace One -1 Card with One +1 Heal 2 Any Ally Card

+
+
+
+
+

Add Two Rolling Heal 1 Self Cards

+
+
+
+
+

Add Two Rolling Curse Cards

+
+
+
+
+

Ignore Negative Scenario Effects and Add Two +1 Cards

+
+ +
+
@@ -711,7 +789,8 @@
Extra Blesses in Deck: 0
Extra Curses in Deck: 0

-
+ +
@@ -805,7 +884,8 @@
Extra Curses in Deck: 0
-
+ +
@@ -813,7 +893,8 @@
Extra Curses in Deck: 0
- + + Bear Status Effects
@@ -826,6 +907,7 @@
Extra Curses in Deck: 0

+
@@ -834,6 +916,7 @@
Extra Curses in Deck: 0
+ @@ -893,6 +976,31 @@
Extra Curses in Deck: 0
+
+
+

Manipulate Your Modifiers

+ × +
+ Reveal the top  + +  cards +
    +
+
+
+
+

Played Modifiers

@@ -903,5 +1011,6 @@

Played Modifiers

+ diff --git a/regenerate.png b/regenerate.png new file mode 100644 index 0000000..1d0389b Binary files /dev/null and b/regenerate.png differ diff --git a/script2.js b/script2.js index f3c6f7e..1657161 100644 --- a/script2.js +++ b/script2.js @@ -541,6 +541,56 @@ function checkCookie() { nsPerk15.classList.add("checked"); } break; + case "diviner": + diviner.classList.add("character-selected"); + characterSelected = true; + confirmCharacterButton.classList.remove("not-without-more-selected"); + if (perk1 === "dvchosen"){ + dvPerk1.classList.add("checked"); + } + if (perk2 === "dvchosen"){ + dvPerk2.classList.add("checked"); + } + if (perk3 === "dvchosen"){ + dvPerk3.classList.add("checked"); + } + if (perk4 === "dvchosen"){ + dvPerk4.classList.add("checked"); + } + if (perk5 === "dvchosen"){ + dvPerk5.classList.add("checked"); + } + if (perk6 === "dvchosen"){ + dvPerk6.classList.add("checked"); + } + if (perk7 === "dvchosen"){ + dvPerk7.classList.add("checked"); + } + if (perk8 === "dvchosen"){ + dvPerk8.classList.add("checked"); + } + if (perk9 === "dvchosen"){ + dvPerk9.classList.add("checked"); + } + if (perk10 === "dvchosen"){ + dvPerk10.classList.add("checked"); + } + if (perk11 === "dvchosen"){ + dvPerk11.classList.add("checked"); + } + if (perk12 === "dvchosen"){ + dvPerk12.classList.add("checked"); + } + if (perk13 === "dvchosen"){ + dvPerk13.classList.add("checked"); + } + if (perk14 === "dvchosen"){ + dvPerk14.classList.add("checked"); + } + if (perk15 === "dvchosen"){ + dvPerk15.classList.add("checked"); + } + break; default: characterSelected = false; break; @@ -620,6 +670,7 @@ let toggleStunned = document.getElementById('toggle-stunned'); let toggleMuddled = document.getElementById('toggle-muddled'); let toggleInvisible = document.getElementById('toggle-invisible'); let toggleStrengthened = document.getElementById('toggle-strengthened'); +let toggleRegenerate = document.getElementById('toggle-regenerate'); let toggleBearPoison = document.getElementById('toggle-bear-poison'); let toggleBearWounded = document.getElementById('toggle-bear-wounded'); let toggleBearImmobilized = document.getElementById('toggle-bear-immobilized'); @@ -628,6 +679,7 @@ let toggleBearStunned = document.getElementById('toggle-bear-stunned'); let toggleBearMuddled = document.getElementById('toggle-bear-muddled'); let toggleBearInvisible = document.getElementById('toggle-bear-invisible'); let toggleBearStrengthened = document.getElementById('toggle-bear-strengthened'); +let toggleBearRegenerate = document.getElementById('toggle-bear-regenerate'); let xpUp = document.getElementById('xp-up'); let xpDown = document.getElementById('xp-down'); let healButton = document.getElementById('heal'); @@ -680,6 +732,7 @@ let tinkerer = document.getElementById('tinkerer'); let beastTyrant = document.getElementById('beastTyrant'); let doomStalker = document.getElementById('doomStalker'); let nightshroud = document.getElementById("nightshroud"); +let diviner = document.getElementById("diviner"); //status effects let poisoned = false; @@ -696,6 +749,8 @@ let muddled = false; let muddledToken = document.getElementById('muddled'); let strengthened = false; let strengthenedToken = document.getElementById('strengthened'); +let regenerate = false; +let regenerateToken = document.getElementById('regenerate'); let invisible = false; let invisibleToken = document.getElementById('invisible'); let bearPoisoned = false; @@ -712,6 +767,8 @@ let bearMuddled = false; let bearMuddledToken = document.getElementById('bear-muddled'); let bearStrengthened = false; let bearStrengthenedToken = document.getElementById('bear-strengthened'); +let bearRegenerate = false; +let bearRegenerateToken = document.getElementById('bear-regenerate'); let bearInvisible = false; let bearInvisibleToken = document.getElementById('bear-invisible'); @@ -899,7 +956,7 @@ function confirmCharacter(){ (function (){ var cardToChooseFrom = cardsToChooseFrom[i]; if((i>-1 && i<13) || i>14){ - cardToChooseFrom.innerHTML = ""; + cardToChooseFrom.innerHTML = ""; } else { cardToChooseFrom.innerHTML = ''; } @@ -2052,6 +2109,151 @@ function confirmCharacter(){ health = maxHealth; break; } + } else if(diviner.classList.contains("character-selected")){ + let characterChoice = "diviner"; + setCookie("character", "diviner", 365); + document.getElementById("diviner-perks").classList.remove("hiding"); + flippedCard = "./DV/dvBack.png"; + handSize = 9 + cardHand10.classList.add("hiding"); + cardHand11.classList.add("hiding"); + cardHand12.classList.add("hiding"); + var hand = document.querySelectorAll(".hand"); + var cardsToChooseFrom = document.querySelectorAll(".chooseCardsTable"); + for (var i = 0; i-1 && i<12) || i>14){ + cardToChooseFrom.innerHTML = ""; + } else { + cardToChooseFrom.innerHTML = ''; + } + }).call(this,i); + } + for (var j = 0; j{ } } +toggleRegenerate.onclick = () =>{ + if(!regenerate){ + regenerate = true; + regenerateToken.classList.remove('hiding'); + }else{ + regenerate = false; + regenerateToken.classList.add('hiding'); + } +} + +toggleBearRegenerate.onclick = () =>{ + if(!bearRegenerate){ + bearRegenerate = true; + bearRegenerateToken.classList.remove('hiding'); + }else{ + bearRegenerate = false; + bearRegenerateToken.classList.add('hiding'); + } +} let healthCounter = document.getElementById('health-counter'); let xpCounter = document.getElementById('xp-counter'); let bearHealthCounter = document.getElementById('bear-health-counter'); @@ -4681,12 +4902,14 @@ let mustShuffle = document.getElementById("mustShuffle"); let blessButton = document.getElementById('bless'); let curseButton = document.getElementById('curse'); let shuffleModsButton = document.getElementById('shuffleMods'); +let manipulateModsButton = document.getElementById('manipulateMods'); let numOfCurses = 0; let numOfBlesses = 0; let addMinusOne = document.getElementById('add-minus-1'); let cardsInDeckText = document.getElementById("cardsInDeck"); let resetDeckButton = document.getElementById("reset-deck"); let usedMods = document.getElementById("used-modifier-cards"); +let unusedMods = document.getElementById("unused-modifier-cards"); modifierDeck.onclick = () => { if(modDeckArray.length>0){ @@ -5173,6 +5396,7 @@ let swConfirmPerksButton = document.getElementById('swConfirmPerksButton'); let scConfirmPerksButton = document.getElementById('scConfirmPerksButton'); let tiConfirmPerksButton = document.getElementById('tiConfirmPerksButton'); let nsConfirmPerksButton = document.getElementById('nsConfirmPerksButton'); +let dvConfirmPerksButton = document.getElementById('dvConfirmPerksButton'); //Cragheart @@ -6287,6 +6511,222 @@ if (nsPerk15.classList.contains('checked')){ } defaultDeckArray = modDeckArray.slice(); confirmPerks(); +} + + // diviner + + let dvPerk1 = document.getElementById("dvPerk1-1"); + let dvPerk2 = document.getElementById("dvPerk1-2"); + let dvPerk3 = document.getElementById("dvPerk2"); + let dvPerk4 = document.getElementById("dvPerk3-1"); + let dvPerk5 = document.getElementById("dvPerk3-2"); + let dvPerk6 = document.getElementById("dvPerk4"); + let dvPerk7 = document.getElementById("dvPerk5"); + let dvPerk8 = document.getElementById("dvPerk6"); + let dvPerk9 = document.getElementById("dvPerk7"); + let dvPerk10 = document.getElementById("dvPerk8"); + let dvPerk11 = document.getElementById("dvPerk9"); + let dvPerk12 = document.getElementById("dvPerk10"); + let dvPerk13 = document.getElementById("dvPerk11"); + let dvPerk14 = document.getElementById("dvPerk12"); + let dvPerk15 = document.getElementById("dvPerk13"); + hasMinus1 = 0; + +dvConfirmPerksButton.onclick = () => { +if(dvPerk1.classList.contains('checked')){ + for (var i = 0; i`; + } + sortableListEl.innerHTML = inner; + selectEl.addEventListener('change', (event) => { + inner = ''; + selectValue = +event.target.value; + for (var i=0; i`; + } + else { + inner += `
  • `; + } + } + sortableListEl.innerHTML = inner; + sortable('.sortable')[0].addEventListener('sortupdate', function(e) { + modDeckArray = sortable('.sortable', 'serialize')[0].items; + }); + }); + + sortable('.sortable', { + itemSerializer: (serializedItem, sortableContainer) => { + return serializedItem.node.dataset.card; + } + }) + sortable('.sortable')[0].addEventListener('sortupdate', function(e) { + modDeckArray = sortable('.sortable', 'serialize')[0].items; + }); + manipulateModal.style.display = "block"; +} + +closeManip.onclick = function() { + manipulateModal.style.display = "none"; +} + +// When the user clicks anywhere outside of the modal, close it +window.onclick = function(event) { + if (event.target == manipulateModal) { + manipulateModal.style.display = "none"; + } +} diff --git a/style.css b/style.css index 50e271c..6672624 100644 --- a/style.css +++ b/style.css @@ -312,6 +312,55 @@ transition: width 0.35s ease-in-out, height 0.35s ease-in-out; cursor: pointer; } +#manipulateModal{ + display: none; + position: fixed; + z-index: 1; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: rgb(0,0,0); + background-color: rgba(0,0,0,0.4); +} + +#manipulateContent{ + background-color: #fefefe; + margin: 90px auto 60px auto; + padding:10px; + border: 1px solid #888; + width: 75%; +} + +#unused-modifier-cards { + color: black; +} + +.sortable > li > img { + width: 100px; +} + +.sortable { + columns: 5; + -webkit-columns: 5; + -moz-columns: 5; +} + +.closeManip { + color: #aaa; + float: right; + top:0; + font-size: 50px; + font-weight: bold; +} + +.closeManip:hover, +.closeManip:focus { + color: black; + text-decoration: none; + cursor: pointer; +} + h6, #cardsInDeck{ padding: 0; margin: 0;