forked from public/bol
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.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.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.origins": "Origines",
|
||||||
"BOL.featureCategory.races": "Races",
|
"BOL.featureCategory.races": "Races",
|
||||||
|
@ -663,15 +663,23 @@ export class BoLActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
getInitiativeRank(rollData = undefined) {
|
clearInitiative() {
|
||||||
|
this.unsetFlag("world", "last-initiative" )
|
||||||
|
}
|
||||||
|
|
||||||
|
/*-------------------------------------------- */
|
||||||
|
getInitiativeRank(rollData = undefined, isCombat = false) {
|
||||||
if (!rollData) {
|
if (!rollData) {
|
||||||
rollData = this.getFlag("world", "last-initiative")
|
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
|
||||||
if (!rollData) {
|
if (!rollData) {
|
||||||
fvttInit = -1
|
fvttInit = -1
|
||||||
|
if ( isCombat ) {
|
||||||
|
ui.notifications.warn(game.i18n.localize("BOL.ui.warninitiative"))
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (rollData.isLegendary) {
|
if (rollData.isLegendary) {
|
||||||
fvttInit = 10
|
fvttInit = 10
|
||||||
|
@ -25,7 +25,7 @@ export class BoLCombatManager extends Combat {
|
|||||||
// calculate initiative
|
// calculate initiative
|
||||||
for (let cId = 0; cId < ids.length; cId++) {
|
for (let cId = 0; cId < ids.length; cId++) {
|
||||||
const combatant = this.combatants.get(ids[cId])
|
const combatant = this.combatants.get(ids[cId])
|
||||||
let fvttInit = combatant.actor.getInitiativeRank()
|
let fvttInit = combatant.actor.getInitiativeRank(false, true)
|
||||||
fvttInit += (cId / 100)
|
fvttInit += (cId / 100)
|
||||||
await this.updateEmbeddedDocuments("Combatant", [{ _id: ids[cId], initiative: fvttInit }]);
|
await this.updateEmbeddedDocuments("Combatant", [{ _id: ids[cId], initiative: fvttInit }]);
|
||||||
}
|
}
|
||||||
@ -40,7 +40,16 @@ export class BoLCombatManager extends Combat {
|
|||||||
}
|
}
|
||||||
super.nextRound()
|
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",
|
"url": "https://www.uberwald.me/gitea/public/bol",
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"version": "10.4.12",
|
"version": "10.4.13",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "10",
|
"verified": "10",
|
||||||
@ -203,8 +203,8 @@
|
|||||||
],
|
],
|
||||||
"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.12.zip",
|
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.4.13.zip",
|
||||||
"background": "systems/images/map_lemurie.webp",
|
"background": "systems/bol/ui/page_accueil.webp",
|
||||||
"gridDistance": 1.5,
|
"gridDistance": 1.5,
|
||||||
"gridUnits": "m",
|
"gridUnits": "m",
|
||||||
"primaryTokenAttribute": "resources.hp",
|
"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