Review initiative

This commit is contained in:
2023-05-01 18:50:32 +02:00
parent 59ee6684ab
commit 268ac0a25a
8 changed files with 36 additions and 17 deletions

View File

@ -48,7 +48,13 @@ export class BoLActor extends Actor {
}
return false
}
/* -------------------------------------------- */
getInitiativeMalus() {
if ( this.type === 'encounter' && (this.chartype == "adversary" || this.chartype == "tough")) {
return this.system.aptitudes.init.value
}
return 0
}
/* -------------------------------------------- */
getBougette() {
if (this.type == "character") {
@ -871,17 +877,17 @@ export class BoLActor extends Actor {
/*-------------------------------------------- */
getInitiativeRank(rollData = undefined, isCombat = false, combatData) {
if (!rollData) {
rollData = this.getFlag("world", "last-initiative")
}
let fvttInit = 4 // Pietaille par defaut
if (this.type == 'character') {
fvttInit = 5
fvttInit = -1
if (!rollData) {
if (isCombat) {
if (game.user.isGM ) {
game.socket.emit("system.bol", { name: "msg_request_init_roll", data: { actorId: this.id, combatData : combatData } })
if (this.hasPlayerOwner) {
game.socket.emit("system.bol", { name: "msg_request_init_roll", data: { actorId: this.id, combatData } })
} else {
BoLRoll.aptitudeCheck(this, "init", undefined, combatData);
}
}
}
} else {