mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Adversary Attack
This commit is contained in:
parent
5a8aed73d2
commit
2981aab917
19 changed files with 269 additions and 499 deletions
|
|
@ -8,8 +8,8 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
|||
this.config.experiences = [];
|
||||
|
||||
if(config.source?.action) {
|
||||
this.item = config.actor.parent.items.get(config.source.item);
|
||||
this.action = this.item.system.actions.find(a => a._id === config.source.action);
|
||||
this.item = config.data.parent.items.get(config.source.item);
|
||||
this.action = config.data.attack?._id == config.source.action ? config.data.attack : this.item.system.actions.find(a => a._id === config.source.action);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
|||
|
||||
async _prepareContext(_options) {
|
||||
const context = await super._prepareContext(_options);
|
||||
context.experiences = Object.keys(this.config.actor.experiences).map(id => ({ id, ...this.config.actor.experiences[id] }));
|
||||
context.experiences = Object.keys(this.config.data.experiences).map(id => ({ id, ...this.config.data.experiences[id] }));
|
||||
context.selectedExperiences = this.config.experiences;
|
||||
context.advantage = this.config.advantage;
|
||||
/* context.diceOptions = this.diceOptions; */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue