Cost & Range #1

This commit is contained in:
Dapoolp 2025-06-14 11:17:48 +02:00
parent f983ae392f
commit 7f8799f2dc
10 changed files with 112 additions and 47 deletions

View file

@ -62,6 +62,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
if (!!this.action.effects) context.effects = this.action.effects.map(e => this.action.item.effects.get(e._id));
if (this.action.damage?.hasOwnProperty('includeBase')) context.hasBaseDamage = !!this.action.parent.damage;
context.getRealIndex = this.getRealIndex.bind(this);
console.log(context)
return context;
}
@ -132,6 +133,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
data = this.action.toObject();
data.effects.push({ _id: created._id });
this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) });
this.action.item.effects.get(created._id).sheet.render(true);
}
/**

View file

@ -45,6 +45,7 @@ export default class DhActiveEffectConfig extends ActiveEffectConfig {
break;
}
console.log(context, partContext)
return partContext;
}

View file

@ -51,7 +51,7 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) {
const context = await super._prepareContext(_options);
context.document = this.document;
context.tabs = super._getTabs(this.constructor.TABS);
console.log(context)
return context;
}