forked from public/bol
Fix options de combat
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user