Update for future module
This commit is contained in:
@ -18,6 +18,10 @@ export class BoLActor extends Actor {
|
||||
let actor = super.create(data, options);
|
||||
return actor;
|
||||
}
|
||||
|
||||
if (data.type == 'encounter') {
|
||||
data.system = { resources: { hero : { max : 0, value: 0 } } }
|
||||
}
|
||||
|
||||
if (data.type == 'horde') {
|
||||
let weapon = {
|
||||
@ -47,6 +51,9 @@ export class BoLActor extends Actor {
|
||||
this.chartype = 'tough'
|
||||
this.villainy = true
|
||||
}
|
||||
if (this.type === 'creature') {
|
||||
this.villainy = true
|
||||
}
|
||||
if (this.type == "horde") {
|
||||
let weapon = this.items.find(i => i.type === "item" && i.system.subtype === "weapon")
|
||||
// Check if the horde attack is inline with the hordesize
|
||||
@ -105,7 +112,7 @@ export class BoLActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getVillainy() {
|
||||
return (this.type === 'encounter' && this.chartype == "adversary")
|
||||
return ( (this.type === 'encounter' && this.chartype == "adversary") || this.chartype == "creature")
|
||||
}
|
||||
isUndead() {
|
||||
return (this.type == "encounter" && this.system.isundead)
|
||||
@ -695,7 +702,7 @@ export class BoLActor extends Actor {
|
||||
resources['faith'] = this.system.resources.faith
|
||||
resources['power'] = this.system.resources.power
|
||||
}
|
||||
if (this.system.chartype == 'adversary') {
|
||||
if (this.system.chartype == 'adversary' || this.system.chartype == 'creature') {
|
||||
resources['hero'] = foundry.utils.duplicate(this.system.resources.hero)
|
||||
resources['hero'].label = "BOL.resources.villainy"
|
||||
}
|
||||
|
Reference in New Issue
Block a user