initiative bugfix

This commit is contained in:
2022-12-01 23:57:33 +01:00
parent 593db9ba5b
commit 085265df5d
3 changed files with 25 additions and 21 deletions

View File

@ -656,25 +656,28 @@ export class BoLActor extends Actor {
/*-------------------------------------------- */
getInitiativeRank() {
let rollData = this.getFlag("world", "last-initiative")
let fvttInit = 5
if (this.type == 'character') {
if (rollData.isLegendary) {
fvttInit = 10
} else if (rollData.isCritical) {
fvttInit = 9
} else if (rollData.isSuccess ) {
fvttInit = 8
} else if (rollData.isFumble) {
fvttInit = 3
let fvttInit = 4 // Pietaille par defaut
if (this.type == 'character' ) {
fvttInit = 5
if (!rollData) {
fvttInit = -1
} else {
if (rollData.isLegendary) {
fvttInit = 10
} else if (rollData.isCritical) {
fvttInit = 9
} else if (rollData.isSuccess ) {
fvttInit = 8
} else if (rollData.isFumble) {
fvttInit = 3
}
}
} else {
fvttInit = 4 // Pietaille par defautco
if ( this.getCharType() == 'adversary') {
fvttInit = 7
}
if ( this.getCharType() == 'tough') {
fvttInit = 6
}
}
if ( this.getCharType() == 'adversary') {
fvttInit = 7
}
if ( this.getCharType() == 'tough') {
fvttInit = 6
}
return fvttInit
}