Welcome page and init info message

This commit is contained in:
LeRatierBretonnien 2022-12-23 16:38:41 +01:00
parent d74f7784bb
commit 7a8cf9f8fd
6 changed files with 25 additions and 5005 deletions

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 372 KiB

View File

@ -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",

View File

@ -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

View File

@ -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()
}
}

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 KiB