Compare commits
139 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5aa8ef1d0e | |||
| bfd30c935b | |||
| dd92009cba | |||
| 7ab0bfbf67 | |||
| b956152edb | |||
| dc9cc5c74c | |||
| 06278ca11e | |||
| 53865f1349 | |||
| 98cd9d829f | |||
| c26c425c6d | |||
| 423444a139 | |||
| b49a30bb6e | |||
| 2a38461a47 | |||
| 52c340be26 | |||
| f2c5304643 | |||
| b6aefde9da | |||
| f31a0013a9 | |||
| e4af877358 | |||
| d162771749 | |||
| f53644119a | |||
| 34999a27b7 | |||
| 6e23f9a7b4 | |||
| d852f6fd96 | |||
| 0e0c133f6f | |||
| 8a6b581981 | |||
| 5497717605 | |||
| 85fa53b16e | |||
| 9feab73fd2 | |||
| ed7c9e66ec | |||
| 82350c6c42 | |||
| 0b7489b21f | |||
| 21fb2c5f72 | |||
| 20e7af41ae | |||
| 17a091bec8 | |||
| 13cb2c5a55 | |||
| 28fe055f32 | |||
| b35de64cea | |||
| 1e7eb5c750 | |||
| 1b1695bf1f | |||
| f524ce5e2e | |||
| d14ef20fb1 | |||
| 83070b632b | |||
| 2723801c9c | |||
| 5d1ce0a262 | |||
| 74ebac9862 | |||
| 2a5b162605 | |||
| d6e897c289 | |||
| a2b8b40464 | |||
| bdaa3bc029 | |||
| 816c1fb0e7 | |||
| acdd8f6964 | |||
| 5fa8f2cf15 | |||
| 5a818fb142 | |||
| 6625a5b9de | |||
| cf69b92934 | |||
| 005cde4a01 | |||
| 1b94d676e7 | |||
| 7cda820a99 | |||
| 7281fdab60 | |||
| 3b9441b555 | |||
| c2abfd6dfd | |||
| f05c393600 | |||
| 23b6f4b4f8 | |||
| d5195aa157 | |||
| 15072fe2c8 | |||
| ba4a6cb2a2 | |||
| 4847d22f7e | |||
| 2c053cc3eb | |||
| c55e0c8bb6 | |||
| 29aafedcfa | |||
| 8070c855a0 | |||
| aaf0eb6546 | |||
| c14a135c94 | |||
| 40d5a876b8 | |||
| 3b47ed1bed | |||
| fdc5d370de | |||
| 19c4a3f7ac | |||
| 2dad283de9 | |||
| 61ff80b69f | |||
| a185bc2153 | |||
| b213cae62b | |||
| 19d3dd5515 | |||
| 4f2d742284 | |||
| a0b7db1bf6 | |||
| c569a1110c | |||
| 56407505ea | |||
| 5e4a78530a | |||
| 7be4d2b9ca | |||
| eb4b0fba00 | |||
| 3f22b4511d | |||
| 6f777332a4 | |||
| 101ea0ffb5 | |||
| af11324fb7 | |||
| 6903774f97 | |||
| 1a9d2d0d9f | |||
| 359abd3ab4 | |||
| 1a3a493df4 | |||
| 0890efd1ec | |||
| 5b4278cf30 | |||
| 8665506160 | |||
| fdd0a8bbb1 | |||
| 8499782fdd | |||
| 124cc85d82 | |||
| 2c39bb9eef | |||
| e05f47e2cb | |||
| 630219a546 | |||
| 7386742c1b | |||
| b19ecd29f8 | |||
| 0bca77a3c7 | |||
| 6230d4b050 | |||
| 54a052bb23 | |||
| 9dcb403289 | |||
| fae1faded5 | |||
| e6654858a1 | |||
| b6e2a7e813 | |||
| c71eeda11f | |||
| 9ac13c4cae | |||
| 4e3f13e77e | |||
| 5f875af0a6 | |||
| 247a87b41c | |||
| 31bf1d8b8f | |||
| abca7e3cd1 | |||
| 11d2e831df | |||
| b89d041064 | |||
| 28295e69d5 | |||
| e979923712 | |||
| 189fe142d1 | |||
| 5acc51534d | |||
| 9fb64e7539 | |||
| 01152a9ad4 | |||
| f605ef0f08 | |||
| 2131d70d6c | |||
| 91d91f26f2 | |||
| 10cb19c10d | |||
| 8d8e669bb3 | |||
| 3864d042ab | |||
| fd01ac366d | |||
| 9ca26e2a7a | |||
| a7d1748c80 |
@@ -0,0 +1,6 @@
|
|||||||
|
<h1>Guild Master</h1>
|
||||||
|
<h2>Adventurer's guild management game</h2>
|
||||||
|
<p>It's a game where you manage an adventurer's guild. You can hire adventurers, assign them to quests to send them on adventures. </p>
|
||||||
|
|
||||||
|
<h3>How to play</h3>
|
||||||
|
Game is playable on <a href="https://guildmaster.yht.one/">guildmaster.yht.one</a> and is always automatically updated when new release is made.
|
||||||
@@ -8,6 +8,19 @@
|
|||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap" rel="stylesheet">
|
||||||
|
<link rel="manifest" href="/manifest.json" />
|
||||||
|
<link rel="preload" href="/img/promo/chicken_mage.jpg" as="image">
|
||||||
|
<meta name="description"
|
||||||
|
content="Guild Master is a browser game where you manage your own adventurer's guild!"/>
|
||||||
|
<meta property="twitter:title" content="Guild Master - Adventurer's guild management game"/>
|
||||||
|
<meta property="twitter:image" content="https://guildmaster.yht.one/img/app-icons/icon.png"/>
|
||||||
|
<meta property="twitter:description"
|
||||||
|
content="Guild Master is a browser game where you manage your own adventurer's guild!"/>
|
||||||
|
<meta property="og:title" content="Guild Master - Adventurer's guild management game"/>
|
||||||
|
<meta property="og:url" content="https://guildmaster.yht.one/"/>
|
||||||
|
<meta property="og:description"
|
||||||
|
content="Guild Master is a browser game where you manage your own adventurer's guild!"/>
|
||||||
|
<meta property="og:image" content="https://guildmaster.yht.one/img/app-icons/icon.png"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
@@ -1,28 +1,31 @@
|
|||||||
{
|
{
|
||||||
"name": "adventurers-guild",
|
"name": "adventurers-guild",
|
||||||
"version": "0.0.1",
|
"version": "0.14.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "run-p type-check build-only",
|
"dev-public": "vite --host",
|
||||||
|
"build": "run-p build-only && cp -r CNAME dist/CNAME",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"build-only": "vite build",
|
"build-only": "vite build",
|
||||||
"type-check": "vue-tsc --noEmit"
|
"type-check": "vue-tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"sass": "^1.59.3",
|
"@vueuse/components": "^11.3.0",
|
||||||
"vue": "^3.2.45",
|
"sass": "^1.81.0",
|
||||||
"vue-router": "^4.1.6"
|
"vue": "^3.5.13",
|
||||||
|
"vue-router": "^4.4.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^18.11.12",
|
"@types/node": "^18.19.64",
|
||||||
"@vitejs/plugin-vue": "^4.0.0",
|
"@vitejs/plugin-vue": "^5.2.0",
|
||||||
"@vue/tsconfig": "^0.1.3",
|
"@vue/tsconfig": "^0.6.0",
|
||||||
"eslint": "^8.36.0",
|
"eslint": "^9.15.0",
|
||||||
"eslint-plugin-vue": "^9.9.0",
|
"eslint-plugin-vue": "^9.31.0",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"typescript": "~4.7.4",
|
"typescript": "~5.7.2",
|
||||||
"vite": "^4.0.0",
|
"vite": "5.4.11",
|
||||||
"vue-tsc": "^1.0.12"
|
"vite-plugin-pwa": "^0.21.0",
|
||||||
|
"vue-tsc": "^2.1.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,115 @@
|
|||||||
|
{
|
||||||
|
"levelRequirement": {
|
||||||
|
"F": 1,
|
||||||
|
"E": 5,
|
||||||
|
"D": 10,
|
||||||
|
"C": 25,
|
||||||
|
"B": 50,
|
||||||
|
"A": 100,
|
||||||
|
"S": 250
|
||||||
|
},
|
||||||
|
"ranks": {
|
||||||
|
"F": [
|
||||||
|
{
|
||||||
|
"title": "Frog Frenzy",
|
||||||
|
"text": "Kill 10 demon frogs."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Rats!",
|
||||||
|
"text": "Get rid of the rats from someone's basement."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Herb gathering",
|
||||||
|
"text": "Collect medicinal herbs."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Big pile of rubble",
|
||||||
|
"text": "Tavern collapsed. Again. Help clean up the debris."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"E": [
|
||||||
|
{
|
||||||
|
"title": "Gnoblin subjugation",
|
||||||
|
"text": "Kill 3 gnoblins."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Phantom menace",
|
||||||
|
"text": "Exorcise ghosts out of someone's apartment."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Scratchy in peril",
|
||||||
|
"text": "Get Scratchy the cat from the tree safe onto the ground."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"D": [
|
||||||
|
{
|
||||||
|
"title": "Caravan escort",
|
||||||
|
"text": "Escort a merchant caravan."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Rare ore",
|
||||||
|
"text": "Obtain laudanium ore for town's blacksmith."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Demonic pests!",
|
||||||
|
"text": "Clear the fields from cabbage imps."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"C": [
|
||||||
|
{
|
||||||
|
"title": "Scratchy, the butcher",
|
||||||
|
"text": "Scratchy turned evil and is terrorizing its victims. Put a stop to it!"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Hobgnoblin subjegation",
|
||||||
|
"text": "Gnoblins evolved and are back for vengeance."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Holy",
|
||||||
|
"text": "Gnoblins summoned their machine god and it started going haywire on everything around it. Destroy it!"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"B": [
|
||||||
|
{
|
||||||
|
"title": "Undead horde",
|
||||||
|
"text": "Due to the spillage of necromancy potion at nearby graveyard we now have an undead army on our doorstep."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Runaway prisoner",
|
||||||
|
"text": "During the last prison guard strike a prisoner managed to escape. Bring them back to their cell."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "The aristocrats",
|
||||||
|
"text": "Royalty wants an escort for one of their carriages."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"A": [
|
||||||
|
{
|
||||||
|
"title": "Ogre king",
|
||||||
|
"text": "Ogres have chosen a new king through democratic vote. They all voted for the strongest ogre."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Devilish dungeon",
|
||||||
|
"text": "New dungeon was discovered. It needs to be mapped and explored so lower rank adventurers can enter."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Eater of Worlds",
|
||||||
|
"text": "A giant worm emerged from the ground and appears to be consuming the ground itself."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"S": [
|
||||||
|
{
|
||||||
|
"title": "The Demon King",
|
||||||
|
"text": "Demon King has awoken and is a threat to whole existence. Heroes needed."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Scratchy, Destruction Incarnate",
|
||||||
|
"text": "Scratchy was reborn as a machine of pure destruction and needs to be stopped."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Jiggly Jungle",
|
||||||
|
"text": "A jungle south began rapidly expanding and experts think arson is our only option."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 234 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 230 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 304 KiB |
|
After Width: | Height: | Size: 92 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="800px" height="800px" viewBox="0 0 569.613 569.614"
|
||||||
|
xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<path d="M371.49,563.638l113.052-65.854c5.26-3.063,9.088-8.094,10.64-13.975c1.555-5.888,0.701-12.148-2.359-17.405
|
||||||
|
l-30.769-52.807c4.789-6.524,9.083-13.115,12.972-19.918c3.893-6.799,7.405-13.84,10.606-21.275l61.114-0.221
|
||||||
|
c6.086-0.021,11.915-2.464,16.202-6.781c4.287-4.32,6.687-10.165,6.665-16.255l-0.48-130.833
|
||||||
|
c-0.024-6.089-2.464-11.919-6.784-16.206c-4.299-4.269-10.113-6.662-16.166-6.662c-0.03,0-0.062,0-0.089,0l-61.182,0.242
|
||||||
|
c-6.444-14.462-14.428-28.14-23.871-40.913l30.417-53.143c6.294-11.001,2.481-25.025-8.52-31.316L369.403,5.335
|
||||||
|
c-5.281-3.023-11.545-3.822-17.424-2.231c-5.872,1.598-10.872,5.462-13.892,10.747L307.665,67
|
||||||
|
c-15.766-1.662-31.653-1.613-47.363,0.144l-30.796-52.892c-3.063-5.263-8.094-9.091-13.975-10.646
|
||||||
|
c-5.884-1.551-12.148-0.704-17.408,2.359L85.068,71.823c-10.949,6.38-14.657,20.429-8.28,31.38l30.765,52.831
|
||||||
|
c-4.761,6.484-9.048,13.076-12.953,19.899c-3.904,6.824-7.417,13.855-10.6,21.255l-61.139,0.235
|
||||||
|
C10.187,197.472-0.046,207.785,0,220.456L0.48,351.29c0.024,6.086,2.463,11.919,6.784,16.206
|
||||||
|
c4.299,4.269,10.11,6.661,16.166,6.661c0.028,0,0.058,0,0.086,0l61.203-0.229c6.432,14.452,14.413,28.131,23.868,40.915
|
||||||
|
l-30.413,53.141c-3.023,5.284-3.825,11.548-2.231,17.423c1.597,5.872,5.462,10.872,10.747,13.896l113.535,64.977
|
||||||
|
c3.596,2.056,7.513,3.032,11.38,3.032c7.962,0,15.701-4.146,19.942-11.552l30.417-53.149c15.799,1.671,31.684,1.619,47.348-0.144
|
||||||
|
l30.799,52.89c3.066,5.26,8.094,9.088,13.978,10.643C359.967,567.552,366.23,566.705,371.49,563.638z M341.129,465.911
|
||||||
|
c-4.902-8.418-14.599-12.815-24.137-10.994c-20.588,3.935-42.174,3.999-63.128,0.202c-9.572-1.735-19.184,2.741-24.015,11.181
|
||||||
|
l-26.748,46.745l-73.694-42.18l26.75-46.741c4.832-8.439,3.819-19.006-2.521-26.371c-13.978-16.239-24.685-34.594-31.818-54.554
|
||||||
|
c-3.265-9.131-11.918-15.227-21.61-15.227c-0.027,0-0.058,0-0.085,0l-53.825,0.199l-0.315-84.937l53.819-0.205
|
||||||
|
c9.722-0.04,18.366-6.197,21.576-15.374c3.69-10.557,7.962-20.019,13.06-28.917c5.101-8.914,11.089-17.387,18.311-25.897
|
||||||
|
c6.294-7.417,7.225-17.993,2.334-26.396l-27.081-46.509l73.385-42.754l27.078,46.497c4.893,8.4,14.544,12.821,24.095,11.004
|
||||||
|
c20.716-3.911,42.317-3.978,63.189-0.19c9.557,1.753,19.189-2.742,24.019-11.178l26.753-46.744l73.697,42.179l-26.753,46.742
|
||||||
|
c-4.826,8.437-3.816,19,2.521,26.368c13.956,16.221,24.669,34.587,31.842,54.59c3.271,9.119,11.919,15.202,21.604,15.202
|
||||||
|
c0.031,0,0.062,0,0.092,0l53.789-0.214l0.315,84.927l-53.783,0.192c-9.712,0.037-18.351,6.182-21.569,15.347
|
||||||
|
c-3.746,10.654-8.023,20.131-13.082,28.975c-5.064,8.847-11.067,17.338-18.356,25.958c-6.271,7.418-7.194,17.978-2.305,26.368
|
||||||
|
l27.078,46.472l-73.391,42.749L341.129,465.911z"/>
|
||||||
|
<path d="M392.531,346.458c16.472-28.773,20.746-62.24,12.047-94.232s-29.342-58.685-58.115-75.151
|
||||||
|
c-18.761-10.74-40.05-16.417-61.562-16.417c-44.446,0-85.762,23.944-107.822,62.485c-33.994,59.404-13.327,135.39,46.071,169.386
|
||||||
|
c18.764,10.737,40.052,16.411,61.564,16.411C329.158,408.943,370.475,385.001,392.531,346.458z M352.696,323.658
|
||||||
|
c-13.902,24.293-39.955,39.385-67.985,39.385c-13.528,0-26.934-3.58-38.764-10.349c-37.433-21.426-50.456-69.312-29.033-106.751
|
||||||
|
c13.905-24.291,39.958-39.385,67.987-39.385c13.528,0,26.932,3.58,38.762,10.355c18.136,10.379,31.142,27.197,36.628,47.359
|
||||||
|
C365.771,284.435,363.075,305.524,352.696,323.658z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 119 KiB |
@@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"name": "Guild Master - Adventurer's guild management game",
|
||||||
|
"short_name": "Guild Master",
|
||||||
|
"theme_color": "#3C2114",
|
||||||
|
"background_color": "#d9c8b3",
|
||||||
|
"display": "standalone",
|
||||||
|
"scope": "./",
|
||||||
|
"start_url": "./",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "img/app-icons/icon-72x72.png",
|
||||||
|
"sizes": "72x72",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "maskable any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "img/app-icons/icon-96x96.png",
|
||||||
|
"sizes": "96x96",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "maskable any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "img/app-icons/icon-128x128.png",
|
||||||
|
"sizes": "128x128",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "maskable any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "img/app-icons/icon-144x144.png",
|
||||||
|
"sizes": "144x144",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "maskable any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "img/app-icons/icon-152x152.png",
|
||||||
|
"sizes": "152x152",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "maskable any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "img/app-icons/icon-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "maskable any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "img/app-icons/icon-384x384.png",
|
||||||
|
"sizes": "384x384",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "maskable any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "img/app-icons/icon.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "maskable any"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": "aldek",
|
||||||
|
"name": "Aldek"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "aria",
|
||||||
|
"name": "Aria"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "burnett",
|
||||||
|
"name": "Burnett"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "charlotte",
|
||||||
|
"name": "Charlotte"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "ella",
|
||||||
|
"name": "Ella"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "elyza",
|
||||||
|
"name": "Elyza"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "emille",
|
||||||
|
"name": "Emille"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "garret",
|
||||||
|
"name": "Garret"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "gryza",
|
||||||
|
"name": "Gryza"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "lestat",
|
||||||
|
"name": "Lestat"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "lydia",
|
||||||
|
"name": "Lydia"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "noor",
|
||||||
|
"name": "Noor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "noron",
|
||||||
|
"name": "Noron"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "oola",
|
||||||
|
"name": "Oola"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "owen",
|
||||||
|
"name": "Owen"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "ryslette",
|
||||||
|
"name": "Ryslette"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "sally",
|
||||||
|
"name": "Sally"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "tovu",
|
||||||
|
"name": "Tovu"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "wrydio",
|
||||||
|
"name": "Wrydio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "xarya",
|
||||||
|
"name": "Xarya"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
After Width: | Height: | Size: 4.9 MiB |
|
After Width: | Height: | Size: 5.6 MiB |
|
After Width: | Height: | Size: 5.3 MiB |
|
After Width: | Height: | Size: 4.9 MiB |
|
After Width: | Height: | Size: 406 KiB |
|
After Width: | Height: | Size: 470 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 99 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="800px" height="800px" viewBox="0 0 569.613 569.614"
|
||||||
|
xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<path d="M371.49,563.638l113.052-65.854c5.26-3.063,9.088-8.094,10.64-13.975c1.555-5.888,0.701-12.148-2.359-17.405
|
||||||
|
l-30.769-52.807c4.789-6.524,9.083-13.115,12.972-19.918c3.893-6.799,7.405-13.84,10.606-21.275l61.114-0.221
|
||||||
|
c6.086-0.021,11.915-2.464,16.202-6.781c4.287-4.32,6.687-10.165,6.665-16.255l-0.48-130.833
|
||||||
|
c-0.024-6.089-2.464-11.919-6.784-16.206c-4.299-4.269-10.113-6.662-16.166-6.662c-0.03,0-0.062,0-0.089,0l-61.182,0.242
|
||||||
|
c-6.444-14.462-14.428-28.14-23.871-40.913l30.417-53.143c6.294-11.001,2.481-25.025-8.52-31.316L369.403,5.335
|
||||||
|
c-5.281-3.023-11.545-3.822-17.424-2.231c-5.872,1.598-10.872,5.462-13.892,10.747L307.665,67
|
||||||
|
c-15.766-1.662-31.653-1.613-47.363,0.144l-30.796-52.892c-3.063-5.263-8.094-9.091-13.975-10.646
|
||||||
|
c-5.884-1.551-12.148-0.704-17.408,2.359L85.068,71.823c-10.949,6.38-14.657,20.429-8.28,31.38l30.765,52.831
|
||||||
|
c-4.761,6.484-9.048,13.076-12.953,19.899c-3.904,6.824-7.417,13.855-10.6,21.255l-61.139,0.235
|
||||||
|
C10.187,197.472-0.046,207.785,0,220.456L0.48,351.29c0.024,6.086,2.463,11.919,6.784,16.206
|
||||||
|
c4.299,4.269,10.11,6.661,16.166,6.661c0.028,0,0.058,0,0.086,0l61.203-0.229c6.432,14.452,14.413,28.131,23.868,40.915
|
||||||
|
l-30.413,53.141c-3.023,5.284-3.825,11.548-2.231,17.423c1.597,5.872,5.462,10.872,10.747,13.896l113.535,64.977
|
||||||
|
c3.596,2.056,7.513,3.032,11.38,3.032c7.962,0,15.701-4.146,19.942-11.552l30.417-53.149c15.799,1.671,31.684,1.619,47.348-0.144
|
||||||
|
l30.799,52.89c3.066,5.26,8.094,9.088,13.978,10.643C359.967,567.552,366.23,566.705,371.49,563.638z M341.129,465.911
|
||||||
|
c-4.902-8.418-14.599-12.815-24.137-10.994c-20.588,3.935-42.174,3.999-63.128,0.202c-9.572-1.735-19.184,2.741-24.015,11.181
|
||||||
|
l-26.748,46.745l-73.694-42.18l26.75-46.741c4.832-8.439,3.819-19.006-2.521-26.371c-13.978-16.239-24.685-34.594-31.818-54.554
|
||||||
|
c-3.265-9.131-11.918-15.227-21.61-15.227c-0.027,0-0.058,0-0.085,0l-53.825,0.199l-0.315-84.937l53.819-0.205
|
||||||
|
c9.722-0.04,18.366-6.197,21.576-15.374c3.69-10.557,7.962-20.019,13.06-28.917c5.101-8.914,11.089-17.387,18.311-25.897
|
||||||
|
c6.294-7.417,7.225-17.993,2.334-26.396l-27.081-46.509l73.385-42.754l27.078,46.497c4.893,8.4,14.544,12.821,24.095,11.004
|
||||||
|
c20.716-3.911,42.317-3.978,63.189-0.19c9.557,1.753,19.189-2.742,24.019-11.178l26.753-46.744l73.697,42.179l-26.753,46.742
|
||||||
|
c-4.826,8.437-3.816,19,2.521,26.368c13.956,16.221,24.669,34.587,31.842,54.59c3.271,9.119,11.919,15.202,21.604,15.202
|
||||||
|
c0.031,0,0.062,0,0.092,0l53.789-0.214l0.315,84.927l-53.783,0.192c-9.712,0.037-18.351,6.182-21.569,15.347
|
||||||
|
c-3.746,10.654-8.023,20.131-13.082,28.975c-5.064,8.847-11.067,17.338-18.356,25.958c-6.271,7.418-7.194,17.978-2.305,26.368
|
||||||
|
l27.078,46.472l-73.391,42.749L341.129,465.911z"/>
|
||||||
|
<path d="M392.531,346.458c16.472-28.773,20.746-62.24,12.047-94.232s-29.342-58.685-58.115-75.151
|
||||||
|
c-18.761-10.74-40.05-16.417-61.562-16.417c-44.446,0-85.762,23.944-107.822,62.485c-33.994,59.404-13.327,135.39,46.071,169.386
|
||||||
|
c18.764,10.737,40.052,16.411,61.564,16.411C329.158,408.943,370.475,385.001,392.531,346.458z M352.696,323.658
|
||||||
|
c-13.902,24.293-39.955,39.385-67.985,39.385c-13.528,0-26.934-3.58-38.764-10.349c-37.433-21.426-50.456-69.312-29.033-106.751
|
||||||
|
c13.905-24.291,39.958-39.385,67.987-39.385c13.528,0,26.932,3.58,38.762,10.355c18.136,10.379,31.142,27.197,36.628,47.359
|
||||||
|
C365.771,284.435,363.075,305.524,352.696,323.658z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.6 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Discord</title><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect width="24" height="24" fill="none"/>
|
||||||
|
<path d="M12,2A10,10,0,0,0,8.84,21.5c.5.08.66-.23.66-.5V19.31C6.73,19.91,6.14,18,6.14,18A2.69,2.69,0,0,0,5,16.5c-.91-.62.07-.6.07-.6a2.1,2.1,0,0,1,1.53,1,2.15,2.15,0,0,0,2.91.83,2.16,2.16,0,0,1,.63-1.34C8,16.17,5.62,15.31,5.62,11.5a3.87,3.87,0,0,1,1-2.71,3.58,3.58,0,0,1,.1-2.64s.84-.27,2.75,1a9.63,9.63,0,0,1,5,0c1.91-1.29,2.75-1,2.75-1a3.58,3.58,0,0,1,.1,2.64,3.87,3.87,0,0,1,1,2.71c0,3.82-2.34,4.66-4.57,4.91a2.39,2.39,0,0,1,.69,1.85V21c0,.27.16.59.67.5A10,10,0,0,0,12,2Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 660 B |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 4.2 MiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 731 KiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 1018 KiB |
|
After Width: | Height: | Size: 947 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 474 KiB |
|
After Width: | Height: | Size: 130 KiB |
|
After Width: | Height: | Size: 200 KiB |
@@ -1,305 +1,120 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {RouterLink, RouterView} from 'vue-router'</script>
|
import {RouterLink, RouterView} from 'vue-router'
|
||||||
|
import {version} from "../package.json"
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<section class="loading-screen" :class="{disabled: !loading}">
|
||||||
|
<div class="title panel note-paper">
|
||||||
|
<h1>Guild Master</h1>
|
||||||
|
<h3>Adventurer's guild management game</h3>
|
||||||
|
<small>v{{ version }}</small>
|
||||||
|
<div class="lds-ring">
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
<h3>Loading assets...</h3>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
<header>
|
<header>
|
||||||
<nav>
|
<nav>
|
||||||
<RouterLink to="/">Guild</RouterLink>
|
<RouterLink
|
||||||
<RouterLink to="/quests">Quests</RouterLink>
|
:to="{name: 'guild'}"
|
||||||
<RouterLink to="/adventurers">Adventurers</RouterLink>
|
>
|
||||||
|
Guild
|
||||||
|
</RouterLink>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
<RouterView/>
|
||||||
<RouterView
|
|
||||||
:guild="guild"
|
|
||||||
:adventurers="adventurers"
|
|
||||||
:quests="missives"
|
|
||||||
:lastRecruitTime="lastRecruitHandled"
|
|
||||||
@finalizeQuest="finalizeQuest($event)"
|
|
||||||
@wipeSave="resetSave()"
|
|
||||||
@recruitActionTaken="lastRecruitHandled = Number(new Date())"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {defineComponent} from "vue";
|
import {defineComponent} from "vue";
|
||||||
import {Adventurer} from "@/classes/Adventurer";
|
import AdventurerIdentity from "@/models/AdventurerIdentity.ts";
|
||||||
import {Quest} from "@/classes/Quest";
|
import SaveData from "@/models/SaveData.ts";
|
||||||
import {Guild} from "@/classes/Guild";
|
|
||||||
import {getFromString, QuestRank} from "@/classes/QuestRank";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "GuildView",
|
name: "GuildMaster",
|
||||||
watch: {
|
|
||||||
adventurers: {
|
|
||||||
deep: true,
|
|
||||||
handler(newAdventurers) {
|
|
||||||
for (const adventurerId in newAdventurers) {
|
|
||||||
const adventurer = newAdventurers[adventurerId] as Adventurer;
|
|
||||||
if (adventurer.canLevelUp()) {
|
|
||||||
adventurer.levelUp();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: () => ({
|
data: () => ({
|
||||||
guild: new Guild(1, 500),
|
loading: true,
|
||||||
lastQuestGot: {
|
screenWakeLock: null as null | WakeLockSentinel,
|
||||||
S: null as null|number,
|
possibleRecruits: {} as { [key: string]: AdventurerIdentity },
|
||||||
A: null as null|number,
|
saveData: null as null | SaveData,
|
||||||
B: null as null|number,
|
|
||||||
C: null as null|number,
|
|
||||||
D: null as null|number,
|
|
||||||
E: null as null|number,
|
|
||||||
F: null as null|number,
|
|
||||||
},
|
|
||||||
lastRecruitHandled: null as null|number,
|
|
||||||
adventurers: {
|
|
||||||
} as { [key: string]: Adventurer },
|
|
||||||
quests: {
|
|
||||||
F: {
|
|
||||||
"1": new Quest("1", QuestRank.F, "Frog Frenzy", "Kill 10 demon frogs.", 30, 1, 25),
|
|
||||||
"2": new Quest("2", QuestRank.F, "Rats!", "Get rid of the rats in someone's basement.", 21, 1, 15),
|
|
||||||
"3": new Quest("3", QuestRank.F, "Herb gethering", "Colect medicinal herbs.", 25, 1, 19),
|
|
||||||
"4": new Quest("4", QuestRank.F, "Big pile of rubble", "Tavern collapsed. Again. Help clean up the debris.", 27, 1, 10),
|
|
||||||
} as { [key: string]: Quest },
|
|
||||||
E: {
|
|
||||||
"1": new Quest("1", QuestRank.E, "Gnoblin subjegation", "Kill 3 gnoblins.", 500, 2, 30),
|
|
||||||
"2": new Quest("2", QuestRank.E, "Phantom menace", "Exorcise ghosts out of someone's apartment.", 510, 2, 28),
|
|
||||||
"3": new Quest("3", QuestRank.E, "Scratchy in peril", "Get Scratchy the cat from the tree safe to the ground.", 550, 2, 32),
|
|
||||||
} as { [key: string]: Quest },
|
|
||||||
D: {
|
|
||||||
"1": new Quest("1", QuestRank.D, "Caravan escort", "Escort a merchant caravan.", 2000, 3, 47),
|
|
||||||
"2": new Quest("2", QuestRank.D, "Rare ore", "Obtain laudanium ore for town's blacksmith.", 2200, 3, 54),
|
|
||||||
"3": new Quest("3", QuestRank.D, "Demonic pests!", "Clear the fields from cabbage imps.", 2149, 3, 49),
|
|
||||||
} as { [key: string]: Quest },
|
|
||||||
C: {
|
|
||||||
"1": new Quest("1", QuestRank.C, "Scratchy, the butcher", "Scratchy turned evil and is terrorizing its victims. Put a stop to it!", 7500, 5, 150),
|
|
||||||
"2": new Quest("2", QuestRank.C, "Hobgnoblin subjegation", "Gnoblins evolved and are back for vengance.", 7600, 5, 150),
|
|
||||||
"3": new Quest("3", QuestRank.C, "Holy", "Gnoblins summoned their machine god and it started going haywire on everything around it. Destroy it!", 7777, 5, 49),
|
|
||||||
} as { [key: string]: Quest },
|
|
||||||
B: {
|
|
||||||
"1": new Quest("1", QuestRank.B, "Undead horde", "Due to the spillage of necromancy potion at nearby graveyard we now have an undead army on our doorstep.", 25000, 8, 200),
|
|
||||||
"2": new Quest("2", QuestRank.B, "Runaway prisoner", "During the last prison guard strike a prisoner managed to escape. Bring them back to their cell.", 26000, 8, 210),
|
|
||||||
"3": new Quest("3", QuestRank.B, "The aristocrats", "Royalty wants an escort for one of their carriages.", 25000, 8, 200),
|
|
||||||
} as { [key: string]: Quest },
|
|
||||||
A: {
|
|
||||||
"1": new Quest("1", QuestRank.A, "Ogre king", "Ogres have chosen a new king through democratic vote. They all voted for the strongest ogre.", 100000, 12, 200),
|
|
||||||
"2": new Quest("2", QuestRank.A, "Devilish dungeon", "New dungeon was discovered. It needs to be mapped and explored so lower rank adventurers can enter.", 100000, 12, 210),
|
|
||||||
"3": new Quest("3", QuestRank.A, "Eater of Worlds", "A giant worm emerged from the ground and appears to be consuming the ground itself.", 100000, 12, 200),
|
|
||||||
} as { [key: string]: Quest },
|
|
||||||
S: {
|
|
||||||
"1": new Quest("1", QuestRank.S, "The Demon King", "Demon King has awoken and is a threat to whole existence. Heroes needed.", 1000000, 20, 200),
|
|
||||||
"2": new Quest("2", QuestRank.S, "Scratchy, Destruction Incarnate", "Scratchy was reborn as a machine of pure destruction and needs to be stopped.", 1000000, 20, 210),
|
|
||||||
"3": new Quest("3", QuestRank.S, "Jiggly Jungle", "A jungle south began rapidly expanding and experts think arson is our only option.", 1000000, 20, 200),
|
|
||||||
} as { [key: string]: Quest },
|
|
||||||
} as { [key: string]: { [key: string]: Quest } },
|
|
||||||
missives: {
|
|
||||||
F: {} as { [key: string]: Quest },
|
|
||||||
E: {} as { [key: string]: Quest },
|
|
||||||
D: {} as { [key: string]: Quest },
|
|
||||||
C: {} as { [key: string]: Quest },
|
|
||||||
B: {} as { [key: string]: Quest },
|
|
||||||
A: {} as { [key: string]: Quest },
|
|
||||||
S: {} as { [key: string]: Quest },
|
|
||||||
} as { [key: string]: { [key: string]: Quest } },
|
|
||||||
}),
|
}),
|
||||||
methods: {
|
methods: {
|
||||||
async updateMissives() {
|
async acquireScreenWakeLock(): Promise<void> {
|
||||||
for (const missiveRank in this.missives) {
|
if (!("wakeLock" in navigator)) {
|
||||||
const rank = getFromString(missiveRank as QuestRank);
|
return;
|
||||||
for (const missiveId in this.missives[rank.toString() as QuestRank]) {
|
}
|
||||||
const missive = this.missives[rank.toString()][missiveId];
|
if (this.screenWakeLock !== null) {
|
||||||
if (missive.adventurers.length <= 0) {
|
return;
|
||||||
missive.progressPoints = 0;
|
}
|
||||||
|
try {
|
||||||
|
this.screenWakeLock = await navigator.wakeLock.request("screen");
|
||||||
|
} catch (e) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.acquireScreenWakeLock();
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async loadAdventurerData(): Promise<void> {
|
||||||
|
await fetch("/data/adventurers.json")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
if (!Array.isArray(data)) throw new Error("Data was expected to be an array");
|
||||||
|
for (const rawData of data) {
|
||||||
|
if (typeof rawData.id !== "string" || typeof rawData.name !== "string" || typeof rawData.portrait !== "string") {
|
||||||
|
console.error("Failed to load one of the adventurer's data: invalid data");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (const adventurerId in missive.adventurers) {
|
this.possibleRecruits[rawData.id] = new AdventurerIdentity(
|
||||||
const adventurer = missive.adventurers[adventurerId];
|
rawData.id,
|
||||||
const attack = adventurer.attackPerLevel * adventurer.level;
|
rawData.name,
|
||||||
missive.progressPoints = Math.min(missive.progressPoints + attack, missive.maxProgress);
|
rawData.portrait,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
}
|
.catch(error => {
|
||||||
|
console.error("Failed to load adventurer data:", error);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
finalizeQuest(missive: Quest) {
|
saveGame(): void {
|
||||||
missive.progressPoints = 0;
|
window.localStorage.setItem("saveData", JSON.stringify(this.saveData));
|
||||||
this.guild.gold += missive.goldReward;
|
console.debug("Game saved");
|
||||||
for (const adventurerId in missive.adventurers) {
|
|
||||||
const adventurer = missive.adventurers[adventurerId];
|
|
||||||
adventurer.exp += (missive.expReward / missive.adventurers.length);
|
|
||||||
adventurer.busy = false;
|
|
||||||
}
|
|
||||||
missive.adventurers = [];
|
|
||||||
delete this.missives[missive.rank.toString() as QuestRank][missive.id];
|
|
||||||
},
|
},
|
||||||
getRandomQuest(rank: QuestRank): Quest | null {
|
loadGame(): void {
|
||||||
const keys = Object.keys(this.quests[rank]);
|
const saveData = window.localStorage.getItem("saveData");
|
||||||
if (keys.length <= 0) return null;
|
if (saveData === null) {
|
||||||
const questsForRank = this.quests[rank] as { [key: string]: Quest };
|
this.saveData = new SaveData({}, this.possibleRecruits);
|
||||||
const randomId = keys.length * Math.random() << 0;
|
return;
|
||||||
const randomIdString = keys[randomId] as string;
|
|
||||||
return questsForRank[randomIdString];
|
|
||||||
},
|
|
||||||
createMissive(questToAdd: Quest, rank: QuestRank) {
|
|
||||||
const quest = JSON.parse(JSON.stringify(questToAdd));
|
|
||||||
const newId = Math.random().toString(16).slice(2).toString();
|
|
||||||
quest.id = newId;
|
|
||||||
this.missives[rank][newId] = quest;
|
|
||||||
},
|
|
||||||
saveGame() {
|
|
||||||
console.debug("Saving game...");
|
|
||||||
window.localStorage.setItem("savedGame", JSON.stringify({
|
|
||||||
guild: this.guild,
|
|
||||||
adventurers: this.adventurers,
|
|
||||||
missives: this.missives,
|
|
||||||
lastQuestGot: this.lastQuestGot,
|
|
||||||
lastRecruitAction: this.lastRecruitHandled,
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
loadGame() {
|
|
||||||
const rawData = window.localStorage.getItem("savedGame");
|
|
||||||
if (!rawData) return;
|
|
||||||
const saveData = JSON.parse(rawData);
|
|
||||||
|
|
||||||
this.lastQuestGot = saveData.lastQuestGot;
|
|
||||||
|
|
||||||
this.guild = new Guild(saveData.guild.level, saveData.guild.gold);
|
|
||||||
|
|
||||||
const adventurers = {} as { [key: string]: Adventurer };
|
|
||||||
|
|
||||||
for (const id in saveData.adventurers) {
|
|
||||||
const data = saveData.adventurers[id];
|
|
||||||
const adventurer = new Adventurer(data.id, data.name, data.portrait, data.attackPerLevel, data.defensePerLevel, data.level);
|
|
||||||
adventurer.busy = data.busy;
|
|
||||||
adventurers[data.id] = adventurer;
|
|
||||||
}
|
}
|
||||||
this.adventurers = adventurers;
|
const jsonData = JSON.parse(saveData);
|
||||||
|
if (jsonData === null) return;
|
||||||
const missives = {} as { [key: string]: { [key: string]: Quest } };
|
this.saveData = new SaveData(jsonData, this.possibleRecruits);
|
||||||
|
for (const adventurer of this.saveData.adventurers) {
|
||||||
for (const id in saveData.missives) {
|
delete this.possibleRecruits[adventurer?.identity?.id];
|
||||||
const missiveRank = {} as { [key: string]: Quest }
|
|
||||||
for (const questId in saveData.missives[id]) {
|
|
||||||
const data = saveData.missives[id][questId];
|
|
||||||
const quest = new Quest(questId, getFromString(data.rank), data.title, data.text, data.maxProgress, data.expReward, data.goldReward);
|
|
||||||
quest.progressPoints = data.progressPoints;
|
|
||||||
if (data.adventurers.length > 0) {
|
|
||||||
quest.adventurers.push(this.adventurers[data.adventurers[0].id])
|
|
||||||
}
|
|
||||||
missiveRank[questId] = quest;
|
|
||||||
}
|
|
||||||
missives[id] = missiveRank;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.missives = missives;
|
|
||||||
|
|
||||||
this.lastRecruitHandled = saveData.lastRecruitAction;
|
|
||||||
},
|
|
||||||
resetSave() {
|
|
||||||
if (!confirm("You are about to wipe your save file. Are you sure?")) return;
|
|
||||||
window.localStorage.removeItem("savedGame");
|
|
||||||
window.location.reload();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
async mounted() {
|
||||||
|
|
||||||
|
await this.acquireScreenWakeLock();
|
||||||
|
|
||||||
|
await this.loadAdventurerData();
|
||||||
|
|
||||||
this.loadGame();
|
this.loadGame();
|
||||||
|
|
||||||
|
this.loading = false;
|
||||||
|
console.debug("Game loaded");
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
this.saveGame();
|
this.saveGame();
|
||||||
}, 30*1000)
|
}, 10 * 1000);
|
||||||
|
|
||||||
setInterval(() => {
|
},
|
||||||
this.updateMissives();
|
|
||||||
|
|
||||||
const now = Number(new Date());
|
|
||||||
|
|
||||||
for (const id in this.lastQuestGot) {
|
|
||||||
const lastTime = this.lastQuestGot[getFromString(id as QuestRank)];
|
|
||||||
if (lastTime === null) this.lastQuestGot[getFromString(id as QuestRank)] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Number(now) - Number(this.lastQuestGot.F) >= 12 * 1000) {
|
|
||||||
this.lastQuestGot.F = now;
|
|
||||||
const keys = Object.keys(this.missives[QuestRank.F]);
|
|
||||||
if (keys.length >= 5) return;
|
|
||||||
const quest = this.getRandomQuest(QuestRank.F);
|
|
||||||
if (quest !== null) {
|
|
||||||
this.createMissive(quest, QuestRank.F);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.guild.level < 2) return;
|
|
||||||
if (Number(now) - Number(this.lastQuestGot.E) >= 20 * 1000) {
|
|
||||||
this.lastQuestGot.E = now;
|
|
||||||
const keys = Object.keys(this.missives[QuestRank.E]);
|
|
||||||
if (keys.length >= 5) return;
|
|
||||||
const quest = this.getRandomQuest(QuestRank.E);
|
|
||||||
if (quest !== null) {
|
|
||||||
this.createMissive(quest, QuestRank.E);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.guild.level < 3) return;
|
|
||||||
if (Number(now) - Number(this.lastQuestGot.D) >= 50 * 1000) {
|
|
||||||
this.lastQuestGot.D = now;
|
|
||||||
const keys = Object.keys(this.missives[QuestRank.D]);
|
|
||||||
if (keys.length >= 5) return;
|
|
||||||
const quest = this.getRandomQuest(QuestRank.D);
|
|
||||||
if (quest !== null) {
|
|
||||||
this.createMissive(quest, QuestRank.D);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.guild.level < 4) return;
|
|
||||||
if (Number(now) - Number(this.lastQuestGot.C) >= 2 * 60 * 1000) {
|
|
||||||
this.lastQuestGot.C = now;
|
|
||||||
const keys = Object.keys(this.missives[QuestRank.C]);
|
|
||||||
if (keys.length >= 5) return;
|
|
||||||
const quest = this.getRandomQuest(QuestRank.C);
|
|
||||||
if (quest !== null) {
|
|
||||||
this.createMissive(quest, QuestRank.C);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.guild.level < 5) return;
|
|
||||||
if (Number(now) - Number(this.lastQuestGot.B) >= 2 * 60 * 1000) {
|
|
||||||
this.lastQuestGot.B = now;
|
|
||||||
const keys = Object.keys(this.missives[QuestRank.B]);
|
|
||||||
if (keys.length >= 5) return;
|
|
||||||
const quest = this.getRandomQuest(QuestRank.B);
|
|
||||||
if (quest !== null) {
|
|
||||||
this.createMissive(quest, QuestRank.B);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.guild.level < 6) return;
|
|
||||||
if (Number(now) - Number(this.lastQuestGot.A) >= 5 * 60 * 1000) {
|
|
||||||
this.lastQuestGot.A = now;
|
|
||||||
const keys = Object.keys(this.missives[QuestRank.A]);
|
|
||||||
if (keys.length >= 5) return;
|
|
||||||
const quest = this.getRandomQuest(QuestRank.A);
|
|
||||||
if (quest !== null) {
|
|
||||||
this.createMissive(quest, QuestRank.A);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.guild.level < 6) return;
|
|
||||||
if (Number(now) - Number(this.lastQuestGot.S) >= 30 * 60 * 1000) {
|
|
||||||
this.lastQuestGot.S = now;
|
|
||||||
const keys = Object.keys(this.missives[QuestRank.S]);
|
|
||||||
if (keys.length >= 5) return;
|
|
||||||
const quest = this.getRandomQuest(QuestRank.S);
|
|
||||||
if (quest !== null) {
|
|
||||||
this.createMissive(quest, QuestRank.S);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -322,18 +137,98 @@ nav {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
padding: 2rem;
|
padding-inline: 2rem;
|
||||||
background-size: 200px;
|
padding-bottom: 2rem;
|
||||||
background-blend-mode: darken;
|
padding-top: 0.5rem;
|
||||||
background-color: rgba(0, 0, 0, 0.65);
|
background-size: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: bottom;
|
||||||
|
filter: drop-shadow(0 0 0.5rem rgba(0, 0, 0, 0.25));
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 2rem;
|
||||||
|
height: 2rem;
|
||||||
|
transform: translateY(0.35rem);
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
color: #fff;
|
color: #000;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&.router-link-active {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.router-link-exact-active {
|
}
|
||||||
|
|
||||||
|
.loading-screen {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
z-index: 5;
|
||||||
|
user-select: none;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
background-image: url("/img/promo/chicken_mage.jpg");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: flex-start;
|
||||||
|
transition: opacity 0.25s linear;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-block: 2.5%;
|
||||||
|
margin-inline: 2.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lds-ring {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lds-ring div {
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
width: 64px;
|
||||||
|
height: 64px;
|
||||||
|
margin: 8px;
|
||||||
|
border: 8px solid;
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
||||||
|
border-color: #000 transparent transparent transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lds-ring div:nth-child(1) {
|
||||||
|
animation-delay: -0.45s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lds-ring div:nth-child(2) {
|
||||||
|
animation-delay: -0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lds-ring div:nth-child(3) {
|
||||||
|
animation-delay: -0.15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes lds-ring {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: system-ui, sans-serif;
|
||||||
|
font-weight: normal;
|
||||||
|
vertical-align: baseline;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol, ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote, q {
|
||||||
|
quotes: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
outline: none;
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:focus-visible {
|
||||||
|
outline: 2px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:focus-visible {
|
||||||
|
outline: 2px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
img, picture, video, canvas, svg {
|
||||||
|
display: block;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
min-height: 100vh;
|
||||||
|
font-family: 'EB Garamond', serif;
|
||||||
|
overflow-y: scroll;
|
||||||
|
user-select: none;
|
||||||
|
background-color: rgb(19, 16, 14);
|
||||||
|
background-blend-mode: darken;
|
||||||
|
background-repeat: repeat;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
max-width: 69rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
export class Adventurer {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
portrait: string;
|
|
||||||
level: number;
|
|
||||||
exp: number;
|
|
||||||
attackPerLevel: number;
|
|
||||||
defensePerLevel: number;
|
|
||||||
busy: boolean;
|
|
||||||
|
|
||||||
constructor(id: string, name: string, portrait: string, attackPerLevel: number, defensePerLevel: number, level: number = 1) {
|
|
||||||
this.id = id;
|
|
||||||
this.name = name;
|
|
||||||
this.portrait = portrait;
|
|
||||||
this.attackPerLevel = attackPerLevel;
|
|
||||||
this.defensePerLevel = defensePerLevel;
|
|
||||||
this.level = level;
|
|
||||||
this.exp = 0;
|
|
||||||
this.busy = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
levelUp(): void {
|
|
||||||
this.exp = 0;
|
|
||||||
this.level += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
canLevelUp(): boolean {
|
|
||||||
const requirement = this.level * 3;
|
|
||||||
return this.exp >= requirement;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
export class Guild {
|
|
||||||
gold: number;
|
|
||||||
level: number;
|
|
||||||
displayUpgradeCost: number|string;
|
|
||||||
|
|
||||||
constructor(level: number, gold: number) {
|
|
||||||
this.gold = gold;
|
|
||||||
this.level = level;
|
|
||||||
this.displayUpgradeCost = this.getUpgradeCost() ?? "Max level";
|
|
||||||
}
|
|
||||||
|
|
||||||
upgrade(): void {
|
|
||||||
const cost = this.getUpgradeCost();
|
|
||||||
if (cost === null) return;
|
|
||||||
if (this.gold < cost) return;
|
|
||||||
this.gold -= cost;
|
|
||||||
this.level += 1;
|
|
||||||
if (this.level >= 7) {
|
|
||||||
this.displayUpgradeCost = "Max level";
|
|
||||||
} else {
|
|
||||||
const newCost = this.getUpgradeCost();
|
|
||||||
if (newCost === null) return;
|
|
||||||
this.displayUpgradeCost = newCost;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getUpgradeCost(): number|null {
|
|
||||||
return upgradeCosts[this.level] ?? null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const upgradeCosts = {
|
|
||||||
"1": 1000,
|
|
||||||
"2": 2500,
|
|
||||||
"3": 5000,
|
|
||||||
"4": 10000,
|
|
||||||
"5": 25000,
|
|
||||||
"6": 50000,
|
|
||||||
} as {[index:string]: number}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
import type {Adventurer} from "@/classes/Adventurer";
|
|
||||||
import type {QuestRank} from "@/classes/QuestRank";
|
|
||||||
|
|
||||||
export class Quest {
|
|
||||||
id: string;
|
|
||||||
rank: QuestRank;
|
|
||||||
title: string;
|
|
||||||
text: string;
|
|
||||||
adventurers: Array<Adventurer>;
|
|
||||||
progressPoints: number;
|
|
||||||
maxProgress: number;
|
|
||||||
expReward: number;
|
|
||||||
goldReward: number;
|
|
||||||
|
|
||||||
constructor(id: string, rank: QuestRank, title: string, text: string, maxProgress: number, expReward: number, goldReward: number) {
|
|
||||||
this.id = id;
|
|
||||||
this.rank = rank;
|
|
||||||
this.title = title;
|
|
||||||
this.text = text;
|
|
||||||
this.maxProgress = maxProgress;
|
|
||||||
this.expReward = expReward;
|
|
||||||
this.goldReward = goldReward;
|
|
||||||
this.progressPoints = 0;
|
|
||||||
this.adventurers = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
export enum QuestRank {
|
|
||||||
S = "S",
|
|
||||||
A = "A",
|
|
||||||
B = "B",
|
|
||||||
C = "C",
|
|
||||||
D = "D",
|
|
||||||
E = "E",
|
|
||||||
F = "F",
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getFromString(string: keyof typeof QuestRank): QuestRank {
|
|
||||||
return QuestRank[string];
|
|
||||||
}
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="slots">
|
|
||||||
<button class="slot" v-for="adventurer in adventurers" :key="adventurer.id">
|
|
||||||
<AdventurerMiniComponent
|
|
||||||
:adventurer="currentAdventurer"
|
|
||||||
:all-adventurers="adventurers"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import {defineComponent} from "vue";
|
|
||||||
import AdventurerMiniComponent from "@/components/AdventurerMiniComponent.vue";
|
|
||||||
import type {Adventurer} from "@/classes/Adventurer";
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
name: "AdventurerList",
|
|
||||||
components: {AdventurerMiniComponent},
|
|
||||||
data: () => ({
|
|
||||||
currentAdventurer: null as Adventurer|null
|
|
||||||
}),
|
|
||||||
props: {
|
|
||||||
adventurers: {
|
|
||||||
type: Array<Adventurer>
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
print(a: string) {
|
|
||||||
console.log(a);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.slots {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
.slot {
|
|
||||||
padding: 0;
|
|
||||||
width: 5rem;
|
|
||||||
height: 5rem;
|
|
||||||
border: 2px solid #000;
|
|
||||||
background-color: rgba(0,0,0, 0.2);
|
|
||||||
cursor: pointer;
|
|
||||||
border-radius: 0.2rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
<template>
|
|
||||||
<AdventurerTile
|
|
||||||
v-if="adventurer"
|
|
||||||
:adventurer="adventurer"
|
|
||||||
@click="() => {
|
|
||||||
$emit('freeAdventurer', adventurer.id)
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
<article
|
|
||||||
class="select"
|
|
||||||
v-else
|
|
||||||
@click="() => {
|
|
||||||
if (Object.keys(allAdventurers).length <= 0) return;
|
|
||||||
selection = !selection;
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<span>+</span>
|
|
||||||
</article>
|
|
||||||
<div class="selection" v-if="selection">
|
|
||||||
<button
|
|
||||||
class="slot"
|
|
||||||
v-for="adventurer in allAdventurers"
|
|
||||||
:key="adventurer.id"
|
|
||||||
:class="{busy: adventurer.busy}"
|
|
||||||
@click="() => {
|
|
||||||
if (adventurer.busy) return;
|
|
||||||
$emit('hireAdventurer', adventurer.id);
|
|
||||||
selection = false;
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<AdventurerTile
|
|
||||||
:adventurer="adventurer"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import {defineComponent, type PropType} from "vue";
|
|
||||||
import type {Adventurer} from "@/classes/Adventurer";
|
|
||||||
import AdventurerTile from "@/components/AdventurerTile.vue";
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
name: "AdventurerMiniComponent",
|
|
||||||
components: {AdventurerTile},
|
|
||||||
emits: [ "freeAdventurer", "hireAdventurer" ],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
selection: false,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
adventurer: {
|
|
||||||
type: Object as PropType<Adventurer>,
|
|
||||||
},
|
|
||||||
allAdventurers: {
|
|
||||||
type: Object as PropType<{[key: string]: Adventurer}>,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
print(a:string) {
|
|
||||||
console.log(a);
|
|
||||||
},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
|
|
||||||
.selection {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
left: 50%;
|
|
||||||
width: max-content;
|
|
||||||
max-width: 16rem;
|
|
||||||
transform: translateX(-50%) translateY(104%);
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 0.5rem;
|
|
||||||
padding: 0.5rem;
|
|
||||||
background-color: rgba(0,0,0, 0.2);
|
|
||||||
z-index: 2;
|
|
||||||
.slot {
|
|
||||||
width: 5rem;
|
|
||||||
height: 5rem;
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 0;
|
|
||||||
border-color: #000;
|
|
||||||
background-color: transparent;
|
|
||||||
background-blend-mode: darken;
|
|
||||||
transition: background-color 0.25s linear, filter 0.25s linear;
|
|
||||||
&.busy {
|
|
||||||
filter: grayscale(1);
|
|
||||||
background-color: rgba(0,0,0, 0.6);
|
|
||||||
&:hover {
|
|
||||||
cursor: not-allowed;
|
|
||||||
border-color: #000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:hover {
|
|
||||||
border-color: #fff;
|
|
||||||
}
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.select {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
font-size: 4.5rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
<template>
|
|
||||||
<article
|
|
||||||
class="adventurer"
|
|
||||||
:title="adventurer.name + (adventurer.busy ? ' (busy)' : '')"
|
|
||||||
>
|
|
||||||
<img :src="adventurer.portrait" :alt="adventurer.name" draggable="false">
|
|
||||||
<div class="level">{{adventurer.level}}</div>
|
|
||||||
</article>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
|
|
||||||
import type {Adventurer} from "@/classes/Adventurer";
|
|
||||||
import {defineComponent, type PropType } from "vue";
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
name: "AdventurerTile",
|
|
||||||
props: {
|
|
||||||
adventurer: {
|
|
||||||
type: Object as PropType<Adventurer>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.adventurer {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow: clip;
|
|
||||||
font-size: 5rem;
|
|
||||||
line-height: 1;
|
|
||||||
color: rgba(0,0,0, 0.75);
|
|
||||||
position: relative;
|
|
||||||
.level {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
font-size: 1rem;
|
|
||||||
background-color: rgba(0,0,0, 0.75);
|
|
||||||
border-bottom-right-radius: 0.2rem;
|
|
||||||
padding: 0.1rem;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -2,7 +2,7 @@ import { createApp } from 'vue'
|
|||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
|
|
||||||
import './assets/main.css'
|
import '@/assets/main.scss'
|
||||||
|
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import type StatHolder from "@/models/StatHolder.ts";
|
||||||
|
import AdventurerInventory from "@/models/AdventurerInventory.ts";
|
||||||
|
import type AdventurerIdentity from "@/models/AdventurerIdentity.ts";
|
||||||
|
|
||||||
|
export default class Adventurer implements StatHolder {
|
||||||
|
|
||||||
|
identity: AdventurerIdentity;
|
||||||
|
experience: number = 0;
|
||||||
|
basePower: number = 0;
|
||||||
|
baseDefense: number = 0;
|
||||||
|
inventory: AdventurerInventory;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
identity: AdventurerIdentity,
|
||||||
|
experience: number = 0,
|
||||||
|
basePower: number = 0,
|
||||||
|
baseDefense: number = 0,
|
||||||
|
inventory: AdventurerInventory = new AdventurerInventory()
|
||||||
|
) {
|
||||||
|
this.identity = identity;
|
||||||
|
this.experience = experience;
|
||||||
|
this.basePower = basePower;
|
||||||
|
this.baseDefense = baseDefense;
|
||||||
|
this.inventory = inventory;
|
||||||
|
}
|
||||||
|
|
||||||
|
getPower(): number {
|
||||||
|
let power = this.basePower;
|
||||||
|
power += this.inventory.getPower();
|
||||||
|
return power;
|
||||||
|
}
|
||||||
|
|
||||||
|
getDefense(): number {
|
||||||
|
let defense = this.baseDefense;
|
||||||
|
defense += this.inventory.getDefense();
|
||||||
|
return defense;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
export default class AdventurerIdentity {
|
||||||
|
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
portrait: string;
|
||||||
|
|
||||||
|
constructor(id: string, name: string, portrait: string) {
|
||||||
|
this.id = id;
|
||||||
|
this.name = name;
|
||||||
|
this.portrait = portrait;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
import type Item from "@/models/Item.ts";
|
||||||
|
import type StatHolder from "@/models/StatHolder.ts";
|
||||||
|
|
||||||
|
export default class AdventurerInventory implements StatHolder {
|
||||||
|
|
||||||
|
helmetId = 0;
|
||||||
|
armorId = 1;
|
||||||
|
bootsId = 2;
|
||||||
|
weaponId = 3;
|
||||||
|
|
||||||
|
items: Array<Item|null> = [];
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
helmet: Item | null = null,
|
||||||
|
armor: Item | null = null,
|
||||||
|
boots: Item | null = null,
|
||||||
|
weapon: Item | null = null
|
||||||
|
) {
|
||||||
|
this.items[this.helmetId] = helmet;
|
||||||
|
this.items[this.armorId] = armor;
|
||||||
|
this.items[this.bootsId] = boots;
|
||||||
|
this.items[this.weaponId] = weapon;
|
||||||
|
}
|
||||||
|
|
||||||
|
getHelmet(): Item | null {
|
||||||
|
return this.items[this.helmetId];
|
||||||
|
}
|
||||||
|
|
||||||
|
getArmor(): Item | null {
|
||||||
|
return this.items[this.armorId];
|
||||||
|
}
|
||||||
|
|
||||||
|
getBoots(): Item | null {
|
||||||
|
return this.items[this.bootsId];
|
||||||
|
}
|
||||||
|
|
||||||
|
getWeapon(): Item | null {
|
||||||
|
return this.items[this.weaponId];
|
||||||
|
}
|
||||||
|
|
||||||
|
getDefense(): number {
|
||||||
|
let defense = 0;
|
||||||
|
for (let item of this.items) {
|
||||||
|
if (item !== null) {
|
||||||
|
defense += item.getDefense();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return defense
|
||||||
|
}
|
||||||
|
|
||||||
|
getPower(): number {
|
||||||
|
let power = 0;
|
||||||
|
for (let item of this.items) {
|
||||||
|
if (item !== null) {
|
||||||
|
power += item.getPower();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return power;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import type StatHolder from "@/models/StatHolder.ts";
|
||||||
|
import type {ItemType} from "@/models/ItemType.ts";
|
||||||
|
|
||||||
|
export default class Item implements StatHolder {
|
||||||
|
|
||||||
|
name: string;
|
||||||
|
description: string;
|
||||||
|
power: number;
|
||||||
|
defense: number;
|
||||||
|
type: ItemType;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
name: string,
|
||||||
|
description: string,
|
||||||
|
power: number,
|
||||||
|
defense: number,
|
||||||
|
type: ItemType
|
||||||
|
) {
|
||||||
|
this.name = name;
|
||||||
|
this.description = description;
|
||||||
|
this.power = power;
|
||||||
|
this.defense = defense;
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
getDefense(): number {
|
||||||
|
return this.defense;
|
||||||
|
}
|
||||||
|
|
||||||
|
getPower(): number {
|
||||||
|
return this.power;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
export enum ItemType {
|
||||||
|
|
||||||
|
HELMET = 'helmet',
|
||||||
|
ARMOR = 'armor',
|
||||||
|
BOOTS = 'boots',
|
||||||
|
WEAPON = 'weapon',
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import Adventurer from "@/models/Adventurer.ts";
|
||||||
|
import type AdventurerIdentity from "@/models/AdventurerIdentity.ts";
|
||||||
|
import AdventurerInventory from "@/models/AdventurerInventory.ts";
|
||||||
|
|
||||||
|
export default class SaveData {
|
||||||
|
|
||||||
|
adventurers: Array<Adventurer> = [];
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
data: {[key:string]: unknown} = {},
|
||||||
|
adventurerIdentities: {[key:string]: AdventurerIdentity} = {}
|
||||||
|
) {
|
||||||
|
if (Array.isArray(data?.adventurers)) {
|
||||||
|
for (const adventurerData of data.adventurers) {
|
||||||
|
const identity = adventurerIdentities[adventurerData?.identity?.id];
|
||||||
|
if (!identity) {
|
||||||
|
console.error("Adventurer identity not found for adventurer data", adventurerData);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
this.adventurers.push(new Adventurer(
|
||||||
|
identity,
|
||||||
|
adventurerData?.experience ?? 0,
|
||||||
|
adventurerData?.basePower ?? 0,
|
||||||
|
adventurerData?.baseDefense ?? 0,
|
||||||
|
new AdventurerInventory(
|
||||||
|
adventurerData?.inventory?.helmet ?? null,
|
||||||
|
adventurerData?.inventory?.armor ?? null,
|
||||||
|
adventurerData?.inventory?.boots ?? null,
|
||||||
|
adventurerData?.inventory?.weapon ?? null,
|
||||||
|
)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export default interface StatHolder {
|
||||||
|
|
||||||
|
getPower(): number;
|
||||||
|
getDefense(): number;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import {createRouter, createWebHashHistory} from 'vue-router'
|
import {createRouter, createWebHashHistory} from 'vue-router'
|
||||||
import HomeView from '../views/HomeView.vue'
|
|
||||||
|
import HomeView from '@/views/HomeView.vue';
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHashHistory(import.meta.env.BASE_URL),
|
history: createWebHashHistory(import.meta.env.BASE_URL),
|
||||||
@@ -7,18 +8,8 @@ const router = createRouter({
|
|||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
name: 'guild',
|
name: 'guild',
|
||||||
component: HomeView
|
component: HomeView,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/quests',
|
|
||||||
name: 'quests',
|
|
||||||
component: () => import('../views/QuestView.vue')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/adventurers',
|
|
||||||
name: 'adventurers',
|
|
||||||
component: () => import('../views/AdventurerView.vue')
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1,210 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="adventurer-section">
|
|
||||||
<section class="recruit">
|
|
||||||
<h1>Applying adventurers</h1>
|
|
||||||
<div class="adventurers">
|
|
||||||
<div v-if="currentlyForHire">
|
|
||||||
<adventurer-tile class="hire-tile" :adventurer="currentlyForHire"/>
|
|
||||||
<div class="decision">
|
|
||||||
<span
|
|
||||||
title="Hire"
|
|
||||||
@click="hireAdventurer(currentlyForHire)"
|
|
||||||
>
|
|
||||||
✔
|
|
||||||
</span>
|
|
||||||
<span
|
|
||||||
title="Dismiss"
|
|
||||||
:class="{disabled: Object.keys(adventurers).length <= 0}"
|
|
||||||
@click="dismissAdventurer()"
|
|
||||||
>
|
|
||||||
✗
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
<span>Noone applied as of now. Check back later!</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section class="collection">
|
|
||||||
<h1>Recruited adventurers</h1>
|
|
||||||
<div class="adventurers">
|
|
||||||
<div class="adventurer-tile" v-for="adventurer in adventurers" :key="adventurer.id">
|
|
||||||
<AdventurerTile class="entry" :adventurer="adventurer" />
|
|
||||||
<b>{{ adventurer.name }}</b>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import type {PropType} from "vue";
|
|
||||||
import {defineComponent} from "vue";
|
|
||||||
import AdventurerTile from "@/components/AdventurerTile.vue";
|
|
||||||
import {Adventurer} from "@/classes/Adventurer";
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
name: "RecruitView",
|
|
||||||
components: {AdventurerTile},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
currentlyForHire: null as Adventurer|null,
|
|
||||||
adventurersForHire: [
|
|
||||||
new Adventurer("rincewind-diskworld", "Rincewind", "/img/adventurers/rincewind.png", 2, 2),
|
|
||||||
new Adventurer("fran-sword-isekai", "Fran", "/img/adventurers/fran.png", 3, 1.5),
|
|
||||||
new Adventurer("kazuma-konosuba", "Kazuma", "/img/adventurers/kazuma.png", 2, 2),
|
|
||||||
new Adventurer("rein-beast-tamer", "Rein", "/img/adventurers/rein.png", 2, 2),
|
|
||||||
new Adventurer("momon-overlord", "Momon", "/img/adventurers/momon.png", 2, 2),
|
|
||||||
] as Array<Adventurer>,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
adventurers: {
|
|
||||||
type: Object as PropType<{ [key: string]: Adventurer }>,
|
|
||||||
default() {
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lastRecruitTime: {
|
|
||||||
type: Number as PropType<null|number>,
|
|
||||||
default() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getRandomAdventurer(): Adventurer|null {
|
|
||||||
if (this.adventurersForHire.length <= 0) return null;
|
|
||||||
const randomId = this.adventurersForHire.length * Math.random() << 0;
|
|
||||||
return this.adventurersForHire[randomId];
|
|
||||||
},
|
|
||||||
getNewAdventurerForHire(): void {
|
|
||||||
const adventurer = this.getRandomAdventurer();
|
|
||||||
if (adventurer === null) {
|
|
||||||
this.currentlyForHire = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.adventurers[adventurer.id] != null) {
|
|
||||||
this.currentlyForHire = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.currentlyForHire = adventurer;
|
|
||||||
window.localStorage.setItem("currentlyForHire", adventurer.id);
|
|
||||||
|
|
||||||
},
|
|
||||||
hireAdventurer(adventurer: Adventurer): void {
|
|
||||||
this.adventurers[adventurer.id] = adventurer;
|
|
||||||
this.currentlyForHire = null;
|
|
||||||
window.localStorage.removeItem("currentlyForHire");
|
|
||||||
this.$emit("recruitActionTaken", adventurer);
|
|
||||||
},
|
|
||||||
dismissAdventurer() {
|
|
||||||
this.currentlyForHire = null;
|
|
||||||
this.$emit("recruitActionTaken", null);
|
|
||||||
window.localStorage.removeItem("currentlyForHire");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if (Object.keys(this.adventurers).length <= 0) {
|
|
||||||
this.currentlyForHire = this.adventurersForHire[0];
|
|
||||||
window.localStorage.setItem("currentlyForHire", this.adventurersForHire[0].id);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const savedCurrentForHire = window.localStorage.getItem("currentlyForHire");
|
|
||||||
if (savedCurrentForHire !== null) {
|
|
||||||
for (const id in this.adventurersForHire) {
|
|
||||||
const adventurer = this.adventurersForHire[id];
|
|
||||||
if (adventurer.id === savedCurrentForHire) {
|
|
||||||
this.currentlyForHire = adventurer;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const now = Number(new Date());
|
|
||||||
|
|
||||||
if (now - this.lastRecruitTime >= 1000 * 60 * 30 && this.currentlyForHire === null) {
|
|
||||||
this.getNewAdventurerForHire();
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
emits: ["recruitActionTaken"]
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.adventurer-section {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
section {
|
|
||||||
max-width: 1280px;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
padding-block: 1rem;
|
|
||||||
}
|
|
||||||
h1 {
|
|
||||||
font-size: 2rem;
|
|
||||||
font-weight: bold;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.adventurers {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 1rem;
|
|
||||||
.adventurer-tile {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 0.25rem;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
.entry {
|
|
||||||
height: 7rem;
|
|
||||||
width: 7rem;
|
|
||||||
}
|
|
||||||
b {
|
|
||||||
line-height: 1;
|
|
||||||
text-align: center;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.decision {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 2rem;
|
|
||||||
gap: 1rem;
|
|
||||||
span {
|
|
||||||
cursor: pointer;
|
|
||||||
&:hover {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
&.disabled {
|
|
||||||
color: rgba(0,0,0, 0.5)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.hire-tile {
|
|
||||||
width: 8rem;
|
|
||||||
height: 8rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,95 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<main>
|
<main>
|
||||||
<section class="title">
|
<section class="title panel note-paper">
|
||||||
<h1>Guild Master</h1>
|
<h1>Guild Master</h1>
|
||||||
<h3>Adventurer's guild management game</h3>
|
<h3>Adventurer's guild management game</h3>
|
||||||
<small>v{{ version }}</small>
|
<small>v{{ version }}</small>
|
||||||
</section>
|
<p class="news">{{ news }}</p>
|
||||||
<section class="coffer">
|
|
||||||
<p>Coffer: {{guild.gold}} gold</p>
|
|
||||||
</section>
|
|
||||||
<section class="upgrade">
|
|
||||||
<p>Guild level: {{ guild.level }}</p>
|
|
||||||
<button :disabled="guild.gold < 1000" @click="guild.upgrade()">
|
|
||||||
<span>Upgrade guild level</span><br>
|
|
||||||
<span>({{ guild.displayUpgradeCost }})</span>
|
|
||||||
</button>
|
|
||||||
</section>
|
|
||||||
<section class="upgrade">
|
|
||||||
<span class="wipe-save" @click="$emit('wipeSave')">Wipe your save data</span>
|
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {defineComponent} from "vue";
|
import {defineComponent} from "vue";
|
||||||
import type {PropType} from "vue";
|
|
||||||
import type {Guild} from "@/classes/Guild";
|
|
||||||
|
|
||||||
import {version} from "../../package.json"
|
import {version} from "../../package.json"
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "GuildView",
|
name: "GuildView",
|
||||||
data() {
|
methods: {},
|
||||||
|
components: {},
|
||||||
|
data: () => {
|
||||||
return {
|
return {
|
||||||
version: version,
|
version: version,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
guild: {
|
news: {
|
||||||
type: Object as PropType<Guild>,
|
type: String,
|
||||||
|
default: "",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.title {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding: 2.5rem;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
gap: 0.5rem;
|
|
||||||
h1 {
|
|
||||||
font-size: 4rem;
|
|
||||||
line-height: 0.75;
|
|
||||||
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
margin: 0;
|
|
||||||
line-height: 0.9;
|
|
||||||
}
|
|
||||||
small {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
font-weight: bold;
|
|
||||||
line-height: 0.25;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.coffer {
|
|
||||||
text-align: center;
|
|
||||||
p {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.upgrade {
|
|
||||||
text-align: center;
|
|
||||||
.wipe-save {
|
|
||||||
display: inline-flex;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-block: 1rem;
|
|
||||||
color: #d52121;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
p {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,384 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="guild" v-if="guild.level >= 7 && Object.keys(quests.S).length > 0">
|
|
||||||
<h1>Rank S Quests</h1>
|
|
||||||
<section class="missives">
|
|
||||||
<div
|
|
||||||
class="missive"
|
|
||||||
:class="{done: missive.maxProgress <= missive.progressPoints}"
|
|
||||||
v-for="missive in quests.S"
|
|
||||||
:key="missive.id"
|
|
||||||
@click="() => {
|
|
||||||
if (missive.progressPoints < missive.maxProgress) return;
|
|
||||||
$emit('finalizeQuest', missive)
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<h2>{{ missive.title }}</h2>
|
|
||||||
<p>{{ missive.text }}</p>
|
|
||||||
<div class="slots">
|
|
||||||
<button class="slot">
|
|
||||||
<AdventurerComponent
|
|
||||||
:adventurer="missive.adventurers[0]"
|
|
||||||
:all-adventurers="adventurers"
|
|
||||||
@hire-adventurer="(id) => {
|
|
||||||
adventurers[id].busy = true;
|
|
||||||
missive.adventurers[0] = adventurers[id];
|
|
||||||
}"
|
|
||||||
@free-adventurer="(id) => {
|
|
||||||
if (missive.progressPoints >= missive.maxProgress) return;
|
|
||||||
adventurers[id].busy = false;
|
|
||||||
missive.adventurers.splice(0, 1);
|
|
||||||
if (missive.adventurers.length <= 0) {
|
|
||||||
missive.progressPoints = 0;
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<progress :max="missive.maxProgress" :value="missive.progressPoints"></progress>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
<div class="guild" v-if="guild.level >= 6 && Object.keys(quests.A).length > 0">
|
|
||||||
<h1>Rank A Quests</h1>
|
|
||||||
<section class="missives">
|
|
||||||
<div
|
|
||||||
class="missive"
|
|
||||||
:class="{done: missive.maxProgress <= missive.progressPoints}"
|
|
||||||
v-for="missive in quests.A"
|
|
||||||
:key="missive.id"
|
|
||||||
@click="() => {
|
|
||||||
if (missive.progressPoints < missive.maxProgress) return;
|
|
||||||
$emit('finalizeQuest', missive)
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<h2>{{ missive.title }}</h2>
|
|
||||||
<p>{{ missive.text }}</p>
|
|
||||||
<div class="slots">
|
|
||||||
<button class="slot">
|
|
||||||
<AdventurerComponent
|
|
||||||
:adventurer="missive.adventurers[0]"
|
|
||||||
:all-adventurers="adventurers"
|
|
||||||
@hire-adventurer="(id) => {
|
|
||||||
adventurers[id].busy = true;
|
|
||||||
missive.adventurers[0] = adventurers[id];
|
|
||||||
}"
|
|
||||||
@free-adventurer="(id) => {
|
|
||||||
if (missive.progressPoints >= missive.maxProgress) return;
|
|
||||||
adventurers[id].busy = false;
|
|
||||||
missive.adventurers.splice(0, 1);
|
|
||||||
if (missive.adventurers.length <= 0) {
|
|
||||||
missive.progressPoints = 0;
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<progress :max="missive.maxProgress" :value="missive.progressPoints"></progress>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
<div class="guild" v-if="guild.level >= 5 && Object.keys(quests.B).length > 0">
|
|
||||||
<h1>Rank B Quests</h1>
|
|
||||||
<section class="missives">
|
|
||||||
<div
|
|
||||||
class="missive"
|
|
||||||
:class="{done: missive.maxProgress <= missive.progressPoints}"
|
|
||||||
v-for="missive in quests.B"
|
|
||||||
:key="missive.id"
|
|
||||||
@click="() => {
|
|
||||||
if (missive.progressPoints < missive.maxProgress) return;
|
|
||||||
$emit('finalizeQuest', missive)
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<h2>{{ missive.title }}</h2>
|
|
||||||
<p>{{ missive.text }}</p>
|
|
||||||
<div class="slots">
|
|
||||||
<button class="slot">
|
|
||||||
<AdventurerComponent
|
|
||||||
:adventurer="missive.adventurers[0]"
|
|
||||||
:all-adventurers="adventurers"
|
|
||||||
@hire-adventurer="(id) => {
|
|
||||||
adventurers[id].busy = true;
|
|
||||||
missive.adventurers[0] = adventurers[id];
|
|
||||||
}"
|
|
||||||
@free-adventurer="(id) => {
|
|
||||||
if (missive.progressPoints >= missive.maxProgress) return;
|
|
||||||
adventurers[id].busy = false;
|
|
||||||
missive.adventurers.splice(0, 1);
|
|
||||||
if (missive.adventurers.length <= 0) {
|
|
||||||
missive.progressPoints = 0;
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<progress :max="missive.maxProgress" :value="missive.progressPoints"></progress>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
<div class="guild" v-if="guild.level >= 4 && Object.keys(quests.C).length > 0">
|
|
||||||
<h1>Rank C Quests</h1>
|
|
||||||
<section class="missives">
|
|
||||||
<div
|
|
||||||
class="missive"
|
|
||||||
:class="{done: missive.maxProgress <= missive.progressPoints}"
|
|
||||||
v-for="missive in quests.C"
|
|
||||||
:key="missive.id"
|
|
||||||
@click="() => {
|
|
||||||
if (missive.progressPoints < missive.maxProgress) return;
|
|
||||||
$emit('finalizeQuest', missive)
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<h2>{{ missive.title }}</h2>
|
|
||||||
<p>{{ missive.text }}</p>
|
|
||||||
<div class="slots">
|
|
||||||
<button class="slot">
|
|
||||||
<AdventurerComponent
|
|
||||||
:adventurer="missive.adventurers[0]"
|
|
||||||
:all-adventurers="adventurers"
|
|
||||||
@hire-adventurer="(id) => {
|
|
||||||
adventurers[id].busy = true;
|
|
||||||
missive.adventurers[0] = adventurers[id];
|
|
||||||
}"
|
|
||||||
@free-adventurer="(id) => {
|
|
||||||
if (missive.progressPoints >= missive.maxProgress) return;
|
|
||||||
adventurers[id].busy = false;
|
|
||||||
missive.adventurers.splice(0, 1);
|
|
||||||
if (missive.adventurers.length <= 0) {
|
|
||||||
missive.progressPoints = 0;
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<progress :max="missive.maxProgress" :value="missive.progressPoints"></progress>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
<div class="guild" v-if="guild.level >= 3 && Object.keys(quests.D).length > 0">
|
|
||||||
<h1>Rank D Quests</h1>
|
|
||||||
<section class="missives">
|
|
||||||
<div
|
|
||||||
class="missive"
|
|
||||||
:class="{done: missive.maxProgress <= missive.progressPoints}"
|
|
||||||
v-for="missive in quests.D"
|
|
||||||
:key="missive.id"
|
|
||||||
@click="() => {
|
|
||||||
if (missive.progressPoints < missive.maxProgress) return;
|
|
||||||
$emit('finalizeQuest', missive)
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<h2>{{ missive.title }}</h2>
|
|
||||||
<p>{{ missive.text }}</p>
|
|
||||||
<div class="slots">
|
|
||||||
<button class="slot">
|
|
||||||
<AdventurerComponent
|
|
||||||
:adventurer="missive.adventurers[0]"
|
|
||||||
:all-adventurers="adventurers"
|
|
||||||
@hire-adventurer="(id) => {
|
|
||||||
adventurers[id].busy = true;
|
|
||||||
missive.adventurers[0] = adventurers[id];
|
|
||||||
}"
|
|
||||||
@free-adventurer="(id) => {
|
|
||||||
if (missive.progressPoints >= missive.maxProgress) return;
|
|
||||||
adventurers[id].busy = false;
|
|
||||||
missive.adventurers.splice(0, 1);
|
|
||||||
if (missive.adventurers.length <= 0) {
|
|
||||||
missive.progressPoints = 0;
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<progress :max="missive.maxProgress" :value="missive.progressPoints"></progress>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
<div class="guild" v-if="guild.level >= 2 && Object.keys(quests.E).length > 0">
|
|
||||||
<h1>Rank E Quests</h1>
|
|
||||||
<section class="missives">
|
|
||||||
<div
|
|
||||||
class="missive"
|
|
||||||
:class="{done: missive.maxProgress <= missive.progressPoints}"
|
|
||||||
v-for="missive in quests.E"
|
|
||||||
:key="missive.id"
|
|
||||||
@click="() => {
|
|
||||||
if (missive.progressPoints < missive.maxProgress) return;
|
|
||||||
$emit('finalizeQuest', missive)
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<h2>{{ missive.title }}</h2>
|
|
||||||
<p>{{ missive.text }}</p>
|
|
||||||
<div class="slots">
|
|
||||||
<button class="slot">
|
|
||||||
<AdventurerComponent
|
|
||||||
:adventurer="missive.adventurers[0]"
|
|
||||||
:all-adventurers="adventurers"
|
|
||||||
@hire-adventurer="(id) => {
|
|
||||||
adventurers[id].busy = true;
|
|
||||||
missive.adventurers[0] = adventurers[id];
|
|
||||||
}"
|
|
||||||
@free-adventurer="(id) => {
|
|
||||||
if (missive.progressPoints >= missive.maxProgress) return;
|
|
||||||
adventurers[id].busy = false;
|
|
||||||
missive.adventurers.splice(0, 1);
|
|
||||||
if (missive.adventurers.length <= 0) {
|
|
||||||
missive.progressPoints = 0;
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<progress :max="missive.maxProgress" :value="missive.progressPoints"></progress>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
<div class="guild">
|
|
||||||
<h1>Rank F Quests</h1>
|
|
||||||
<section class="missives">
|
|
||||||
<div
|
|
||||||
class="missive"
|
|
||||||
:class="{done: missive.maxProgress <= missive.progressPoints}"
|
|
||||||
v-for="missive in quests.F"
|
|
||||||
:key="missive.id"
|
|
||||||
@click="() => {
|
|
||||||
if (missive.progressPoints < missive.maxProgress) return;
|
|
||||||
$emit('finalizeQuest', missive)
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<h2>{{ missive.title }}</h2>
|
|
||||||
<p>{{ missive.text }}</p>
|
|
||||||
<div class="slots">
|
|
||||||
<button class="slot">
|
|
||||||
<AdventurerComponent
|
|
||||||
:adventurer="missive.adventurers[0]"
|
|
||||||
:all-adventurers="adventurers"
|
|
||||||
@hire-adventurer="(id) => {
|
|
||||||
adventurers[id].busy = true;
|
|
||||||
missive.adventurers[0] = adventurers[id];
|
|
||||||
}"
|
|
||||||
@free-adventurer="(id) => {
|
|
||||||
if (missive.progressPoints >= missive.maxProgress) return;
|
|
||||||
adventurers[id].busy = false;
|
|
||||||
missive.adventurers.splice(0, 1);
|
|
||||||
if (missive.adventurers.length <= 0) {
|
|
||||||
missive.progressPoints = 0;
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<progress :max="missive.maxProgress" :value="missive.progressPoints"></progress>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import {defineComponent, type PropType} from "vue";
|
|
||||||
import AdventurerComponent from "@/components/AdventurerMiniComponent.vue";
|
|
||||||
import type {Adventurer} from "@/classes/Adventurer";
|
|
||||||
import type {Quest} from "@/classes/Quest";
|
|
||||||
import type {Guild} from "@/classes/Guild";
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
name: "QuestView",
|
|
||||||
components: {AdventurerComponent},
|
|
||||||
props: {
|
|
||||||
guild: {
|
|
||||||
type: Object as PropType<Guild>,
|
|
||||||
},
|
|
||||||
adventurers: {
|
|
||||||
type: Object as PropType<{ [key: string]: Adventurer }>,
|
|
||||||
default() {
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
quests: {
|
|
||||||
type: Object as PropType<{ [key: string]: Quest }>,
|
|
||||||
default() {
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lastRecruitTime: {
|
|
||||||
type: Number as PropType<null|number>,
|
|
||||||
default() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
emits: [ 'finalizeQuest', 'wipeSave', 'recruitActionTaken'],
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.guild {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 3rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.missives {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
width: calc(100% - 2rem);
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding-inline: 1rem;
|
|
||||||
gap: 1rem;
|
|
||||||
|
|
||||||
.missive {
|
|
||||||
width: min(100%, 14rem);
|
|
||||||
text-align: center;
|
|
||||||
border: 2px solid #000;
|
|
||||||
padding: 0.5rem;
|
|
||||||
position: relative;
|
|
||||||
background-color: rgba(255, 255, 255, 0.2);
|
|
||||||
|
|
||||||
&.done {
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
content: "✔";
|
|
||||||
font-size: 5rem;
|
|
||||||
color: green;
|
|
||||||
transform: translate(45%, -40%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.slots {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.slot {
|
|
||||||
padding: 0;
|
|
||||||
width: 5rem;
|
|
||||||
height: 5rem;
|
|
||||||
border: 2px solid #000;
|
|
||||||
background-color: rgba(0, 0, 0, 0.2);
|
|
||||||
cursor: pointer;
|
|
||||||
border-radius: 0.2rem;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "@vue/tsconfig/tsconfig.node.json",
|
"extends": "@vue/tsconfig/tsconfig.json",
|
||||||
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
|
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"composite": true,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "@vue/tsconfig/tsconfig.web.json",
|
"extends": "@vue/tsconfig/tsconfig.json",
|
||||||
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
|
|||||||
@@ -2,14 +2,25 @@ import { fileURLToPath, URL } from 'node:url'
|
|||||||
|
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
import {VitePWA} from "vite-plugin-pwa";
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [vue()],
|
plugins: [
|
||||||
|
vue(),
|
||||||
|
VitePWA({
|
||||||
|
registerType: 'prompt',
|
||||||
|
injectRegister: 'script',
|
||||||
|
filename: 'service-worker.js',
|
||||||
|
workbox: {
|
||||||
|
globPatterns: ['**/*.{js,css,html,ico,png,jpeg,svg,json}'],
|
||||||
|
}
|
||||||
|
})
|
||||||
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
base: "/GuildMaster/"
|
base: "/"
|
||||||
})
|
})
|
||||||
|
|||||||