This commit is contained in:
@@ -283,6 +283,23 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
||||
*/
|
||||
async roll(rollType, rollTarget, defenderId, defenderTokenId, extraShieldDr = 0) {
|
||||
const hasTarget = false
|
||||
|
||||
// Ranged weapon attacks from PCs use the ranged attack dialog (range, movement, aim modifiers)
|
||||
if (rollType === "weapon-attack" && rollTarget?.isRangedAttack === true) {
|
||||
let roll = await LethalFantasyRoll.promptRangedAttack({
|
||||
rollType: "weapon-attack",
|
||||
actorId: this.parent.id,
|
||||
actorName: this.parent.name,
|
||||
actorImage: this.parent.img,
|
||||
rollTarget,
|
||||
defenderId,
|
||||
defenderTokenId,
|
||||
})
|
||||
if (!roll) return null
|
||||
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||
return
|
||||
}
|
||||
|
||||
let roll = await LethalFantasyRoll.prompt({
|
||||
rollType,
|
||||
rollTarget,
|
||||
|
||||
Reference in New Issue
Block a user