Compare commits
2 Commits
bol-v10.4.
...
bol-v10.4.
Author | SHA1 | Date | |
---|---|---|---|
884823a1bc | |||
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
|
||||||
|
@ -548,7 +548,7 @@ export class BoLDefaultRoll {
|
|||||||
async roll() {
|
async roll() {
|
||||||
|
|
||||||
const r = new Roll(this.rollData.formula)
|
const r = new Roll(this.rollData.formula)
|
||||||
// console.log("Roll formula", this.rollData.formula)
|
//console.log("Roll formula", this.rollData.formula)
|
||||||
await r.roll({ "async": false })
|
await r.roll({ "async": false })
|
||||||
const activeDice = r.terms[0].results.filter(r => r.active)
|
const activeDice = r.terms[0].results.filter(r => r.active)
|
||||||
const diceTotal = activeDice.map(r => r.result).reduce((a, b) => a + b)
|
const diceTotal = activeDice.map(r => r.result).reduce((a, b) => a + b)
|
||||||
@ -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)
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
],
|
],
|
||||||
"url": "https://www.uberwald.me/gitea/public/bol",
|
"url": "https://www.uberwald.me/gitea/public/bol",
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"version": "10.4.9",
|
"version": "10.4.10",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "10",
|
"verified": "10",
|
||||||
@ -203,7 +203,7 @@
|
|||||||
],
|
],
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json",
|
||||||
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.4.9.zip",
|
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.4.10.zip",
|
||||||
"background": "systems/images/map_lemurie.webp",
|
"background": "systems/images/map_lemurie.webp",
|
||||||
"gridDistance": 1.5,
|
"gridDistance": 1.5,
|
||||||
"gridUnits": "m",
|
"gridUnits": "m",
|
||||||
|
Reference in New Issue
Block a user