Fix the numbers

This commit is contained in:
2025-02-23 16:23:54 -08:00
parent 5ab3778074
commit 81f498c804
12 changed files with 83 additions and 38 deletions

View File

@ -5,6 +5,7 @@ import { getThralls, ItemStage, LifeStage, Thrall } from "./thralls.ts";
export class PlayerProgress {
#name: string;
#thrallTemplate: number;
#nImprovements: number;
#stats: Record<Stat, number>;
#talents: Record<Stat, number>;
#isInPenance: boolean;
@ -22,6 +23,7 @@ export class PlayerProgress {
constructor(asSuccessor: SuccessorOption, withWish: Wish | null) {
this.#name = asSuccessor.name;
this.#thrallTemplate = asSuccessor.template.id;
this.#nImprovements = asSuccessor.nImprovements;
this.#stats = { ...asSuccessor.stats };
this.#talents = { ...asSuccessor.talents };
this.#isInPenance = asSuccessor.inPenance;
@ -53,12 +55,16 @@ export class PlayerProgress {
return { id: this.#thrallTemplate };
}
get nImprovements(): number {
return this.#nImprovements;
}
get isInPenance(): boolean {
return this.#isInPenance;
}
refill() {
this.#blood = 2000;
this.#blood = 1000;
let learnableSkills = []; // TODO: Also include costing info
for (let skill of getSkills()