#42 Amélioration messages de tchat
* Appel à la chance * compétences * jets généraux (remplace table résolution, carac et cas particuliers) * Attaque: en cours
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { Misc } from "./misc.js";
|
||||
import { RdDBonus } from "./rdd-bonus.js";
|
||||
import { RdDDice } from "./rdd-dice.js";
|
||||
|
||||
/**
|
||||
@ -88,7 +89,7 @@ export class RdDResolutionTable {
|
||||
return message;
|
||||
}
|
||||
|
||||
static async explainRollDataV2(rollData, template = 'chat-resultat-rdd.html') {
|
||||
static async explainRollDataV2(rollData, template = 'chat-resultat-general.html') {
|
||||
rollData.ajustements = RdDResolutionTable._buildAjustements(rollData);
|
||||
rollData.show = rollData.show || {};
|
||||
|
||||
@ -101,21 +102,29 @@ export class RdDResolutionTable {
|
||||
if (rollData.competence) {
|
||||
list.push({ label: rollData.competence.name, value: rollData.competence.data.niveau});
|
||||
}
|
||||
if (rollData.tactique) {
|
||||
const surprise = RdDBonus.find(rollData.tactique);
|
||||
list.push({ label: surprise.descr, value: surprise.attaque });
|
||||
}
|
||||
if (rollData.surpriseDefenseur) {
|
||||
const surprise = RdDBonus.find(rollData.surpriseDefenseur);
|
||||
list.push({ label: surprise.descr, value: surprise.attaque });
|
||||
}
|
||||
if (rollData.diffLibre != undefined) {
|
||||
const label = rollData.selectedSort ? rollData.selectedSort.name : 'libre';
|
||||
const label = rollData.selectedSort ? rollData.selectedSort.name : 'Libre';
|
||||
list.push({ label: label, value: rollData.diffLibre });
|
||||
}
|
||||
if (rollData.diffConditions != undefined) {
|
||||
list.push({ label: 'conditions', value: rollData.diffConditions });
|
||||
list.push({ label: 'Conditions', value: rollData.diffConditions });
|
||||
}
|
||||
if (rollData.etat != undefined) {
|
||||
list.push({ label: 'état', value: rollData.etat });
|
||||
list.push({ label: 'Etat', value: rollData.etat });
|
||||
}
|
||||
if (rollData.selectedCarac != undefined && rollData.moral != undefined && rollData.selectedCarac.label == 'Volonté') {
|
||||
list.push({ label: 'moral', value: rollData.selectedCarac != undefined && rollData.moral != undefined && rollData.selectedCarac.label == 'Volonté' ? rollData.moral : undefined });
|
||||
list.push({ label: 'Moral', value: rollData.selectedCarac != undefined && rollData.moral != undefined && rollData.selectedCarac.label == 'Volonté' ? rollData.moral : undefined });
|
||||
}
|
||||
if (RdDResolutionTable.isAjustementAstrologique(rollData)) {
|
||||
list.push({ label: 'astrologique', value: rollData.ajustementAstrologique||0 });
|
||||
list.push({ label: 'Astrologique', value: rollData.ajustementAstrologique||0 });
|
||||
}
|
||||
if (rollData.rolled.bonus && rollData.selectedSort) {
|
||||
list.push({ label: 'Bonus de case', value: rollData.rolled.bonus, unit: '%' });
|
||||
|
Reference in New Issue
Block a user