mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Fixed a lot of cases where we expected a combatant to have an attached actor (#1520)
This commit is contained in:
parent
e6973fabd0
commit
0b343c9f52
9 changed files with 41 additions and 17 deletions
|
|
@ -15,8 +15,9 @@ export default class DhCombat extends foundry.abstract.TypeDataModel {
|
|||
get extendedBattleToggles() {
|
||||
const modifiers = CONFIG.DH.ENCOUNTER.BPModifiers;
|
||||
const adversaries =
|
||||
this.parent.turns?.filter(x => x.isNPC)?.map(x => ({ ...x.actor, type: x.actor.system.type })) ?? [];
|
||||
const characters = this.parent.turns?.filter(x => !x.isNPC) ?? [];
|
||||
this.parent.turns?.filter(x => x.actor && x.isNPC)?.map(x => ({ ...x.actor, type: x.actor.system.type })) ??
|
||||
[];
|
||||
const characters = this.parent.turns?.filter(x => x.actor && !x.isNPC) ?? [];
|
||||
|
||||
const activeAutomatic = Object.keys(modifiers).reduce((acc, categoryKey) => {
|
||||
const category = modifiers[categoryKey];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue