Various fixes for spell and ranged attacks

This commit is contained in:
2026-05-23 00:11:58 +02:00
parent e417b61625
commit 2770774aa3
5 changed files with 19 additions and 9 deletions
+2
View File
@@ -262,6 +262,7 @@ Hooks.on("renderChatMessageHTML", (message, html, data) => {
const isRangedAttack = (rollTargetOptions?.attackMode === "ranged")
|| (attacker?.type === "monster" && attacker.system.attackMode === "ranged")
|| (attackerWeapon?.system?.weaponType === "ranged")
|| (rollTargetOptions?.isRangedAttack === true)
const defenseMsg = {
type: "requestDefense",
@@ -403,6 +404,7 @@ Hooks.on("renderChatMessageHTML", (message, html, data) => {
}
roll.options.diceResults = diceResults
roll.options.rollTotal = roll.total
if (game?.dice3d) await game.dice3d.showForRoll(roll, game.user, true)
await roll.toMessage()
return
}