mirror of
https://github.com/YouHaveTrouble/GuildMaster.git
synced 2026-05-12 06:26:59 +00:00
hook in data sources for adventurers and quests,
programatically generate quest rewards, change damage math,
This commit is contained in:
@@ -44,6 +44,7 @@ import type {PropType} from "vue";
|
||||
import {defineComponent} from "vue";
|
||||
import AdventurerTile from "@/components/AdventurerTile.vue";
|
||||
import {Adventurer} from "@/classes/Adventurer";
|
||||
import { loadAdventurersForHire } from "@/GameData";
|
||||
|
||||
export default defineComponent({
|
||||
name: "RecruitView",
|
||||
@@ -51,13 +52,7 @@ export default defineComponent({
|
||||
data: () => {
|
||||
return {
|
||||
currentlyForHire: null as Adventurer|null,
|
||||
adventurersForHire: [
|
||||
new Adventurer("rincewind-diskworld", "Rincewind", "/img/adventurers/rincewind.png", 2),
|
||||
new Adventurer("fran-sword-isekai", "Fran", "/img/adventurers/fran.png", 3),
|
||||
new Adventurer("kazuma-konosuba", "Kazuma", "/img/adventurers/kazuma.png", 2),
|
||||
new Adventurer("rein-beast-tamer", "Rein", "/img/adventurers/rein.png", 2),
|
||||
new Adventurer("momon-overlord", "Momon", "/img/adventurers/momon.png", 2),
|
||||
] as Array<Adventurer>,
|
||||
adventurersForHire: [] as Array<Adventurer>,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -109,7 +104,10 @@ export default defineComponent({
|
||||
window.localStorage.removeItem("currentlyForHire");
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
async mounted() {
|
||||
|
||||
this.adventurersForHire = await loadAdventurersForHire();
|
||||
|
||||
if (Object.keys(this.adventurers).length <= 0) {
|
||||
this.currentlyForHire = this.adventurersForHire[0];
|
||||
window.localStorage.setItem("currentlyForHire", this.adventurersForHire[0].id);
|
||||
|
||||
Reference in New Issue
Block a user