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
|
rollData.actor = undefined // Cleanup if present
|
||||||
this.setFlag("world", "last-initiative", rollData)
|
await this.setFlag("world", "last-initiative", rollData)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
getInitiativeRank() {
|
getInitiativeRank(rollData = undefined) {
|
||||||
let rollData = this.getFlag("world", "last-initiative")
|
if (!rollData) {
|
||||||
|
rollData = this.getFlag("world", "last-initiative")
|
||||||
|
}
|
||||||
let fvttInit = 4 // Pietaille par defaut
|
let fvttInit = 4 // Pietaille par defaut
|
||||||
if (this.type == 'character' ) {
|
if (this.type == 'character' ) {
|
||||||
fvttInit = 5
|
fvttInit = 5
|
||||||
|
@ -571,7 +571,7 @@ export class BoLDefaultRoll {
|
|||||||
|
|
||||||
if (this.rollData.registerInit) {
|
if (this.rollData.registerInit) {
|
||||||
actor.registerInit(this.rollData)
|
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
|
if (this.rollData.isSuccess && this.rollData.mode == "spell") { // PP cost management
|
||||||
this.rollData.remainingPP = actor.spendPowerPoint(this.rollData.ppCost + this.rollData.ppCostArmor)
|
this.rollData.remainingPP = actor.spendPowerPoint(this.rollData.ppCost + this.rollData.ppCostArmor)
|
||||||
|
Loading…
Reference in New Issue
Block a user