Welcome page and init info message
This commit is contained in:
parent
d74f7784bb
commit
7a8cf9f8fd
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 372 KiB |
@ -183,6 +183,7 @@
|
||||
"BOL.ui.selectactor": "Selectionnez votre personnage pour utiliser la 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.ui.warninitiative": "Votre initiative n'est pas disponible. Effectuez un jet d'Initiative pour ce combat.",
|
||||
|
||||
"BOL.featureCategory.origins": "Origines",
|
||||
"BOL.featureCategory.races": "Races",
|
||||
|
@ -663,7 +663,12 @@ export class BoLActor extends Actor {
|
||||
}
|
||||
|
||||
/*-------------------------------------------- */
|
||||
getInitiativeRank(rollData = undefined) {
|
||||
clearInitiative() {
|
||||
this.unsetFlag("world", "last-initiative" )
|
||||
}
|
||||
|
||||
/*-------------------------------------------- */
|
||||
getInitiativeRank(rollData = undefined, isCombat = false) {
|
||||
if (!rollData) {
|
||||
rollData = this.getFlag("world", "last-initiative")
|
||||
}
|
||||
@ -672,6 +677,9 @@ export class BoLActor extends Actor {
|
||||
fvttInit = 5
|
||||
if (!rollData) {
|
||||
fvttInit = -1
|
||||
if ( isCombat ) {
|
||||
ui.notifications.warn(game.i18n.localize("BOL.ui.warninitiative"))
|
||||
}
|
||||
} else {
|
||||
if (rollData.isLegendary) {
|
||||
fvttInit = 10
|
||||
|
@ -25,7 +25,7 @@ export class BoLCombatManager extends Combat {
|
||||
// calculate initiative
|
||||
for (let cId = 0; cId < ids.length; cId++) {
|
||||
const combatant = this.combatants.get(ids[cId])
|
||||
let fvttInit = combatant.actor.getInitiativeRank()
|
||||
let fvttInit = combatant.actor.getInitiativeRank(false, true)
|
||||
fvttInit += (cId / 100)
|
||||
await this.updateEmbeddedDocuments("Combatant", [{ _id: ids[cId], initiative: fvttInit }]);
|
||||
}
|
||||
@ -41,6 +41,15 @@ export class BoLCombatManager extends Combat {
|
||||
super.nextRound()
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
_onDelete() {
|
||||
let combatants = this.combatants.contents
|
||||
for (let c of combatants) {
|
||||
let actor = game.actors.get(c.data.actorId)
|
||||
actor.clearInitiative()
|
||||
}
|
||||
super._onDelete()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
],
|
||||
"url": "https://www.uberwald.me/gitea/public/bol",
|
||||
"license": "LICENSE.txt",
|
||||
"version": "10.4.12",
|
||||
"version": "10.4.13",
|
||||
"compatibility": {
|
||||
"minimum": "10",
|
||||
"verified": "10",
|
||||
@ -203,8 +203,8 @@
|
||||
],
|
||||
"socket": true,
|
||||
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json",
|
||||
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.4.12.zip",
|
||||
"background": "systems/images/map_lemurie.webp",
|
||||
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.4.13.zip",
|
||||
"background": "systems/bol/ui/page_accueil.webp",
|
||||
"gridDistance": 1.5,
|
||||
"gridUnits": "m",
|
||||
"primaryTokenAttribute": "resources.hp",
|
||||
|
BIN
ui/page_accueil.webp
Normal file
BIN
ui/page_accueil.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 494 KiB |
Loading…
Reference in New Issue
Block a user