COrrection sur bonus de force + bouton pour appliquer les dommages
All checks were successful
Release Creation / build (release) Successful in 46s

This commit is contained in:
2025-11-21 23:36:02 +01:00
parent 2c25820152
commit 7dc2492c96
21 changed files with 160 additions and 66 deletions

View File

@@ -197,11 +197,30 @@ Hooks.on("renderChatMessageHTML", (message, html, data) => {
}
if (game.user.isGM) {
$(html).find(".li-apply-wounds").each((i, btn) => {
btn.style.display = "inline"
btn.style.display = "block"
})
$(html).find(".li-apply-wounds-select").click((event) => {
$(html).find(".apply-wounds-btn").click((event) => {
CthulhuEternalUtils.applyWounds(message, event)
})
$(html).find(".apply-wounds-btn").hover(
function (event) {
// Mouse enter - select the token
let combatantId = $(this).data("combatant-id")
if (combatantId && game.combat) {
let combatant = game.combat.combatants.get(combatantId)
if (combatant?.token) {
let token = canvas.tokens.get(combatant.token.id)
if (token) {
token.control({ releaseOthers: true })
}
}
}
},
function (event) {
// Mouse leave - release selection
canvas.tokens.releaseAll()
}
)
}
})