mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 12:41:07 +01:00
Fixed critical threshold applying to reactions
This commit is contained in:
parent
c958acabe6
commit
9473250f0c
2 changed files with 4 additions and 2 deletions
|
|
@ -87,7 +87,7 @@ export class DHActionRollData extends foundry.abstract.DataModel {
|
||||||
if (this.type === CONFIG.DH.GENERAL.rollTypes.attack.id)
|
if (this.type === CONFIG.DH.GENERAL.rollTypes.attack.id)
|
||||||
modifiers.push({
|
modifiers.push({
|
||||||
label: 'Bonus to Hit',
|
label: 'Bonus to Hit',
|
||||||
value: this.bonus ?? this.parent.actor.system.attack.roll.bonus
|
value: this.bonus ?? this.parent.actor.system.attack.roll.bonus ?? 0
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,9 @@ export default class D20Roll extends DHRoll {
|
||||||
|
|
||||||
get isCritical() {
|
get isCritical() {
|
||||||
if (!this.d20._evaluated) return;
|
if (!this.d20._evaluated) return;
|
||||||
return this.d20.total >= this.data.system.criticalThreshold;
|
|
||||||
|
const criticalThreshold = this.options.actionType === 'reaction' ? 20 : this.data.system.criticalThreshold;
|
||||||
|
return this.d20.total >= criticalThreshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
get hasAdvantage() {
|
get hasAdvantage() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue