ajout item sur cellule + augmentation bonus et difficultés

This commit is contained in:
2024-08-22 14:39:30 +02:00
parent 4eece5aaf4
commit 8a4487c833
71 changed files with 484 additions and 325 deletions

View File

@@ -67,6 +67,10 @@ export class HawkmoonActor extends Actor {
/* -------------------------------------------- */
prepareArme(arme) {
if (this.type == "cellule") {
return arme
}
arme = foundry.utils.duplicate(arme)
let combat = this.getCombatValues()
if (arme.system.typearme == "contact" || arme.system.typearme == "contactjet") {
@@ -202,6 +206,20 @@ export class HawkmoonActor extends Actor {
/* -------------------------------------------- */
getCombatValues() {
if (this.type == "cellule"){
return {
initBase: 0,
initTotal: 0,
bonusDegats: 0,
bonusDegatsTotal: 0,
vitesseBase: 0,
vitesseTotal: 0,
defenseBase: 0,
protection: 0,
defenseTotal: 0
}
}
let combat = {
initBase: this.system.attributs.adr.value,
initTotal: this.system.attributs.adr.value + this.system.combat.initbonus,