Compare commits
4 Commits
bol-v10.4.
...
bol-v10.4.
Author | SHA1 | Date | |
---|---|---|---|
884823a1bc | |||
399c22d623 | |||
085265df5d | |||
593db9ba5b |
@ -182,7 +182,8 @@
|
|||||||
"BOL.ui.armornoformula": "L'armure {protect.name} n'a pas de formule pour la protection !",
|
"BOL.ui.armornoformula": "L'armure {protect.name} n'a pas de formule pour la protection !",
|
||||||
"BOL.ui.selectactor": "Selectionnez votre personnage pour utiliser la macro",
|
"BOL.ui.selectactor": "Selectionnez votre personnage pour utiliser la macro",
|
||||||
"BOL.ui.itemnotfound": "Impossible de trouver l'objet de cette macro",
|
"BOL.ui.itemnotfound": "Impossible de trouver l'objet de cette macro",
|
||||||
|
"BOL.ui.noinit": "Pas d'initiative trouvée, veuillez en enregistrer une.",
|
||||||
|
|
||||||
"BOL.featureCategory.origins": "Origines",
|
"BOL.featureCategory.origins": "Origines",
|
||||||
"BOL.featureCategory.races": "Races",
|
"BOL.featureCategory.races": "Races",
|
||||||
"BOL.featureCategory.careers": "Carrières",
|
"BOL.featureCategory.careers": "Carrières",
|
||||||
|
@ -648,33 +648,38 @@ 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) {
|
||||||
let fvttInit = 5
|
rollData = this.getFlag("world", "last-initiative")
|
||||||
if (this.type == 'character') {
|
}
|
||||||
if (rollData.isLegendary) {
|
let fvttInit = 4 // Pietaille par defaut
|
||||||
fvttInit = 10
|
if (this.type == 'character' ) {
|
||||||
} else if (rollData.isCritical) {
|
fvttInit = 5
|
||||||
fvttInit = 9
|
if (!rollData) {
|
||||||
} else if (rollData.isSuccess ) {
|
fvttInit = -1
|
||||||
fvttInit = 8
|
} else {
|
||||||
} else if (rollData.isFumble) {
|
if (rollData.isLegendary) {
|
||||||
fvttInit = 3
|
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') {
|
||||||
if ( this.getCharType() == 'adversary') {
|
fvttInit = 7
|
||||||
fvttInit = 7
|
}
|
||||||
}
|
if ( this.getCharType() == 'tough') {
|
||||||
if ( this.getCharType() == 'tough') {
|
fvttInit = 6
|
||||||
fvttInit = 6
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return fvttInit
|
return fvttInit
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
|
@ -20,7 +20,7 @@ export class BoLCombatManager extends Combat {
|
|||||||
console.log(`${game.system.title} | Combat.rollInitiative()`, ids, formula, messageOptions);
|
console.log(`${game.system.title} | Combat.rollInitiative()`, ids, formula, messageOptions);
|
||||||
// Structure input data
|
// Structure input data
|
||||||
ids = typeof ids === "string" ? [ids] : ids;
|
ids = typeof ids === "string" ? [ids] : ids;
|
||||||
const currentId = this.combatant.id;
|
//const currentId = this.combatant.id;
|
||||||
|
|
||||||
// calculate initiative
|
// calculate initiative
|
||||||
for (let cId = 0; cId < ids.length; cId++) {
|
for (let cId = 0; cId < ids.length; cId++) {
|
||||||
|
@ -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.7",
|
"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.7.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