Diverses prise en compte technique
This commit is contained in:
@@ -71,6 +71,7 @@ export class HawkmoonActor extends Actor {
|
||||
}
|
||||
return arme
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getWeapons() {
|
||||
let armes = []
|
||||
@@ -78,9 +79,6 @@ export class HawkmoonActor extends Actor {
|
||||
if (arme.type == "arme") {
|
||||
armes.push(this.prepareArme(arme))
|
||||
}
|
||||
if (arme.type == "bouclier") {
|
||||
armes.push(this.prepareBouclier(arme))
|
||||
}
|
||||
}
|
||||
return armes
|
||||
}
|
||||
@@ -173,7 +171,10 @@ export class HawkmoonActor extends Actor {
|
||||
prepareDerivedData() {
|
||||
|
||||
if (this.type == 'personnage') {
|
||||
// TODO
|
||||
let vigueur = Math.floor( (this.system.attributs.pui.value + this.system.attributs.tre.value) / 2)
|
||||
if (vigueur != this.system.sante.vigueur) {
|
||||
this.update( { 'system.sante.vigueur': vigueur})
|
||||
}
|
||||
}
|
||||
|
||||
super.prepareDerivedData()
|
||||
@@ -350,9 +351,10 @@ export class HawkmoonActor extends Actor {
|
||||
rollData.actorImg = this.img
|
||||
rollData.actorId = this.id
|
||||
rollData.img = this.img
|
||||
rollData.canEclatDoubleD20 = true
|
||||
rollData.doubleD20 = false
|
||||
rollData.attributs = HawkmoonUtility.getAttributs()
|
||||
rollData.maitriseId = "none"
|
||||
rollData.nbEclat = this.system.eclat.value
|
||||
rollData.nbBA = this.system.bonneaventure.actuelle
|
||||
|
||||
if (attrKey) {
|
||||
rollData.attrKey = attrKey
|
||||
@@ -363,6 +365,7 @@ export class HawkmoonActor extends Actor {
|
||||
}
|
||||
if (compId) {
|
||||
rollData.competence = duplicate(this.items.get(compId) || {})
|
||||
rollData.maitrises = rollData.competence.system.predilections.filter(p => p.maitrise )
|
||||
rollData.actionImg = rollData.competence?.img
|
||||
}
|
||||
if (compName) {
|
||||
|
Reference in New Issue
Block a user