Add ranged attacks for monsters
This commit is contained in:
+3
-2
@@ -304,7 +304,8 @@ export default class LethalFantasyUtils {
|
||||
|
||||
// Pour les monstres, récupérer les attaques activées
|
||||
if (isMonster) {
|
||||
const enabledAttacks = Object.entries(defender.system.attacks).filter(([key, attack]) => attack.enabled)
|
||||
const attacksSet = defender.system.attackMode === "ranged" ? defender.system.rangedAttacks : defender.system.attacks
|
||||
const enabledAttacks = Object.entries(attacksSet).filter(([key, attack]) => attack.enabled)
|
||||
|
||||
if (enabledAttacks.length === 0) {
|
||||
ui.notifications.warn("No enabled attacks available for defense")
|
||||
@@ -448,7 +449,7 @@ export default class LethalFantasyUtils {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static hasD30Reroll(d30Message) {
|
||||
return /mulligan|re-?roll/i.test(d30Message || "")
|
||||
return d30Message?.type === "mulligan"
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user