mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 12:41:07 +01:00
Some localization, style and smaller changes
This commit is contained in:
parent
a554ec0e4d
commit
048510074c
9 changed files with 137 additions and 151 deletions
|
|
@ -686,10 +686,10 @@ export default class DhCharacter extends BaseDataActor {
|
|||
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) {
|
||||
changes.system.resources = {
|
||||
hope: {
|
||||
value: newHopeValue
|
||||
}
|
||||
if (!changes.system.resources) changes.system.resources = { hope: { value: 0 } };
|
||||
changes.system.resources.hope = {
|
||||
...changes.system.resources.hope,
|
||||
value: changes.system.resources.hope.value + newHopeValue
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -710,7 +710,7 @@ export default class DhCharacter extends BaseDataActor {
|
|||
}
|
||||
|
||||
static migrateData(source) {
|
||||
if (typeof (source.scars) === 'object') source.scars = 0;
|
||||
if (typeof source.scars === 'object') source.scars = 0;
|
||||
return super.migrateData(source);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue