mirror of
https://github.com/YouHaveTrouble/GuildMaster.git
synced 2026-05-12 14:36:58 +00:00
add quest exp modifier upgrade
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<h2>Upgrades</h2>
|
||||
<div class="upgrade">
|
||||
<span>Adventurer capacity (level {{ guild.adventurerCapacity.level }})</span>
|
||||
<small>Increases the maximum amount of recruited adventurers</small>
|
||||
<button
|
||||
class="button metal"
|
||||
v-if="guild.adventurerCapacity.nextLevelCost"
|
||||
@@ -12,6 +13,18 @@
|
||||
Upgrade ({{ formatGold(guild.adventurerCapacity.nextLevelCost) }} gold)
|
||||
</button>
|
||||
</div>
|
||||
<div class="upgrade" v-if="guild.level >= guild.expModifier.guildLevelRequirement">
|
||||
<span>Quest exp modifier (level {{ guild.expModifier.level }})</span>
|
||||
<small>Increases exp from newly offered quests by 10% per level</small>
|
||||
<button
|
||||
class="button metal"
|
||||
v-if="guild.expModifier.nextLevelCost"
|
||||
:disabled="guild.gold < guild.expModifier.nextLevelCost"
|
||||
@click="upgradeQuestExpModifier()"
|
||||
>
|
||||
Upgrade ({{ formatGold(guild.expModifier.nextLevelCost) }} gold)
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -39,7 +52,14 @@ export default defineComponent({
|
||||
if (this.guild.gold < this.guild.adventurerCapacity.nextLevelCost) return;
|
||||
this.guild.gold -= this.guild.adventurerCapacity.nextLevelCost;
|
||||
this.guild.adventurerCapacity.upgrade();
|
||||
}
|
||||
},
|
||||
upgradeQuestExpModifier(): void {
|
||||
if (!this.guild.expModifier) return;
|
||||
if (!this.guild.expModifier.nextLevelCost) return;
|
||||
if (this.guild.gold < this.guild.expModifier.nextLevelCost) return;
|
||||
this.guild.gold -= this.guild.expModifier.nextLevelCost;
|
||||
this.guild.expModifier.upgrade();
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -63,12 +83,15 @@ export default defineComponent({
|
||||
font-size: 1.25rem;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
width: min(25rem, 100%);
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 0.2rem;
|
||||
small {
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user