Various minor fixes to successor system and mixing

This commit is contained in:
2025-02-23 12:09:47 -08:00
parent 9024d67114
commit d031a6acbe
18 changed files with 94 additions and 25 deletions

View File

@ -4,6 +4,7 @@ import { getThralls, ItemStage, LifeStage, Thrall } from "./thralls.ts";
export class PlayerProgress {
#name: string;
#thrallTemplate: number;
#stats: Record<Stat, number>;
#talents: Record<Stat, number>;
#isInPenance: boolean;
@ -20,6 +21,7 @@ export class PlayerProgress {
constructor(asSuccessor: SuccessorOption, withWish: Wish | null) {
this.#name = asSuccessor.name;
this.#thrallTemplate = asSuccessor.template.id;
this.#stats = { ...asSuccessor.stats };
this.#talents = { ...asSuccessor.talents };
this.#isInPenance = asSuccessor.inPenance;
@ -47,6 +49,10 @@ export class PlayerProgress {
return this.#name;
}
get template(): Thrall {
return { id: this.#thrallTemplate };
}
get isInPenance(): boolean {
return this.#isInPenance;
}