Fix init creature + minor changes
This commit is contained in:
@ -756,6 +756,14 @@ export class BoLActor extends Actor {
|
||||
this.unsetFlag("world", "last-initiative" )
|
||||
}
|
||||
|
||||
/*-------------------------------------------- */
|
||||
getSize() {
|
||||
if (this.system.details.size.length > 0 && game.bol.config.creatureSize[this.system.details.size]) {
|
||||
return game.bol.config.creatureSize[this.system.details.size].order
|
||||
}
|
||||
return game.bol.config.creatureSize["medium"].order // Medium size per default
|
||||
}
|
||||
|
||||
/*-------------------------------------------- */
|
||||
getInitiativeRank(rollData = undefined, isCombat = false) {
|
||||
if (!rollData) {
|
||||
@ -787,6 +795,17 @@ export class BoLActor extends Actor {
|
||||
if ( this.getCharType() == 'tough') {
|
||||
fvttInit = 6
|
||||
}
|
||||
if ( this.getCharType() == 'creature') {
|
||||
let mySize = this.getSize()
|
||||
let sizeSmall = game.bol.config.creatureSize["small"].order
|
||||
let sizeMedium = game.bol.config.creatureSize["medium"].order
|
||||
if ( mySize >= sizeSmall && mySize <= sizeMedium) {
|
||||
fvttInit = 6
|
||||
}
|
||||
if ( mySize > sizeMedium) {
|
||||
fvttInit = 7
|
||||
}
|
||||
}
|
||||
return fvttInit
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user