forked from public/foundryvtt-reve-de-dragon
Gestion des points d'XP en voie
This commit is contained in:
@ -18,6 +18,7 @@ import { RdDUtility } from "./rdd-utility.js";
|
||||
import { TMRUtility } from "./tmr-utility.js";
|
||||
import { RdDCalendrier } from "./rdd-calendrier.js";
|
||||
import { RdDResolutionTable } from "./rdd-resolution-table.js";
|
||||
import { RdDTokenHud } from "./rdd-token-hud.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
@ -67,13 +68,12 @@ const _patch_initiative = () => {
|
||||
}
|
||||
//console.log("Combatat", c);
|
||||
const roll = this._getInitiativeRoll(c, rollFormula);
|
||||
//console.log("Compute init for", armeCombat, competence, rollFormula, roll.total);
|
||||
|
||||
if ( roll.total <= 0 ) roll.total = 1;
|
||||
//console.log("Compute init for", armeCombat, competence, rollFormula, roll.total);
|
||||
await this.updateEmbeddedEntity("Combatant", { _id: c._id, initiative: roll.total });
|
||||
|
||||
// Send a chat message
|
||||
let rollMode =
|
||||
messageOptions.rollMode || game.settings.get("core", "rollMode");
|
||||
let rollMode = messageOptions.rollMode || game.settings.get("core", "rollMode");
|
||||
let messageData = mergeObject(
|
||||
{
|
||||
speaker: {
|
||||
@ -187,10 +187,6 @@ Hooks.once("init", async function() {
|
||||
_patch_initiative();
|
||||
});
|
||||
|
||||
Hooks.once("renderApplication", () => {
|
||||
messageDeBienvenue();
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
function messageDeBienvenue(){
|
||||
game.messages
|
||||
@ -204,6 +200,11 @@ function messageDeBienvenue(){
|
||||
);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
Hooks.once("renderApplication", () => {
|
||||
messageDeBienvenue();
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
/* -------------------------------------------- */
|
||||
@ -223,6 +224,8 @@ Hooks.once("ready", function() {
|
||||
//whisper: [ ChatMessage.getWhisperRecipients("GM") ] } );
|
||||
}
|
||||
|
||||
// Integration du TokenHUD
|
||||
Hooks.on('renderTokenHUD', (app, html, data) => { RdDTokenHud.addTokenHudExtensions(app, html, data) });
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user