Ame/Ame max
This commit is contained in:
@@ -38,6 +38,7 @@ export class MournbladeCYD2Actor extends Actor {
|
||||
}
|
||||
|
||||
if (data.type == 'personnage') {
|
||||
console.log("Loading skills for personnage")
|
||||
const skills = await MournbladeCYD2Utility.loadCompendium("fvtt-mournblade-cyd2.skills")
|
||||
data.items = skills.map(i => i.toObject())
|
||||
}
|
||||
@@ -67,10 +68,6 @@ export class MournbladeCYD2Actor 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") {
|
||||
@@ -235,20 +232,6 @@ export class MournbladeCYD2Actor 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,
|
||||
@@ -550,11 +533,16 @@ export class MournbladeCYD2Actor extends Actor {
|
||||
|
||||
// Gestion des états Traumatisé, Très Traumatisé et Brisé
|
||||
if (ame.etat == traumatiseValue) {
|
||||
ChatMessage.create({ content: `<strong>${this.name} est Traumatisé !</strong>` })
|
||||
ChatMessage.create({ content: `<strong>${this.name} est Traumatisé et subit 1 adversité bleue et 1 adversité noire !</strong>` })
|
||||
this.incDecAdversite("bleue", 1)
|
||||
this.incDecAdversite("noire", 1)
|
||||
} else if (ame.etat == tresTraumatiseValue) {
|
||||
ChatMessage.create({ content: `<strong>${this.name} est Très Traumatisé !</strong>` })
|
||||
ChatMessage.create({ content: `<strong>${this.name} est Très Traumatisé et subit 1 adversité bleue et 1 adversité noire !</strong>` })
|
||||
this.incDecAdversite("bleue", 1)
|
||||
this.incDecAdversite("noire", 1)
|
||||
} else if (ame.etat >= briseValue) {
|
||||
ChatMessage.create({ content: `<strong>${this.name} est Brisé !</strong>` })
|
||||
ChatMessage.create({ content: `<strong>${this.name} est Brisé et subit 1 adversité noire !</strong>` })
|
||||
this.incDecAdversite("noire", 1)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user