mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Fixed scars change preUpdate
This commit is contained in:
parent
4282933dcf
commit
50b4b4cf26
1 changed files with 2 additions and 1 deletions
|
|
@ -721,7 +721,8 @@ export default class DhCharacter extends DhCreature {
|
|||
const newHopeMax = this.system.resources.hope.max + diff;
|
||||
const newHopeValue = Math.min(newHopeMax, this.system.resources.hope.value);
|
||||
if (newHopeValue != this.system.resources.hope.value) {
|
||||
if (!changes.system.resources) changes.system.resources = { hope: { value: 0 } };
|
||||
if (!changes.system.resources.hope) changes.system.resources.hope = { value: 0 };
|
||||
|
||||
changes.system.resources.hope = {
|
||||
...changes.system.resources.hope,
|
||||
value: changes.system.resources.hope.value + newHopeValue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue