mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Feature/233 234 235 (#246)
* #233 #234 #235 + Fixes * Fix reaction roll
This commit is contained in:
parent
eb647f1e31
commit
750282aeec
24 changed files with 355 additions and 192 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import CostSelectionDialog from '../../applications/costSelectionDialog.mjs';
|
||||
import { DHActionDiceData, DHActionRollData, DHDamageData, DHDamageField } from './actionDice.mjs';
|
||||
import DhpActor from '../../documents/actor.mjs';
|
||||
import D20RollDialog from '../../dialogs/d20RollDialog.mjs';
|
||||
|
|
@ -343,7 +342,9 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
|||
label: 'Attack',
|
||||
type: this.actionType,
|
||||
difficulty: this.roll?.difficulty,
|
||||
formula: this.roll.getFormula()
|
||||
formula: this.roll.getFormula(),
|
||||
bonus: this.roll.bonus,
|
||||
advantage: SYSTEM.ACTIONS.advandtageState[this.roll.advState].value
|
||||
};
|
||||
if (this.roll?.type === 'diceSet') roll.lite = true;
|
||||
|
||||
|
|
@ -372,7 +373,7 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
|||
|
||||
/* ROLL */
|
||||
get hasRoll() {
|
||||
return !!this.roll?.type;
|
||||
return !!this.roll?.type || !!this.roll?.bonus;
|
||||
}
|
||||
/* ROLL */
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ export class DHActionRollData extends foundry.abstract.DataModel {
|
|||
type: new fields.StringField({ nullable: true, initial: null, choices: SYSTEM.GENERAL.rollTypes }),
|
||||
trait: new fields.StringField({ nullable: true, initial: null, choices: SYSTEM.ACTOR.abilities }),
|
||||
difficulty: new fields.NumberField({ nullable: true, initial: null, integer: true, min: 0 }),
|
||||
bonus: new fields.NumberField({ nullable: true, initial: null, integer: true, min: 0 }),
|
||||
bonus: new fields.NumberField({ nullable: true, initial: null, integer: true }),
|
||||
advState: new fields.StringField({ choices: SYSTEM.ACTIONS.advandtageState, initial: 'neutral' }),
|
||||
diceRolling: new fields.SchemaField({
|
||||
multiplier: new fields.StringField({
|
||||
choices: SYSTEM.GENERAL.diceSetNumbers,
|
||||
|
|
@ -62,7 +63,7 @@ export class DHActionDiceData extends foundry.abstract.DataModel {
|
|||
label: 'Multiplier'
|
||||
}),
|
||||
flatMultiplier: new fields.NumberField({ nullable: true, initial: 1, label: 'Flat Multiplier' }),
|
||||
dice: new fields.StringField({ choices: SYSTEM.GENERAL.diceTypes, initial: 'd6', label: 'Formula' }),
|
||||
dice: new fields.StringField({ choices: SYSTEM.GENERAL.diceTypes, initial: 'd6', label: 'Dice' }),
|
||||
bonus: new fields.NumberField({ nullable: true, initial: null, label: 'Bonus' }),
|
||||
custom: new fields.SchemaField({
|
||||
enabled: new fields.BooleanField({ label: 'Custom Formula' }),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue