Gestion des signes draconiques #455

Closed
vincent.vandeme wants to merge 233 commits from v1.4-signes-draconiques into master
2 changed files with 43 additions and 9 deletions
Showing only changes of commit 8e565e3ca6 - Show all commits

View File

@ -166,11 +166,25 @@ export class RdDCommands {
}
/* -------------------------------------------- */
help(msg, table = undefined) {
async help(msg) {
this.help(msg, undefined);
}
async help(msg, table) {
let list = []
this._buildSubTableHelp(list, table || this.commandsTable);
const messageAide = list.reduce((a, b) => a + '</li><li class="list-item">' + b);
RdDCommands._chatAnswer(msg, `Commandes disponibles<ul class="alterne-list"><li class="list-item">${messageAide}</li></ul>`);
let html = await renderTemplate("systems/foundryvtt-reve-de-dragon/templates/settings/dialog-aide-commands.html", { commands: list });
let d = new Dialog(
{
title: "Commandes disponibles dans le tchat",
content: html,
buttons: {},
},
{
width: 600, height: 500,
});
d.render(true);
}
/* -------------------------------------------- */

View File

@ -0,0 +1,20 @@
<h3>Dés spéciaux</h3>
<ul class="alterne-list">
<li class="list-item">
<strong>/roll 1d7</strong>: lance un dé de rencontre
</li>
<li class="list-item">
<strong>/roll 1dr</strong>: lance un dé draconique (de 0à 7, relance et additionne en cas de 7)
</li>
<li class="list-item">
<strong>/roll 1dh</strong>: lance le dé des heures (de 1 à 12)
</li>
</ul>
<h3>Commandes disponibles</h3>
<ul class="alterne-list">
{{#each commands as |command key|}}
<li class="list-item">
{{{command}}}
</li>
{{/each}}
</ul>