foundryvtt-reve-de-dragon/module/rdd-namegen.js

17 lines
699 B
JavaScript
Raw Normal View History

2021-02-10 15:25:14 +01:00
import { Misc } from "./misc.js";
const words = [ 'pore', 'pre', 'flor', 'lane', 'turlu', 'pin', 'a', 'alph', 'i', 'onse', 'iane', 'ane', 'zach', 'arri', 'ba', 'bo', 'bi',
'alta', 'par', 'pir', 'zor', 'zir', 'de', 'pol', 'tran', 'no', 'la','al' , 'pul', 'one', 'ner', 'nur' ];
/* -------------------------------------------- */
export class RdDNameGen {
static getName( msg, params ) {
let max = words.length;
let name = words[new Roll("1d"+max+" -1").roll().total];
name += words[new Roll("1d"+max+" -1").roll().total];
//console.log(name);
ChatMessage.create( { content: `Nom : ${name}`, whisper: ChatMessage.getWhisperRecipients("GM") } );
}
}