Correction sur se désengager

This commit is contained in:
2025-03-28 18:09:36 +01:00
parent 39f8cfdbcc
commit 436b282ff5
69 changed files with 245 additions and 305 deletions

View File

@@ -206,7 +206,7 @@ export class HawkmoonActor extends Actor {
/* -------------------------------------------- */
getCombatValues() {
if (this.type == "cellule"){
if (this.type == "cellule") {
return {
initBase: 0,
initTotal: 0,
@@ -543,6 +543,23 @@ export class HawkmoonActor extends Actor {
return init || -1
}
/* -------------------------------------------- */
getBestAttackValue() {
let attackList = this.items.filter(item => (item.type == "arme" || item.type == "talent") && item.system.equipped)
let maxOff = 0
let bestArme
for (let arme of attackList) {
if (arme.type == "arme") {
arme = this.prepareArme(arme)
}
if (arme.system.totalOffensif > maxOff) {
maxOff = arme.system.totalOffensif
bestArme = foundry.utils.duplicate(arme)
}
}
return bestArme
}
/* -------------------------------------------- */
getBestDefenseValue() {
let defenseList = this.items.filter(item => (item.type == "arme") && item.system.equipped)