Fix sur combat + mains gauche

This commit is contained in:
2025-09-24 16:42:08 +02:00
parent e794611bf3
commit 78ef009465
48 changed files with 142 additions and 141 deletions

View File

@@ -82,8 +82,8 @@ export class TeDeumActor extends Actor {
let compScore = this.getCompetenceScore(comp.name)
let mainGaucheScore = this.getCompetenceScore("main gauche")
if (mainGaucheScore < compScore) {
ui.notifications.info(`${actor.name} : Utilisation de la compétence Main Gauche au lieu de ${comp.name}`)
let mainGaucheComp = this.itms.find(item => item.type == "competence" && item.name.toLowerCase() == "main gauche")
ui.notifications.info(`${this.name} : Utilisation de la compétence Main Gauche au lieu de ${comp.name}`)
let mainGaucheComp = this.items.find(item => item.type == "competence" && item.name.toLowerCase() == "main gauche")
if (!mainGaucheComp) {
// Create a fake competence object
mainGaucheComp = foundry.utils.duplicate(comp)