Fix sur combat + mains gauche
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -612,7 +612,7 @@ export class TeDeumUtility {
|
||||
await this.getLocalisation(rollData)
|
||||
// Now the degats
|
||||
let degatsRoll = await new Roll(rollData.arme.system.degats).roll()
|
||||
await this.showDiceSoNice(rollData.degatsRoll, game.settings.get("core", "rollMode"))
|
||||
await this.showDiceSoNice(degatsRoll, game.settings.get("core", "rollMode"))
|
||||
rollData.degatsRoll = foundry.utils.duplicate(degatsRoll)
|
||||
rollData.degats = degatsRoll.total
|
||||
}
|
||||
@@ -631,13 +631,13 @@ export class TeDeumUtility {
|
||||
ca.nbActionsMainGauche -= 1
|
||||
ca.nbActions = Math.max(ca.nbActions - 1, 0)
|
||||
} else {
|
||||
ui.notifications.error(`${actor.name} n'a plus d'actions disponibles à la main gauche`)
|
||||
ui.notifications.error(`${actor.name} n'a plus d'actions disponibles à la main gauche pour ce round`)
|
||||
}
|
||||
}
|
||||
if (ca.nbActions > 0) {
|
||||
ca.nbActions -= 1
|
||||
} else {
|
||||
ui.notifications.error(`${actor.name} n'a plus d'actions disponibles`)
|
||||
ui.notifications.error(`${actor.name} n'a plus d'actions disponibles pour ce round`)
|
||||
}
|
||||
await combatant.setFlag("world", "available-actions", ca)
|
||||
await combatant.update({ name: `${combatant.token.name} (${ca.nbActions} / ${ca.nbActionsMainGauche})` })
|
||||
|
||||
Reference in New Issue
Block a user