forked from public/foundryvtt-reve-de-dragon
Création du compendium Faune, Flore, Minéraux
- les tables d'environnement se basent sur ce seul compendium - les tables de compendiums peuvent chercher plusieurs types d'items - déplacement de la botanique - déplacement des sels alchimiques depuis l'équipement - modification de l'équipement de départ - modification des acteurs (lien vers compendium de l'item source)
This commit is contained in:
@ -37,7 +37,7 @@ export class RdDRollTables {
|
||||
/* -------------------------------------------- */
|
||||
static async getCompetence(toChat = false) {
|
||||
if (toChat == 'liste') {
|
||||
return await RdDRollTables.listOrRoll('competences', 'Item', 'competence', toChat, it => 1);
|
||||
return await RdDRollTables.listOrRoll('competences', 'Item', ['competence'], toChat, it => 1);
|
||||
}
|
||||
else {
|
||||
return await RdDRollTables.drawItemFromRollTable("Détermination aléatoire de compétence", toChat);
|
||||
@ -46,49 +46,49 @@ export class RdDRollTables {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async getSouffle(toChat = false) {
|
||||
return await RdDRollTables.listOrRoll('souffles-de-dragon', 'Item', 'souffle', toChat);
|
||||
return await RdDRollTables.listOrRoll('souffles-de-dragon', 'Item', ['souffle'], toChat);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async getQueue(toChat = false) {
|
||||
return await RdDRollTables.listOrRoll('queues-de-dragon', 'Item', 'queue', toChat);
|
||||
return await RdDRollTables.listOrRoll('queues-de-dragon', 'Item', ['queue'], toChat);
|
||||
}
|
||||
|
||||
static async getDesirLancinant(toChat = false) {
|
||||
return await RdDRollTables.listOrRoll('queues-de-dragon', 'Item', 'queue', toChat,
|
||||
return await RdDRollTables.listOrRoll('queues-de-dragon', 'Item', ['queue'], toChat,
|
||||
it => it.system.frequence,
|
||||
it => it.system.categorie == 'lancinant');
|
||||
}
|
||||
|
||||
static async getIdeeFixe(toChat = false) {
|
||||
return await RdDRollTables.listOrRoll('queues-de-dragon', 'Item', 'queue', toChat,
|
||||
return await RdDRollTables.listOrRoll('queues-de-dragon', 'Item', ['queue'], toChat,
|
||||
it => it.system.frequence,
|
||||
it => it.system.categorie == 'ideefixe');
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async getTeteHR(toChat = false) {
|
||||
return await RdDRollTables.listOrRoll('tetes-de-dragon-pour-haut-revants', 'Item', 'tete', toChat);
|
||||
return await RdDRollTables.listOrRoll('tetes-de-dragon-pour-haut-revants', 'Item', ['tete'], toChat);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async getTete(toChat = false) {
|
||||
return await RdDRollTables.listOrRoll('tetes-de-dragon-pour-tous-personnages', 'Item', 'tete', toChat);
|
||||
return await RdDRollTables.listOrRoll('tetes-de-dragon-pour-tous-personnages', 'Item', ['tete'], toChat);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async getOmbre(toChat = false) {
|
||||
return await RdDRollTables.listOrRoll('ombres-de-thanatos', 'Item', 'ombre', toChat);
|
||||
return await RdDRollTables.listOrRoll('ombres-de-thanatos', 'Item', ['ombre'], toChat);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async getTarot(toChat = true) {
|
||||
return await RdDRollTables.listOrRoll('tarot-draconique', 'Item', 'tarot', toChat);
|
||||
return await RdDRollTables.listOrRoll('tarot-draconique', 'Item', ['tarot'], toChat);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async listOrRoll(compendium, type, subType, toChat, itemFrequence = it => it.system.frequence, filter = it => true) {
|
||||
const table = new CompendiumTable(compendium, type, subType);
|
||||
static async listOrRoll(compendium, type, subTypes, toChat, itemFrequence = it => it.system.frequence, filter = it => true) {
|
||||
const table = new CompendiumTable(compendium, type, subTypes);
|
||||
if (toChat == 'liste') {
|
||||
return await table.toChatMessage(itemFrequence, filter);
|
||||
}
|
||||
|
Reference in New Issue
Block a user