Skip to content

Commit

Permalink
unlock max amount of arcanas for darkana6
Browse files Browse the repository at this point in the history
  • Loading branch information
Danmer committed Sep 15, 2024
1 parent 2f599f6 commit 94fb9ee
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@
.flex-reverse-row {
display: flex;
}
.flex-reverse-col {
display: flex;
flex-direction: column;
flex-wrap: wrap-reverse;
height: 9em;
}
.app {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -450,6 +456,9 @@
flex-direction: row-reverse;
justify-content: flex-end;
}
.flex-reverse-col {
flex-wrap: wrap;
}
.slot.stage {
margin-left: 0;
min-width: 9em;
Expand Down Expand Up @@ -504,18 +513,8 @@ <h1 class="flex-col-row">
<!-- Slots -->
<section class="slots flex-col-row">
<div class="flex-reverse-row">
<div class="arcanas">
<div v-for="(arcana, $index) in selectedArcanas.slice(6, 9)" :data-id="arcana.id" class="slot arcana" :class="arcana.type" :title="arcana.title" @click="deleteItem(arcana, selectedArcanas[$index+1])" @mouseenter="onMouseEnter(arcana)" @mouseleave="onMouseLeave()">
<div class="icon" :class="`icon-${arcana.id}`"></div>
</div>
</div>
<div class="arcanas">
<div v-for="(arcana, $index) in selectedArcanas.slice(3, 6)" :data-id="arcana.id" class="slot arcana" :class="arcana.type" :title="arcana.title" @click="deleteItem(arcana, selectedArcanas[$index+1])" @mouseenter="onMouseEnter(arcana)" @mouseleave="onMouseLeave()">
<div class="icon" :class="`icon-${arcana.id}`"></div>
</div>
</div>
<div class="arcanas">
<div v-for="(arcana, $index) in selectedArcanas.slice(0, 3)" :data-id="arcana.id" class="slot arcana" :class="arcana.type" :title="arcana.title" @click="deleteItem(arcana, selectedArcanas[$index+1])" @mouseenter="onMouseEnter(arcana)" @mouseleave="onMouseLeave()">
<div class="arcanas flex-reverse-col">
<div v-for="(arcana, $index) in selectedArcanas" :data-id="arcana.id" class="slot arcana" :class="arcana.type" :title="arcana.title" @click="deleteItem(arcana, selectedArcanas[$index+1])" @mouseenter="onMouseEnter(arcana)" @mouseleave="onMouseLeave()">
<div class="icon" :class="`icon-${arcana.id}`"></div>
</div>
<div v-for="i in (selectedArcanas.length < 3 ? 3 - selectedArcanas.length : 0)" class="slot arcana">
Expand Down Expand Up @@ -1351,6 +1350,9 @@ <h2 @click="collapsedSections.stages = !collapsedSections.stages"><small :style=
})

const maxArcanas = computed(() => {
if (selectedIds.has('darkana6')) {
return 99
}
switch (selectedCharacter.value.id) {
case 'sigma':
return 5
Expand All @@ -1361,6 +1363,15 @@ <h2 @click="collapsedSections.stages = !collapsedSections.stages"><small :style=
}
})

watch(maxArcanas, (newMax) => {
if (selectedArcanas.value.length > newMax) {
for (let index = newMax; index < selectedArcanas.value.length; index++) {
const arcana = selectedArcanas.value[index]
unselectId(arcana.id)
}
}
})

watch(
selectedIds,
() => {
Expand Down Expand Up @@ -1574,7 +1585,7 @@ <h2 @click="collapsedSections.stages = !collapsedSections.stages"><small :style=
}
break
case 'arcana':
if (selectedArcanas.value.length <= maxArcanas.value) {
if (item.id === 'darkana6' || selectedArcanas.value.length <= maxArcanas.value) {
selectedIds.add(item.id)
}
break
Expand Down

0 comments on commit 94fb9ee

Please sign in to comment.