Companions can't be put into CombatState anymore. Companions now have a Action Roll button

This commit is contained in:
WBHarry 2025-08-22 19:11:17 +02:00
parent ee786544c7
commit 9b3d1cddc4
4 changed files with 66 additions and 0 deletions

View file

@ -13,6 +13,9 @@ export default class DHTokenHUD extends foundry.applications.hud.TokenHUD {
async _prepareContext(options) {
const context = await super._prepareContext(options);
const nonCombatTypes = ['environment', 'companion'];
context.canToggleCombat = nonCombatTypes.includes(this.actor.type) ? false : context.canToggleCombat;
context.systemStatusEffects = Object.keys(context.statusEffects).reduce((acc, key) => {
const effect = context.statusEffects[key];
if (effect.systemEffect) acc[key] = effect;