mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 04:31:07 +01:00
164 - Add Hope/Fear formula
This commit is contained in:
parent
aacaf516b2
commit
8423ab6776
9 changed files with 125 additions and 57 deletions
|
|
@ -67,6 +67,8 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
context.getRealIndex = this.getRealIndex.bind(this);
|
||||
context.disableOption = this.disableOption.bind(this);
|
||||
context.isNPC = this.action.actor && this.action.actor.type !== 'character';
|
||||
context.hasRoll = this.action.hasRoll();
|
||||
console.log(context)
|
||||
return context;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,13 +42,12 @@ export default class CostSelectionDialog extends HandlebarsApplicationMixin(Appl
|
|||
}
|
||||
|
||||
async _prepareContext(_options) {
|
||||
console.log(this.costs);
|
||||
const updatedCosts = this.action.calcCosts(this.costs),
|
||||
updatedUses = this.action.calcUses(this.uses);
|
||||
return {
|
||||
costs: updatedCosts,
|
||||
uses: updatedUses,
|
||||
canUse: this.action.getRealCosts(updatedCosts)?.hasCost && this.action.hasUses(updatedUses)
|
||||
canUse: this.action.hasCost(updatedCosts) && this.action.hasUses(updatedUses)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,10 +28,6 @@ export class DHRoll extends Roll {
|
|||
|
||||
this.applyKeybindings(config);
|
||||
|
||||
// let roll;
|
||||
// if(config.dialog?.configure === false) {
|
||||
// roll = new this('', config.actor, config);
|
||||
// } else {
|
||||
if (config.dialog.configure !== false) {
|
||||
// Open Roll Dialog
|
||||
const DialogClass = config.dialog?.class ?? this.DefaultDialog;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue