2021-04-12 00:16:23 +02:00
|
|
|
import { Grammar } from "./grammar.js";
|
2021-03-22 20:10:37 +01:00
|
|
|
import { Misc } from "./misc.js";
|
2021-01-01 21:11:56 +01:00
|
|
|
import { RdDUtility } from "./rdd-utility.js";
|
|
|
|
|
2021-04-08 20:37:11 +02:00
|
|
|
const typesObjetsEquipement = ["objet", "arme", "armure", "conteneur", "herbe", "ingredient", "livre", "potion", "munition", "nourritureboisson", "monnaie"];
|
2021-04-06 23:36:35 +02:00
|
|
|
const typesObjetsOeuvres = ["oeuvre", "recettecuisine", "musique", "chant", "danse", "jeu"];
|
2021-04-11 23:01:57 +02:00
|
|
|
const encBrin = 0.00005;
|
2021-01-01 21:11:56 +01:00
|
|
|
/* -------------------------------------------- */
|
|
|
|
export class RdDItem extends Item {
|
|
|
|
|
2021-04-06 23:36:35 +02:00
|
|
|
static getTypeObjetsEquipement() {
|
|
|
|
return typesObjetsEquipement;
|
|
|
|
}
|
2021-04-11 18:43:32 +02:00
|
|
|
|
2021-04-06 23:36:35 +02:00
|
|
|
static getTypesOeuvres() {
|
|
|
|
return typesObjetsOeuvres;
|
|
|
|
}
|
2021-04-11 18:43:32 +02:00
|
|
|
|
2021-04-06 23:36:35 +02:00
|
|
|
prepareDerivedData() {
|
|
|
|
super.prepareDerivedData();
|
2021-04-12 00:16:23 +02:00
|
|
|
const itemData = Misc.data(this);
|
|
|
|
if (RdDItem.getTypeObjetsEquipement().includes(itemData.type)) {
|
2021-04-11 18:47:00 +02:00
|
|
|
this._calculsEquipement();
|
2021-04-08 20:37:11 +02:00
|
|
|
}
|
2021-04-12 00:16:23 +02:00
|
|
|
if (itemData.type == 'potion') {
|
|
|
|
this.prepareDataPotion()
|
|
|
|
}
|
|
|
|
itemData.data.actionPrincipale = this.getActionPrincipale({ warnIfNot: false });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
prepareDataPotion() {
|
|
|
|
const tplData = Misc.templateData(this);
|
|
|
|
const categorie = Grammar.toLowerCaseNoAccent(tplData.categorie);
|
|
|
|
tplData.isEnchante = categorie.includes('enchante');
|
|
|
|
if (tplData.isEnchante) {
|
|
|
|
if (categorie.includes('soin') || categorie.includes('repos')) {
|
|
|
|
tplData.puissance = tplData.herbebonus * tplData.pr;
|
|
|
|
}
|
|
|
|
}
|
2021-04-08 20:37:11 +02:00
|
|
|
}
|
2021-04-11 18:47:00 +02:00
|
|
|
|
|
|
|
_calculsEquipement() {
|
|
|
|
const tplData = Misc.templateData(this);
|
|
|
|
const quantite = Misc.data(this).type == 'conteneur' ? 1 : (tplData.quantite ?? 0);
|
2021-04-11 23:01:57 +02:00
|
|
|
const enc = this.getEnc();
|
|
|
|
if (enc != undefined) {
|
|
|
|
tplData.encTotal = Math.max(enc, 0) * quantite;
|
2021-04-08 20:37:11 +02:00
|
|
|
}
|
|
|
|
if (tplData.cout != undefined) {
|
|
|
|
tplData.prixTotal = Math.max(tplData.cout, 0) * quantite;
|
2021-04-06 23:36:35 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-11 23:01:57 +02:00
|
|
|
getEnc() {
|
|
|
|
const itemData = Misc.data(this);
|
2021-04-12 00:16:23 +02:00
|
|
|
switch (itemData.type) {
|
2021-04-11 23:01:57 +02:00
|
|
|
case 'herbe':
|
|
|
|
return encBrin;
|
|
|
|
}
|
|
|
|
return itemData.data.encombrement
|
|
|
|
}
|
2021-04-11 18:47:00 +02:00
|
|
|
|
2021-04-12 00:16:23 +02:00
|
|
|
getActionPrincipale(options = { warnIfNot: true }) {
|
2021-04-11 23:01:10 +02:00
|
|
|
const itemData = Misc.data(this);
|
|
|
|
if ((itemData.data.quantite ?? 0) <= 0) {
|
|
|
|
if (options.warnIfNot) {
|
|
|
|
ui.notifications.warn(`Vous n'avez plus de ${itemData.name}.`);
|
|
|
|
}
|
2021-04-12 00:16:23 +02:00
|
|
|
return undefined;
|
2021-04-11 23:01:10 +02:00
|
|
|
}
|
|
|
|
switch (itemData.type) {
|
2021-04-12 00:16:23 +02:00
|
|
|
case 'nourritureboisson': return itemData.data.boisson ? 'Boire' : 'Manger';
|
|
|
|
case 'potion': return 'Boire';
|
2021-04-11 23:01:10 +02:00
|
|
|
}
|
|
|
|
if (options.warnIfNot) {
|
2021-04-12 00:16:23 +02:00
|
|
|
ui.notifications.warn(`Impossible d'utilise un ${itemData.name}, aucune action associée définie.`);
|
2021-04-11 23:01:10 +02:00
|
|
|
}
|
2021-04-12 00:16:23 +02:00
|
|
|
|
|
|
|
return undefined;
|
2021-04-11 23:01:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
isAlcool() {
|
|
|
|
const itemData = Misc.data(this);
|
|
|
|
return itemData.type == 'nourritureboisson' && itemData.data.boisson && itemData.data.alcoolise;
|
|
|
|
}
|
|
|
|
|
2021-04-12 01:03:37 +02:00
|
|
|
async diminuerQuantite(nombre, options = { diminuerQuantite: true, supprimerSiZero: false }) {
|
|
|
|
if (options.diminuerQuantite == false) return;
|
2021-04-11 18:47:00 +02:00
|
|
|
const itemData = Misc.data(this);
|
|
|
|
const quantite = itemData.data.quantite;
|
|
|
|
if (quantite != undefined) {
|
|
|
|
const reste = Math.max(quantite - nombre, 0);
|
2021-04-12 01:03:37 +02:00
|
|
|
|
|
|
|
if (options.supprimerSiZero && reste == 0) {
|
|
|
|
ui.notifications.notify(`${itemData.name} supprimé de votre équipement`);
|
|
|
|
await this.delete();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
ui.notifications.notify(`Quantité de ${itemData.name} réduite de ${nombre}.${reste == 0
|
|
|
|
? "Il ne vous en reste plus, vous pouvez le supprimer de votre équipement, ou trouver un moyen de vous en procurer."
|
|
|
|
: ""}`);
|
|
|
|
await this.update({ "data.quantite": reste });
|
|
|
|
}
|
2021-04-11 18:47:00 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-01 21:11:56 +01:00
|
|
|
/* -------------------------------------------- */
|
|
|
|
async postItem() {
|
|
|
|
console.log(this);
|
2021-04-11 18:47:00 +02:00
|
|
|
let chatData = duplicate(Misc.data(this));
|
|
|
|
const properties = this[`_${chatData.type}ChatData`]();
|
2021-01-01 21:11:56 +01:00
|
|
|
chatData["properties"] = properties
|
|
|
|
|
|
|
|
//Check if the posted item should have availability/pay buttons
|
|
|
|
chatData.hasPrice = "cout" in chatData.data;
|
|
|
|
chatData.data.cout_deniers = 0;
|
|
|
|
|
|
|
|
let dialogResult = [-1, -1]; // dialogResult[0] = quantité, dialogResult[1] = prix
|
2021-04-06 23:36:35 +02:00
|
|
|
if (chatData.hasPrice) {
|
2021-04-11 18:47:00 +02:00
|
|
|
chatData.data.cout_deniers = Math.floor(chatData.data.cout * 100);
|
2021-04-06 23:36:35 +02:00
|
|
|
dialogResult = await new Promise((resolve, reject) => {
|
|
|
|
new Dialog({
|
|
|
|
content:
|
|
|
|
`<p>Modifier la quantité?</p>
|
2021-01-11 18:04:26 +01:00
|
|
|
<div class="form-group">
|
2021-01-01 21:11:56 +01:00
|
|
|
<label> Quantité</label>
|
2021-01-29 21:03:32 +01:00
|
|
|
<input name="quantity" type="text" value="1"/>
|
2021-01-01 21:11:56 +01:00
|
|
|
</div>
|
|
|
|
<p>Modifier la prix?</p>
|
|
|
|
<div class="form-group">
|
|
|
|
<label> Prix en Sols</label>
|
|
|
|
<input name="price" type="text" value="${chatData.data.cout}"/>
|
|
|
|
</div>
|
|
|
|
`,
|
2021-04-06 23:36:35 +02:00
|
|
|
title: "Quantité & Prix",
|
|
|
|
buttons: {
|
|
|
|
post: {
|
|
|
|
label: "Soumettre",
|
2021-01-01 21:11:56 +01:00
|
|
|
callback: (dlg) => {
|
2021-04-11 18:47:00 +02:00
|
|
|
resolve([Number(dlg.find('[name="quantity"]').val()), Number(dlg.find('[name="price"]').val())])
|
2021-01-01 21:11:56 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}).render(true)
|
|
|
|
})
|
2021-04-06 23:36:35 +02:00
|
|
|
}
|
|
|
|
|
2021-04-11 18:47:00 +02:00
|
|
|
let quantiteEnvoi = Math.min(dialogResult[0], chatData.data.quantite);
|
|
|
|
const prixTotal = dialogResult[1];
|
|
|
|
if (quantiteEnvoi > 0) {
|
2021-04-06 23:36:35 +02:00
|
|
|
if (this.isOwned) {
|
2021-04-11 18:47:00 +02:00
|
|
|
if (chatData.data.quantite == 0) {
|
|
|
|
quantiteEnvoi = -1
|
2021-01-01 21:11:56 +01:00
|
|
|
}
|
2021-04-11 18:47:00 +02:00
|
|
|
else if (quantiteEnvoi > chatData.data.quantite) {
|
|
|
|
quantiteEnvoi = chatData.data.quantite;
|
|
|
|
ui.notifications.notify(`Impossible de poster plus que ce que vous avez. La quantité à été réduite à ${quantiteEnvoi}.`)
|
|
|
|
}
|
|
|
|
if (quantiteEnvoi > 0) {
|
|
|
|
this.diminuerQuantite(quantiteEnvoi);
|
2021-01-01 21:11:56 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-04-06 23:36:35 +02:00
|
|
|
|
|
|
|
if (chatData.hasPrice) {
|
2021-04-11 18:47:00 +02:00
|
|
|
if (quantiteEnvoi > 0)
|
|
|
|
chatData.postQuantity = Number(quantiteEnvoi);
|
|
|
|
if (prixTotal > 0) {
|
|
|
|
chatData.postPrice = prixTotal;
|
|
|
|
chatData.data.cout_deniers = Math.floor(prixTotal * 100); // Mise à jour cout en deniers
|
2021-01-11 18:04:26 +01:00
|
|
|
}
|
|
|
|
chatData.finalPrice = Number(chatData.postPrice) * Number(chatData.postQuantity);
|
2021-01-22 10:05:30 +01:00
|
|
|
chatData.data.cout_deniers_total = chatData.data.cout_deniers * Number(chatData.postQuantity);
|
|
|
|
chatData.data.quantite = chatData.postQuantity;
|
|
|
|
console.log("POST : ", chatData.finalPrice, chatData.data.cout_deniers_total, chatData.postQuantity);
|
2021-01-01 21:11:56 +01:00
|
|
|
}
|
|
|
|
// Don't post any image for the item (which would leave a large gap) if the default image is used
|
|
|
|
if (chatData.img.includes("/blank.png"))
|
|
|
|
chatData.img = null;
|
2021-04-06 23:36:35 +02:00
|
|
|
|
2021-01-01 21:11:56 +01:00
|
|
|
// JSON object for easy creation
|
|
|
|
chatData.jsondata = JSON.stringify(
|
2021-04-06 23:36:35 +02:00
|
|
|
{
|
|
|
|
compendium: "postedItem",
|
2021-04-11 18:47:00 +02:00
|
|
|
payload: chatData,
|
2021-04-06 23:36:35 +02:00
|
|
|
});
|
|
|
|
|
2021-01-01 21:11:56 +01:00
|
|
|
renderTemplate('systems/foundryvtt-reve-de-dragon/templates/post-item.html', chatData).then(html => {
|
|
|
|
let chatOptions = RdDUtility.chatDataSetup(html);
|
|
|
|
ChatMessage.create(chatOptions)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-04-11 18:47:00 +02:00
|
|
|
static propertyIfDefined(name, val, condition) {
|
|
|
|
return condition ? [`<b>${name}</b>: ${val}`] : [];
|
|
|
|
}
|
|
|
|
|
2021-01-01 21:11:56 +01:00
|
|
|
/* -------------------------------------------- */
|
|
|
|
_objetChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Encombrement</b>: ${tplData.encombrement}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
2021-04-11 18:47:00 +02:00
|
|
|
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_nourritureboissonChatData() {
|
|
|
|
const tplData = Misc.templateData(this);
|
|
|
|
let properties = [].concat(
|
|
|
|
RdDItem.propertyIfDefined('Sustentation', tplData.sust, tplData.sust > 0),
|
|
|
|
RdDItem.propertyIfDefined('Désaltère', tplData.desaltere, tplData.boisson),
|
|
|
|
RdDItem.propertyIfDefined('Force alcool', tplData.force, tplData.boisson && tplData.alcoolise),
|
|
|
|
RdDItem.propertyIfDefined('Exotisme', tplData.qualite, tplData.qualite < 0),
|
|
|
|
RdDItem.propertyIfDefined('Qualité', tplData.qualite, tplData.qualite > 0),
|
|
|
|
[`<b>Encombrement</b>: ${tplData.encombrement}`],
|
|
|
|
);
|
|
|
|
return properties;
|
|
|
|
}
|
2021-01-01 21:11:56 +01:00
|
|
|
/* -------------------------------------------- */
|
|
|
|
_armeChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Compétence</b>: ${tplData.competence}`,
|
|
|
|
`<b>Dommages</b>: ${tplData.dommages}`,
|
|
|
|
`<b>Force minimum</b>: ${tplData.force}`,
|
|
|
|
`<b>Resistance</b>: ${tplData.resistance}`,
|
|
|
|
`<b>Encombrement</b>: ${tplData.encombrement}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_conteneurChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Capacité</b>: ${tplData.capacite} Enc.`,
|
|
|
|
`<b>Encombrement</b>: ${tplData.encombrement}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_munitionChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Encombrement</b>: ${tplData.encombrement}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_armureChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Protection</b>: ${tplData.protection}`,
|
|
|
|
`<b>Détérioration</b>: ${tplData.deterioration}`,
|
|
|
|
`<b>Malus armure</b>: ${tplData.malus}`,
|
|
|
|
`<b>Encombrement</b>: ${tplData.encombrement}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_competenceChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Catégorie</b>: ${tplData.categorie}`,
|
|
|
|
`<b>Niveau</b>: ${tplData.niveau}`,
|
|
|
|
`<b>Caractéristique par défaut</b>: ${tplData.carac_defaut}`,
|
|
|
|
`<b>XP</b>: ${tplData.xp}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_competencecreatureChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Catégorie</b>: ${tplData.categorie}`,
|
|
|
|
`<b>Niveau</b>: ${tplData.niveau}`,
|
|
|
|
`<b>Caractéristique</b>: ${tplData.carac_value}`,
|
|
|
|
`<b>XP</b>: ${tplData.xp}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_sortChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Draconic</b>: ${tplData.draconic}`,
|
|
|
|
`<b>Difficulté</b>: ${tplData.difficulte}`,
|
|
|
|
`<b>Case TMR</b>: ${tplData.caseTMR}`,
|
|
|
|
`<b>Points de Rêve</b>: ${tplData.ptreve}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_herbeChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Milieu</b>: ${tplData.milieu}`,
|
|
|
|
`<b>Rareté</b>: ${tplData.rarete}`,
|
|
|
|
`<b>Catégorie</b>: ${tplData.categorie}`,
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_ingredientChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Milieu</b>: ${tplData.milieu}`,
|
|
|
|
`<b>Rareté</b>: ${tplData.rarete}`,
|
|
|
|
`<b>Catégorie</b>: ${tplData.categorie}`,
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_tacheChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Caractéristique</b>: ${tplData.carac}`,
|
|
|
|
`<b>Compétence</b>: ${tplData.competence}`,
|
|
|
|
`<b>Périodicité</b>: ${tplData.periodicite}`,
|
|
|
|
`<b>Fatigue</b>: ${tplData.fatigue}`,
|
|
|
|
`<b>Difficulté</b>: ${tplData.difficulte}`,
|
|
|
|
`<b>Points de Tâche</b>: ${tplData.points_de_tache}`,
|
|
|
|
`<b>Points de Tâche atteints</b>: ${tplData.points_de_tache_courant}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_livreChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Compétence</b>: ${tplData.competence}`,
|
|
|
|
`<b>Auteur</b>: ${tplData.auteur}`,
|
|
|
|
`<b>Difficulté</b>: ${tplData.difficulte}`,
|
|
|
|
`<b>Points de Tâche</b>: ${tplData.points_de_tache}`,
|
|
|
|
`<b>Encombrement</b>: ${tplData.encombrement}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_potionChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Rareté</b>: ${tplData.rarete}`,
|
|
|
|
`<b>Catégorie</b>: ${tplData.categorie}`,
|
|
|
|
`<b>Encombrement</b>: ${tplData.encombrement}`,
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_queueChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Refoulement</b>: ${tplData.refoulement}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_ombreChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Refoulement</b>: ${tplData.refoulement}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_souffleChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [];
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_teteChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [];
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_tarotChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Concept</b>: ${tplData.concept}`,
|
|
|
|
`<b>Aspect</b>: ${tplData.aspect}`,
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_nombreastralChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Valeur</b>: ${tplData.value}`,
|
|
|
|
`<b>Jour</b>: ${tplData.jourlabel}`,
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_monnaieChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Valeur en Deniers</b>: ${tplData.valeur_deniers}`,
|
|
|
|
`<b>Encombrement</b>: ${tplData.encombrement}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_meditationChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Thème</b>: ${tplData.theme}`,
|
|
|
|
`<b>Compétence</b>: ${tplData.competence}`,
|
|
|
|
`<b>Support</b>: ${tplData.support}`,
|
|
|
|
`<b>Heure</b>: ${tplData.heure}`,
|
|
|
|
`<b>Purification</b>: ${tplData.purification}`,
|
|
|
|
`<b>Vêture</b>: ${tplData.veture}`,
|
|
|
|
`<b>Comportement</b>: ${tplData.comportement}`,
|
|
|
|
`<b>Case TMR</b>: ${tplData.tmr}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
_casetmrChatData() {
|
2021-04-11 18:47:00 +02:00
|
|
|
const tplData = Misc.templateData(this);
|
2021-01-01 21:11:56 +01:00
|
|
|
let properties = [
|
2021-04-11 18:47:00 +02:00
|
|
|
`<b>Coordonnée</b>: ${tplData.coord}`,
|
|
|
|
`<b>Spécificité</b>: ${tplData.specific}`
|
2021-01-01 21:11:56 +01:00
|
|
|
]
|
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|