mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Moved the setting of data.type to d20Roll to not interfer with damageRoll
This commit is contained in:
parent
3e333d3533
commit
8c5a3dbbc5
3 changed files with 6 additions and 6 deletions
|
|
@ -149,16 +149,16 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
||||||
static toggleReaction() {
|
static toggleReaction() {
|
||||||
if (this.config.roll) {
|
if (this.config.roll) {
|
||||||
this.reactionOverride = !this.reactionOverride;
|
this.reactionOverride = !this.reactionOverride;
|
||||||
this.render();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static async submitRoll() {
|
|
||||||
this.config.roll.type = this.reactionOverride
|
this.config.roll.type = this.reactionOverride
|
||||||
? CONFIG.DH.ITEM.actionTypes.reaction.id
|
? CONFIG.DH.ITEM.actionTypes.reaction.id
|
||||||
: this.config.roll.type === CONFIG.DH.ITEM.actionTypes.reaction.id
|
: this.config.roll.type === CONFIG.DH.ITEM.actionTypes.reaction.id
|
||||||
? null
|
? null
|
||||||
: this.config.roll.type;
|
: this.config.roll.type;
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static async submitRoll() {
|
||||||
await this.close({ submitted: true });
|
await this.close({ submitted: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,7 @@ export default class D20Roll extends DHRoll {
|
||||||
data.difficulty = config.roll.difficulty;
|
data.difficulty = config.roll.difficulty;
|
||||||
data.success = roll.isCritical || roll.total >= config.roll.difficulty;
|
data.success = roll.isCritical || roll.total >= config.roll.difficulty;
|
||||||
}
|
}
|
||||||
|
data.type = config.roll.type;
|
||||||
data.advantage = {
|
data.advantage = {
|
||||||
type: config.roll.advantage,
|
type: config.roll.advantage,
|
||||||
dice: roll.dAdvantage?.denomination,
|
dice: roll.dAdvantage?.denomination,
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,6 @@ export default class DHRoll extends Roll {
|
||||||
|
|
||||||
static postEvaluate(roll, config = {}) {
|
static postEvaluate(roll, config = {}) {
|
||||||
return {
|
return {
|
||||||
type: config.roll.type,
|
|
||||||
total: roll.total,
|
total: roll.total,
|
||||||
formula: roll.formula,
|
formula: roll.formula,
|
||||||
dice: roll.dice.map(d => ({
|
dice: roll.dice.map(d => ({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue