Sync with wfrp 4, v8.4.0
All checks were successful
Release Creation / build (release) Successful in 51s

This commit is contained in:
2025-02-01 21:10:28 +01:00
parent e7ea8138c9
commit 554220a812
17 changed files with 202 additions and 74 deletions

View File

@ -178,6 +178,17 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData
return this.wp.exhausted
}
modifyWP(value) {
let updates = {}
let wp = Math.max(Math.min(this.wp.value + value, this.wp.max), 0)
if ( this.wp.value !== wp) {
updates[`system.wp.value`] = wp
}
if (Object.keys(updates).length > 0) {
this.parent.update(updates)
}
}
setBP() {
let updates = {}
let bp = Math.max(this.san.value - this.characteristics.pow.value, 0)