Amélioration chat-message
- utilisation de partial template - fixes mineurs (this sur static) - singulier/pluriel pour points de rêve/points de tâche
This commit is contained in:
parent
f2aff6b234
commit
d6c65ee3a5
@ -1331,6 +1331,7 @@ export class RdDActor extends Actor {
|
||||
ui.notifications.info("Aucun sort disponible!");
|
||||
return;
|
||||
}
|
||||
if ( this.currentTMR) this.currentTMR.minimize(); // Hide
|
||||
|
||||
let rollData = {
|
||||
selectedCarac: this.data.data.carac.reve,
|
||||
@ -1344,7 +1345,6 @@ export class RdDActor extends Actor {
|
||||
coutreve: Array(20).fill().map((item, index) => 1 + index)
|
||||
}
|
||||
|
||||
if ( this.currentTMR) this.currentTMR.minimize(); // Hide
|
||||
const dialog = await RdDRoll.create(this, rollData,
|
||||
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-sort.html',
|
||||
close: html => { this.currentTMR.maximize() } // Re-display TMR
|
||||
@ -1528,10 +1528,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollCarac( caracName ) {
|
||||
let rollData = {
|
||||
selectedCarac: this.getCaracByName(caracName),
|
||||
diviseur : this.getDiviseurSignificative()
|
||||
};
|
||||
let rollData = { selectedCarac: this.getCaracByName(caracName) };
|
||||
|
||||
const dialog = await RdDRoll.create(this, rollData,
|
||||
{html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-carac.html'},
|
||||
@ -1550,15 +1547,12 @@ export class RdDActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
async _onRollCaracResult(rollData) {
|
||||
// Final chat message
|
||||
await RdDResolutionTable.displayRollData(rollData, this.name);
|
||||
await RdDResolutionTable.displayRollData(rollData, this.name, 'chat-resultat-general.html');
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollCompetence( name ) {
|
||||
let rollData = {
|
||||
competence: this.getCompetence(name),
|
||||
diviseur : this.getDiviseurSignificative()
|
||||
}
|
||||
let rollData = { competence: this.getCompetence(name) }
|
||||
|
||||
if (rollData.competence.type == 'competencecreature') {
|
||||
// Fake competence pour créature
|
||||
@ -1610,17 +1604,15 @@ export class RdDActor extends Actor {
|
||||
competence.data.defaut_carac = tache.data.carac; // Patch !
|
||||
let rollData = {
|
||||
competence: competence,
|
||||
diviseur : this.getDiviseurSignificative(),
|
||||
tache: tache,
|
||||
diffConditions: tache.data.difficulte,
|
||||
editLibre: false,
|
||||
editConditions: false,
|
||||
actor: this
|
||||
}
|
||||
|
||||
rollData.carac = {};
|
||||
carac : { }
|
||||
};
|
||||
rollData.carac[tache.data.carac] = duplicate(this.data.data.carac[tache.data.carac]); // Single carac
|
||||
console.log("rollTache !!!", duplicate(rollData));
|
||||
|
||||
console.log("rollTache !!!", rollData);
|
||||
|
||||
const dialog = await RdDRoll.create(this, rollData, {html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-competence.html'}, {
|
||||
name: 'jet-competence',
|
||||
@ -1658,7 +1650,7 @@ export class RdDActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
async rollAppelChance( )
|
||||
{
|
||||
let rollData = { selectedCarac: this.getCaracByName('chance-actuelle') };
|
||||
let rollData = { selectedCarac: this.getCaracByName('chance-actuelle'), surprise: '' };
|
||||
|
||||
const dialog = await RdDRoll.create(this, rollData,
|
||||
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-carac.html'},
|
||||
@ -1676,18 +1668,9 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _appelChanceResult(rollData) {
|
||||
// TODO:
|
||||
const message = {
|
||||
user: game.user._id,
|
||||
alias: this.name,
|
||||
content: this.name + " fait appel à la chance" + RdDResolutionTable.explain(rollData.rolled)
|
||||
};
|
||||
if (rollData.rolled.isSuccess) {
|
||||
message.content += "<br>Un point de chance est dépensée, l'action peut être retentée"
|
||||
await this.chanceActuelleIncDec(-1)
|
||||
}
|
||||
ChatMessage.create(message);
|
||||
|
||||
RdDResolutionTable.displayRollData(rollData, this.name, 'chat-resultat-appelchance.html')
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@ export class ChatUtility {
|
||||
chatOptions.whisper = ChatUtility.getWhisperRecipients(rollMode, name);
|
||||
break;
|
||||
}
|
||||
chatOptions.alias = chatOptions.alias||name;
|
||||
ChatMessage.create(chatOptions);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { DeDraconique } from "./de-draconique.js";
|
||||
import { Misc } from "./misc.js";
|
||||
import { RdDDice } from "./rdd-dice.js";
|
||||
import { RdDResolutionTable } from "./rdd-resolution-table.js";
|
||||
import { RdDRollResolution } from "./rdd-roll-resolution.js";
|
||||
import { RdDRollResolutionTable } from "./rdd-roll-resolution-table.js";
|
||||
import { RdDRollTables } from "./rdd-rolltables.js";
|
||||
import { RdDUtility } from "./rdd-utility.js";
|
||||
import { TMRUtility } from "./tmr-utility.js";
|
||||
@ -167,7 +167,7 @@ export class RdDCommands {
|
||||
|
||||
async rollRdd(msg, params) {
|
||||
if (params.length == 0) {
|
||||
RdDRollResolution.open();
|
||||
RdDRollResolutionTable.open();
|
||||
}
|
||||
else {
|
||||
let flatParams = params.reduce((a, b) => `${a} ${b}`);
|
||||
|
@ -102,8 +102,9 @@ export class RdDResolutionTable {
|
||||
|
||||
static async displayRollData(rollData, userName, template = 'chat-resultat-general.html') {
|
||||
|
||||
let html = await RdDResolutionTable.buildRollDataHtml(rollData, template);
|
||||
ChatUtility.chatWithRollMode({ content: html }, userName)
|
||||
ChatUtility.chatWithRollMode(
|
||||
{ content: await RdDResolutionTable.buildRollDataHtml(rollData, template) },
|
||||
userName)
|
||||
}
|
||||
|
||||
static _buildAjustements(rollData) {
|
||||
@ -218,7 +219,7 @@ export class RdDResolutionTable {
|
||||
if (difficulte < -10) {
|
||||
return duplicate(levelDown.find(levelData => levelData.level == difficulte));
|
||||
}
|
||||
return duplicate(this.resolutionTable[caracValue][difficulte + 10]);
|
||||
return duplicate(RdDResolutionTable.resolutionTable[caracValue][difficulte + 10]);
|
||||
}
|
||||
|
||||
static isAjustementAstrologique(rollData) {
|
||||
@ -342,10 +343,10 @@ export class RdDResolutionTable {
|
||||
maxLevel = Math.max(Math.min(maxLevel, 22), minLevel + countColonnes);
|
||||
|
||||
let table = $("<table class='table-resolution'/>")
|
||||
.append(this._buildHTMLHeader(this.resolutionTable[0], minLevel, maxLevel));
|
||||
.append(this._buildHTMLHeader(RdDResolutionTable.resolutionTable[0], minLevel, maxLevel));
|
||||
|
||||
for (var rowIndex = minCarac; rowIndex <= maxCarac; rowIndex++) {
|
||||
table.append(this._buildHTMLRow(this.resolutionTable[rowIndex], rowIndex, caracValue, levelValue, minLevel, maxLevel));
|
||||
table.append(this._buildHTMLRow(RdDResolutionTable.resolutionTable[rowIndex], rowIndex, caracValue, levelValue, minLevel, maxLevel));
|
||||
}
|
||||
table.append("</table>");
|
||||
return table;
|
||||
|
@ -7,20 +7,18 @@ const titleTableDeResolution = 'Table de résolution';
|
||||
* @extends {Dialog}
|
||||
*/
|
||||
/* -------------------------------------------- */
|
||||
export class RdDRollResolution extends Dialog {
|
||||
export class RdDRollResolutionTable extends Dialog {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async open(rollData = {}) {
|
||||
RdDRollResolution._setDefaultOptions(rollData);
|
||||
RdDRollResolutionTable._setDefaultOptions(rollData);
|
||||
let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-roll-resolution.html', rollData);
|
||||
const dialog = new RdDRollResolution(rollData, html);
|
||||
const dialog = new RdDRollResolutionTable(rollData, html);
|
||||
dialog.render(true);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static _setDefaultOptions(rollData) {
|
||||
|
||||
|
||||
let defRollData = {
|
||||
show: { title: titleTableDeResolution },
|
||||
ajustementsConditions: CONFIG.RDD.ajustementsConditions,
|
||||
@ -62,8 +60,8 @@ export class RdDRollResolution extends Dialog {
|
||||
/* -------------------------------------------- */
|
||||
async onAction(html) {
|
||||
await RdDResolutionTable.rollData(this.rollData);
|
||||
console.log("RdDRollResolution -=>", this.rollData, this.rollData.rolled);
|
||||
await RdDResolutionTable.displayRollData(rollData, game.user.name)
|
||||
console.log("RdDRollResolutionTable -=>", this.rollData, this.rollData.rolled);
|
||||
await RdDResolutionTable.displayRollData(this.rollData, game.user.name);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
@ -50,7 +50,8 @@ export class RdDRoll extends Dialog {
|
||||
isMalusEncombrementTotal: RdDItemCompetence.isMalusEncombrementTotal(rollData.competence),
|
||||
useMalusEncTotal: false,
|
||||
encTotal: actor.getEncombrementTotal(),
|
||||
ajustementAstrologique: actor.ajustementAstrologique()
|
||||
ajustementAstrologique: actor.ajustementAstrologique(),
|
||||
surprise: actor.getSurprise()
|
||||
}
|
||||
mergeObject(rollData, defaultRollData, { overwrite: false });
|
||||
}
|
||||
|
@ -1,11 +1,10 @@
|
||||
/* Common useful functions shared between objects */
|
||||
|
||||
import { TMRUtility } from "./tmr-utility.js";
|
||||
import { RdDRollTables } from "./rdd-rolltables.js";
|
||||
import { ChatUtility } from "./chat-utility.js";
|
||||
import { RdDItemCompetence } from "./item-competence.js";
|
||||
import { RdDCombat } from "./rdd-combat.js";
|
||||
import { RdDRollResolution } from "./rdd-roll-resolution.js";
|
||||
import { RdDRollResolutionTable } from "./rdd-roll-resolution-table.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
const level_category = {
|
||||
@ -92,7 +91,7 @@ const fatigueMarche = { "aise": { "4":1, "6":2, "8":3, "10":4, "12":6 },
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Static tables for commands /table */
|
||||
const table2func = { "rdd": { descr: "rdd: Ouvre la table de résolution", func: RdDRollResolution.open },
|
||||
const table2func = { "rdd": { descr: "rdd: Ouvre la table de résolution", func: RdDRollResolutionTable.open },
|
||||
"queues": { descr: "queues: Tire une queue de Dragon", func: RdDRollTables.getQueue},
|
||||
"ombre": { descr: "ombre: Tire une Ombre de Dragon", func: RdDRollTables.getOmbre },
|
||||
"tetehr": { descr: "tetehr: Tire une Tête de Dragon pour Hauts Revants", fund: RdDRollTables.getTeteHR},
|
||||
@ -198,6 +197,7 @@ export class RdDUtility {
|
||||
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-attaque.html',
|
||||
// messages tchat
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-resultat-appelchance.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-resultat-attaque.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-resultat-parade.html',
|
||||
|
@ -396,7 +396,7 @@ table {border: 1px solid #7a7971;}
|
||||
border-radius: 6px; padding: 3px;
|
||||
background:linear-gradient(150deg, rgba(0, 0, 0, 0.7), rgba(100, 45, 124, 0.4), rgba(82, 17, 131, 0.3),rgba(100, 45, 124, 0.4), rgba(0, 0, 0, 0.7));
|
||||
}
|
||||
.rdd-need-significative{
|
||||
.rdd-diviseur{
|
||||
border-radius: 6px; padding: 3px;
|
||||
background:linear-gradient(30deg, rgba(61, 55, 93, 0.2), rgba(178, 179, 196, 0.1), rgba(59, 62, 63, 0.2), rgba(206, 204, 199, 0.1), rgba(61, 46, 49, 0.2));
|
||||
}
|
||||
|
23
templates/chat-infojet.html
Normal file
23
templates/chat-infojet.html
Normal file
@ -0,0 +1,23 @@
|
||||
<div>
|
||||
<span {{#if ajustements}}class="tooltip" {{/if}}>
|
||||
{{rolled.caracValue}} à {{numberFormat rolled.finalLevel decimals=0 sign=true}}
|
||||
{{#if ajustements}}
|
||||
<div class="tooltiptext ttt-ajustements">
|
||||
{{#each ajustements as |item key|}}
|
||||
<div class="{{#if item.strong}}strong-text{{/if}}">
|
||||
{{#if item.descr}}
|
||||
{{{item.descr}}}
|
||||
{{else}}
|
||||
{{item.label}}: {{numberFormat item.value decimals=0 sign=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if rolled.factor}}<span class="rdd-diviseur">×{{{rolled.factor}}}</span>{{/if}}
|
||||
</span>
|
||||
<span>= {{rolled.score}}%</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>{{rolled.roll}} : </span><span class="rdd-roll-{{rolled.code}} strong-text">{{rolled.quality}}</span>
|
||||
</div>
|
@ -1,22 +1,7 @@
|
||||
<h4>
|
||||
{{alias}} fait appel à la chance
|
||||
<br><span class="tooltip">
|
||||
{{rolled.caracValue}} à {{numberFormat rolled.finalLevel decimals=0 sign=true}}
|
||||
<div class="tooltiptext ttt-ajustements">
|
||||
<div>Ajustements</div>
|
||||
{{#each ajustements as |item key|}}
|
||||
<div class="{{#if item.strong}}strong-text{{/if}}">
|
||||
{{#if item.descr}}
|
||||
{{{item.descr}}}
|
||||
{{else}}
|
||||
{{item.label}}: {{numberFormat item.value decimals=0 sign=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</span> = {{rolled.score}}%
|
||||
</h4>
|
||||
<div><span>{{rolled.roll}} : </span><span class="rdd-roll-{{rolled.code}} strong-text">{{rolled.quality}}</span></div>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||
{{~#if rolled.isSuccess}}
|
||||
<hr>
|
||||
<span>Un point de chance est dépensé, l'action peut être retentée!</span>
|
||||
|
@ -1,24 +1,6 @@
|
||||
<h4>
|
||||
{{alias}} attaque: {{arme.name}}
|
||||
<br>{{selectedCarac.label}} / {{competence.name}}, difficulté {{diffLibre}}
|
||||
<br><span class="tooltip">
|
||||
{{rolled.caracValue}} à {{numberFormat rolled.finalLevel decimals=0 sign=true}}
|
||||
<div class="tooltiptext ttt-ajustements">
|
||||
<div>Ajustements</div>
|
||||
{{#each ajustements as |item key|}}
|
||||
<div class="{{#if item.strong}}strong-text{{/if}}">
|
||||
{{#if item.descr}}
|
||||
{{{item.descr}}}
|
||||
{{else}}
|
||||
{{item.label}}: {{numberFormat item.value decimals=0 sign=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</span>
|
||||
{{#if rolled.factor}}<label class="rdd-need-significative">(×{{{rolled.factor}}})</label>{{/if}} = {{rolled.score}}%
|
||||
</h4>
|
||||
<div><span>{{rolled.roll}} : </span><span class="rdd-roll-{{rolled.code}} strong-text">{{rolled.quality}}</span></div>
|
||||
<h4>{{alias}} attaque: {{arme.name}}</h4>
|
||||
<div>{{selectedCarac.label}} / {{competence.name}}, difficulté {{diffLibre}}</div>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||
<hr>
|
||||
{{#if tactique}}
|
||||
<div>
|
||||
|
@ -1,26 +1,10 @@
|
||||
<h4>
|
||||
{{alias}} {{#if show.title}}{{show.title}}: {{/if}}
|
||||
{{alias}} {{show.title}}:
|
||||
{{#if selectedCarac}}{{selectedCarac.label}}
|
||||
{{#if competence}} / {{competence.name}}{{/if}}
|
||||
{{/if}}
|
||||
<br><span class="tooltip">
|
||||
{{rolled.caracValue}} à {{numberFormat rolled.finalLevel decimals=0 sign=true}}
|
||||
<div class="tooltiptext ttt-ajustements">
|
||||
<div>Ajustements</div>
|
||||
{{#each ajustements as |item key|}}
|
||||
<div class="{{#if item.strong}}strong-text{{/if}}">
|
||||
{{#if item.descr}}
|
||||
{{{item.descr}}}
|
||||
{{else}}
|
||||
{{item.label}}: {{numberFormat item.value decimals=0 sign=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</span>
|
||||
{{#if rolled.factor}}<label class="rdd-need-significative">(×{{{rolled.factor}}})</label>{{/if}} = {{rolled.score}}%
|
||||
</h4>
|
||||
<div><span>{{rolled.roll}} : </span><span class="rdd-roll-{{rolled.code}} strong-text">{{rolled.quality}}</span></div>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||
<hr>
|
||||
<div>
|
||||
<span>{{#if rolled.ptTache}}{{rolled.ptTache}} points de tâche{{/if}}{{#if rolled.ptQualite}}{{#if rolled.ptTache}},{{/if}} ajustement Qualité {{numberFormat rolled.ptQualite decimals=0 sign=true}}{{/if}}</span>
|
||||
|
@ -1,23 +1,6 @@
|
||||
<h4>
|
||||
{{alias}} esquive: {{selectedCarac.label}} / {{competence.name}}, difficulté {{diffLibre}}
|
||||
<br><span class="tooltip">
|
||||
{{rolled.caracValue}} à {{numberFormat rolled.finalLevel decimals=0 sign=true}}
|
||||
<div class="tooltiptext ttt-ajustements">
|
||||
<div>Ajustements</div>
|
||||
{{#each ajustements as |item key|}}
|
||||
<div class="{{#if item.strong}}strong-text{{/if}}">
|
||||
{{#if item.descr}}
|
||||
{{{item.descr}}}
|
||||
{{else}}
|
||||
{{item.label}}: {{numberFormat item.value decimals=0 sign=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</span>
|
||||
{{#if rolled.factor}}<label class="rdd-need-significative">(×{{{rolled.factor}}})</label>{{/if}} = {{rolled.score}}%
|
||||
</h4>
|
||||
<div><span>{{rolled.roll}} : </span><span class="rdd-roll-{{rolled.code}} strong-text">{{rolled.quality}}</span></div>
|
||||
<h4>{{alias}} esquive</h4>
|
||||
<div>{{selectedCarac.label}} / {{competence.name}} attaque à {{diffLibre}}</div>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||
<hr>
|
||||
<div>
|
||||
{{#if rolled.isSuccess}}
|
||||
|
@ -2,27 +2,10 @@
|
||||
{{alias}} {{#if show.title}}{{show.title}}: {{/if}}
|
||||
{{#if selectedCarac}}{{selectedCarac.label}}
|
||||
{{#if competence}} / {{competence.name}}{{/if}}
|
||||
à {{diffLibre}}
|
||||
{{/if}}
|
||||
<br><span {{#if ajustements}}class="tooltip"{{/if}}>
|
||||
{{rolled.caracValue}} à {{numberFormat rolled.finalLevel decimals=0 sign=true}}
|
||||
{{#if ajustements}}
|
||||
<div class="tooltiptext ttt-ajustements">
|
||||
<div>Ajustements</div>
|
||||
{{#each ajustements as |item key|}}
|
||||
<div class="{{#if item.strong}}strong-text{{/if}}">
|
||||
{{#if item.descr}}
|
||||
{{{item.descr}}}
|
||||
{{else}}
|
||||
{{item.label}}: {{numberFormat item.value decimals=0 sign=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{#if rolled.factor}}<label class="rdd-need-significative">(×{{{rolled.factor}}})</label>{{/if}} = {{rolled.score}}%
|
||||
</h4>
|
||||
<div><span>{{rolled.roll}} : </span><span class="rdd-roll-{{rolled.code}} strong-text">{{rolled.quality}}</span></div>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||
<hr>
|
||||
<div>
|
||||
<span>{{#if rolled.ptTache}}{{rolled.ptTache}} points de tâche{{/if}}{{#if rolled.ptQualite}}{{#if rolled.ptTache}},{{/if}} ajustement Qualité {{numberFormat rolled.ptQualite decimals=0 sign=true}}{{/if}}</span>
|
||||
|
@ -1,24 +1,6 @@
|
||||
<h4>
|
||||
{{alias}} pare: {{arme.name}}
|
||||
<br>{{selectedCarac.label}} / {{competence.name}}, difficulté {{diffLibre}}
|
||||
<br><span class="tooltip">
|
||||
{{rolled.caracValue}} à {{numberFormat rolled.finalLevel decimals=0 sign=true}}
|
||||
<div class="tooltiptext ttt-ajustements">
|
||||
<div>Ajustements</div>
|
||||
{{#each ajustements as |item key|}}
|
||||
<div class="{{#if item.strong}}strong-text{{/if}}">
|
||||
{{#if item.descr}}
|
||||
{{{item.descr}}}
|
||||
{{else}}
|
||||
{{item.label}}: {{numberFormat item.value decimals=0 sign=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</span>
|
||||
{{#if rolled.factor}}<label class="rdd-need-significative">(×{{{rolled.factor}}})</label>{{/if}} = {{rolled.score}}%
|
||||
</h4>
|
||||
<div><span>{{rolled.roll}} : </span><span class="rdd-roll-{{rolled.code}} strong-text">{{rolled.quality}}</span></div>
|
||||
<h4>{{alias}} pare: {{arme.name}}</h4>
|
||||
<div>{{selectedCarac.label}} / {{competence.name}}, attaque à {{diffLibre}}</div>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||
<hr>
|
||||
<div>
|
||||
{{#if rolled.isSuccess}}
|
||||
|
@ -1,48 +1,24 @@
|
||||
<h4>
|
||||
{{alias}} {{#if isSortReserve}}met en réserve{{else}}lance{{/if}} le
|
||||
{{selectedSort.data.isrituel}}rituel{{else}}sort{{/if}}
|
||||
{{selectedSort.name}} (r {{selectedSort.data.ptreve_reel}})
|
||||
<br>
|
||||
<span class="tooltip">
|
||||
{{competence.name}}: {{rolled.caracValue}} à {{numberFormat rolled.finalLevel decimals=0 sign=true}}
|
||||
<div class="tooltiptext ttt-ajustements">
|
||||
<div>Ajustements</div>
|
||||
{{#each ajustements as |item key|}}
|
||||
<div class="{{#if item.strong}}strong-text{{/if}}">
|
||||
{{#if item.descr}}
|
||||
{{{item.descr}}}
|
||||
{{else}}
|
||||
{{item.label}}: {{numberFormat item.value decimals=0 sign=true}}
|
||||
{{alias}} {{#if isSortReserve}}met en réserve{{else}}lance{{/if}}
|
||||
le {{#if selectedSort.data.isrituel}}rituel{{else}}sort{{/if}}
|
||||
{{selectedSort.name}}
|
||||
</h4>
|
||||
<div>Pour {{selectedSort.data.ptreve_reel}} point{{~#if (gt selectedSort.data.ptreve_reel 1)}}s{{/if}} de rêve en {{coordLabel}} ({{coord}}).
|
||||
{{#if show.reveInsuffisant}}
|
||||
<span>Pas assez de rêve!</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</span>
|
||||
{{#if rolled.factor}}<label class="rdd-need-significative">(×{{{rolled.factor}}})</label>{{/if}} = {{rolled.score}}%
|
||||
</h4>
|
||||
<div>Pour {{selectedSort.data.ptreve_reel}} points de rêve en {{coordLabel}} ({{coord}})</div>
|
||||
<div>
|
||||
<span>{{rolled.roll}} : </span><span class="rdd-roll-{{rolled.code}} strong-text">{{rolled.quality}}</span>
|
||||
{{#if show.reveInsuffisant}}<span>Pas assez de rêve!</span>{{/if}}
|
||||
</div>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||
<hr>
|
||||
<div>
|
||||
<span>
|
||||
{{#if rolled.isETotal}}
|
||||
Echec TOTAL du sort!
|
||||
{{else if rolled.isEchec}}
|
||||
Echec du sort,
|
||||
{{else}}
|
||||
Réussite du sort,
|
||||
{{/if~}}
|
||||
</span>
|
||||
<span>
|
||||
{{#if (eq depenseReve 0)}}
|
||||
pas de dépense de rêve
|
||||
{{else if (eq depenseReve 1)}}
|
||||
1 point de rêve a été dépensé
|
||||
{{else}}
|
||||
{{depenseReve}} points de rêve ont été dépensés
|
||||
{{/if}}
|
||||
{{#if rolled.isETotal}}Echec TOTAL
|
||||
{{else if rolled.isEchec}}Echec
|
||||
{{else}}Réussite{{/if}}
|
||||
du {{#if selectedSort.data.isrituel}}rituel{{else}}sort{{/if}},
|
||||
{{#if (eq depenseReve 0)}}pas de dépense de rêve
|
||||
{{else if (eq depenseReve 1)}}1 point de rêve a été dépensé
|
||||
{{else}}{{depenseReve}} points de rêve ont été dépensés
|
||||
{{~/if}}.
|
||||
</span>
|
||||
</div>
|
@ -1,28 +1,12 @@
|
||||
<h4>
|
||||
{{alias}} travaille à sa tâche {{tache.name}}
|
||||
<br>{{selectedCarac.label}}/{{competence.name}}
|
||||
<span class="tooltip">
|
||||
{{rolled.caracValue}} à {{numberFormat rolled.finalLevel decimals=0 sign=true}}
|
||||
<div class="tooltiptext ttt-ajustements">
|
||||
<div>Ajustements</div>
|
||||
{{#each ajustements as |item key|}}
|
||||
<div class="{{#if item.strong}}strong-text{{/if}}">
|
||||
{{#if item.descr}}
|
||||
{{{item.descr}}}
|
||||
{{else}}
|
||||
{{item.label}}: {{numberFormat item.value decimals=0 sign=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</span>
|
||||
{{#if rolled.factor}}<label class="rdd-need-significative">(×{{{rolled.factor}}})</label>{{/if}} = {{rolled.score}}%
|
||||
</h4>
|
||||
<div><span>{{rolled.roll}} : </span><span class="rdd-roll-{{rolled.code}} strong-text">{{rolled.quality}}</span></div>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||
<hr>
|
||||
<div>
|
||||
Après {{tache.data.periodicite}} vous avez obtenu {{rolled.ptTache}} points de tâche,
|
||||
votre avancement est de <span class="rdd-roll-{{#if (gt tache.data.points_de_tache_courant 0)}}norm{{else}}etotal{{/if}}">{{tache.data.points_de_tache_courant}} sur {{tache.data.points_de_tache}}</span> Points de Tâche.
|
||||
{{#if tache.data.fatigue}}<br><span>Vous êtes fatigué de {{tache.data.fatigue}} cases.</span>{{/if}}
|
||||
Après {{tache.data.periodicite}} vous avez obtenu {{rolled.ptTache}} point{{~#if (gt rolled.ptTache 1)}}s{{/if}} de tâche,
|
||||
votre avancement est de <span class="rdd-roll-{{#if (gt tache.data.points_de_tache_courant 0)}}norm{{else}}etotal{{/if}}">{{tache.data.points_de_tache_courant}} sur {{tache.data.points_de_tache}}</span> point{{~#if (gt tache.data.points_de_tache_courant 1)}}s{{/if}} de tâche.
|
||||
{{#if tache.data.fatigue}}<br><span>Vous vous êtes fatigué de {{tache.data.fatigue}} case{{~#if (gt tache.data.fatigue 1)}}s{{/if}}.</span>{{/if}}
|
||||
{{#if rolled.isETotal}}<br><span>Votre échec total augmente de 1 la difficulté de la tâche!</span>{{/if~}}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user