forked from public/bol
Init again !!!!
This commit is contained in:
parent
085265df5d
commit
399c22d623
@ -648,14 +648,16 @@ export class BoLActor extends Actor {
|
||||
}
|
||||
|
||||
/*-------------------------------------------- */
|
||||
registerInit(rollData) {
|
||||
async registerInit(rollData) {
|
||||
rollData.actor = undefined // Cleanup if present
|
||||
this.setFlag("world", "last-initiative", rollData)
|
||||
await this.setFlag("world", "last-initiative", rollData)
|
||||
}
|
||||
|
||||
/*-------------------------------------------- */
|
||||
getInitiativeRank() {
|
||||
let rollData = this.getFlag("world", "last-initiative")
|
||||
getInitiativeRank(rollData = undefined) {
|
||||
if (!rollData) {
|
||||
rollData = this.getFlag("world", "last-initiative")
|
||||
}
|
||||
let fvttInit = 4 // Pietaille par defaut
|
||||
if (this.type == 'character' ) {
|
||||
fvttInit = 5
|
||||
|
@ -571,7 +571,7 @@ export class BoLDefaultRoll {
|
||||
|
||||
if (this.rollData.registerInit) {
|
||||
actor.registerInit(this.rollData)
|
||||
this.rollData.initiativeRank = actor.getInitiativeRank()
|
||||
this.rollData.initiativeRank = actor.getInitiativeRank(this.rollData)
|
||||
}
|
||||
if (this.rollData.isSuccess && this.rollData.mode == "spell") { // PP cost management
|
||||
this.rollData.remainingPP = actor.spendPowerPoint(this.rollData.ppCost + this.rollData.ppCostArmor)
|
||||
|
Loading…
Reference in New Issue
Block a user