display all quest levels when level is high enough and add some base quests for each tier

This commit is contained in:
2023-03-19 19:48:49 +01:00
parent 76fb24a948
commit c0f9edadef
4 changed files with 330 additions and 20 deletions
+2 -2
View File
@@ -8,13 +8,13 @@ export class Adventurer {
defensePerLevel: number;
busy: boolean;
constructor(id: string, name: string, portrait: string, attackPerLevel: number, defensePerLevel: number) {
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 = 1;
this.level = level;
this.exp = 0;
this.busy = false;
}
+1 -2
View File
@@ -15,7 +15,7 @@ export class Guild {
if (this.gold < cost) return;
this.gold -= cost;
this.level += 1;
if (this.level > 7) {
if (this.level >= 7) {
this.displayUpgradeCost = "Max level";
} else {
const newCost = this.getUpgradeCost();
@@ -36,5 +36,4 @@ const upgradeCosts = {
"4": 10000,
"5": 25000,
"6": 50000,
"7": 100000,
} as {[index:string]: number}