Fix options de combat

This commit is contained in:
2023-04-04 13:41:22 +02:00
parent e7f3851daa
commit 5b91041a3f
9 changed files with 55 additions and 59 deletions

View File

@ -22,6 +22,17 @@ export class BoLActor extends Actor {
super.prepareData()
}
/* -------------------------------------------- */
isHeroAdversary() {
if (this.type === 'character') {
return true
}
if (this.type === 'encounter' && this.chartype == "adversary") {
return true
}
return false
}
/* -------------------------------------------- */
getCharType() {
if (this.type === 'character') {
@ -32,10 +43,10 @@ export class BoLActor extends Actor {
/* -------------------------------------------- */
getVillainy() {
if (this.type === 'character') {
return false
if (this.type === 'encounter' && this.chartype == "adversary") {
return true
}
return true
return false
}
/* -------------------------------------------- */
@ -734,7 +745,7 @@ export class BoLActor extends Actor {
ChatMessage.create({
alias: this.name,
whisper: BoLUtility.getWhisperRecipientsAndGMs(this.name),
content: await renderTemplate('systems/bol/templates/chat/chat-vitality-zero.hbs', { name: this.name, img: this.img, hp: this.system.resources.hp.value })
content: await renderTemplate('systems/bol/templates/chat/chat-vitality-zero.hbs', { name: this.name, img: this.img, hp: this.system.resources.hp.value, isHeroAdversary: this.isHeroAdversary() })
})
} else {
if (prone) {