Merged with v14-Dev

This commit is contained in:
WBHarry 2026-02-26 16:16:51 +01:00
commit 76c21302d2
81 changed files with 504 additions and 141 deletions

View file

@ -190,6 +190,10 @@ export default class DhpAdversary extends DhCreature {
}
}
prepareDerivedData() {
this.attack.roll.isStandardAttack = true;
}
_getTags() {
const tags = [
game.i18n.localize(`DAGGERHEART.GENERAL.Tiers.${this.tier}`),

View file

@ -745,7 +745,7 @@ export default class DhCharacter extends DhCreature {
};
const globalHopeMax = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).maxHope;
this.resources.hope.max = globalHopeMax - this.scars;
this.resources.hope.max = globalHopeMax;
this.resources.hitPoints.max += this.class.value?.system?.hitPoints ?? 0;
/* Companion Related Data */
@ -769,6 +769,7 @@ 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;

View file

@ -37,7 +37,7 @@ export default class DhEnvironment extends BaseDataActor {
potentialAdversaries: new fields.TypedObjectField(
new fields.SchemaField({
label: new fields.StringField(),
adversaries: new ForeignDocumentUUIDArrayField({ type: 'Actor' })
adversaries: new ForeignDocumentUUIDArrayField({ type: 'Actor' }, { required: false, initial: [] })
})
),
notes: new fields.HTMLField()