mirror of
https://github.com/YouHaveTrouble/GuildMaster.git
synced 2026-05-12 06:26:59 +00:00
fix max guild level being displayed on level 7 when upgraded to it
This commit is contained in:
@@ -3,6 +3,7 @@ import AdventurerCapacityUpgrade from "@/classes/guildUpgrades/AdventurerCapacit
|
|||||||
import {formatGold} from "@/classes/NumberMagic";
|
import {formatGold} from "@/classes/NumberMagic";
|
||||||
import QuestExpUpgrade from "@/classes/guildUpgrades/QuestExpUpgrade";
|
import QuestExpUpgrade from "@/classes/guildUpgrades/QuestExpUpgrade";
|
||||||
|
|
||||||
|
const MAX_LEVEL: number = 8;
|
||||||
|
|
||||||
export class Guild {
|
export class Guild {
|
||||||
gold: number;
|
gold: number;
|
||||||
@@ -30,7 +31,7 @@ export class Guild {
|
|||||||
if (this.gold < cost) return;
|
if (this.gold < cost) return;
|
||||||
this.gold -= cost;
|
this.gold -= cost;
|
||||||
this.level += 1;
|
this.level += 1;
|
||||||
if (this.level >= 7) {
|
if (this.level >= MAX_LEVEL) {
|
||||||
this.displayUpgradeCost = "Max level";
|
this.displayUpgradeCost = "Max level";
|
||||||
this.upgradeCost = null;
|
this.upgradeCost = null;
|
||||||
} else {
|
} else {
|
||||||
@@ -46,7 +47,7 @@ export class Guild {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isMaxLevel(): boolean {
|
isMaxLevel(): boolean {
|
||||||
return this.level >= 8;
|
return this.level >= MAX_LEVEL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user