mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Fix async/await roll postEvaluate (#417)
* Fix async/await roll postEvaluate * Fixed DualityReroll DiceSoNice * Add chatDisplay: false to actors base attack * Add chatDisplay: false to downtime actions * Add Action Type Select item name in header --------- Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
parent
01f5173aa4
commit
e6bfe08d83
9 changed files with 36 additions and 20 deletions
|
|
@ -140,8 +140,8 @@ export default class D20Roll extends DHRoll {
|
|||
return modifiers;
|
||||
}
|
||||
|
||||
static async postEvaluate(roll, config = {}) {
|
||||
const data = await super.postEvaluate(roll, config);
|
||||
static postEvaluate(roll, config = {}) {
|
||||
const data = super.postEvaluate(roll, config);
|
||||
if (config.targets?.length) {
|
||||
config.targets.forEach(target => {
|
||||
const difficulty = config.roll.difficulty ?? target.difficulty ?? target.evasion;
|
||||
|
|
@ -184,7 +184,7 @@ export default class D20Roll extends DHRoll {
|
|||
static async reroll(rollString, _target, message) {
|
||||
let parsedRoll = game.system.api.dice.D20Roll.fromData(rollString);
|
||||
parsedRoll = await parsedRoll.reroll();
|
||||
const newRoll = await game.system.api.dice.D20Roll.postEvaluate(parsedRoll, {
|
||||
const newRoll = game.system.api.dice.D20Roll.postEvaluate(parsedRoll, {
|
||||
targets: message.system.targets,
|
||||
roll: {
|
||||
advantage: message.system.roll.advantage?.type,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue