Skip to content

Commit

Permalink
Merge pull request #221 from Havoclivekiller/master
Browse files Browse the repository at this point in the history
missing import
  • Loading branch information
ClipplerBlood authored Dec 17, 2024
2 parents a82a6cc + 55605c3 commit 3af87bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/module/chat/roll-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function postAttackToChat(attacker, defender, item, attackRoll, attackAtt
? defender?.system.characteristics.defense
: defender?.getAttribute(defenseAttribute)?.value || ''

const plus20 = attackRoll?.total >= 20 && (targetNumber ? attackRoll?.total > targetNumber + (optinalRuleExceedsByFive ? 5 : 4) : true)
const plus20 = attackRoll?.total >= 20 && (targetNumber ? attackRoll?.total > targetNumber + (game.settings.get('demonlord', 'optinalRuleExceedsByFive') ? 5 : 4) : true)
const didHit = voidRoll ? false : attackRoll?.total >= targetNumber

let diceTotalGM = attackRoll?.total ?? ''
Expand Down Expand Up @@ -223,7 +223,7 @@ export function postTalentToChat(actor, talent, attackRoll, target, inputBoons)
}

const targetNumber = talentData?.action?.attack ? actor.getTargetNumber(talent) : ''
const plus20 = attackRoll?.total >= 20 && (targetNumber ? attackRoll?.total > targetNumber + (optinalRuleExceedsByFive ? 5 : 4) : true)
const plus20 = attackRoll?.total >= 20 && (targetNumber ? attackRoll?.total > targetNumber + (game.settings.get('demonlord', 'optinalRuleExceedsByFive') ? 5 : 4) : true)

let resultText =
!voidRoll && attackRoll != null && targetNumber !== undefined && attackRoll.total >= parseInt(targetNumber)
Expand Down Expand Up @@ -339,7 +339,7 @@ export async function postSpellToChat(actor, spell, attackRoll, target, inputBoo
if (uses >= 0 && usesMax > 0) usesText = game.i18n.localize('DL.SpellCastingsUses') + ': ' + uses + ' / ' + usesMax

const targetNumber = actor.getTargetNumber(spell)
const plus20 = attackRoll?.total >= 20 && (targetNumber ? attackRoll?.total > targetNumber + (optinalRuleExceedsByFive ? 5 : 4) : true)
const plus20 = attackRoll?.total >= 20 && (targetNumber ? attackRoll?.total > targetNumber + (game.settings.get('demonlord', 'optinalRuleExceedsByFive') ? 5 : 4) : true)

let resultText =
!voidRoll && targetNumber && attackRoll?.total >= parseInt(targetNumber)
Expand Down Expand Up @@ -511,7 +511,7 @@ export const postItemToChat = (actor, item, attackRoll, target, inputBoons) => {
}*/

const targetNumber = itemData?.action?.attack ? actor.getTargetNumber(item) : ''
const plus20 = attackRoll?.total >= 20 && (targetNumber ? attackRoll?.total > targetNumber + (optinalRuleExceedsByFive ? 5 : 4) : true)
const plus20 = attackRoll?.total >= 20 && (targetNumber ? attackRoll?.total > targetNumber + (game.settings.get('demonlord', 'optinalRuleExceedsByFive') ? 5 : 4) : true)

let resultText =
!voidRoll && attackRoll != null && targetNumber !== undefined && attackRoll.total >= parseInt(targetNumber)
Expand Down

0 comments on commit 3af87bf

Please sign in to comment.