mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Update action actionType & roll type
This commit is contained in:
parent
5045d481e5
commit
b5ba7e7fba
7 changed files with 14 additions and 12 deletions
|
|
@ -7,7 +7,7 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
|||
this.roll = roll;
|
||||
this.config = config;
|
||||
this.config.experiences = [];
|
||||
this.reactionOverride = config.roll?.type === 'reaction';
|
||||
this.reactionOverride = config.actionType === 'reaction';
|
||||
|
||||
if (config.source?.action) {
|
||||
this.item = config.data.parent.items.get(config.source.item) ?? config.data.parent;
|
||||
|
|
@ -114,7 +114,7 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
|||
context.extraFormula = this.config.extraFormula;
|
||||
context.formula = this.roll.constructFormula(this.config);
|
||||
|
||||
context.showReaction = !context.rollConfig.type && context.rollType === 'DualityRoll';
|
||||
context.showReaction = !context.config.roll?.type && context.rollType === 'DualityRoll';
|
||||
context.reactionOverride = this.reactionOverride;
|
||||
}
|
||||
return context;
|
||||
|
|
@ -171,11 +171,11 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
|||
static toggleReaction() {
|
||||
if (this.config.roll) {
|
||||
this.reactionOverride = !this.reactionOverride;
|
||||
this.config.roll.type = this.reactionOverride
|
||||
this.config.actionType = this.reactionOverride
|
||||
? CONFIG.DH.ITEM.actionTypes.reaction.id
|
||||
: this.config.roll.type === CONFIG.DH.ITEM.actionTypes.reaction.id
|
||||
: this.config.actionType === CONFIG.DH.ITEM.actionTypes.reaction.id
|
||||
? null
|
||||
: this.config.roll.type;
|
||||
: this.config.actionType;
|
||||
this.render();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -661,7 +661,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
})
|
||||
});
|
||||
|
||||
game.system.api.fields.ActionFields.CostField.execute.call(this, result);
|
||||
if(result) game.system.api.fields.ActionFields.CostField.execute.call(this, result);
|
||||
}
|
||||
|
||||
//TODO: redo toggleEquipItem method
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue