Skill rebalancing, analytic data tracking
This commit is contained in:
@ -5,6 +5,7 @@ export class PlayerProgress {
|
||||
#stats: Record<Stat, number>
|
||||
#exp: number;
|
||||
#blood: number
|
||||
#itemsPurloined: number
|
||||
#skillsLearned: number[] // use the raw ID representation for indexOf
|
||||
#untrimmedSkillsAvailable: Skill[]
|
||||
|
||||
@ -17,6 +18,7 @@ export class PlayerProgress {
|
||||
};
|
||||
this.#exp = 0;
|
||||
this.#blood = 0;
|
||||
this.#itemsPurloined = 0;
|
||||
this.#skillsLearned = [];
|
||||
this.#untrimmedSkillsAvailable = []
|
||||
|
||||
@ -74,6 +76,14 @@ export class PlayerProgress {
|
||||
return true;
|
||||
}
|
||||
|
||||
purloinItem() {
|
||||
this.#itemsPurloined += 1;
|
||||
}
|
||||
|
||||
getItemsPurloined() {
|
||||
return this.#itemsPurloined
|
||||
}
|
||||
|
||||
add(stat: Stat, amount: number) {
|
||||
if (amount != Math.floor(amount)) {
|
||||
throw `stat increment must be integer: ${amount}`
|
||||
|
Reference in New Issue
Block a user