Compare commits

...

2 Commits

Author SHA1 Message Date
uberwald 7279cd752d Fix initiative again
Release Creation / build (release) Successful in 43s
2026-05-18 07:58:28 +02:00
uberwald db3e8b5d35 Improve init for monsters and some fixwes around shields
Release Creation / build (release) Successful in 48s
2026-05-17 13:22:29 +02:00
37 changed files with 399 additions and 360 deletions
+3
View File
@@ -988,6 +988,9 @@
"diceResult": "Dice result", "diceResult": "Dice result",
"progressionCount": "Progression count:" "progressionCount": "Progression count:"
}, },
"Combat": {
"RollMonsters": "Roll Monsters"
},
"EquipmentCategories": { "EquipmentCategories": {
"ClassKit": "Class Kit", "ClassKit": "Class Kit",
"Clothing": "Clothing", "Clothing": "Clothing",
+215 -241
View File
@@ -129,310 +129,284 @@ Hooks.once("ready", function () {
} }
}) })
// Test if version below 13 Hooks.on("renderChatMessageHTML", (message, html, data) => {
let hookName = "renderChatMessage"
if (foundry.utils.isNewerVersion(game.version, "12.0",)) {
hookName = "renderChatMessageHTML"
}
Hooks.on(hookName, (message, html, data) => {
const typeMessage = data.message.flags.lethalFantasy?.typeMessage const typeMessage = data.message.flags.lethalFantasy?.typeMessage
// Message de demande de jet de dés // Message de demande de jet de dés
if (typeMessage === "askRoll") { if (typeMessage === "askRoll") {
// Affichage des boutons de jet de dés uniquement pour les joueurs // Affichage des boutons de jet de dés uniquement pour les joueurs
if (game.user.isGM) { if (game.user.isGM) {
html.find(".ask-roll-dice").each((i, btn) => { for (const btn of html.querySelectorAll(".ask-roll-dice")) {
btn.style.display = "none" btn.style.display = "none"
}) }
} else { } else {
html.find(".ask-roll-dice").click((event) => { for (const btn of html.querySelectorAll(".ask-roll-dice")) {
const btn = $(event.currentTarget) btn.addEventListener("click", () => {
const type = btn.data("type") const type = btn.dataset.type
const value = btn.data("value") const value = btn.dataset.value
const avantage = btn.data("avantage") ?? "=" const avantage = btn.dataset.avantage ?? "="
const character = game.user.character const character = game.user.character
if (type === SYSTEM.ROLL_TYPE.RESOURCE) character.rollResource(value) if (type === SYSTEM.ROLL_TYPE.RESOURCE) character.rollResource(value)
else if (type === SYSTEM.ROLL_TYPE.SAVE) character.rollSave(value, avantage) else if (type === SYSTEM.ROLL_TYPE.SAVE) character.rollSave(value, avantage)
}) })
}
} }
} }
// Gestion du survol et du clic sur les boutons de dégâts pour les GMs // Gestion du survol et du clic sur les boutons de dégâts pour les GMs
if (game.user.isGM) { if (game.user.isGM) {
// Show damage buttons only for GM // Show damage buttons only for GM
$(html).find(".li-apply-wounds").each((i, btn) => { for (const btn of html.querySelectorAll(".li-apply-wounds")) {
btn.style.display = "block" btn.style.display = "block"
}) }
$(html).find(".apply-wounds-btn").hover( for (const btn of html.querySelectorAll(".apply-wounds-btn")) {
function (event) { btn.addEventListener("mouseenter", () => {
// Mouse enter - select the token and pan to it const combatantId = btn.dataset.combatantId
let combatantId = $(this).data("combatant-id")
if (combatantId && game.combat) { if (combatantId && game.combat) {
let combatant = game.combat.combatants.get(combatantId) const combatant = game.combat.combatants.get(combatantId)
if (combatant?.token) { if (combatant?.token) {
let token = canvas.tokens.get(combatant.token.id) const token = canvas.tokens.get(combatant.token.id)
if (token) { if (token) {
token.control({ releaseOthers: true }) token.control({ releaseOthers: true })
canvas.animatePan(token.center) canvas.animatePan(token.center)
} }
} }
} }
}, })
function (event) { btn.addEventListener("mouseleave", () => canvas.tokens.releaseAll())
// Mouse leave - release selection btn.addEventListener("click", event => LethalFantasyUtils.applyDamage(message, event))
canvas.tokens.releaseAll() }
}
)
$(html).find(".apply-wounds-btn").click((event) => {
LethalFantasyUtils.applyDamage(message, event)
})
} }
// Gestion du survol et du clic sur les boutons de défense // Gestion du survol et du clic sur les boutons de défense
$(html).find(".request-defense-btn").hover( for (const btn of html.querySelectorAll(".request-defense-btn")) {
function (event) { btn.addEventListener("mouseenter", () => {
// Mouse enter - select the token and pan to it const tokenId = btn.dataset.tokenId
let tokenId = $(this).data("token-id")
if (tokenId) { if (tokenId) {
let token = canvas.tokens.get(tokenId) const token = canvas.tokens.get(tokenId)
if (token) { if (token) {
token.control({ releaseOthers: true }) token.control({ releaseOthers: true })
canvas.animatePan(token.center) canvas.animatePan(token.center)
} }
} }
}, })
function (event) { btn.addEventListener("mouseleave", () => canvas.tokens.releaseAll())
// Mouse leave - release selection
canvas.tokens.releaseAll()
}
)
// Gestionnaire pour les boutons de demande de défense // Gestionnaire pour les boutons de demande de défense
$(html).find(".request-defense-btn").off("click").on("click", (event) => { btn.addEventListener("click", event => {
event.preventDefault() event.preventDefault()
event.stopPropagation() event.stopPropagation()
const button = $(event.currentTarget) const combatantId = btn.dataset.combatantId
const combatantId = button.data("combatant-id") const tokenId = btn.dataset.tokenId
const tokenId = button.data("token-id")
// Récupérer le combattant soit du combat, soit directement du token // Récupérer le combattant soit du combat, soit directement du token
let combatant = null let combatant = null
let token = null let token = null
if (game.combat && combatantId) { if (game.combat && combatantId) {
combatant = game.combat.combatants.get(combatantId) combatant = game.combat.combatants.get(combatantId)
} }
// Si pas de combattant trouvé, chercher le token directement // Si pas de combattant trouvé, chercher le token directement
if (!combatant && tokenId) { if (!combatant && tokenId) {
token = canvas.tokens.get(tokenId) token = canvas.tokens.get(tokenId)
if (token) { if (token) {
// Créer un pseudo-combattant avec les infos du token // Créer un pseudo-combattant avec les infos du token
combatant = { combatant = {
actor: token.actor, actor: token.actor,
name: token.name, name: token.name,
token: token, token: token,
actorId: token.actorId actorId: token.actorId
}
} }
} }
}
if (!combatant) return if (!combatant) return
// Récupérer les informations de l'attaquant depuis le message // Récupérer les informations de l'attaquant depuis le message
const attackerName = message.rolls[0]?.actorName || "Unknown" const attackerName = message.rolls[0]?.actorName || "Unknown"
const attackerId = message.rolls[0]?.actorId const attackerId = message.rolls[0]?.actorId
const weaponName = message.rolls[0]?.rollName || "weapon" const weaponName = message.rolls[0]?.rollName || "weapon"
const attackRoll = message.rolls[0]?.rollTotal || 0 const attackRoll = message.rolls[0]?.rollTotal || 0
const defenderName = combatant.name const defenderName = combatant.name
const attackWeaponId = message.rolls[0]?.rollTarget?.weapon?.id || message.rolls[0]?.rollTarget?.weapon?._id const attackWeaponId = message.rolls[0]?.rollTarget?.weapon?.id || message.rolls[0]?.rollTarget?.weapon?._id
const attackRollType = message.rolls[0]?.type const attackRollType = message.rolls[0]?.type
const attackRollKey = message.rolls[0]?.rollTarget?.rollKey const attackRollKey = message.rolls[0]?.rollTarget?.rollKey
console.log(`[LF] request-defense-btn | attackRollType=${attackRollType} defender=${defenderName} defenderType=${combatant.actor?.type}`) console.log(`[LF] request-defense-btn | attackRollType=${attackRollType} defender=${defenderName} defenderType=${combatant.actor?.type}`)
const attackD30result = message.rolls[0]?.options?.D30result || null const attackD30result = message.rolls[0]?.options?.D30result || null
const attackD30message = message.rolls[0]?.options?.D30message || null const attackD30message = message.rolls[0]?.options?.D30message || null
const attackRerollContext = { const attackRerollContext = {
rollType: message.rolls[0]?.options?.rollType, rollType: message.rolls[0]?.options?.rollType,
rollTarget: foundry.utils.duplicate(message.rolls[0]?.options?.rollTarget ?? {}), rollTarget: foundry.utils.duplicate(message.rolls[0]?.options?.rollTarget ?? {}),
actorId: message.rolls[0]?.options?.actorId, actorId: message.rolls[0]?.options?.actorId,
actorName: message.rolls[0]?.options?.actorName, actorName: message.rolls[0]?.options?.actorName,
actorImage: message.rolls[0]?.options?.actorImage, actorImage: message.rolls[0]?.options?.actorImage,
defenderId: combatant.actor?.id || null, defenderId: combatant.actor?.id || null,
defenderTokenId: tokenId || combatant.token?.id || null, defenderTokenId: tokenId || combatant.token?.id || null,
rollContext: foundry.utils.duplicate(message.rolls[0]?.options?.rollData ?? {}) rollContext: foundry.utils.duplicate(message.rolls[0]?.options?.rollData ?? {})
} }
// Préparer le message de demande de défense // Préparer le message de demande de défense
// isRanged: true si le monstre était en mode ranged (via rollTarget.attackMode stocké dans le roll) // isRanged: true si le monstre était en mode ranged (via rollTarget.attackMode stocké dans le roll)
// OU si l'attaquant utilisait une arme ranged (weapon-attack avec weaponType === "ranged") // OU si l'attaquant utilisait une arme ranged (weapon-attack avec weaponType === "ranged")
const attacker = game.actors.get(attackerId) const attacker = game.actors.get(attackerId)
const rollTargetOptions = message.rolls[0]?.options?.rollTarget const rollTargetOptions = message.rolls[0]?.options?.rollTarget
const attackerWeapon = rollTargetOptions?.weapon const attackerWeapon = rollTargetOptions?.weapon
const isRangedAttack = (rollTargetOptions?.attackMode === "ranged") const isRangedAttack = (rollTargetOptions?.attackMode === "ranged")
|| (attacker?.type === "monster" && attacker.system.attackMode === "ranged") || (attacker?.type === "monster" && attacker.system.attackMode === "ranged")
|| (attackerWeapon?.system?.weaponType === "ranged") || (attackerWeapon?.system?.weaponType === "ranged")
const defenseMsg = { const defenseMsg = {
type: "requestDefense", type: "requestDefense",
attackerName: attackerName, attackerName,
attackerId: attackerId, attackerId,
defenderName: defenderName, defenderName,
weaponName: weaponName, weaponName,
attackRoll: attackRoll, attackRoll,
attackWeaponId: attackWeaponId, attackWeaponId,
attackRollType: attackRollType, attackRollType,
attackRollKey: attackRollKey, attackRollKey,
attackD30result: attackD30result, attackD30result,
attackD30message: attackD30message, attackD30message,
attackRerollContext: attackRerollContext, attackRerollContext,
combatantId: combatantId, combatantId,
tokenId: tokenId, tokenId,
isRanged: isRangedAttack isRanged: isRangedAttack
} }
// Envoyer le message socket à l'utilisateur contrôlant le combatant // Envoyer le message socket à l'utilisateur contrôlant le combatant
// Only consider active (online) users; fall back to any active GM for unowned/GM monsters. // Only consider active (online) users; fall back to any active GM for unowned/GM monsters.
let owners = game.users.filter(u => let owners = game.users.filter(u => u.active && combatant.actor.testUserPermission(u, "OWNER"))
u.active && combatant.actor.testUserPermission(u, "OWNER") if (owners.length === 0) {
) owners = game.users.filter(u => u.active && u.isGM)
if (owners.length === 0) { }
owners = game.users.filter(u => u.active && u.isGM)
}
// Récupérer l'acteur attaquant pour vérifier qui l'a lancé // Récupérer l'acteur attaquant pour vérifier qui l'a lancé
const attackerOwners = attacker ? game.users.filter(u => attacker.testUserPermission(u, "OWNER")).map(u => u.id) : [] const attackerOwners = attacker ? game.users.filter(u => attacker.testUserPermission(u, "OWNER")).map(u => u.id) : []
// Monsters always need their owner (usually the GM) to roll a save/defense, // Monsters always need their owner (usually the GM) to roll a save/defense,
// even if that owner also controls the attacker. Only skip for same-player PC-vs-PC. // even if that owner also controls the attacker. Only skip for same-player PC-vs-PC.
const defenderIsMonster = combatant.actor?.type === "monster" const defenderIsMonster = combatant.actor?.type === "monster"
let messageSent = false let messageSent = false
owners.forEach(owner => { owners.forEach(owner => {
// Don't let a player be both attacker and defender for their own PC, unless defending a monster. // Don't let a player be both attacker and defender for their own PC, unless defending a monster.
if (attackerOwners.includes(owner.id) && owner.id === game.user.id && !defenderIsMonster) { if (attackerOwners.includes(owner.id) && owner.id === game.user.id && !defenderIsMonster) {
// Ne rien faire - on ne veut pas que l'attaquant se défende contre lui-même // Ne rien faire - on ne veut pas que l'attaquant se défende contre lui-même
return
}
if (owner.id === game.user.id) {
// Si l'utilisateur actuel est le propriétaire du défenseur (mais pas l'attaquant), appeler directement
LethalFantasyUtils.showDefenseRequest({ ...defenseMsg, userId: owner.id })
messageSent = true
} else {
// Sinon, envoyer via socket
game.socket.emit(`system.${SYSTEM.id}`, { ...defenseMsg, userId: owner.id })
messageSent = true
}
})
// Notification pour l'attaquant
if (messageSent) {
ui.notifications.info(`Defense request sent to ${defenderName}'s controller`)
}
})
}
// Gestionnaire pour les boutons de jet de dégâts (armes et résultats de combat)
for (const btn of html.querySelectorAll(".damage-roll-btn, .roll-damage-btn")) {
btn.addEventListener("click", async event => {
event.preventDefault()
event.stopPropagation()
const weaponId = btn.dataset.weaponId
const attackKey = btn.dataset.attackKey
const attackerId = btn.dataset.attackerId
const defenderId = btn.dataset.defenderId
const defenderTokenId = btn.dataset.defenderTokenId || null
const extraShieldDr = Number(btn.dataset.extraShieldDr || 0)
const damageType = btn.dataset.damageType
const damageFormula = btn.dataset.damageFormula
const damageModifier = btn.dataset.damageModifier
const isMonster = btn.dataset.isMonster
// Récupérer l'acteur (soit depuis le message, soit depuis attackerId)
const actor = attackerId ? game.actors.get(attackerId) : game.actors.get(message.rolls[0]?.actorId)
if (!actor) {
ui.notifications.error("Actor not found")
return return
} }
if (owner.id === game.user.id) { // Pour les sorts, rouler les dés de dégâts avec option bypass DR
// Si l'utilisateur actuel est le propriétaire du défenseur (mais pas l'attaquant), appeler directement if (damageType === "spell" && damageFormula) {
LethalFantasyUtils.showDefenseRequest({ ...defenseMsg, userId: owner.id }) const bypassArmor = await foundry.applications.api.DialogV2.confirm({
messageSent = true window: { title: "Spell Damage" },
} else { classes: ["lethalfantasy"],
// Sinon, envoyer via socket content: "<p>Does this spell's damage bypass armor DR?</p>",
game.socket.emit(`system.${SYSTEM.id}`, { yes: { label: "Yes (ignore armor)", icon: "fa-solid fa-wand-magic-sparkles" },
...defenseMsg, no: { label: "No (apply armor DR)", icon: "fa-solid fa-shield" }
userId: owner.id
}) })
messageSent = true const rollOpts = {
type: "spell-damage",
rollType: "spell-damage",
rollName: damageFormula,
isDamage: true,
rollData: { isDamage: true },
bypassArmor: bypassArmor ?? false,
defenderId,
defenderTokenId,
actorId: actor.id,
actorName: actor.name,
actorImage: actor.img
}
const roll = new LethalFantasyRoll(damageFormula, {}, rollOpts)
await roll.evaluate()
roll.options.rollTotal = roll.total
if (game?.dice3d) await game.dice3d.showForRoll(roll, game.user, true)
await roll.toMessage()
return
} }
// Pour les boutons de résultat de combat (monster damage)
if (damageType === "monster" && attackKey) {
await actor.system.prepareMonsterRoll("monster-damage", attackKey, undefined, undefined, undefined, defenderId, defenderTokenId, extraShieldDr)
return
}
// Pour les monstres, utiliser prepareMonsterRoll
if (isMonster || actor.type === "monster") {
await actor.system.prepareMonsterRoll("monster-damage", weaponId, undefined, undefined, damageModifier)
return
}
// Pour les personnages, récupérer l'arme
const weapon = actor.items.get(weaponId)
if (!weapon) {
ui.notifications.error("Weapon not found")
return
}
// Lancer les dégâts avec la bonne méthode
const rollType = damageType === "small" ? "weapon-damage-small" : "weapon-damage-medium"
await actor.prepareRoll(rollType, weaponId, undefined, defenderId, defenderTokenId, extraShieldDr)
}) })
}
// Notification pour l'attaquant
if (messageSent) {
ui.notifications.info(`Defense request sent to ${defenderName}'s controller`)
}
})
// Gestionnaire pour les boutons de jet de dégâts (armes et résultats de combat)
$(html).find(".damage-roll-btn, .roll-damage-btn").off("click").on("click", async (event) => {
event.preventDefault()
event.stopPropagation()
const button = $(event.currentTarget)
const weaponId = button.data("weapon-id")
const attackKey = button.data("attack-key")
let attackerId = button.data("attacker-id")
const defenderId = button.data("defender-id")
const defenderTokenId = button.data("defender-token-id") || null
const extraShieldDr = Number(button.data("extra-shield-dr") || 0)
const damageType = button.data("damage-type")
const damageFormula = button.data("damage-formula")
const damageModifier = button.data("damage-modifier")
const isMonster = button.data("is-monster")
// Récupérer l'acteur (soit depuis le message, soit depuis attackerId)
let actor = attackerId ? game.actors.get(attackerId) : game.actors.get(message.rolls[0]?.actorId)
if (!actor) {
ui.notifications.error("Actor not found")
return
}
// Pour les sorts, rouler les dés de dégâts avec option bypass DR
if (damageType === "spell" && damageFormula) {
const bypassArmor = await foundry.applications.api.DialogV2.confirm({
window: { title: "Spell Damage" },
classes: ["lethalfantasy"],
content: "<p>Does this spell's damage bypass armor DR?</p>",
yes: { label: "Yes (ignore armor)", icon: "fa-solid fa-wand-magic-sparkles" },
no: { label: "No (apply armor DR)", icon: "fa-solid fa-shield" }
})
const rollOpts = {
type: "spell-damage",
rollType: "spell-damage",
rollName: damageFormula,
isDamage: true,
rollData: { isDamage: true },
bypassArmor: bypassArmor ?? false,
defenderId,
defenderTokenId,
actorId: actor.id,
actorName: actor.name,
actorImage: actor.img
}
const roll = new LethalFantasyRoll(damageFormula, {}, rollOpts)
await roll.evaluate()
roll.options.rollTotal = roll.total
if (game?.dice3d) await game.dice3d.showForRoll(roll, game.user, true)
await roll.toMessage()
return
}
// Pour les boutons de résultat de combat (monster damage)
if (damageType === "monster" && attackKey) {
await actor.system.prepareMonsterRoll("monster-damage", attackKey, undefined, undefined, undefined, defenderId, defenderTokenId, extraShieldDr)
return
}
// Pour les monstres, utiliser prepareMonsterRoll
if (isMonster || actor.type === "monster") {
await actor.system.prepareMonsterRoll("monster-damage", weaponId, undefined, undefined, damageModifier)
return
}
// Pour les personnages, récupérer l'arme
const weapon = actor.items.get(weaponId)
if (!weapon) {
ui.notifications.error("Weapon not found")
return
}
// Lancer les dégâts avec la bonne méthode
const rollType = damageType === "small" ? "weapon-damage-small" : "weapon-damage-medium"
await actor.prepareRoll(rollType, weaponId, undefined, defenderId, defenderTokenId, extraShieldDr)
})
// Masquer les boutons de dommages dans les messages de résultat de combat si l'utilisateur n'est pas l'attaquant // Masquer les boutons de dommages dans les messages de résultat de combat si l'utilisateur n'est pas l'attaquant
$(html).find(".roll-damage-btn").each(function() { for (const btn of html.querySelectorAll(".roll-damage-btn")) {
const button = $(this) const attackerId = btn.dataset.attackerId
const attackerId = button.data("attacker-id")
if (attackerId) { if (attackerId) {
const attacker = game.actors.get(attackerId) const attacker = game.actors.get(attackerId)
// Masquer le bouton si l'utilisateur n'est pas GM et ne possède pas l'attaquant // Masquer le bouton si l'utilisateur n'est pas GM et ne possède pas l'attaquant
if (!game.user.isGM && !attacker?.testUserPermission(game.user, "OWNER")) { if (!game.user.isGM && !attacker?.testUserPermission(game.user, "OWNER")) {
button.hide() btn.style.display = "none"
} }
} }
}) }
}) })
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
LethalFantasyUtils.pushCombatOptions(html, options);
});
// Hook pour ajouter les données d'attaque au message de défense // Hook pour ajouter les données d'attaque au message de défense
Hooks.on("preCreateChatMessage", (message) => { Hooks.on("preCreateChatMessage", (message) => {
const rollType = message.rolls[0]?.options?.rollType const rollType = message.rolls[0]?.options?.rollType
+39
View File
@@ -18,6 +18,7 @@ export class LethalFantasyCombatTracker extends foundry.applications.sidebar.tab
actions: { actions: {
initiativePlus: LethalFantasyCombatTracker.#initiativePlus, initiativePlus: LethalFantasyCombatTracker.#initiativePlus,
initiativeMinus: LethalFantasyCombatTracker.#initiativeMinus, initiativeMinus: LethalFantasyCombatTracker.#initiativeMinus,
rollMonsterProgression: LethalFantasyCombatTracker.#rollMonsterProgression,
}, },
}); });
@@ -49,6 +50,15 @@ export class LethalFantasyCombatTracker extends foundry.applications.sidebar.tab
c.update({ 'initiative': newInit }); c.update({ 'initiative': newInit });
} }
/**
* Roll progression dice for all monster combatants that are eligible this round.
* @param {Event} ev Click event.
*/
static async #rollMonsterProgression(ev) {
ev.preventDefault();
await game.combat.rollMonsterProgression();
}
activateListeners(html) { activateListeners(html) {
super.activateListeners(html); super.activateListeners(html);
// Display Combat settings // Display Combat settings
@@ -130,6 +140,34 @@ export class LethalFantasyCombat extends Combat {
return this; return this;
} }
/** Roll progression dice for all eligible monster combatants this round. Called manually by the GM. */
async rollMonsterProgression() {
const currentRound = this.round;
const monsters = this.combatants.filter(c => c.actor?.type === "monster" && !c.isDefeated);
if (monsters.length === 0) {
ui.notifications.warn("No monsters in combat.");
return;
}
let rolled = 0;
for (let c of monsters) {
if (c.initiative !== null && currentRound >= c.initiative) {
await c.actor.system.rollProgressionDice(this.id, c.id);
rolled++;
}
}
if (rolled === 0) {
const earliest = monsters.reduce((min, c) => (c.initiative !== null && c.initiative < min) ? c.initiative : min, Infinity);
if (earliest === Infinity) {
ui.notifications.warn("Monsters have no initiative set. Roll initiative first.");
} else {
ui.notifications.info(`No monsters act yet — earliest monster initiative is ${earliest} (current round: ${currentRound}).`);
}
}
}
resetProgression(cId) { resetProgression(cId) {
let c = this.combatants.get(cId); let c = this.combatants.get(cId);
c.update({ 'system.progressionCount': 0 }); c.update({ 'system.progressionCount': 0 });
@@ -203,6 +241,7 @@ export class LethalFantasyCombat extends Combat {
for (let c of this.combatants) { for (let c of this.combatants) {
if (nextRound >= c.initiative) { if (nextRound >= c.initiative) {
if (c.actor.type === "monster") continue; // Monsters roll manually via the "Roll Monsters" button
const playerOwner = game.users.find(u => u.active && !u.isGM && u.character?.id === c.actor.id); const playerOwner = game.users.find(u => u.active && !u.isGM && u.character?.id === c.actor.id);
if (game.user.isGM && playerOwner) { if (game.user.isGM && playerOwner) {
game.socket.emit(`system.${SYSTEM.id}`, { type: "rollProgressionDice", userId: playerOwner.id, progressionCount: c.system.progressionCount + 1, actorId: c.actor.id, combatId: this.id, combatantId: c.id }); game.socket.emit(`system.${SYSTEM.id}`, { type: "rollProgressionDice", userId: playerOwner.id, progressionCount: c.system.progressionCount + 1, actorId: c.actor.id, combatId: this.id, combatantId: c.id });
+1 -1
View File
@@ -147,6 +147,6 @@ export async function rollFreeDie(dieType, count = 1, explode = false) {
content, content,
sound: CONFIG.sounds.dice, sound: CONFIG.sounds.dice,
} }
ChatMessage.applyRollMode(msgData, rollMode) ChatMessage.applyMode(msgData, rollMode)
await ChatMessage.create(msgData) await ChatMessage.create(msgData)
} }
@@ -172,7 +172,7 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
}) })
if (!roll) return null if (!roll) return null
await roll.toMessage({}, { rollMode: roll.options.rollMode }) await roll.toMessage({}, { messageMode: roll.options.rollMode })
} }
static async #onRollInitiative(event, target) { static async #onRollInitiative(event, target) {
@@ -259,9 +259,11 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
async _onRoll(event, target) { async _onRoll(event, target) {
if (this.isEditMode) return if (this.isEditMode) return
const rollType = event.target.dataset.rollType const el = event.currentTarget
let rollKey = event.target.dataset.rollKey; const rollType = el.dataset.rollType
let rollDice = event.target.dataset?.rollDice; if (!rollType) return
let rollKey = el.dataset.rollKey
let rollDice = el.dataset.rollDice
this.actor.prepareRoll(rollType, rollKey, rollDice) this.actor.prepareRoll(rollType, rollKey, rollDice)
+4 -2
View File
@@ -111,11 +111,13 @@ export default class LethalFantasyMonsterSheet extends LethalFantasyActorSheet {
}) })
if (!roll) return null if (!roll) return null
await roll.toMessage({}, { rollMode: roll.options.rollMode }) await roll.toMessage({}, { messageMode: roll.options.rollMode })
} }
static async #onRollInitiative(event, target) { static async #onRollInitiative(event, target) {
await this.document.system.rollInitiative(event, target) const combat = game.combat
const combatant = combat?.combatants.find(c => c.actorId === this.document.id)
await this.document.system.rollInitiative(combat?.id, combatant?.id)
} }
getBestWeaponClassSkill(skills, rollType, multiplier = 1.0) { getBestWeaponClassSkill(skills, rollType, multiplier = 1.0) {
+1 -1
View File
@@ -279,7 +279,7 @@ export default class LethalFantasyActor extends Actor {
break break
default: default:
ui.notifications.error(game.i18n.localize("LETHALFANTASY.Notifications.rollTypeNotFound") + String(rollType)) ui.notifications.error(game.i18n.localize("LETHALFANTASY.Notifications.rollTypeNotFound") + String(rollType))
break return
} }
// In all cases // In all cases
+10 -10
View File
@@ -320,8 +320,8 @@ export default class LethalFantasyRoll extends Roll {
hasModifier = false hasModifier = false
} }
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)])) const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes);
console.log("Roll mode", rollModes)
const fieldRollMode = new foundry.data.fields.StringField({ const fieldRollMode = new foundry.data.fields.StringField({
choices: rollModes, choices: rollModes,
@@ -676,7 +676,7 @@ export default class LethalFantasyRoll extends Roll {
/* ***********************************************************/ /* ***********************************************************/
static async promptInitiative(options = {}) { static async promptInitiative(options = {}) {
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)])) const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
const fieldRollMode = new foundry.data.fields.StringField({ const fieldRollMode = new foundry.data.fields.StringField({
choices: rollModes, choices: rollModes,
blank: false, blank: false,
@@ -730,7 +730,7 @@ export default class LethalFantasyRoll extends Roll {
let initRoll = new Roll(formula, options.data) let initRoll = new Roll(formula, options.data)
await initRoll.evaluate() await initRoll.evaluate()
let msg = await initRoll.toMessage({ flavor: `Initiative for ${options.actorName}` }, { rollMode: rollContext.visibility }) let msg = await initRoll.toMessage({ flavor: `Initiative for ${options.actorName}` }, { messageMode: rollContext.visibility })
if (game?.dice3d && initRoll.dice?.length) { if (game?.dice3d && initRoll.dice?.length) {
await game.dice3d.waitFor3DAnimationByMessageID(msg.id) await game.dice3d.waitFor3DAnimationByMessageID(msg.id)
} }
@@ -744,7 +744,7 @@ export default class LethalFantasyRoll extends Roll {
/* ***********************************************************/ /* ***********************************************************/
static async promptCombatAction(options = {}) { static async promptCombatAction(options = {}) {
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)])) const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
const fieldRollMode = new foundry.data.fields.StringField({ const fieldRollMode = new foundry.data.fields.StringField({
choices: rollModes, choices: rollModes,
blank: false, blank: false,
@@ -1001,7 +1001,7 @@ export default class LethalFantasyRoll extends Roll {
let max = roll.dice[0].faces - 1 let max = roll.dice[0].faces - 1
max = Math.min(currentAction.progressionCount, max) max = Math.min(currentAction.progressionCount, max)
let msg = await roll.toMessage({ flavor: `Progression Roll for ${currentAction.name}, progression count : ${currentAction.progressionCount}/${max}` }, { rollMode: rollContext.visibility }) let msg = await roll.toMessage({ flavor: `Progression Roll for ${currentAction.name}, progression count : ${currentAction.progressionCount}/${max}` }, { messageMode: rollContext.visibility })
if (game?.dice3d) { if (game?.dice3d) {
await game.dice3d.waitFor3DAnimationByMessageID(msg.id) await game.dice3d.waitFor3DAnimationByMessageID(msg.id)
} }
@@ -1043,7 +1043,7 @@ export default class LethalFantasyRoll extends Roll {
/* ***********************************************************/ /* ***********************************************************/
static async promptRangedDefense(options = {}) { static async promptRangedDefense(options = {}) {
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes); const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes);
const fieldRollMode = new foundry.data.fields.StringField({ const fieldRollMode = new foundry.data.fields.StringField({
choices: rollModes, choices: rollModes,
blank: false, blank: false,
@@ -1332,11 +1332,11 @@ export default class LethalFantasyRoll extends Roll {
* *
* @param {Object} [messageData={}] Additional data to include in the message. * @param {Object} [messageData={}] Additional data to include in the message.
* @param {Object} options Options for message creation. * @param {Object} options Options for message creation.
* @param {string} options.rollMode The mode of the roll (e.g., public, private). * @param {string} options.messageMode The mode of the roll (e.g., public, private).
* @param {boolean} [options.create=true] Whether to create the message. * @param {boolean} [options.create=true] Whether to create the message.
* @returns {Promise} - A promise that resolves when the message is created. * @returns {Promise} - A promise that resolves when the message is created.
*/ */
async toMessage(messageData = {}, { rollMode, create = true } = {}) { async toMessage(messageData = {}, { messageMode, create = true } = {}) {
return await super.toMessage( return await super.toMessage(
{ {
isSave: this.isSave, isSave: this.isSave,
@@ -1354,7 +1354,7 @@ export default class LethalFantasyRoll extends Roll {
rollData: this.rollData, rollData: this.rollData,
...messageData, ...messageData,
}, },
{ rollMode, create }, { messageMode, create },
) )
} }
+7 -2
View File
@@ -297,7 +297,7 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
}) })
if (!roll) return null if (!roll) return null
await roll.toMessage({}, { rollMode: roll.options.rollMode }) await roll.toMessage({}, { messageMode: roll.options.rollMode })
} }
async rollInitiative(combatId = undefined, combatantId = undefined) { async rollInitiative(combatId = undefined, combatantId = undefined) {
@@ -318,7 +318,7 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
}) })
if (!roll) return null if (!roll) return null
await roll.toMessage({}, { rollMode: roll.options.rollMode }) await roll.toMessage({}, { messageMode: roll.options.rollMode })
} }
async rollProgressionDice(combatId, combatantId, rollProgressionCount) { async rollProgressionDice(combatId, combatantId, rollProgressionCount) {
@@ -356,6 +356,11 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
} }
} }
if (weaponsChoices.length === 0) {
ui.notifications.warn(`${this.parent.name} has no weapons or spells available for combat. Add a weapon to the character sheet first.`)
return
}
let roll = await LethalFantasyRoll.promptCombatAction({ let roll = await LethalFantasyRoll.promptCombatAction({
actorId: this.parent.id, actorId: this.parent.id,
actorName: this.parent.name, actorName: this.parent.name,
+3 -4
View File
@@ -180,7 +180,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
}) })
if (!roll) return null if (!roll) return null
await roll.toMessage({}, { rollMode: roll.options.rollMode }) await roll.toMessage({}, { messageMode: roll.options.rollMode })
} }
async prepareMonsterRoll(rollType, rollKey, rollDice = undefined, tokenId = undefined, damageModifier = undefined, defenderId = undefined, defenderTokenId = undefined, extraShieldDr = 0) { async prepareMonsterRoll(rollType, rollKey, rollDice = undefined, tokenId = undefined, damageModifier = undefined, defenderId = undefined, defenderTokenId = undefined, extraShieldDr = 0) {
@@ -284,7 +284,6 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
// In all cases // In all cases
if (rollTarget) { if (rollTarget) {
rollTarget.tokenId = tokenId rollTarget.tokenId = tokenId
console.log(rollTarget)
await this.roll(rollType, rollTarget, defenderId, defenderTokenId, extraShieldDr) await this.roll(rollType, rollTarget, defenderId, defenderTokenId, extraShieldDr)
} }
} }
@@ -305,7 +304,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
}) })
if (!roll) return null if (!roll) return null
await roll.toMessage({}, { rollMode: roll.options.rollMode }) await roll.toMessage({}, { messageMode: roll.options.rollMode })
} }
async rollProgressionDice(combatId, combatantId) { async rollProgressionDice(combatId, combatantId) {
@@ -317,7 +316,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
return return
} }
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes) const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes)
const fieldRollMode = new foundry.data.fields.StringField({ const fieldRollMode = new foundry.data.fields.StringField({
choices: rollModes, choices: rollModes,
blank: false, blank: false,
+17 -10
View File
@@ -401,7 +401,7 @@ export default class LethalFantasyUtils {
defenderTokenId, defenderTokenId,
isRanged: true isRanged: true
} }
await roll.toMessage({}, { rollMode: roll.options.rollMode }) await roll.toMessage({}, { messageMode: roll.options.rollMode })
} }
return return
} }
@@ -1092,25 +1092,32 @@ export default class LethalFantasyUtils {
static async applyDamage(message, event) { static async applyDamage(message, event) {
// Récupérer les données du message // Récupérer les données du message
let combatantId = event.currentTarget.dataset.combatantId let combatantId = event.currentTarget.dataset.combatantId
if (!combatantId || !game.combat) { if (!combatantId) {
ui.notifications.error("No combatant selected") ui.notifications.error("No combatant selected")
return return
} }
let combatant = game.combat.combatants.get(combatantId) // Try to find the target: first as a combat combatant, then as a scene token
if (!combatant) { let targetActor = null
ui.notifications.error("Combatant not found") if (game.combat) {
return const combatant = game.combat.combatants.get(combatantId)
if (combatant) {
targetActor = combatant.token?.actor || game.actors.get(combatant.actorId)
}
}
if (!targetActor) {
// Fall back to scene token lookup (non-combat tokens use tokenId as their combatantId)
const token = canvas.tokens?.placeables?.find(t => t.id === combatantId)
targetActor = token?.actor
} }
let targetActor = combatant.token?.actor || game.actors.get(combatant.actorId)
if (!targetActor) { if (!targetActor) {
ui.notifications.error("Target actor not found") ui.notifications.error("Target actor not found")
return return
} }
// Récupérer les données de dégâts du message // Récupérer les données de dégâts du message
let damageTotal = message.rolls[0]?.total || 0 // Use options.rollTotal (includes weapon modifier bonus) rather than roll.total (dice formula only)
let damageTotal = message.rolls[0]?.options?.rollTotal ?? message.rolls[0]?.total ?? 0
let weaponName = message.rolls[0]?.options?.rollName || "Unknown Weapon" let weaponName = message.rolls[0]?.options?.rollName || "Unknown Weapon"
// Calculer les DR // Calculer les DR
@@ -1188,7 +1195,7 @@ export default class LethalFantasyUtils {
ChatMessage.create({ ChatMessage.create({
user: game.user.id, user: game.user.id,
speaker: { alias: targetActor.name }, speaker: { alias: targetActor.name },
rollMode: "gmroll", mode: "gmroll",
content: messageContent content: messageContent
}) })
} }
+1 -1
View File
@@ -1 +1 @@
MANIFEST-000587 MANIFEST-000595
+8 -8
View File
@@ -1,8 +1,8 @@
2026/05/02-08:40:55.892385 7fd7557ee6c0 Recovering log #585 2026/05/18-07:32:52.671725 7f5a94bff6c0 Recovering log #593
2026/05/02-08:40:55.903385 7fd7557ee6c0 Delete type=3 #583 2026/05/18-07:32:52.684619 7f5a94bff6c0 Delete type=3 #591
2026/05/02-08:40:55.903442 7fd7557ee6c0 Delete type=0 #585 2026/05/18-07:32:52.684760 7f5a94bff6c0 Delete type=0 #593
2026/05/02-08:41:12.057856 7fd7477fe6c0 Level-0 table #590: started 2026/05/18-07:58:12.225439 7f5a467fc6c0 Level-0 table #598: started
2026/05/02-08:41:12.057882 7fd7477fe6c0 Level-0 table #590: 0 bytes OK 2026/05/18-07:58:12.225593 7f5a467fc6c0 Level-0 table #598: 0 bytes OK
2026/05/02-08:41:12.121845 7fd7477fe6c0 Delete type=0 #588 2026/05/18-07:58:12.232817 7f5a467fc6c0 Delete type=0 #596
2026/05/02-08:41:12.122077 7fd7477fe6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end) 2026/05/18-07:58:12.252837 7f5a467fc6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
2026/05/02-08:41:12.122121 7fd7477fe6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end) 2026/05/18-07:58:12.252955 7f5a467fc6c0 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/05/01-23:33:08.433602 7f8fb27bf6c0 Recovering log #581 2026/05/17-11:57:50.231387 7f16423fc6c0 Recovering log #589
2026/05/01-23:33:08.476792 7f8fb27bf6c0 Delete type=3 #579 2026/05/17-11:57:50.249229 7f16423fc6c0 Delete type=3 #587
2026/05/01-23:33:08.476868 7f8fb27bf6c0 Delete type=0 #581 2026/05/17-11:57:50.249281 7f16423fc6c0 Delete type=0 #589
2026/05/01-23:33:55.878970 7f8d1bfff6c0 Level-0 table #586: started 2026/05/17-13:21:53.429711 7f1641bfb6c0 Level-0 table #594: started
2026/05/01-23:33:55.881418 7f8d1bfff6c0 Level-0 table #586: 0 bytes OK 2026/05/17-13:21:53.429759 7f1641bfb6c0 Level-0 table #594: 0 bytes OK
2026/05/01-23:33:55.924908 7f8d1bfff6c0 Delete type=0 #584 2026/05/17-13:21:53.437714 7f1641bfb6c0 Delete type=0 #592
2026/05/01-23:33:56.035970 7f8d1bfff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end) 2026/05/17-13:21:53.449134 7f1641bfb6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
2026/05/01-23:33:56.036022 7f8d1bfff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end) 2026/05/17-13:21:53.461721 7f1641bfb6c0 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-000584 MANIFEST-000592
+8 -8
View File
@@ -1,8 +1,8 @@
2026/05/02-08:40:55.909564 7fd747fff6c0 Recovering log #582 2026/05/18-07:32:52.700651 7f5a477fe6c0 Recovering log #590
2026/05/02-08:40:55.919159 7fd747fff6c0 Delete type=3 #580 2026/05/18-07:32:52.712680 7f5a477fe6c0 Delete type=3 #588
2026/05/02-08:40:55.919214 7fd747fff6c0 Delete type=0 #582 2026/05/18-07:32:52.712814 7f5a477fe6c0 Delete type=0 #590
2026/05/02-08:41:11.999050 7fd7477fe6c0 Level-0 table #587: started 2026/05/18-07:58:12.232998 7f5a467fc6c0 Level-0 table #595: started
2026/05/02-08:41:11.999076 7fd7477fe6c0 Level-0 table #587: 0 bytes OK 2026/05/18-07:58:12.233130 7f5a467fc6c0 Level-0 table #595: 0 bytes OK
2026/05/02-08:41:12.057672 7fd7477fe6c0 Delete type=0 #585 2026/05/18-07:58:12.244133 7f5a467fc6c0 Delete type=0 #593
2026/05/02-08:41:12.122063 7fd7477fe6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end) 2026/05/18-07:58:12.252873 7f5a467fc6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
2026/05/02-08:41:12.122111 7fd7477fe6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end) 2026/05/18-07:58:12.252977 7f5a467fc6c0 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/05/01-23:33:08.486839 7f8fb17bd6c0 Recovering log #578 2026/05/17-11:57:50.260046 7f16433fe6c0 Recovering log #586
2026/05/01-23:33:08.536613 7f8fb17bd6c0 Delete type=3 #576 2026/05/17-11:57:50.276348 7f16433fe6c0 Delete type=3 #584
2026/05/01-23:33:08.536667 7f8fb17bd6c0 Delete type=0 #578 2026/05/17-11:57:50.276460 7f16433fe6c0 Delete type=0 #586
2026/05/01-23:33:55.999594 7f8d1bfff6c0 Level-0 table #583: started 2026/05/17-13:21:53.474443 7f1641bfb6c0 Level-0 table #591: started
2026/05/01-23:33:55.999624 7f8d1bfff6c0 Level-0 table #583: 0 bytes OK 2026/05/17-13:21:53.474485 7f1641bfb6c0 Level-0 table #591: 0 bytes OK
2026/05/01-23:33:56.035856 7f8d1bfff6c0 Delete type=0 #581 2026/05/17-13:21:53.481502 7f1641bfb6c0 Delete type=0 #589
2026/05/01-23:33:56.036000 7f8d1bfff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end) 2026/05/17-13:21:53.490389 7f1641bfb6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
2026/05/01-23:33:56.036042 7f8d1bfff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end) 2026/05/17-13:21:53.512946 7f1641bfb6c0 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-000589 MANIFEST-000597
+8 -8
View File
@@ -1,8 +1,8 @@
2026/05/02-08:40:55.873571 7fd747fff6c0 Recovering log #587 2026/05/18-07:32:52.650924 7f5a47fff6c0 Recovering log #595
2026/05/02-08:40:55.883892 7fd747fff6c0 Delete type=3 #585 2026/05/18-07:32:52.662191 7f5a47fff6c0 Delete type=3 #593
2026/05/02-08:40:55.883950 7fd747fff6c0 Delete type=0 #587 2026/05/18-07:32:52.662331 7f5a47fff6c0 Delete type=0 #595
2026/05/02-08:41:11.870087 7fd7477fe6c0 Level-0 table #592: started 2026/05/18-07:58:12.218060 7f5a467fc6c0 Level-0 table #600: started
2026/05/02-08:41:11.870140 7fd7477fe6c0 Level-0 table #592: 0 bytes OK 2026/05/18-07:58:12.218402 7f5a467fc6c0 Level-0 table #600: 0 bytes OK
2026/05/02-08:41:11.937524 7fd7477fe6c0 Delete type=0 #590 2026/05/18-07:58:12.225237 7f5a467fc6c0 Delete type=0 #598
2026/05/02-08:41:12.122025 7fd7477fe6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) 2026/05/18-07:58:12.244392 7f5a467fc6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2026/05/02-08:41:12.122087 7fd7477fe6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) 2026/05/18-07:58:12.252899 7f5a467fc6c0 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/05/01-23:33:08.376215 7f8fb0fbc6c0 Recovering log #583 2026/05/17-11:57:50.206131 7f1643bff6c0 Recovering log #591
2026/05/01-23:33:08.417318 7f8fb0fbc6c0 Delete type=3 #581 2026/05/17-11:57:50.222037 7f1643bff6c0 Delete type=3 #589
2026/05/01-23:33:08.417396 7f8fb0fbc6c0 Delete type=0 #583 2026/05/17-11:57:50.222089 7f1643bff6c0 Delete type=0 #591
2026/05/01-23:33:55.962045 7f8d1bfff6c0 Level-0 table #588: started 2026/05/17-13:21:53.292176 7f1641bfb6c0 Level-0 table #596: started
2026/05/01-23:33:55.962068 7f8d1bfff6c0 Level-0 table #588: 0 bytes OK 2026/05/17-13:21:53.292219 7f1641bfb6c0 Level-0 table #596: 0 bytes OK
2026/05/01-23:33:55.999439 7f8d1bfff6c0 Delete type=0 #586 2026/05/17-13:21:53.299322 7f1641bfb6c0 Delete type=0 #594
2026/05/01-23:33:56.035992 7f8d1bfff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) 2026/05/17-13:21:53.306548 7f1641bfb6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2026/05/01-23:33:56.036035 7f8d1bfff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) 2026/05/17-13:21:53.318889 7f1641bfb6c0 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-000284 MANIFEST-000292
+8 -8
View File
@@ -1,8 +1,8 @@
2026/05/02-08:40:55.939668 7fd754fed6c0 Recovering log #282 2026/05/18-07:32:52.738234 7f5a477fe6c0 Recovering log #290
2026/05/02-08:40:55.949715 7fd754fed6c0 Delete type=3 #280 2026/05/18-07:32:52.749839 7f5a477fe6c0 Delete type=3 #288
2026/05/02-08:40:55.949784 7fd754fed6c0 Delete type=0 #282 2026/05/18-07:32:52.749970 7f5a477fe6c0 Delete type=0 #290
2026/05/02-08:41:12.184448 7fd7477fe6c0 Level-0 table #287: started 2026/05/18-07:58:12.253340 7f5a467fc6c0 Level-0 table #295: started
2026/05/02-08:41:12.184496 7fd7477fe6c0 Level-0 table #287: 0 bytes OK 2026/05/18-07:58:12.253449 7f5a467fc6c0 Level-0 table #295: 0 bytes OK
2026/05/02-08:41:12.252892 7fd7477fe6c0 Delete type=0 #285 2026/05/18-07:58:12.261029 7f5a467fc6c0 Delete type=0 #293
2026/05/02-08:41:12.365481 7fd7477fe6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end) 2026/05/18-07:58:12.286385 7f5a467fc6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
2026/05/02-08:41:12.365509 7fd7477fe6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end) 2026/05/18-07:58:12.286487 7f5a467fc6c0 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/05/01-23:33:08.590994 7f8fb1fbe6c0 Recovering log #278 2026/05/17-11:57:50.303535 7f16433fe6c0 Recovering log #286
2026/05/01-23:33:08.636941 7f8fb1fbe6c0 Delete type=3 #276 2026/05/17-11:57:50.318955 7f16433fe6c0 Delete type=3 #284
2026/05/01-23:33:08.636992 7f8fb1fbe6c0 Delete type=0 #278 2026/05/17-11:57:50.319061 7f16433fe6c0 Delete type=0 #286
2026/05/01-23:33:56.204694 7f8d1bfff6c0 Level-0 table #283: started 2026/05/17-13:21:53.481662 7f1641bfb6c0 Level-0 table #291: started
2026/05/01-23:33:56.204728 7f8d1bfff6c0 Level-0 table #283: 0 bytes OK 2026/05/17-13:21:53.481693 7f1641bfb6c0 Level-0 table #291: 0 bytes OK
2026/05/01-23:33:56.238272 7f8d1bfff6c0 Delete type=0 #281 2026/05/17-13:21:53.490187 7f1641bfb6c0 Delete type=0 #289
2026/05/01-23:33:56.371888 7f8d1bfff6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end) 2026/05/17-13:21:53.502325 7f1641bfb6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
2026/05/01-23:33:56.426259 7f8d1bfff6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end) 2026/05/17-13:21:53.512979 7f1641bfb6c0 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-000583 MANIFEST-000591
+8 -8
View File
@@ -1,8 +1,8 @@
2026/05/02-08:40:55.925402 7fd755fef6c0 Recovering log #581 2026/05/18-07:32:52.720162 7f5a94bff6c0 Recovering log #589
2026/05/02-08:40:55.935869 7fd755fef6c0 Delete type=3 #579 2026/05/18-07:32:52.731519 7f5a94bff6c0 Delete type=3 #587
2026/05/02-08:40:55.935924 7fd755fef6c0 Delete type=0 #581 2026/05/18-07:32:52.731690 7f5a94bff6c0 Delete type=0 #589
2026/05/02-08:41:11.937698 7fd7477fe6c0 Level-0 table #586: started 2026/05/18-07:58:12.244424 7f5a467fc6c0 Level-0 table #594: started
2026/05/02-08:41:11.937727 7fd7477fe6c0 Level-0 table #586: 0 bytes OK 2026/05/18-07:58:12.244618 7f5a467fc6c0 Level-0 table #594: 0 bytes OK
2026/05/02-08:41:11.998871 7fd7477fe6c0 Delete type=0 #584 2026/05/18-07:58:12.252579 7f5a467fc6c0 Delete type=0 #592
2026/05/02-08:41:12.122041 7fd7477fe6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) 2026/05/18-07:58:12.252922 7f5a467fc6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2026/05/02-08:41:12.122099 7fd7477fe6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) 2026/05/18-07:58:12.252996 7f5a467fc6c0 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/05/01-23:33:08.543693 7f8fb0fbc6c0 Recovering log #577 2026/05/17-11:57:50.282340 7f16423fc6c0 Recovering log #585
2026/05/01-23:33:08.586596 7f8fb0fbc6c0 Delete type=3 #575 2026/05/17-11:57:50.297125 7f16423fc6c0 Delete type=3 #583
2026/05/01-23:33:08.586670 7f8fb0fbc6c0 Delete type=0 #577 2026/05/17-11:57:50.297189 7f16423fc6c0 Delete type=0 #585
2026/05/01-23:33:55.925044 7f8d1bfff6c0 Level-0 table #582: started 2026/05/17-13:21:53.299508 7f1641bfb6c0 Level-0 table #590: started
2026/05/01-23:33:55.925074 7f8d1bfff6c0 Level-0 table #582: 0 bytes OK 2026/05/17-13:21:53.299854 7f1641bfb6c0 Level-0 table #590: 0 bytes OK
2026/05/01-23:33:55.961939 7f8d1bfff6c0 Delete type=0 #580 2026/05/17-13:21:53.306309 7f1641bfb6c0 Delete type=0 #588
2026/05/01-23:33:56.035982 7f8d1bfff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) 2026/05/17-13:21:53.318877 7f1641bfb6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2026/05/01-23:33:56.036029 7f8d1bfff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) 2026/05/17-13:21:53.325564 7f1641bfb6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
+8
View File
@@ -13,6 +13,14 @@
<span>{{ localize "COMBAT.End" }}</span> <span>{{ localize "COMBAT.End" }}</span>
</button> </button>
{{#if combat.round}}
<button type="button" class="combat-control combat-control-lg" data-action="rollMonsterProgression"
data-tooltip="{{ localize 'LETHALFANTASY.Combat.RollMonsters' }}">
<i class="fa-solid fa-dragon" inert></i>
<span>{{ localize "LETHALFANTASY.Combat.RollMonsters" }}</span>
</button>
{{/if}}
<!-- <button type="button" class="inline-control combat-control icon fa-solid fa-arrow-right" data-action="nextTurn" <!-- <button type="button" class="inline-control combat-control icon fa-solid fa-arrow-right" data-action="nextTurn"
data-tooltip aria-label="{{ localize "COMBAT.TurnNext" }}"></button> --> data-tooltip aria-label="{{ localize "COMBAT.TurnNext" }}"></button> -->
<button type="button" class="inline-control combat-control icon fa-solid fa-forward-step" data-action="nextRound" <button type="button" class="inline-control combat-control icon fa-solid fa-forward-step" data-action="nextRound"