mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Merged with main
This commit is contained in:
commit
4319fbabb9
11 changed files with 88 additions and 12 deletions
|
|
@ -757,7 +757,6 @@ export default class DhCharacter extends DhCreature {
|
|||
|
||||
prepareDerivedData() {
|
||||
super.prepareDerivedData();
|
||||
let baseHope = this.resources.hope.value;
|
||||
if (this.companion) {
|
||||
for (let levelKey in this.companion.system.levelData.levelups) {
|
||||
const level = this.companion.system.levelData.levelups[levelKey];
|
||||
|
|
@ -772,7 +771,6 @@ export default class DhCharacter extends DhCreature {
|
|||
}
|
||||
|
||||
this.resources.hope.max -= this.scars;
|
||||
this.resources.hope.value = Math.min(baseHope, this.resources.hope.max);
|
||||
this.attack.roll.trait = this.rules.attack.roll.trait ?? this.attack.roll.trait;
|
||||
|
||||
this.resources.armor = {
|
||||
|
|
|
|||
|
|
@ -60,4 +60,14 @@ export default class DhCreature extends BaseDataActor {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
prepareDerivedData() {
|
||||
const minLimitResource = resource => {
|
||||
if (resource) resource.value = Math.min(resource.value, resource.max);
|
||||
};
|
||||
|
||||
minLimitResource(this.resources.stress);
|
||||
minLimitResource(this.resources.hitPoints);
|
||||
minLimitResource(this.resources.hope);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue