mirror of
https://github.com/YouHaveTrouble/GuildMaster.git
synced 2026-05-12 06:26:59 +00:00
add quest exp modifier upgrade
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import {GuildUpgrade} from "@/classes/GuildUpgrade";
|
||||
|
||||
export default class QuestExpUpgrade extends GuildUpgrade {
|
||||
constructor(level: number = 1) {
|
||||
super();
|
||||
this.level = level;
|
||||
this.nextLevelCost = this.getCostForLevel(this.level);
|
||||
this.guildLevelRequirement = 8;
|
||||
}
|
||||
|
||||
upgrade(): void {
|
||||
this.level += 1;
|
||||
this.nextLevelCost = this.getCostForLevel(this.level);
|
||||
}
|
||||
|
||||
getCostForLevel(level: number): number {
|
||||
const scalingFactor = Math.pow(1.15, level - 1);
|
||||
return Math.floor(4000000 * scalingFactor * Math.pow(level, 1.1));
|
||||
}
|
||||
|
||||
getModifier(): number {
|
||||
return 1 + (this.level * 0.1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user