Ajout de génération aléatoire de description
Ajout d'un bouton pour générer aléatoirement les éléments de description: - nom (pour le MJ seul) - sexe - age - main directrice - cheveux, yeux - heure de naissance - taille et poids (selon la caractéristique Taille)
This commit is contained in:
@ -11,13 +11,17 @@ const words = ['pore', 'pre', 'flor', 'lane', 'turlu', 'pin', 'a', 'alph', 'i',
|
||||
/* -------------------------------------------- */
|
||||
export class RdDNameGen {
|
||||
|
||||
static async getName(msg, params) {
|
||||
static async proposeName(msg, params) {
|
||||
const html = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-command-nom.html`, {
|
||||
nom: Misc.upperFirst(await RdDDice.rollOneOf(words) + await RdDDice.rollOneOf(words))
|
||||
nom: await RdDNameGen.generate()
|
||||
});
|
||||
ChatMessage.create({ content: html, whisper: ChatMessage.getWhisperRecipients("GM") });
|
||||
}
|
||||
|
||||
static async generate() {
|
||||
return Misc.upperFirst(await RdDDice.rollOneOf(words) + await RdDDice.rollOneOf(words));
|
||||
}
|
||||
|
||||
static async onCreerActeur(event) {
|
||||
const button = event.currentTarget;
|
||||
await RdDBaseActor.create({
|
||||
|
Reference in New Issue
Block a user