[Feature] 1876 - Adversary Disposition Split (#1877)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run

This commit is contained in:
WBHarry 2026-05-13 12:34:38 +02:00 committed by GitHub
parent 24813e7e4f
commit d86ab2053c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 5 deletions

View file

@ -350,7 +350,9 @@ export default class DhTooltipManager extends foundry.helpers.interaction.Toolti
async getBattlepointHTML(combatId) {
const combat = game.combats.get(combatId);
const adversaries =
combat.turns?.filter(x => x.actor?.isNPC)?.map(x => ({ ...x.actor, type: x.actor.system.type })) ?? [];
combat.turns
?.filter(x => x.actor?.isNPC && x.token.disposition === CONST.TOKEN_DISPOSITIONS.HOSTILE)
?.map(x => ({ ...x.actor, type: x.actor.system.type })) ?? [];
const characters = combat.turns?.filter(x => !x.isNPC && x.actor) ?? [];
const nrCharacters = characters.length;