Compare commits

..

3 Commits

Author SHA1 Message Date
uberwald 968d156d09 Upgrade to r14
Release Creation / build (release) Successful in 48s
2026-04-30 14:38:56 +02:00
uberwald 59ff098fca Add ranged attacks for monsters 2026-04-29 20:27:20 +02:00
uberwald b8174d5e22 Fix E dice in dice Tray
Release Creation / build (release) Successful in 55s
2026-04-17 23:21:49 +02:00
36 changed files with 467 additions and 238 deletions
+3
View File
@@ -385,6 +385,9 @@
"divinityPoints": "Divinity points", "divinityPoints": "Divinity points",
"aetherPoints": "Aether points", "aetherPoints": "Aether points",
"attacks": "Attacks", "attacks": "Attacks",
"attackMode": "Attack Mode",
"meleeModeLabel": "Melee (8 attacks)",
"rangedModeLabel": "Ranged (4 attacks)",
"monster": "Monster", "monster": "Monster",
"Resist": "Resist", "Resist": "Resist",
"resist": "Resist", "resist": "Resist",
+2 -2
View File
@@ -597,7 +597,7 @@ Hooks.on("createChatMessage", async (message) => {
<div class="combat-status"> <div class="combat-status">
<p><strong>${attackerName}</strong> rolled <strong>${attackRoll}</strong></p> <p><strong>${attackerName}</strong> rolled <strong>${attackRoll}</strong></p>
<p><strong>${defenderName}</strong> currently has <strong>${defenseRoll}</strong></p> <p><strong>${defenderName}</strong> currently has <strong>${defenseRoll}</strong></p>
${defenseD30message ? `<p class="bonus-info">D30 special: ${defenseD30message}</p>` : ""} ${defenseD30message ? `<p class="bonus-info">D30 special: ${defenseD30message.description}</p>` : ""}
</div> </div>
<p class="offer-text">Choose how to improve the defense before resolving the hit.</p> <p class="offer-text">Choose how to improve the defense before resolving the hit.</p>
</div> </div>
@@ -751,7 +751,7 @@ Hooks.on("createChatMessage", async (message) => {
<div class="combat-status"> <div class="combat-status">
<p><strong>${attackerName}</strong> currently has <strong>${attackRollFinal}</strong></p> <p><strong>${attackerName}</strong> currently has <strong>${attackRollFinal}</strong></p>
<p><strong>${defenderName}</strong> rolled <strong>${defenseRoll}</strong></p> <p><strong>${defenderName}</strong> rolled <strong>${defenseRoll}</strong></p>
${attackD30message ? `<p class="bonus-info">D30 special: ${attackD30message}</p>` : ""} ${attackD30message ? `<p class="bonus-info">D30 special: ${attackD30message.description}</p>` : ""}
</div> </div>
<p class="offer-text">Choose how to improve the attack before resolving the combat result.</p> <p class="offer-text">Choose how to improve the attack before resolving the combat result.</p>
</div> </div>
+32 -19
View File
@@ -75,39 +75,53 @@ export function injectDiceTray(_chatLog, html) {
/** /**
* Roll one or more dice of the given type and post the result to chat. * Roll one or more dice of the given type and post the result to chat.
* For exploding dice, follows the Lethal Fantasy rule: each exploded reroll
* contributes (result 1) to the total, same as all other system rolls.
* *
* @param {string} dieType Die face, e.g. "d20" * @param {string} dieType Die face, e.g. "d20"
* @param {number} count Number of dice to roll (19) * @param {number} count Number of dice to roll (19)
* @param {boolean} explode Whether to use the exploding modifier (x = max-value explode) * @param {boolean} explode Whether to use the exploding variant (max triggers reroll at 1)
* @returns {Promise<void>} * @returns {Promise<void>}
*/ */
export async function rollFreeDie(dieType, count = 1, explode = false) { export async function rollFreeDie(dieType, count = 1, explode = false) {
const sides = parseInt(dieType.replace("d", "")) || 20 const sides = parseInt(dieType.replace("d", "")) || 20
const formula = explode ? `${count}d${sides}x` : `${count}d${sides}` const baseFormula = `1d${sides}`
const label = explode const label = explode
? `${count}${dieType.toUpperCase()}E` ? `${count}${dieType.toUpperCase()}E`
: `${count}${dieType.toUpperCase()}` : `${count}${dieType.toUpperCase()}`
const roll = new Roll(formula)
await roll.evaluate()
const results = roll.terms
.filter(t => t.results)
.flatMap(t => t.results)
const total = roll.total
const dieLabel = dieType.toUpperCase() const dieLabel = dieType.toUpperCase()
const resultHtml = results.map(r => { const dieChips = []
const val = r.result let total = 0
const isMax = val === sides
const isMin = val === 1 for (let i = 0; i < count; i++) {
const explodeIcon = r.exploded ? `<i class="fa-solid fa-burst lf-dt-explode-icon"></i>` : "" const r0 = await new Roll(baseFormula).evaluate()
if (game?.dice3d) await game.dice3d.showForRoll(r0, game.user, true)
let diceResult = r0.dice[0].results[0].result
dieChips.push({ label: dieLabel, value: diceResult, exploded: false })
total += diceResult
if (explode) {
while (diceResult === sides) {
const rx = await new Roll(baseFormula).evaluate()
if (game?.dice3d) await game.dice3d.showForRoll(rx, game.user, true)
diceResult = rx.dice[0].results[0].result
const contrib = diceResult - 1
dieChips.push({ label: `${dieLabel}-1`, value: contrib, exploded: true })
total += contrib
}
}
}
const resultHtml = dieChips.map(chip => {
const isMax = !chip.exploded && chip.value === sides
const isMin = chip.value === 1
const explodeIcon = chip.exploded ? `<i class="fa-solid fa-burst lf-dt-explode-icon"></i>` : ""
const classes = ["lf-frc-die-chip", isMax ? "lf-frc-max" : "", isMin ? "lf-frc-min" : ""].filter(Boolean).join(" ") const classes = ["lf-frc-die-chip", isMax ? "lf-frc-max" : "", isMin ? "lf-frc-min" : ""].filter(Boolean).join(" ")
return `<div class="${classes}"> return `<div class="${classes}">
<span class="lf-frc-die-type">${dieLabel}</span> <span class="lf-frc-die-type">${chip.label}</span>
<span class="lf-frc-die-sep">→</span> <span class="lf-frc-die-sep">→</span>
<span class="lf-frc-die-val">${val}${explodeIcon}</span> <span class="lf-frc-die-val">${chip.value}${explodeIcon}</span>
</div>` </div>`
}).join("") }).join("")
@@ -131,7 +145,6 @@ export async function rollFreeDie(dieType, count = 1, explode = false) {
const msgData = { const msgData = {
speaker: ChatMessage.getSpeaker(), speaker: ChatMessage.getSpeaker(),
content, content,
rolls: [roll],
sound: CONFIG.sounds.dice, sound: CONFIG.sounds.dice,
} }
ChatMessage.applyRollMode(msgData, rollMode) ChatMessage.applyRollMode(msgData, rollMode)
+244 -109
View File
@@ -1,148 +1,283 @@
{ {
"d30_dice_results": { "d30_dice_results": {
"30": { "30": {
"melee_attack": "Possible Lethal or Vital Strike or Add D20E to Attack", "melee_attack": {
"ranged_attack": "Possible Lethal or Vital Strike or Add D20E to Attack", "type": "choice",
"melee_defense": "Possible Flawless or Legendary Defense or Add D20E to Defense", "choices": [
"arcane_spell_attack": "Possible Lethal or Vital Magical Strike or Add D20E to Spell Attack", { "type": "special_strike", "options": ["lethal", "vital"] },
"arcane_spell_defense": "Possible Spell Catastrophe or adds D20E to Spell Defense", { "type": "bonus_dice", "dice": "D20E", "target": "attack" }
"skill_rolls": "Skill Succeeds Regardless of Opposing Roll" ],
"description": "Possible Lethal or Vital Strike or Add D20E to Attack"
},
"ranged_attack": {
"type": "choice",
"choices": [
{ "type": "special_strike", "options": ["lethal", "vital"] },
{ "type": "bonus_dice", "dice": "D20E", "target": "attack" }
],
"description": "Possible Lethal or Vital Strike or Add D20E to Attack"
},
"melee_defense": {
"type": "choice",
"choices": [
{ "type": "special_defense", "options": ["flawless", "legendary"] },
{ "type": "bonus_dice", "dice": "D20E", "target": "defense" }
],
"description": "Possible Flawless or Legendary Defense or Add D20E to Defense"
},
"arcane_spell_attack": {
"type": "choice",
"choices": [
{ "type": "special_strike", "options": ["lethal_magical", "vital_magical"] },
{ "type": "bonus_dice", "dice": "D20E", "target": "spell_attack" }
],
"description": "Possible Lethal or Vital Magical Strike or Add D20E to Spell Attack"
},
"arcane_spell_defense": {
"type": "choice",
"choices": [
{ "type": "spell_calamity" },
{ "type": "bonus_dice", "dice": "D20E", "target": "spell_defense" }
],
"description": "Possible Spell Catastrophe or adds D20E to Spell Defense"
},
"skill_rolls": {
"type": "skill_auto_success",
"description": "Skill Succeeds Regardless of Opposing Roll"
}
}, },
"29": { "29": {
"melee_attack": "Gain 1 Grit", "melee_attack": { "type": "gain_grit", "amount": 1, "description": "Gain 1 Grit" },
"ranged_attack": "Gain 1 Grit", "ranged_attack": { "type": "gain_grit", "amount": 1, "description": "Gain 1 Grit" },
"melee_defense": "Gain 1 Grit", "melee_defense": { "type": "gain_grit", "amount": 1, "description": "Gain 1 Grit" },
"arcane_spell_attack": "Gain 1 Grit", "arcane_spell_attack": { "type": "gain_grit", "amount": 1, "description": "Gain 1 Grit" },
"arcane_spell_defense": "Gain 1 Grit", "arcane_spell_defense": { "type": "gain_grit", "amount": 1, "description": "Gain 1 Grit" },
"skill_rolls": "Gain 1 Grit" "skill_rolls": { "type": "gain_grit", "amount": 1, "description": "Gain 1 Grit" }
}, },
"28": { "28": {
"melee_attack": "Shield Destruction", "melee_attack": { "type": "shield_destruction", "description": "Shield Destruction" }
"ranged_attack": "empty",
"melee_defense": "empty",
"arcane_spell_attack": "empty",
"arcane_spell_defense": "empty",
"skill_rolls": "empty"
}, },
"27": { "27": {
"melee_attack": "Granted D6 (1-6) Attack Modifier for This Melee Attack", "melee_attack": {
"ranged_attack": "Granted D6 (1-6) Attack Modifier for This Ranged Attack", "type": "bonus_dice", "dice": "D6", "target": "attack",
"melee_defense": "Granted 1 Luck dice for Use in This Combat Only", "description": "Granted D6 (1-6) Attack Modifier for This Melee Attack"
"arcane_spell_attack": "No Spell Lethargy the Aether Approves of Characters Efforts", },
"arcane_spell_defense": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds", "ranged_attack": {
"skill_rolls": "empty" "type": "bonus_dice", "dice": "D6", "target": "attack",
"description": "Granted D6 (1-6) Attack Modifier for This Ranged Attack"
},
"melee_defense": {
"type": "luck_die", "scope": "combat",
"description": "Granted 1 Luck dice for Use in This Combat Only"
},
"arcane_spell_attack": {
"type": "no_lethargy",
"description": "No Spell Lethargy the Aether Approves of Characters Efforts"
},
"arcane_spell_defense": {
"type": "flash_of_pain", "duration_dice": "1D6E", "target": "caster",
"description": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds"
}
}, },
"26": { "26": {
"melee_attack": "Shield Destruction", "melee_attack": { "type": "shield_destruction", "description": "Shield Destruction" }
"ranged_attack": "empty",
"melee_defense": "empty",
"arcane_spell_attack": "empty",
"arcane_spell_defense": "empty",
"skill_rolls": "empty"
}, },
"25": { "25": {
"melee_attack": "empty", "skill_rolls": {
"ranged_attack": "empty", "type": "bonus_flat", "amount": 1, "target": "skill",
"melee_defense": "empty", "description": "Add 1 to Skill Roll"
"arcane_spell_attack": "empty", }
"arcane_spell_defense": "empty",
"skill_rolls": "Add 1 to Skill Roll"
}, },
"21": { "21": {
"melee_attack": "Hit Inflicts Flash of Pain 1D6E seconds", "melee_attack": {
"ranged_attack": "Hit Inflicts Flash of Pain 1D6E seconds", "type": "flash_of_pain", "duration_dice": "1D6E", "target": "defender",
"melee_defense": "Defender Recovers or ignores any flash of pain", "description": "Hit Inflicts Flash of Pain 1D6E seconds"
"arcane_spell_attack": "Magical Damage inflicts Flash of pain 1D6E seconds", },
"arcane_spell_defense": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds", "ranged_attack": {
"skill_rolls": "Granted D6 (1-6) Skill Modifier for this Skill Attempt" "type": "flash_of_pain", "duration_dice": "1D6E", "target": "defender",
"description": "Hit Inflicts Flash of Pain 1D6E seconds"
},
"melee_defense": {
"type": "recover_pain",
"description": "Defender Recovers or ignores any flash of pain"
},
"arcane_spell_attack": {
"type": "flash_of_pain", "duration_dice": "1D6E", "target": "defender",
"description": "Magical Damage inflicts Flash of pain 1D6E seconds"
},
"arcane_spell_defense": {
"type": "flash_of_pain", "duration_dice": "1D6E", "target": "caster",
"description": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds"
},
"skill_rolls": {
"type": "bonus_dice", "dice": "D6", "target": "skill",
"description": "Granted D6 (1-6) Skill Modifier for this Skill Attempt"
}
}, },
"20": { "20": {
"melee_attack": "Possible Vicious Strike or Add D12 to attack", "melee_attack": {
"ranged_attack": "Possible Vicious Strike or add D12 to attack", "type": "choice",
"melee_defense": "Possible 20/20 defense that avoids Any Attack Except a Lethal Strike or adds D12 to defense", "choices": [
"arcane_spell_attack": "Possible Vicious Application of a Magical Attack or add D12 to attack", { "type": "special_strike", "options": ["vicious"] },
"arcane_spell_defense": "Possible 20/20 Spell defense that Saves Against Any Magical Attack Except a Lethal Magical Strike or add D12 to defense", { "type": "bonus_dice", "dice": "D12", "target": "attack" }
"skill_rolls": "20 Added to Skill Roll" ],
"description": "Possible Vicious Strike or Add D12 to attack"
},
"ranged_attack": {
"type": "choice",
"choices": [
{ "type": "special_strike", "options": ["vicious"] },
{ "type": "bonus_dice", "dice": "D12", "target": "attack" }
],
"description": "Possible Vicious Strike or add D12 to attack"
},
"melee_defense": {
"type": "choice",
"choices": [
{ "type": "special_defense", "options": ["perfect"] },
{ "type": "bonus_dice", "dice": "D12", "target": "defense" }
],
"description": "Possible 20/20 defense that avoids Any Attack Except a Lethal Strike or adds D12 to defense"
},
"arcane_spell_attack": {
"type": "choice",
"choices": [
{ "type": "special_strike", "options": ["vicious_magical"] },
{ "type": "bonus_dice", "dice": "D12", "target": "spell_attack" }
],
"description": "Possible Vicious Application of a Magical Attack or add D12 to attack"
},
"arcane_spell_defense": {
"type": "choice",
"choices": [
{ "type": "special_defense", "options": ["perfect_spell"] },
{ "type": "bonus_dice", "dice": "D12", "target": "spell_defense" }
],
"description": "Possible 20/20 Spell defense that Saves Against Any Magical Attack Except a Lethal Magical Strike or add D12 to defense"
},
"skill_rolls": {
"type": "bonus_flat", "amount": 20, "target": "skill",
"description": "20 Added to Skill Roll"
}
}, },
"15": { "15": {
"melee_attack": "Bleed, Knock-back on Hit", "melee_attack": {
"ranged_attack": "Bleed", "type": "combo",
"melee_defense": "Kick, Punch or Shield Bash", "effects": [
"arcane_spell_attack": "empty", { "type": "bleed" },
"arcane_spell_defense": "empty", { "type": "knockback" }
"skill_rolls": "Add 1 to Skill Roll" ],
"description": "Bleed, Knock-back on Hit"
}, },
"13": { "ranged_attack": { "type": "bleed", "description": "Bleed" },
"melee_attack": "empty", "melee_defense": {
"ranged_attack": "empty", "type": "counter_attack",
"melee_defense": "empty", "options": ["kick", "punch", "shield_bash"],
"arcane_spell_attack": "empty", "description": "Kick, Punch or Shield Bash"
"arcane_spell_defense": "empty",
"skill_rolls": "empty"
}, },
"skill_rolls": {
"type": "bonus_flat", "amount": 1, "target": "skill",
"description": "Add 1 to Skill Roll"
}
},
"13": {},
"11": { "11": {
"melee_attack": "Flurry Attack or Hit to Miss", "melee_attack": {
"ranged_attack": "Roll 2x Damage Dice", "type": "flurry", "condition": "hit_or_miss",
"melee_defense": "empty", "description": "Flurry Attack or Hit to Miss"
"arcane_spell_attack": "empty", },
"arcane_spell_defense": "empty", "ranged_attack": { "type": "double_damage_dice", "description": "Roll 2x Damage Dice" }
"skill_rolls": "empty"
}, },
"10": { "10": {
"melee_attack": "Bleed, Knock-back on Hit", "melee_attack": {
"ranged_attack": "Bleed", "type": "combo",
"melee_defense": "Kick, Punch or Shield Bash", "effects": [
"arcane_spell_attack": "empty", { "type": "bleed" },
"arcane_spell_defense": "empty", { "type": "knockback" }
"skill_rolls": "Add 1 to Skill Roll" ],
"description": "Bleed, Knock-back on Hit"
},
"ranged_attack": { "type": "bleed", "description": "Bleed" },
"melee_defense": {
"type": "counter_attack",
"options": ["kick", "punch", "shield_bash"],
"description": "Kick, Punch or Shield Bash"
},
"skill_rolls": {
"type": "bonus_flat", "amount": 1, "target": "skill",
"description": "Add 1 to Skill Roll"
}
}, },
"8": { "8": {
"melee_attack": "Mulligan, Can Choose to Re-roll This Attack", "melee_attack": { "type": "mulligan", "description": "Mulligan, Can Choose to Re-roll This Attack" },
"ranged_attack": "Mulligan, Can Choose to Re-Roll This Attack", "ranged_attack": { "type": "mulligan", "description": "Mulligan, Can Choose to Re-Roll This Attack" },
"melee_defense": "Mulligan, Can Choose to Re-Roll This Defense", "melee_defense": { "type": "mulligan", "description": "Mulligan, Can Choose to Re-Roll This Defense" },
"arcane_spell_attack": "Mulligan, Can Re-Roll This Spell Attack", "arcane_spell_attack": { "type": "mulligan", "description": "Mulligan, Can Re-Roll This Spell Attack" },
"arcane_spell_defense": "Mulligan, Can Re-Roll This Spell Defense", "arcane_spell_defense": { "type": "mulligan", "description": "Mulligan, Can Re-Roll This Spell Defense" },
"skill_rolls": "Mulligan, Can Re-Roll This Skill roll" "skill_rolls": { "type": "mulligan", "description": "Mulligan, Can Re-Roll This Skill roll" }
}, },
"7": { "7": {
"melee_attack": "Flurry Attack on Hit or Miss", "melee_attack": {
"ranged_attack": "Roll 2x Damage Dice", "type": "flurry", "condition": "hit_or_miss",
"melee_defense": "empty", "description": "Flurry Attack on Hit or Miss"
"arcane_spell_attack": "empty", },
"arcane_spell_defense": "empty", "ranged_attack": { "type": "double_damage_dice", "description": "Roll 2x Damage Dice" }
"skill_rolls": "empty"
}, },
"5": { "5": {
"melee_attack": "Bleed, Knock-back on Hit", "melee_attack": {
"ranged_attack": "Bleed", "type": "combo",
"melee_defense": "Kick, Punch, or Shield Bash", "effects": [
"arcane_spell_attack": "empty", { "type": "bleed" },
"arcane_spell_defense": "empty", { "type": "knockback" }
"skill_rolls": "Add 1 to Skill Roll" ],
"description": "Bleed, Knock-back on Hit"
},
"ranged_attack": { "type": "bleed", "description": "Bleed" },
"melee_defense": {
"type": "counter_attack",
"options": ["kick", "punch", "shield_bash"],
"description": "Kick, Punch, or Shield Bash"
},
"skill_rolls": {
"type": "bonus_flat", "amount": 1, "target": "skill",
"description": "Add 1 to Skill Roll"
}
}, },
"3": { "3": {
"melee_attack": "Triple Damage", "melee_attack": { "type": "damage_multiplier", "multiplier": 3, "description": "Triple Damage" },
"ranged_attack": "Triple Damage", "ranged_attack": { "type": "damage_multiplier", "multiplier": 3, "description": "Triple Damage" },
"melee_defense": "DR Tripled including Shield", "melee_defense": {
"arcane_spell_attack": "Triple Damage on Spell Damage", "type": "dr_multiplier", "multiplier": 3, "includes_shield": true,
"arcane_spell_defense": "D12 Added to Spell Defense Modifier", "description": "DR Tripled including Shield"
"skill_rolls": "empty" },
"arcane_spell_attack": { "type": "damage_multiplier", "multiplier": 3, "description": "Triple Damage on Spell Damage" },
"arcane_spell_defense": {
"type": "bonus_dice", "dice": "D12", "target": "spell_defense",
"description": "D12 Added to Spell Defense Modifier"
}
}, },
"2": { "2": {
"melee_attack": "Double Damage", "melee_attack": { "type": "damage_multiplier", "multiplier": 2, "description": "Double Damage" },
"ranged_attack": "Double Damage", "ranged_attack": { "type": "damage_multiplier", "multiplier": 2, "description": "Double Damage" },
"melee_defense": "DR Doubled including Shield", "melee_defense": {
"arcane_spell_attack": "Double Damage on Spell Damage", "type": "dr_multiplier", "multiplier": 2, "includes_shield": true,
"arcane_spell_defense": "D6 Added to Spell Defense Modifier", "description": "DR Doubled including Shield"
"skill_rolls": "empty" },
"arcane_spell_attack": { "type": "damage_multiplier", "multiplier": 2, "description": "Double Damage on Spell Damage" },
"arcane_spell_defense": {
"type": "bonus_dice", "dice": "D6", "target": "spell_defense",
"description": "D6 Added to Spell Defense Modifier"
}
}, },
"1": { "1": {
"melee_attack": "empty", "ranged_attack": {
"ranged_attack": "Possible Fumble Ranged ammo is broken unrecoverable", "type": "fumble", "detail": "ranged_ammo_broken",
"melee_defense": "empty", "description": "Possible Fumble Ranged ammo is broken unrecoverable"
"arcane_spell_attack": "Possible Spell Calamity or Catastrophe", },
"arcane_spell_defense": "empty", "arcane_spell_attack": {
"skill_rolls": "empty" "type": "spell_calamity",
"description": "Possible Spell Calamity or Catastrophe"
}
} }
}, },
"definitions": { "definitions": {
+12 -11
View File
@@ -47,11 +47,11 @@ export default class D30Roll {
} }
/** /**
* Récupère le résultat d'un jet de D30 * Récupère le résultat d'un jet de D30 sous forme d'objet structuré.
* @param {number} diceValue La valeur du dé (1-30) * @param {number} diceValue La valeur du dé (1-30)
* @param {string} rollType Le type de jet externe (ex: "weapon-attack", "spell-attack", etc.) * @param {string} rollType Le type de jet externe (ex: "weapon-attack", "spell-attack", etc.)
* @param {Object} weapon L'arme ou l'objet utilisé (optionnel, nécessaire pour certains types) * @param {Object} weapon L'arme ou l'objet utilisé (optionnel, nécessaire pour certains types)
* @returns {string|null} Le résultat correspondant ou null si vide/non trouvé * @returns {Object|null} L'objet effet `{ type, description, ...fields }` ou null si aucun effet
*/ */
static getResult(diceValue, rollType, weapon = null) { static getResult(diceValue, rollType, weapon = null) {
if (!this.resultsTable) { if (!this.resultsTable) {
@@ -59,13 +59,11 @@ export default class D30Roll {
return null return null
} }
// Validation des paramètres
if (diceValue < 1 || diceValue > 30) { if (diceValue < 1 || diceValue > 30) {
console.warn(`D30Roll | Invalid dice value: ${diceValue}. Must be between 1 and 30.`) console.warn(`D30Roll | Invalid dice value: ${diceValue}. Must be between 1 and 30.`)
return null return null
} }
// Convert external rollType to internal rollType
const internalType = this.convertToInternalType(rollType, weapon) const internalType = this.convertToInternalType(rollType, weapon)
if (!internalType) { if (!internalType) {
@@ -85,13 +83,16 @@ export default class D30Roll {
} }
const result = resultEntry[internalType] const result = resultEntry[internalType]
return result ?? null
// Retourne null si le résultat est "empty"
if (result === "empty" || !result) {
return null
} }
return result /**
* Retourne le type d'effet d'un résultat D30.
* @param {Object|null} result L'objet retourné par getResult()
* @returns {string|null} Le type d'effet ou null
*/
static getEffectType(result) {
return result?.type ?? null
} }
/** /**
@@ -177,11 +178,11 @@ export default class D30Roll {
/** /**
* Vérifie si un résultat est vide * Vérifie si un résultat est vide
* @param {string} result Le résultat à vérifier * @param {Object|null} result Le résultat à vérifier
* @returns {boolean} True si le résultat est vide * @returns {boolean} True si le résultat est vide
*/ */
static isEmptyResult(result) { static isEmptyResult(result) {
return !result || result === "empty" return !result || !result.type
} }
/** /**
+3
View File
@@ -1105,6 +1105,7 @@ export default class LethalFantasyRoll extends Roll {
// Merge rollContext object into options object // Merge rollContext object into options object
options = { ...options, ...rollContext } options = { ...options, ...rollContext }
options.rollName = "Ranged Defense" options.rollName = "Ranged Defense"
options.rollType = "weapon-defense"
const rollBase = new this(rollContext.movement, options.data, rollData) const rollBase = new this(rollContext.movement, options.data, rollData)
const rollModifier = new Roll(modifierFormula, options.data, rollData) const rollModifier = new Roll(modifierFormula, options.data, rollData)
@@ -1112,6 +1113,7 @@ export default class LethalFantasyRoll extends Roll {
await rollBase.evaluate() await rollBase.evaluate()
let rollD30 = await new Roll("1D30").evaluate() let rollD30 = await new Roll("1D30").evaluate()
options.D30result = rollD30.total options.D30result = rollD30.total
options.D30message = D30Roll.getResult(rollD30.total, options.rollType, options.rollTarget?.weapon)
let badResult = 0 let badResult = 0
if (rollContext.movement.includes("kh")) { if (rollContext.movement.includes("kh")) {
@@ -1154,6 +1156,7 @@ export default class LethalFantasyRoll extends Roll {
rollBase.options.rollTarget = options.rollTarget rollBase.options.rollTarget = options.rollTarget
rollBase.options.titleFormula = `1D20E + ${modifierFormula}` rollBase.options.titleFormula = `1D20E + ${modifierFormula}`
rollBase.options.D30result = options.D30result rollBase.options.D30result = options.D30result
rollBase.options.D30message = options.D30message
rollBase.options.rollName = "Ranged Defense" rollBase.options.rollName = "Ranged Defense"
rollBase.options.badResult = badResult rollBase.options.badResult = badResult
rollBase.options.rollData = foundry.utils.duplicate(rollData) rollBase.options.rollData = foundry.utils.duplicate(rollData)
+20 -4
View File
@@ -127,6 +127,19 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
attack2: attackField("2") attack2: attackField("2")
}) })
schema.attackMode = new fields.StringField({
required: true,
nullable: false,
initial: "melee",
choices: { melee: "Melee", ranged: "Ranged" }
})
schema.rangedAttacks = new fields.SchemaField({
attack1: attackField("1"),
attack2: attackField("2"),
attack3: attackField("3"),
attack4: attackField("4")
})
return schema return schema
} }
@@ -165,14 +178,16 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
switch (rollType) { switch (rollType) {
case "monster-attack": case "monster-attack":
case "monster-defense": case "monster-defense":
case "monster-damage": case "monster-damage": {
rollTarget = foundry.utils.duplicate(this.attacks[rollKey]) const attacksSet = this.attackMode === "ranged" ? this.rangedAttacks : this.attacks
rollTarget = foundry.utils.duplicate(attacksSet[rollKey])
rollTarget.rollKey = rollKey rollTarget.rollKey = rollKey
// Si damageModifier est fourni (depuis le chat), l'utiliser au lieu de celui de la fiche // Si damageModifier est fourni (depuis le chat), l'utiliser au lieu de celui de la fiche
if (damageModifier !== undefined && rollType === "monster-damage") { if (damageModifier !== undefined && rollType === "monster-damage") {
rollTarget.damageModifier = damageModifier rollTarget.damageModifier = damageModifier
} }
break break
}
case "monster-attack-hth": case "monster-attack-hth":
case "monster-defense-hth": case "monster-defense-hth":
case "monster-damage-hth": case "monster-damage-hth":
@@ -304,8 +319,9 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
} }
let hasAttack = false let hasAttack = false
for (let key in this.attacks) { const attacksSet = this.attackMode === "ranged" ? this.rangedAttacks : this.attacks
let attack = this.attacks[key] for (let key in attacksSet) {
let attack = attacksSet[key]
if (attack.enabled && attack.attackScore > 0 && attack.attackScore === roll.total) { if (attack.enabled && attack.attackScore > 0 && attack.attackScore === roll.total) {
hasAttack = true hasAttack = true
const messageContent = await foundry.applications.handlebars.renderTemplate( const messageContent = await foundry.applications.handlebars.renderTemplate(
+3 -2
View File
@@ -304,7 +304,8 @@ export default class LethalFantasyUtils {
// Pour les monstres, récupérer les attaques activées // Pour les monstres, récupérer les attaques activées
if (isMonster) { 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) { if (enabledAttacks.length === 0) {
ui.notifications.warn("No enabled attacks available for defense") ui.notifications.warn("No enabled attacks available for defense")
@@ -448,7 +449,7 @@ export default class LethalFantasyUtils {
/* -------------------------------------------- */ /* -------------------------------------------- */
static hasD30Reroll(d30Message) { static hasD30Reroll(d30Message) {
return /mulligan|re-?roll/i.test(d30Message || "") return d30Message?.type === "mulligan"
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
+1 -1
View File
@@ -1 +1 @@
MANIFEST-000567 MANIFEST-000579
+8 -8
View File
@@ -1,8 +1,8 @@
2026/04/17-15:59:28.854423 7fc1d9fbd6c0 Recovering log #565 2026/04/30-14:38:06.808992 7f3f35bff6c0 Recovering log #577
2026/04/17-15:59:28.865018 7fc1d9fbd6c0 Delete type=3 #563 2026/04/30-14:38:06.818757 7f3f35bff6c0 Delete type=3 #575
2026/04/17-15:59:28.865088 7fc1d9fbd6c0 Delete type=0 #565 2026/04/30-14:38:06.818831 7f3f35bff6c0 Delete type=0 #577
2026/04/17-17:32:42.752073 7fc1d8fbb6c0 Level-0 table #570: started 2026/04/30-14:38:35.518816 7f3ee77fe6c0 Level-0 table #582: started
2026/04/17-17:32:42.752102 7fc1d8fbb6c0 Level-0 table #570: 0 bytes OK 2026/04/30-14:38:35.518836 7f3ee77fe6c0 Level-0 table #582: 0 bytes OK
2026/04/17-17:32:42.757979 7fc1d8fbb6c0 Delete type=0 #568 2026/04/30-14:38:35.525869 7f3ee77fe6c0 Delete type=0 #580
2026/04/17-17:32:42.764071 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end) 2026/04/30-14:38:35.538258 7f3ee77fe6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
2026/04/17-17:32:42.764104 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end) 2026/04/30-14:38:35.538288 7f3ee77fe6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
+8 -8
View File
@@ -1,8 +1,8 @@
2026/04/16-08:58:49.556234 7fc1d97bc6c0 Recovering log #561 2026/04/29-20:13:54.005832 7fed937fe6c0 Recovering log #573
2026/04/16-08:58:49.566786 7fc1d97bc6c0 Delete type=3 #559 2026/04/29-20:13:54.016172 7fed937fe6c0 Delete type=3 #571
2026/04/16-08:58:49.566849 7fc1d97bc6c0 Delete type=0 #561 2026/04/29-20:13:54.016279 7fed937fe6c0 Delete type=0 #573
2026/04/16-10:53:23.903167 7fc1d8fbb6c0 Level-0 table #566: started 2026/04/29-20:27:06.418200 7feb10fff6c0 Level-0 table #578: started
2026/04/16-10:53:23.903203 7fc1d8fbb6c0 Level-0 table #566: 0 bytes OK 2026/04/29-20:27:06.418231 7feb10fff6c0 Level-0 table #578: 0 bytes OK
2026/04/16-10:53:23.909050 7fc1d8fbb6c0 Delete type=0 #564 2026/04/29-20:27:06.424568 7feb10fff6c0 Delete type=0 #576
2026/04/16-10:53:23.921766 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end) 2026/04/29-20:27:06.431809 7feb10fff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
2026/04/16-10:53:23.921790 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end) 2026/04/29-20:27:06.431871 7feb10fff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
+1 -1
View File
@@ -1 +1 @@
MANIFEST-000564 MANIFEST-000576
+8 -8
View File
@@ -1,8 +1,8 @@
2026/04/17-15:59:28.871085 7fc1dafbf6c0 Recovering log #562 2026/04/30-14:38:06.823818 7f3f353fe6c0 Recovering log #574
2026/04/17-15:59:28.880683 7fc1dafbf6c0 Delete type=3 #560 2026/04/30-14:38:06.834104 7f3f353fe6c0 Delete type=3 #572
2026/04/17-15:59:28.880729 7fc1dafbf6c0 Delete type=0 #562 2026/04/30-14:38:06.834187 7f3f353fe6c0 Delete type=0 #574
2026/04/17-17:32:42.744598 7fc1d8fbb6c0 Level-0 table #567: started 2026/04/30-14:38:35.525993 7f3ee77fe6c0 Level-0 table #579: started
2026/04/17-17:32:42.744627 7fc1d8fbb6c0 Level-0 table #567: 0 bytes OK 2026/04/30-14:38:35.526019 7f3ee77fe6c0 Level-0 table #579: 0 bytes OK
2026/04/17-17:32:42.751972 7fc1d8fbb6c0 Delete type=0 #565 2026/04/30-14:38:35.532067 7f3ee77fe6c0 Delete type=0 #577
2026/04/17-17:32:42.764061 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end) 2026/04/30-14:38:35.538267 7f3ee77fe6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
2026/04/17-17:32:42.764085 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end) 2026/04/30-14:38:35.538302 7f3ee77fe6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
+8 -8
View File
@@ -1,8 +1,8 @@
2026/04/16-08:58:49.571861 7fc1da7be6c0 Recovering log #558 2026/04/29-20:13:54.023030 7fed93fff6c0 Recovering log #570
2026/04/16-08:58:49.581625 7fc1da7be6c0 Delete type=3 #556 2026/04/29-20:13:54.032615 7fed93fff6c0 Delete type=3 #568
2026/04/16-08:58:49.581687 7fc1da7be6c0 Delete type=0 #558 2026/04/29-20:13:54.032677 7fed93fff6c0 Delete type=0 #570
2026/04/16-10:53:23.896992 7fc1d8fbb6c0 Level-0 table #563: started 2026/04/29-20:27:06.286266 7feb10fff6c0 Level-0 table #575: started
2026/04/16-10:53:23.897059 7fc1d8fbb6c0 Level-0 table #563: 0 bytes OK 2026/04/29-20:27:06.286286 7feb10fff6c0 Level-0 table #575: 0 bytes OK
2026/04/16-10:53:23.903074 7fc1d8fbb6c0 Delete type=0 #561 2026/04/29-20:27:06.292048 7feb10fff6c0 Delete type=0 #573
2026/04/16-10:53:23.921755 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end) 2026/04/29-20:27:06.299186 7feb10fff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
2026/04/16-10:53:23.921797 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end) 2026/04/29-20:27:06.299236 7feb10fff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
+1 -1
View File
@@ -1 +1 @@
MANIFEST-000569 MANIFEST-000581
+8 -8
View File
@@ -1,8 +1,8 @@
2026/04/17-15:59:28.839432 7fc1da7be6c0 Recovering log #567 2026/04/30-14:38:06.795186 7f3f353fe6c0 Recovering log #579
2026/04/17-15:59:28.849242 7fc1da7be6c0 Delete type=3 #565 2026/04/30-14:38:06.805935 7f3f353fe6c0 Delete type=3 #577
2026/04/17-15:59:28.849292 7fc1da7be6c0 Delete type=0 #567 2026/04/30-14:38:06.805994 7f3f353fe6c0 Delete type=0 #579
2026/04/17-17:32:42.764151 7fc1d8fbb6c0 Level-0 table #572: started 2026/04/30-14:38:35.512680 7f3ee77fe6c0 Level-0 table #584: started
2026/04/17-17:32:42.764181 7fc1d8fbb6c0 Level-0 table #572: 0 bytes OK 2026/04/30-14:38:35.512729 7f3ee77fe6c0 Level-0 table #584: 0 bytes OK
2026/04/17-17:32:42.770357 7fc1d8fbb6c0 Delete type=0 #570 2026/04/30-14:38:35.518704 7f3ee77fe6c0 Delete type=0 #582
2026/04/17-17:32:42.789018 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) 2026/04/30-14:38:35.538247 7f3ee77fe6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2026/04/17-17:32:42.789049 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) 2026/04/30-14:38:35.538281 7f3ee77fe6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
+8 -8
View File
@@ -1,8 +1,8 @@
2026/04/16-08:58:49.542216 7fc1dafbf6c0 Recovering log #563 2026/04/29-20:13:53.990808 7fed927fc6c0 Recovering log #575
2026/04/16-08:58:49.551998 7fc1dafbf6c0 Delete type=3 #561 2026/04/29-20:13:54.001559 7fed927fc6c0 Delete type=3 #573
2026/04/16-08:58:49.552067 7fc1dafbf6c0 Delete type=0 #563 2026/04/29-20:13:54.001699 7fed927fc6c0 Delete type=0 #575
2026/04/16-10:53:23.915570 7fc1d8fbb6c0 Level-0 table #568: started 2026/04/29-20:27:06.273802 7feb10fff6c0 Level-0 table #580: started
2026/04/16-10:53:23.915589 7fc1d8fbb6c0 Level-0 table #568: 0 bytes OK 2026/04/29-20:27:06.273877 7feb10fff6c0 Level-0 table #580: 0 bytes OK
2026/04/16-10:53:23.921669 7fc1d8fbb6c0 Delete type=0 #566 2026/04/29-20:27:06.280252 7feb10fff6c0 Delete type=0 #578
2026/04/16-10:53:23.921782 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) 2026/04/29-20:27:06.299161 7feb10fff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2026/04/16-10:53:23.921813 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) 2026/04/29-20:27:06.299217 7feb10fff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
+1 -1
View File
@@ -1 +1 @@
MANIFEST-000264 MANIFEST-000276
+8 -8
View File
@@ -1,8 +1,8 @@
2026/04/17-15:59:28.899464 7fc1d97bc6c0 Recovering log #262 2026/04/30-14:38:06.849252 7f3f353fe6c0 Recovering log #274
2026/04/17-15:59:28.910004 7fc1d97bc6c0 Delete type=3 #260 2026/04/30-14:38:06.859072 7f3f353fe6c0 Delete type=3 #272
2026/04/17-15:59:28.910074 7fc1d97bc6c0 Delete type=0 #262 2026/04/30-14:38:06.859126 7f3f353fe6c0 Delete type=0 #274
2026/04/17-17:32:42.770457 7fc1d8fbb6c0 Level-0 table #267: started 2026/04/30-14:38:35.538433 7f3ee77fe6c0 Level-0 table #279: started
2026/04/17-17:32:42.770479 7fc1d8fbb6c0 Level-0 table #267: 0 bytes OK 2026/04/30-14:38:35.538452 7f3ee77fe6c0 Level-0 table #279: 0 bytes OK
2026/04/17-17:32:42.777091 7fc1d8fbb6c0 Delete type=0 #265 2026/04/30-14:38:35.544715 7f3ee77fe6c0 Delete type=0 #277
2026/04/17-17:32:42.789028 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end) 2026/04/30-14:38:35.567736 7f3ee77fe6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
2026/04/17-17:32:42.789054 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end) 2026/04/30-14:38:35.567785 7f3ee77fe6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
+8 -8
View File
@@ -1,8 +1,8 @@
2026/04/16-08:58:49.600337 7fc1dafbf6c0 Recovering log #258 2026/04/29-20:13:54.051682 7fed937fe6c0 Recovering log #270
2026/04/16-08:58:49.610136 7fc1dafbf6c0 Delete type=3 #256 2026/04/29-20:13:54.062010 7fed937fe6c0 Delete type=3 #268
2026/04/16-08:58:49.610209 7fc1dafbf6c0 Delete type=0 #258 2026/04/29-20:13:54.062071 7fed937fe6c0 Delete type=0 #270
2026/04/16-10:53:23.940580 7fc1d8fbb6c0 Level-0 table #263: started 2026/04/29-20:27:06.292128 7feb10fff6c0 Level-0 table #275: started
2026/04/16-10:53:23.940611 7fc1d8fbb6c0 Level-0 table #263: 0 bytes OK 2026/04/29-20:27:06.292152 7feb10fff6c0 Level-0 table #275: 0 bytes OK
2026/04/16-10:53:23.947242 7fc1d8fbb6c0 Delete type=0 #261 2026/04/29-20:27:06.299041 7feb10fff6c0 Delete type=0 #273
2026/04/16-10:53:23.947402 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end) 2026/04/29-20:27:06.299199 7feb10fff6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
2026/04/16-10:53:23.947419 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end) 2026/04/29-20:27:06.299226 7feb10fff6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
+1 -1
View File
@@ -1 +1 @@
MANIFEST-000563 MANIFEST-000575
+8 -8
View File
@@ -1,8 +1,8 @@
2026/04/17-15:59:28.886104 7fc1da7be6c0 Recovering log #561 2026/04/30-14:38:06.836968 7f3ee7fff6c0 Recovering log #573
2026/04/17-15:59:28.896104 7fc1da7be6c0 Delete type=3 #559 2026/04/30-14:38:06.846980 7f3ee7fff6c0 Delete type=3 #571
2026/04/17-15:59:28.896157 7fc1da7be6c0 Delete type=0 #561 2026/04/30-14:38:06.847050 7f3ee7fff6c0 Delete type=0 #573
2026/04/17-17:32:42.758102 7fc1d8fbb6c0 Level-0 table #566: started 2026/04/30-14:38:35.532186 7f3ee77fe6c0 Level-0 table #578: started
2026/04/17-17:32:42.758128 7fc1d8fbb6c0 Level-0 table #566: 0 bytes OK 2026/04/30-14:38:35.532209 7f3ee77fe6c0 Level-0 table #578: 0 bytes OK
2026/04/17-17:32:42.763950 7fc1d8fbb6c0 Delete type=0 #564 2026/04/30-14:38:35.538132 7f3ee77fe6c0 Delete type=0 #576
2026/04/17-17:32:42.764079 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) 2026/04/30-14:38:35.538276 7f3ee77fe6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2026/04/17-17:32:42.764099 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) 2026/04/30-14:38:35.538295 7f3ee77fe6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
+8 -8
View File
@@ -1,8 +1,8 @@
2026/04/16-08:58:49.586323 7fc1d9fbd6c0 Recovering log #557 2026/04/29-20:13:54.036694 7fed92ffd6c0 Recovering log #569
2026/04/16-08:58:49.596973 7fc1d9fbd6c0 Delete type=3 #555 2026/04/29-20:13:54.047834 7fed92ffd6c0 Delete type=3 #567
2026/04/16-08:58:49.597026 7fc1d9fbd6c0 Delete type=0 #557 2026/04/29-20:13:54.047922 7fed92ffd6c0 Delete type=0 #569
2026/04/16-10:53:23.909144 7fc1d8fbb6c0 Level-0 table #562: started 2026/04/29-20:27:06.280338 7feb10fff6c0 Level-0 table #574: started
2026/04/16-10:53:23.909174 7fc1d8fbb6c0 Level-0 table #562: 0 bytes OK 2026/04/29-20:27:06.280357 7feb10fff6c0 Level-0 table #574: 0 bytes OK
2026/04/16-10:53:23.915478 7fc1d8fbb6c0 Delete type=0 #560 2026/04/29-20:27:06.286179 7feb10fff6c0 Delete type=0 #572
2026/04/16-10:53:23.921775 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) 2026/04/29-20:27:06.299174 7feb10fff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2026/04/16-10:53:23.921804 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) 2026/04/29-20:27:06.299209 7feb10fff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
+2 -2
View File
@@ -6,7 +6,7 @@
"download": "#{DOWNLOAD}#", "download": "#{DOWNLOAD}#",
"url": "#{URL}#", "url": "#{URL}#",
"license": "LICENSE", "license": "LICENSE",
"version": "13.0.0", "version": "14.0.0",
"authors": [ "authors": [
{ {
"name": "Uberwald", "name": "Uberwald",
@@ -15,7 +15,7 @@
], ],
"compatibility": { "compatibility": {
"minimum": "13", "minimum": "13",
"verified": "13" "verified": "14"
}, },
"esmodules": ["lethal-fantasy.mjs"], "esmodules": ["lethal-fantasy.mjs"],
"styles": ["css/fvtt-lethal-fantasy.css"], "styles": ["css/fvtt-lethal-fantasy.css"],
+1 -1
View File
@@ -127,7 +127,7 @@
{{#if D30message}} {{#if D30message}}
<div class="d30-message"> <div class="d30-message">
<i class="fa-solid fa-wand-magic-sparkles"></i> <i class="fa-solid fa-wand-magic-sparkles"></i>
<span>{{D30message}}</span> <span>{{D30message.description}}</span>
</div> </div>
{{/if}} {{/if}}
</div> </div>
+58 -1
View File
@@ -18,7 +18,16 @@
<fieldset> <fieldset>
<legend>{{localize "LETHALFANTASY.Label.attacks"}}</legend> <legend>{{localize "LETHALFANTASY.Label.attacks"}}</legend>
<div class="attacks"> <div class="attack-mode-selector">
<label>{{localize "LETHALFANTASY.Label.attackMode"}}</label>
<select name="system.attackMode">
<option value="melee" {{#if (eq system.attackMode "melee")}}selected{{/if}}>{{localize "LETHALFANTASY.Label.meleeModeLabel"}}</option>
<option value="ranged" {{#if (eq system.attackMode "ranged")}}selected{{/if}}>{{localize "LETHALFANTASY.Label.rangedModeLabel"}}</option>
</select>
</div>
{{#if (eq system.attackMode "melee")}}
<div class="attacks melee-attacks">
{{#each system.attacks as |item key|}} {{#each system.attacks as |item key|}}
<div class="attack" data-attack-key="{{key}}" > <div class="attack" data-attack-key="{{key}}" >
<div class=""> <div class="">
@@ -64,6 +73,54 @@
</div> </div>
{{/each}} {{/each}}
</div> </div>
{{else}}
<div class="attacks ranged-attacks">
{{#each system.rangedAttacks as |item key|}}
<div class="attack" data-attack-key="{{key}}" >
<div class="">
<input type="checkbox" name="system.rangedAttacks.{{item.key}}.enabled" {{checked item.enabled}} data-tooltip="Attack enabled/disabled" />
</div>
<div class="name">
<input type="text" name="system.rangedAttacks.{{item.key}}.name" value="{{item.name}}" data-tooltip="Attack name" />
</div>
<div class="numeric">
<input type="number" name="system.rangedAttacks.{{item.key}}.attackScore" value="{{item.attackScore}}" data-tooltip="Progression number" />
</div>
<div class="numeric">
<input type="number" name="system.rangedAttacks.{{item.key}}.attackModifier" value="{{item.attackModifier}}" data-tooltip="Attack modifier" />
</div>
<div class="numeric">
<input type="number" name="system.rangedAttacks.{{item.key}}.defenseModifier" value="{{item.defenseModifier}}" data-tooltip="Defense modifier"/>
</div>
<div class="damage-dice">
<input type="text" name="system.rangedAttacks.{{item.key}}.damageDice" value="{{item.damageDice}}" data-tooltip="Damage dice"/>
</div>
<div class="numeric">
<input type="number" name="system.rangedAttacks.{{item.key}}.damageModifier" value="{{item.damageModifier}}" data-tooltip="Damage modifier"/>
</div>
<div class="attack-icons">
<a class="rollable" data-roll-type="monster-attack" data-roll-key="{{item.key}}" data-tooltip="Roll Attack">
<i class="lf-roll-small fa-solid fa-bow-arrow" data-roll-type="monster-attack" data-roll-key="{{item.key}}"></i>
</a>
<a class="rollable" data-roll-type="monster-defense" data-roll-key="{{item.key}}" data-tooltip="Roll Defense">
<i class="fa-solid fa-shield-halved" data-roll-type="monster-defense" data-roll-key="{{item.key}}"></i>
</a>
<a class="rollable" data-roll-type="monster-damage" data-roll-key="{{item.key}}"
data-tooltip="Roll Damage">
<i class="fa-regular fa-face-head-bandage" data-roll-type="monster-damage"
data-roll-key="{{item.key}}"></i>
</a>
</div>
</div>
{{/each}}
</div>
{{/if}}
</fieldset> </fieldset>
<fieldset> <fieldset>