diff --git a/public/items/blessingPowerItems.json b/public/items/blessingPowerItems.json index 51aad0d..dfd1a23 100644 --- a/public/items/blessingPowerItems.json +++ b/public/items/blessingPowerItems.json @@ -3,66 +3,77 @@ "iconURL": "", "itemName": "Flower Necklace", "minItemPower": 1, - "maxItemPower": 1 + "maxItemPower": 1, + "rarity": 2 }, "facb5102-34d8-4813-ab06-ac2b8e9f3ed9": { "iconURL": "", "itemName": "Jewel Necklace", "minItemPower": 2, - "maxItemPower": 2 + "maxItemPower": 2, + "rarity": 3 }, "ddd29671-ca7f-4132-8784-80346e154059": { "iconURL": "", "itemName": "Blessing Power Gachapon", "minItemPower": 10, - "maxItemPower": 30 + "maxItemPower": 30, + "rarity": 4 }, "c1e029ff-b82c-48bd-a1f1-ea6291fad948": { "iconURL": "", "itemName": "Mandrake", "minItemPower": 1, - "maxItemPower": 3 + "maxItemPower": 3, + "rarity": 1 }, "52cd4a48-ff8a-4493-8030-b4e7754cd227": { "iconURL": "", "itemName": "Muddled Mushroom", "minItemPower": 2, - "maxItemPower": 5 + "maxItemPower": 5, + "rarity": 1 }, "636b7384-1389-4012-933c-9063baa7a38d": { "iconURL": "", "itemName": "Grassy Bunny", "minItemPower": 3, - "maxItemPower": 6 + "maxItemPower": 6, + "rarity": 2 }, "2563b5f8-8fd5-4795-af86-33200605cf3e": { "iconURL": "", "itemName": "Chirping Chick", "minItemPower": 4, - "maxItemPower": 10 + "maxItemPower": 10, + "rarity": 2 }, "54e9bcf5-f1a5-4350-a75d-88af02b4fc13": { "iconURL": "", "itemName": "Gorgeous Horse", "minItemPower": 5, - "maxItemPower": 16 + "maxItemPower": 16, + "rarity": 3 }, "e736d2b9-a8ec-4a4e-a721-24880c8a6038": { "iconURL": "", "itemName": "Blooming Fox", "minItemPower": 7, - "maxItemPower": 24 + "maxItemPower": 24, + "rarity": 3 }, "9fb7f9ba-e7ed-4e99-b161-386f48299443": { "iconURL": "", "itemName": "Frozen Dragon", "minItemPower": 10, - "maxItemPower": 32 + "maxItemPower": 32, + "rarity": 4 }, "e2472929-1218-4cd6-a73b-b783c17bbc31": { "iconURL": "", "itemName": "Flaming Lion", "minItemPower": 14, - "maxItemPower": 48 + "maxItemPower": 48, + "rarity": 4 } } \ No newline at end of file diff --git a/public/items/fellowPowerItems.json b/public/items/fellowPowerItems.json index 4c41ca8..eddd7a9 100644 --- a/public/items/fellowPowerItems.json +++ b/public/items/fellowPowerItems.json @@ -1,92 +1,163 @@ { - "1f7aff96-030d-4007-9a70-82db7a8be3e3": { - "iconURL": "", - "itemName": "Contestant Portrait", - "minItemPower": 15000, - "maxItemPower": 40000 - }, - "2006c92e-8e32-4c9f-a913-3b2d1ed8dea0": { - "iconURL": "", - "itemName": "Potion of Bravery", - "minItemPower": 800, - "maxItemPower": 800 - }, - "30d05d98-a615-4e3a-94da-8aa6e4ad03a9": { - "iconURL": "", - "itemName": "Basic Elixir", - "minItemPower": 3000, - "maxItemPower": 3000 - }, - "3eccaaac-5afe-415a-ac8f-55df213cf015": { - "iconURL": "", - "itemName": "Potion of Freedom", - "minItemPower": 800, - "maxItemPower": 800 - }, - "68a7a68a-2123-4a8e-b64d-9dbdf0637521": { - "iconURL": "", - "itemName": "Potion of Erudition", - "minItemPower": 800, - "maxItemPower": 800 - }, - "7075da2f-a617-42a1-b142-fe2401ad87ec": { - "iconURL": "", - "itemName": "Potion of Inspiration", - "minItemPower": 800, - "maxItemPower": 800 - }, - "762a2775-ca50-4c13-8797-2f03b045ed10": { - "iconURL": "", - "itemName": "Red Contestant Portrait", - "minItemPower": 10000, - "maxItemPower": 25000 - }, - "9c95396d-e5d8-4f7d-9d37-1469e7dc0ee1": { - "iconURL": "", - "itemName": "Yellow Signed Towel", - "minItemPower": 4500, - "maxItemPower": 10000 - }, - "a351a27b-765b-46b5-95fc-99c47e63176d": { - "iconURL": "", - "itemName": "Potion of Diligence", - "minItemPower": 800, - "maxItemPower": 800 - }, - "a44b763b-833b-49d0-91d6-e5fcb8c6ce7c": { - "iconURL": "", - "itemName": "Yellow Signed Handkerchief", - "minItemPower": 2000, - "maxItemPower": 5000 - }, - "bc5fc5c6-65e1-41c8-822d-d6e06ec0894e": { - "iconURL": "", - "itemName": "Advanced Elixir", - "minItemPower": 30000, - "maxItemPower": 30000 - }, - "cd50f711-36a4-4b3b-b4ef-84b52c8a18e2": { - "iconURL": "", - "itemName": "Champion's Statue", - "minItemPower": 30000, - "maxItemPower": 80000 - }, - "ce522371-80bd-4266-b473-8f5ace7099c7": { - "iconURL": "", - "itemName": "Red Signed Handkerchief", - "minItemPower": 3000, - "maxItemPower": 8000 - }, - "d7d705d3-9562-4f03-98d8-3b0da81fcf47": { - "iconURL": "", - "itemName": "Champion's Belt", - "minItemPower": 20000, - "maxItemPower": 50000 - }, - "ed1663c2-aff0-41b4-b5ed-7f86463c1d69": { - "iconURL": "", - "itemName": "Red Signed Towel", - "minItemPower": 6000, - "maxItemPower": 15000 - } -} \ No newline at end of file + "1f7aff96-030d-4007-9a70-82db7a8be3e3": { + "iconURL": "", + "itemName": "Contestant Portrait (Wolf)", + "minItemPower": 15000, + "maxItemPower": 40000, + "rarity": 3 + }, + "2006c92e-8e32-4c9f-a913-3b2d1ed8dea0": { + "iconURL": "", + "itemName": "Potion of Bravery", + "minItemPower": 800, + "maxItemPower": 800, + "rarity": 3 + }, + "30d05d98-a615-4e3a-94da-8aa6e4ad03a9": { + "iconURL": "", + "itemName": "Basic Elixir", + "minItemPower": 3000, + "maxItemPower": 3000, + "rarity": 3 + }, + "3eccaaac-5afe-415a-ac8f-55df213cf015": { + "iconURL": "", + "itemName": "Potion of Freedom", + "minItemPower": 800, + "maxItemPower": 800, + "rarity": 3 + }, + "68a7a68a-2123-4a8e-b64d-9dbdf0637521": { + "iconURL": "", + "itemName": "Potion of Erudition", + "minItemPower": 800, + "maxItemPower": 800, + "rarity": 3 + }, + "7075da2f-a617-42a1-b142-fe2401ad87ec": { + "iconURL": "", + "itemName": "Potion of Inspiration", + "minItemPower": 800, + "maxItemPower": 800, + "rarity": 3 + }, + "762a2775-ca50-4c13-8797-2f03b045ed10": { + "iconURL": "", + "itemName": "Contestant Portrait (Lion)", + "minItemPower": 10000, + "maxItemPower": 25000, + "rarity": 3 + }, + "9c95396d-e5d8-4f7d-9d37-1469e7dc0ee1": { + "iconURL": "", + "itemName": "Signed Towel (Yellow)", + "minItemPower": 4500, + "maxItemPower": 10000, + "rarity": 2 + }, + "a351a27b-765b-46b5-95fc-99c47e63176d": { + "iconURL": "", + "itemName": "Potion of Diligence", + "minItemPower": 800, + "maxItemPower": 800, + "rarity": 3 + }, + "a44b763b-833b-49d0-91d6-e5fcb8c6ce7c": { + "iconURL": "", + "itemName": "Signed Handkerchief (Yellow)", + "minItemPower": 2000, + "maxItemPower": 5000, + "rarity": 1 + }, + "bc5fc5c6-65e1-41c8-822d-d6e06ec0894e": { + "iconURL": "", + "itemName": "Advanced Elixir", + "minItemPower": 30000, + "maxItemPower": 30000, + "rarity": 4 + }, + "cd50f711-36a4-4b3b-b4ef-84b52c8a18e2": { + "iconURL": "", + "itemName": "Champion's Statue", + "minItemPower": 30000, + "maxItemPower": 80000, + "rarity": 4 + }, + "ce522371-80bd-4266-b473-8f5ace7099c7": { + "iconURL": "", + "itemName": "Signed Handkerchief (Red)", + "minItemPower": 3000, + "maxItemPower": 8000, + "rarity": 1 + }, + "d7d705d3-9562-4f03-98d8-3b0da81fcf47": { + "iconURL": "", + "itemName": "Champion's Belt", + "minItemPower": 20000, + "maxItemPower": 50000, + "rarity": 4 + }, + "ed1663c2-aff0-41b4-b5ed-7f86463c1d69": { + "iconURL": "", + "itemName": "Signed Towel (Red)", + "minItemPower": 6000, + "maxItemPower": 15000, + "rarity": 2 + }, + "472d229e-3541-4115-8104-53af579f24a4": { + "iconURL": "", + "itemName": "Demonic Exercise Bike", + "minItemPower": 20000, + "maxItemPower": 50000, + "rarity": 4 + }, + "6214eeeb-c77b-415c-a055-6d15b04ca026": { + "iconURL": "", + "itemName": "Steel Barbell", + "minItemPower": 15000, + "maxItemPower": 40000, + "rarity": 3 + }, + "732f16e3-6de7-4bc7-af77-9cdbaf68b695": { + "iconURL": "", + "itemName": "Pac-Ball", + "minItemPower": 4500, + "maxItemPower": 10000, + "rarity": 2 + }, + "a64b4819-5b32-41c5-8fe0-293ea8695a0c": { + "iconURL": "", + "itemName": "Stone Dumbbell", + "minItemPower": 3000, + "maxItemPower": 8000, + "rarity": 1 + }, + "b282b9cb-1802-4563-88a1-e7e267a0bcd4": { + "iconURL": "", + "itemName": "Rock Kettlebell", + "minItemPower": 6000, + "maxItemPower": 15000, + "rarity": 2 + }, + "bf1611c0-ddec-4ad8-8299-a2e19818186f": { + "iconURL": "", + "itemName": "Screaming Punching Bag", + "minItemPower": 30000, + "maxItemPower": 80000, + "rarity": 4 + }, + "daca4964-69c4-4167-b7bf-2e8eb49a8f1b": { + "iconURL": "", + "itemName": "Ivy Jump Rope", + "minItemPower": 2000, + "maxItemPower": 5000, + "rarity": 1 + }, + "fff5a89a-1691-47ea-af30-c811f1c1dbfc": { + "iconURL": "", + "itemName": "Fairy Shuttlecock", + "minItemPower": 10000, + "maxItemPower": 25000, + "rarity": 3 + } +} diff --git a/public/items/intimacyPowerItems.json b/public/items/intimacyPowerItems.json new file mode 100644 index 0000000..bb8ed44 --- /dev/null +++ b/public/items/intimacyPowerItems.json @@ -0,0 +1,86 @@ +{ + "09b1fff4-c1a3-49d5-acf1-b996d93a7217": { + "iconURL": "", + "itemName": "Song: \"Unhappy Elder\"", + "minItemPower": 2, + "maxItemPower": 5, + "rarity": 1 + }, + "0dbbda4c-0e4c-4cc2-b204-0301178ae667": { + "iconURL": "", + "itemName": "Gold Ring", + "minItemPower": 1, + "maxItemPower": 1, + "rarity": 2 + }, + "590ebe99-0fdd-4216-bb51-88d48f07d518": { + "iconURL": "", + "itemName": "Song: \"Forbidden Love\"", + "minItemPower": 10, + "maxItemPower": 32, + "rarity": 4 + }, + "62c5fe6d-92d2-458d-8ce4-c206eeb6245a": { + "iconURL": "", + "itemName": "Song: \"Prince's Wish\"", + "minItemPower": 4, + "maxItemPower": 10, + "rarity": 2 + }, + "67e7598f-f687-4ea0-b9f5-f89aaa965d44": { + "iconURL": "", + "itemName": "Song: \"Otherworld Stars\"", + "minItemPower": 7, + "maxItemPower": 24, + "rarity": 3 + }, + "71c7537b-ef33-4f64-91d4-e7e9c3915cad": { + "iconURL": "", + "itemName": "Diamond Ring", + "minItemPower": 5, + "maxItemPower": 5, + "rarity": 4 + }, + "73ddfbbf-3071-4103-9893-b9b77af05ce9": { + "iconURL": "", + "itemName": "Song: \"Single Golden Mushroom\"", + "minItemPower": 5, + "maxItemPower": 16, + "rarity": 3 + }, + "910cfd8f-9e75-4ca1-b776-e6b4df78e80b": { + "iconURL": "", + "itemName": "Song: \"Starry Love\"", + "minItemPower": 1, + "maxItemPower": 3, + "rarity": 1 + }, + "b2536feb-7dcb-4cec-93e5-581bc64e693b": { + "iconURL": "", + "itemName": "Song: \"Princess's Wish\"", + "minItemPower": 3, + "maxItemPower": 6, + "rarity": 2 + }, + "b2ebc786-79c3-47df-b0d9-330bb8e85a5f": { + "iconURL": "", + "itemName": "Song: \"Unlucky Succubus\"", + "minItemPower": 14, + "maxItemPower": 48, + "rarity": 4 + }, + "d5eb513d-68e0-4cd3-bb44-e3e8d36cfecd": { + "iconURL": "", + "itemName": "Gemstone Ring", + "minItemPower": 2, + "maxItemPower": 2, + "rarity": 3 + }, + "bcd9068a-c3b1-4914-ac50-af3369a7a8e5": { + "iconURL": "", + "itemName": "Intamacy Gachapon", + "minItemPower": 10, + "maxItemPower": 30, + "rarity": 4 + } +} diff --git a/src/App.vue b/src/App.vue index ceac73c..5248187 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,21 +6,11 @@ import GlobalHeader from '@/components/GlobalHeader.vue' diff --git a/src/assets/base.css b/src/assets/base.css index a1b5026..5f38317 100644 --- a/src/assets/base.css +++ b/src/assets/base.css @@ -1,5 +1,5 @@ body { - min-height: 100vh; + /* min-height: 100vh; */ text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; diff --git a/src/assets/images/isl_logo.png b/src/assets/images/isl_logo.png new file mode 100644 index 0000000..5564af0 Binary files /dev/null and b/src/assets/images/isl_logo.png differ diff --git a/src/assets/logo.svg b/src/assets/logo.svg deleted file mode 100644 index 7565660..0000000 --- a/src/assets/logo.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/assets/main.css b/src/assets/main.css index 1e37676..323f92f 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -1,6 +1,6 @@ @import './base.css'; -#app { +/* #app { margin: 0 auto; padding: 2rem; font-weight: normal; @@ -28,4 +28,4 @@ a, #app { padding: 0 2rem; } -} +} */ diff --git a/src/components/BlessingPower/SpecialItemsCard.vue b/src/components/BlessingPower/SpecialItemsCard.vue index 8f369c3..6edcaf1 100644 --- a/src/components/BlessingPower/SpecialItemsCard.vue +++ b/src/components/BlessingPower/SpecialItemsCard.vue @@ -1,10 +1,77 @@ diff --git a/src/components/BlessingPower/StandardItemsCard.vue b/src/components/BlessingPower/StandardItemsCard.vue index 32f068d..31fc76e 100644 --- a/src/components/BlessingPower/StandardItemsCard.vue +++ b/src/components/BlessingPower/StandardItemsCard.vue @@ -1,9 +1,54 @@ diff --git a/src/components/FellowPower/SpecialItemsCard.vue b/src/components/FellowPower/SpecialItemsCard.vue index fb2765e..497720d 100644 --- a/src/components/FellowPower/SpecialItemsCard.vue +++ b/src/components/FellowPower/SpecialItemsCard.vue @@ -1,10 +1,77 @@ diff --git a/src/components/FellowPower/StandardItemsCard.vue b/src/components/FellowPower/StandardItemsCard.vue index dd8a4f6..1346488 100644 --- a/src/components/FellowPower/StandardItemsCard.vue +++ b/src/components/FellowPower/StandardItemsCard.vue @@ -1,9 +1,54 @@ diff --git a/src/components/GlobalHeader.vue b/src/components/GlobalHeader.vue index 35d9861..fd1edfb 100644 --- a/src/components/GlobalHeader.vue +++ b/src/components/GlobalHeader.vue @@ -1,7 +1,29 @@ - + diff --git a/src/components/IntimacyPower/SpecialItemsCard.vue b/src/components/IntimacyPower/SpecialItemsCard.vue new file mode 100644 index 0000000..7c705d3 --- /dev/null +++ b/src/components/IntimacyPower/SpecialItemsCard.vue @@ -0,0 +1,143 @@ + + + + + diff --git a/src/components/IntimacyPower/StandardItemsCard.vue b/src/components/IntimacyPower/StandardItemsCard.vue new file mode 100644 index 0000000..bbc3d9c --- /dev/null +++ b/src/components/IntimacyPower/StandardItemsCard.vue @@ -0,0 +1,93 @@ + + + diff --git a/src/components/IntimacyPower/SummaryCard.vue b/src/components/IntimacyPower/SummaryCard.vue new file mode 100644 index 0000000..b533f01 --- /dev/null +++ b/src/components/IntimacyPower/SummaryCard.vue @@ -0,0 +1,30 @@ + + + diff --git a/src/components/SpecialItem.vue b/src/components/SpecialItem.vue deleted file mode 100644 index 6396933..0000000 --- a/src/components/SpecialItem.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - - diff --git a/src/components/StandardItem.vue b/src/components/StandardItem.vue deleted file mode 100644 index a6a002d..0000000 --- a/src/components/StandardItem.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - - - diff --git a/src/main.ts b/src/main.ts index b645d87..1ff243c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -18,6 +18,9 @@ const vuetify = createVuetify({ directives, icons: { defaultSet: 'mdi', + }, + theme: { + defaultTheme: 'dark' } }) diff --git a/src/router/index.ts b/src/router/index.ts index 65c6ea2..ca858c6 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -18,6 +18,11 @@ const router = createRouter({ path: "/fellow-power", name: "fellow-power", component: () => import('@/views/FellowPowerView.vue') + }, + { + path: "/intimacy-power", + name: "intimacy-power", + component: () => import('@/views/IntimacyPowerView.vue') } ] }) diff --git a/src/stores/counter.ts b/src/stores/counter.ts deleted file mode 100644 index b6757ba..0000000 --- a/src/stores/counter.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ref, computed } from 'vue' -import { defineStore } from 'pinia' - -export const useCounterStore = defineStore('counter', () => { - const count = ref(0) - const doubleCount = computed(() => count.value * 2) - function increment() { - count.value++ - } - - return { count, doubleCount, increment } -}) diff --git a/src/stores/powerItems.ts b/src/stores/powerItems.ts index ab902b5..81dda2f 100644 --- a/src/stores/powerItems.ts +++ b/src/stores/powerItems.ts @@ -6,12 +6,20 @@ import { computed, ref, toRaw } from 'vue' export const usePowerItems = defineStore('powerItems', () => { const BLESSING_POWER_ITEM_STORAGE = 'BLESSING_POWER_ITEM_STORAGE' const FELLOW_POWER_ITEM_STORAGE = 'FELLOW_POWER_ITEM_STORAGE' + const INTIMACY_POWER_ITEM_STORAGE = 'INTIMACY_POWER_ITEM_STORAGE' const blessingPowerItems = ref(new Map()) const fellowPowerItems = ref(new Map()) + const intimacyPowerItems = ref(new Map()) async function fetchPowerItems() { axios - .get('/items/blessingPowerItems.json') + .get('/items/blessingPowerItems.json', { + headers: { + 'Cache-Control': 'no-cache', + Pragma: 'no-cache', + Expires: '0' + } + }) .then((resp) => { const plainMap = new Map( Object.entries(JSON.parse(localStorage.getItem(BLESSING_POWER_ITEM_STORAGE) || '{}')) @@ -27,7 +35,13 @@ export const usePowerItems = defineStore('powerItems', () => { console.log(err) }) axios - .get('/items/fellowPowerItems.json') + .get('/items/fellowPowerItems.json', { + headers: { + 'Cache-Control': 'no-cache', + Pragma: 'no-cache', + Expires: '0' + } + }) .then((resp) => { const plainMap = new Map( Object.entries(JSON.parse(localStorage.getItem(FELLOW_POWER_ITEM_STORAGE) || '{}')) @@ -42,6 +56,28 @@ export const usePowerItems = defineStore('powerItems', () => { .catch((err) => { console.log(err) }) + axios + .get('/items/intimacyPowerItems.json', { + headers: { + 'Cache-Control': 'no-cache', + Pragma: 'no-cache', + Expires: '0' + } + }) + .then((resp) => { + const plainMap = new Map( + Object.entries(JSON.parse(localStorage.getItem(INTIMACY_POWER_ITEM_STORAGE) || '{}')) + ) + Object.keys(resp.data).map((key) => { + const cur = resp.data[key] + if (cur['owned'] === undefined) cur['owned'] = 0 + cur['owned'] = plainMap.get(key) !== undefined ? plainMap.get(key)?.owned : 0 + intimacyPowerItems.value.set(key, resp.data[key]) + }) + }) + .catch((err) => { + console.log(err) + }) } function updateOwned(key: string, newOwned: number) { @@ -64,6 +100,15 @@ export const usePowerItems = defineStore('powerItems', () => { JSON.stringify(mapToObj(toRaw(fellowPowerItems.value))) ) } + cur = intimacyPowerItems.value.get(key) + if (cur !== undefined) { + cur.owned = newOwned + intimacyPowerItems.value.set(key, cur) + localStorage.setItem( + INTIMACY_POWER_ITEM_STORAGE, + JSON.stringify(mapToObj(toRaw(intimacyPowerItems.value))) + ) + } } function mapToObj(map: Map) { @@ -217,6 +262,78 @@ export const usePowerItems = defineStore('powerItems', () => { ) ) + const totalIntimacyPower = computed(() => + [...intimacyPowerItems.value.values()].reduce( + (accumulator: number, currentValue: PowerItem) => { + return currentValue !== undefined + ? accumulator + + ((currentValue.maxItemPower + currentValue.minItemPower) / 2) * currentValue.owned + : 0 + }, + 0 + ) + ) + + const standardIntimacyItems = computed( + () => + new Map( + [...intimacyPowerItems.value.entries()].filter( + (cur) => cur[1].maxItemPower === cur[1].minItemPower + ) + ) + ) + + const standardIntimacyItemTotal = computed(() => + [...standardIntimacyItems.value.values()].reduce( + (accumulator: number, currentValue: PowerItem) => + currentValue !== undefined + ? accumulator + + ((currentValue.maxItemPower + currentValue.minItemPower) / 2) * currentValue.owned + : 0, + 0 + ) + ) + + const specialIntimacyItems = computed( + () => + new Map( + [...intimacyPowerItems.value.entries()].filter( + (cur) => cur[1].maxItemPower !== cur[1].minItemPower + ) + ) + ) + + const specialIntimacyItemsMinTotal = computed(() => + [...specialIntimacyItems.value.values()].reduce( + (accumulator: number, currentValue: PowerItem) => + currentValue !== undefined + ? accumulator + currentValue.minItemPower * currentValue.owned + : 0, + 0 + ) + ) + + const specialIntimacyItemsMaxTotal = computed(() => + [...specialIntimacyItems.value.values()].reduce( + (accumulator: number, currentValue: PowerItem) => + currentValue !== undefined + ? accumulator + currentValue.maxItemPower * currentValue.owned + : 0, + 0 + ) + ) + + const specialIntimacyItemsAveTotal = computed(() => + [...specialIntimacyItems.value.values()].reduce( + (accumulator: number, currentValue: PowerItem) => + currentValue !== undefined + ? accumulator + + ((currentValue.maxItemPower + currentValue.minItemPower) / 2) * currentValue.owned + : 0, + 0 + ) + ) + fetchPowerItems() return { @@ -236,6 +353,13 @@ export const usePowerItems = defineStore('powerItems', () => { specialFellowItems, specialFellowItemsMinTotal, specialFellowItemsMaxTotal, - specialFellowItemsAveTotal + specialFellowItemsAveTotal, + totalIntimacyPower, + standardIntimacyItems, + standardIntimacyItemTotal, + specialIntimacyItems, + specialIntimacyItemsMinTotal, + specialIntimacyItemsMaxTotal, + specialIntimacyItemsAveTotal } }) diff --git a/src/types/PowerItem.ts b/src/types/PowerItem.ts index 89f2b4e..5d08c56 100644 --- a/src/types/PowerItem.ts +++ b/src/types/PowerItem.ts @@ -4,4 +4,5 @@ export type PowerItem = { minItemPower: number maxItemPower: number owned: number + rarity: number } diff --git a/src/views/BlessingPowerView.vue b/src/views/BlessingPowerView.vue index 7c1b9d3..1c76bc3 100644 --- a/src/views/BlessingPowerView.vue +++ b/src/views/BlessingPowerView.vue @@ -5,22 +5,16 @@ import SummaryCard from '@/components/BlessingPower/SummaryCard.vue' diff --git a/src/views/FellowPowerView.vue b/src/views/FellowPowerView.vue index 09bf8da..b6fae2b 100644 --- a/src/views/FellowPowerView.vue +++ b/src/views/FellowPowerView.vue @@ -5,22 +5,16 @@ import SummaryCard from '@/components/FellowPower/SummaryCard.vue' diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 19edb9f..785668b 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,10 +1,91 @@ - + diff --git a/src/views/IntimacyPowerView.vue b/src/views/IntimacyPowerView.vue new file mode 100644 index 0000000..05c50e7 --- /dev/null +++ b/src/views/IntimacyPowerView.vue @@ -0,0 +1,20 @@ + + + + +