Visibilité des jets /rdd

This commit is contained in:
2026-07-10 18:07:08 +02:00
parent 6c239b8ed9
commit b89dd3845a
7 changed files with 17 additions and 43 deletions
+2 -31
View File
@@ -1570,9 +1570,10 @@ export class RdDActor extends RdDBaseActorSang {
/* -------------------------------------------- */
async ajoutExperience(rollData, hideChatMessage = 'show') {
const rollMode = rollData.current?.rollmode?.key ?? game.settings.get("core", "rollMode")
if (!rollData.rolled.isPart ||
rollData.finalLevel >= 0 ||
game.settings.get("core", "rollMode") == 'selfroll' ||
rollMode == 'selfroll' ||
!Misc.hasConnectedGM()) {
return
}
@@ -1795,36 +1796,6 @@ export class RdDActor extends RdDBaseActorSang {
}
}
/**
* Méthode pour faire un jet prédéterminer sans ouvrir la fenêtre de dialogue
* @param {*} caracName
* @param {*} compName
* @param {*} diff
* @param {*} options
* @returns
*/
async doRollCaracCompetence(caracName, compName, diff, options = { title: "" }) {
const carac = this.getCaracByName(caracName);
if (!carac) {
ui.notifications.warn(`${this.name} n'a pas de caractéristique correspondant à ${caracName}`)
return;
}
const competence = this.getCompetence(compName);
let rollData = {
alias: this.getAlias(),
caracValue: Number(carac.value),
selectedCarac: carac,
competence: competence,
diffLibre: diff,
show: { title: options?.title ?? '' }
};
RollDataAjustements.calcul(rollData, this);
await RdDResolutionTable.rollData(rollData);
this.ajoutExperience(rollData);
await RdDRollResult.displayRollData(rollData, this)
return rollData.rolled;
}
/* -------------------------------------------- */
async creerTacheDepuisLivre(item, options = { renderSheet: true }) {
const nomTache = "Lire " + item.name;