mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 04:44:16 +02:00
[Feature] 1876 - Adversary Disposition Split (#1877)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
This commit is contained in:
parent
24813e7e4f
commit
d86ab2053c
4 changed files with 18 additions and 5 deletions
|
|
@ -56,7 +56,9 @@ export default class DhCombatTracker extends foundry.applications.sidebar.tabs.C
|
|||
async _prepareTrackerContext(context, options) {
|
||||
await super._prepareTrackerContext(context, options);
|
||||
|
||||
const adversaries = context.turns?.filter(x => x.isNPC) ?? [];
|
||||
const npcs = context.turns?.filter(x => x.isNPC) ?? [];
|
||||
const adversaries = npcs.filter(x => x.disposition !== CONST.TOKEN_DISPOSITIONS.FRIENDLY);
|
||||
const friendlies = npcs.filter(x => x.disposition === CONST.TOKEN_DISPOSITIONS.FRIENDLY);
|
||||
const characters = context.turns?.filter(x => !x.isNPC) ?? [];
|
||||
const spotlightQueueEnabled = game.settings.get(
|
||||
CONFIG.DH.id,
|
||||
|
|
@ -75,6 +77,7 @@ export default class DhCombatTracker extends foundry.applications.sidebar.tabs.C
|
|||
Object.assign(context, {
|
||||
actionTokens: game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.variantRules).actionTokens,
|
||||
adversaries,
|
||||
friendlies,
|
||||
allCharacters: characters,
|
||||
characters: characters.filter(x => !spotlightQueueEnabled || x.system.spotlight.requestOrderIndex == 0),
|
||||
spotlightRequests
|
||||
|
|
@ -129,7 +132,8 @@ export default class DhCombatTracker extends foundry.applications.sidebar.tabs.C
|
|||
active: index === combat.turn,
|
||||
canPing: combatant.sceneId === canvas.scene?.id && game.user.hasPermission('PING_CANVAS'),
|
||||
type: combatant.actor?.system?.type,
|
||||
img: await this._getCombatantThumbnail(combatant)
|
||||
img: await this._getCombatantThumbnail(combatant),
|
||||
disposition: combatant.token.disposition
|
||||
};
|
||||
|
||||
turn.css = [turn.active ? 'active' : null, hidden ? 'hide' : null, isDefeated ? 'defeated' : null].filterJoin(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue