88 Gestion argent/commerce
This commit is contained in:
parent
3c2241197a
commit
dc57058465
@ -1,6 +1,6 @@
|
|||||||
[Dolphin]
|
[Dolphin]
|
||||||
SortOrder=1
|
SortRole=modificationtime
|
||||||
Timestamp=2020,11,21,8,49,55
|
Timestamp=2021,1,1,20,0,59
|
||||||
Version=4
|
Version=4
|
||||||
ViewMode=1
|
ViewMode=1
|
||||||
VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails
|
VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails
|
||||||
|
BIN
icons/objets/piece_argent_sol.webp
Normal file
BIN
icons/objets/piece_argent_sol.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
icons/objets/piece_bronze_epees.webp
Normal file
BIN
icons/objets/piece_bronze_epees.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
icons/objets/piece_etain_poisson.webp
Normal file
BIN
icons/objets/piece_etain_poisson.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
icons/objets/piece_or_sol.webp
Normal file
BIN
icons/objets/piece_or_sol.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
@ -98,35 +98,35 @@ export class RdDActor extends Actor {
|
|||||||
/**
|
/**
|
||||||
* Prepare Character type specific data
|
* Prepare Character type specific data
|
||||||
*/
|
*/
|
||||||
_prepareCharacterData(actorData) {
|
async _prepareCharacterData(actorData) {
|
||||||
// Initialize empty items
|
// Initialize empty items
|
||||||
RdDUtility.computeCarac(actorData.data);
|
RdDUtility.computeCarac(actorData.data);
|
||||||
this.computeEncombrementTotalEtMalusArmure();
|
this.computeEncombrementTotalEtMalusArmure();
|
||||||
this.computeEtatGeneral();
|
this.computeEtatGeneral();
|
||||||
this.checkMonnaiePresence();
|
await this.checkMonnaiePresence();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
checkMonnaiePresence( ) { // Ajout opportuniste si les pièces n'existent pas.
|
async checkMonnaiePresence( ) { // Ajout opportuniste si les pièces n'existent pas.
|
||||||
let piece = this.data.items.find( item => item.type =='monnaie' && Number(item.data.valeur_deniers) == 1);
|
let piece = this.data.items.find( item => item.type =='monnaie' && Number(item.data.valeur_deniers) == 1);
|
||||||
if (!piece) {
|
if (!piece) {
|
||||||
let piece = RdDUtility.createMonnaie("Etain (1 denier)", 1);
|
let piece = RdDUtility.createMonnaie("Etain (1 denier)", 1, "systems/foundryvtt-reve-de-dragon/icons/objets/piece_etain_poisson.webp" );
|
||||||
this.createOwnedItem( piece );
|
const updated = await this.createOwnedItem( piece );
|
||||||
}
|
}
|
||||||
piece = this.data.items.find( item => item.type =='monnaie' && Number(item.data.valeur_deniers) == 10);
|
piece = this.data.items.find( item => item.type =='monnaie' && Number(item.data.valeur_deniers) == 10);
|
||||||
if (!piece) {
|
if (!piece) {
|
||||||
let piece = RdDUtility.createMonnaie("Bronze (10 deniers)", 10);
|
let piece = RdDUtility.createMonnaie("Bronze (10 deniers)", 10, "systems/foundryvtt-reve-de-dragon/icons/objets/piece_bronze_epees.webp");
|
||||||
this.createOwnedItem( piece );
|
const updated = await this.createOwnedItem( piece );
|
||||||
}
|
}
|
||||||
piece = this.data.items.find( item => item.type =='monnaie' && Number(item.data.valeur_deniers) == 100);
|
piece = this.data.items.find( item => item.type =='monnaie' && Number(item.data.valeur_deniers) == 100);
|
||||||
if (!piece) {
|
if (!piece) {
|
||||||
let piece = RdDUtility.createMonnaie("Argent (1 sol)", 100);
|
let piece = RdDUtility.createMonnaie("Argent (1 sol)", 100, "systems/foundryvtt-reve-de-dragon/icons/objets/piece_argent_sol.webp");
|
||||||
this.createOwnedItem( piece );
|
const updated = await this.createOwnedItem( piece );
|
||||||
}
|
}
|
||||||
piece = this.data.items.find( item => item.type =='monnaie' && Number(item.data.valeur_deniers) == 1000);
|
piece = this.data.items.find( item => item.type =='monnaie' && Number(item.data.valeur_deniers) == 1000);
|
||||||
if (!piece) {
|
if (!piece) {
|
||||||
let piece = RdDUtility.createMonnaie("Or (10 sols)", 1000);
|
let piece = RdDUtility.createMonnaie("Or (10 sols)", 1000, "systems/foundryvtt-reve-de-dragon/icons/objets/piece_or_sol.webp");
|
||||||
this.createOwnedItem( piece );
|
const updated = await this.createOwnedItem( piece );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2147,7 +2147,7 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
payerDenier( sumDenier ) {
|
async payerDenier( sumDenier, dataObj ) {
|
||||||
sumDenier = Number(sumDenier);
|
sumDenier = Number(sumDenier);
|
||||||
let denierDisponible = 0;
|
let denierDisponible = 0;
|
||||||
let monnaie = this.data.items.filter( item => item.type =='monnaie');
|
let monnaie = this.data.items.filter( item => item.type =='monnaie');
|
||||||
@ -2155,16 +2155,27 @@ export class RdDActor extends Actor {
|
|||||||
denierDisponible += piece.data.valeur_deniers * Number(piece.data.quantite);
|
denierDisponible += piece.data.valeur_deniers * Number(piece.data.quantite);
|
||||||
}
|
}
|
||||||
console.log("DENIER", game.user.character, sumDenier, denierDisponible);
|
console.log("DENIER", game.user.character, sumDenier, denierDisponible);
|
||||||
|
|
||||||
|
let msg = "";
|
||||||
if ( denierDisponible >= sumDenier) {
|
if ( denierDisponible >= sumDenier) {
|
||||||
denierDisponible -= sumDenier;
|
denierDisponible -= sumDenier;
|
||||||
this.optimizeArgent(denierDisponible);
|
this.optimizeArgent(denierDisponible);
|
||||||
|
msg = `Vous avez payé <strong>${sumDenier} Deniers</strong>, qui ont été soustraits de votre argent.`;
|
||||||
} else {
|
} else {
|
||||||
let message = {
|
msg = "Vous n'avez pas assez d'argent pour paye cette somme !";
|
||||||
whisper: ChatUtility.getWhisperRecipientsAndGMs( this.name ),
|
|
||||||
content : "Vous n'avez pas assez d'argent pour paye cette somme !"
|
|
||||||
};
|
|
||||||
ChatMessage.create( message );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( dataObj ) {
|
||||||
|
dataObj.payload.data.cout = sumDenier / 100; // Mise à jour du prix en sols , avec le prix acheté
|
||||||
|
await this.createOwnedItem( dataObj.payload );
|
||||||
|
msg += `<br>Et l'objet <strong>${dataObj.payload.name}</strong> a été ajouté à votre inventaire.`;
|
||||||
|
}
|
||||||
|
|
||||||
|
let message = {
|
||||||
|
whisper: ChatUtility.getWhisperRecipientsAndGMs( this.name ),
|
||||||
|
content : msg
|
||||||
|
};
|
||||||
|
ChatMessage.create( message );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
307
module/item-rdd.js
Normal file
307
module/item-rdd.js
Normal file
@ -0,0 +1,307 @@
|
|||||||
|
import { RdDUtility } from "./rdd-utility.js";
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
export class RdDItem extends Item {
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async postItem() {
|
||||||
|
console.log(this);
|
||||||
|
const properties = this[`_${this.data.type}ChatData`]();
|
||||||
|
let chatData = duplicate(this.data);
|
||||||
|
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
|
||||||
|
if (chatData.hasPrice )
|
||||||
|
{
|
||||||
|
let sols = chatData.data.cout;
|
||||||
|
chatData.data.cout_deniers = Math.floor(sols * 100);
|
||||||
|
dialogResult = await new Promise( (resolve, reject) => {new Dialog({
|
||||||
|
content :
|
||||||
|
`<p hidden>Modifier la quantité?</p>
|
||||||
|
<div hidden class="form-group">
|
||||||
|
<label> Quantité</label>
|
||||||
|
<input name="quantity" type="text" placeholder="Ne rien mettre pour quantité infinie"/>
|
||||||
|
</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>
|
||||||
|
`,
|
||||||
|
title : "Quantité",
|
||||||
|
buttons : {
|
||||||
|
post : {
|
||||||
|
label : "Soumettre",
|
||||||
|
callback: (dlg) => {
|
||||||
|
resolve( [ dlg.find('[name="quantity"]').val(), dlg.find('[name="price"]').val() ] )
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}).render(true)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dialogResult[0] > 0)
|
||||||
|
{
|
||||||
|
if (this.isOwned)
|
||||||
|
{
|
||||||
|
if (this.data.data.quantite == 0)
|
||||||
|
dialogResult[0] = -1
|
||||||
|
else if (this.data.data.quantite < dialogResult[0])
|
||||||
|
{
|
||||||
|
dialogResult[0] = this.data.data.quantite
|
||||||
|
ui.notifications.notify(`Impossible de poster plus que ce que vous avez. La quantité à été réduite à ${dialogResult[0]}.`)
|
||||||
|
this.update({"data.quantite" : 0})
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ui.notifications.notify(`Quantité réduite par ${dialogResult[0]}.`)
|
||||||
|
this.update({"data.quantite" : this.data.data.quantite - dialogResult[0]})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dialogResult[0] > 0)
|
||||||
|
chatData.postQuantity = dialogResult[0];
|
||||||
|
if (dialogResult[1] > 0) {
|
||||||
|
chatData.postPrice = dialogResult[1];
|
||||||
|
chatData.data.cout_deniers = Math.floor(dialogResult[1] * 100); // Mise à jour cout en deniers
|
||||||
|
}
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
// JSON object for easy creation
|
||||||
|
chatData.jsondata = JSON.stringify(
|
||||||
|
{
|
||||||
|
compendium : "postedItem",
|
||||||
|
payload: this.data,
|
||||||
|
});
|
||||||
|
|
||||||
|
renderTemplate('systems/foundryvtt-reve-de-dragon/templates/post-item.html', chatData).then(html => {
|
||||||
|
let chatOptions = RdDUtility.chatDataSetup(html);
|
||||||
|
ChatMessage.create(chatOptions)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_objetChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Encombrement</b>: ${data.encombrement}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_armeChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Compétence</b>: ${data.competence}`,
|
||||||
|
`<b>Dommages</b>: ${data.dommages}`,
|
||||||
|
`<b>Force minimum</b>: ${data.force}`,
|
||||||
|
`<b>Resistance</b>: ${data.resistance}`,
|
||||||
|
`<b>Encombrement</b>: ${data.encombrement}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_conteneurChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Capacité</b>: ${data.capacite} Enc.`,
|
||||||
|
`<b>Encombrement</b>: ${data.encombrement}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_munitionChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Encombrement</b>: ${data.encombrement}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_armureChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Protection</b>: ${data.protection}`,
|
||||||
|
`<b>Détérioration</b>: ${data.deterioration}`,
|
||||||
|
`<b>Malus armure</b>: ${data.malus}`,
|
||||||
|
`<b>Encombrement</b>: ${data.encombrement}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_competenceChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Catégorie</b>: ${data.categorie}`,
|
||||||
|
`<b>Niveau</b>: ${data.niveau}`,
|
||||||
|
`<b>Caractéristique par défaut</b>: ${data.carac_defaut}`,
|
||||||
|
`<b>XP</b>: ${data.xp}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_competencecreatureChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Catégorie</b>: ${data.categorie}`,
|
||||||
|
`<b>Niveau</b>: ${data.niveau}`,
|
||||||
|
`<b>Caractéristique</b>: ${data.carac_value}`,
|
||||||
|
`<b>XP</b>: ${data.xp}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_sortChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Draconic</b>: ${data.draconic}`,
|
||||||
|
`<b>Difficulté</b>: ${data.difficulte}`,
|
||||||
|
`<b>Case TMR</b>: ${data.caseTMR}`,
|
||||||
|
`<b>Points de Rêve</b>: ${data.ptreve}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_herbeChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Milieu</b>: ${data.milieu}`,
|
||||||
|
`<b>Rareté</b>: ${data.rarete}`,
|
||||||
|
`<b>Catégorie</b>: ${data.categorie}`,
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_ingredientChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Milieu</b>: ${data.milieu}`,
|
||||||
|
`<b>Rareté</b>: ${data.rarete}`,
|
||||||
|
`<b>Catégorie</b>: ${data.categorie}`,
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_tacheChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Caractéristique</b>: ${data.carac}`,
|
||||||
|
`<b>Compétence</b>: ${data.competence}`,
|
||||||
|
`<b>Périodicité</b>: ${data.periodicite}`,
|
||||||
|
`<b>Fatigue</b>: ${data.fatigue}`,
|
||||||
|
`<b>Difficulté</b>: ${data.difficulte}`,
|
||||||
|
`<b>Points de Tâche</b>: ${data.points_de_tache}`,
|
||||||
|
`<b>Points de Tâche atteints</b>: ${data.points_de_tache_courant}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_livreChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Compétence</b>: ${data.competence}`,
|
||||||
|
`<b>Auteur</b>: ${data.auteur}`,
|
||||||
|
`<b>Difficulté</b>: ${data.difficulte}`,
|
||||||
|
`<b>Points de Tâche</b>: ${data.points_de_tache}`,
|
||||||
|
`<b>Encombrement</b>: ${data.encombrement}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_potionChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Rareté</b>: ${data.rarete}`,
|
||||||
|
`<b>Catégorie</b>: ${data.categorie}`,
|
||||||
|
`<b>Encombrement</b>: ${data.encombrement}`,
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_queueChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Refoulement</b>: ${data.refoulement}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_ombreChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Refoulement</b>: ${data.refoulement}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_souffleChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [];
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_teteChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [];
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_tarotChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Concept</b>: ${data.concept}`,
|
||||||
|
`<b>Aspect</b>: ${data.aspect}`,
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_nombreastralChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Valeur</b>: ${data.value}`,
|
||||||
|
`<b>Jour</b>: ${data.jourlabel}`,
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_monnaieChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Valeur en Deniers</b>: ${data.valeur_deniers}`,
|
||||||
|
`<b>Encombrement</b>: ${data.encombrement}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_meditationChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Thème</b>: ${data.theme}`,
|
||||||
|
`<b>Compétence</b>: ${data.competence}`,
|
||||||
|
`<b>Support</b>: ${data.support}`,
|
||||||
|
`<b>Heure</b>: ${data.heure}`,
|
||||||
|
`<b>Purification</b>: ${data.purification}`,
|
||||||
|
`<b>Vêture</b>: ${data.veture}`,
|
||||||
|
`<b>Comportement</b>: ${data.comportement}`,
|
||||||
|
`<b>Case TMR</b>: ${data.tmr}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_casetmrChatData() {
|
||||||
|
const data = duplicate(this.data.data);
|
||||||
|
let properties = [
|
||||||
|
`<b>Coordonnée</b>: ${data.coord}`,
|
||||||
|
`<b>Spécificité</b>: ${data.specific}`
|
||||||
|
]
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
import { RdDItemSort } from "./item-sort.js";
|
import { RdDItemSort } from "./item-sort.js";
|
||||||
import { RdDUtility } from "./rdd-utility.js";
|
import { RdDUtility } from "./rdd-utility.js";
|
||||||
|
import { RdDItem } from "./item-rdd.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend the basic ItemSheet with some very simple modifications
|
* Extend the basic ItemSheet with some very simple modifications
|
||||||
@ -19,7 +20,20 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
_getHeaderButtons() {
|
||||||
|
let buttons = super._getHeaderButtons();
|
||||||
|
// Add "Post to chat" button
|
||||||
|
// We previously restricted this to GM and editable items only. If you ever find this comment because it broke something: eh, sorry!
|
||||||
|
buttons.unshift(
|
||||||
|
{
|
||||||
|
class: "post",
|
||||||
|
icon: "fas fa-comment",
|
||||||
|
onclick: ev => new RdDItem(this.item.data).postItem()
|
||||||
|
})
|
||||||
|
return buttons
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
/** @override */
|
/** @override */
|
||||||
setPosition(options={}) {
|
setPosition(options={}) {
|
||||||
const position = super.setPosition(options);
|
const position = super.setPosition(options);
|
||||||
|
@ -195,7 +195,9 @@ export class RdDUtility {
|
|||||||
'systems/foundryvtt-reve-de-dragon/templates/editor-notes-mj.html',
|
'systems/foundryvtt-reve-de-dragon/templates/editor-notes-mj.html',
|
||||||
// HUD
|
// HUD
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html',
|
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-attaque.html'
|
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-attaque.html',
|
||||||
|
// POST
|
||||||
|
'systems/foundryvtt-reve-de-dragon/templates/post-item.html'
|
||||||
];
|
];
|
||||||
|
|
||||||
return loadTemplates(templatePaths);
|
return loadTemplates(templatePaths);
|
||||||
@ -886,14 +888,23 @@ export class RdDUtility {
|
|||||||
// Gestion du bouton payer
|
// Gestion du bouton payer
|
||||||
html.on("click", '#payer-button', event => {
|
html.on("click", '#payer-button', event => {
|
||||||
let sumdenier = event.currentTarget.attributes['data-somme-denier'].value;
|
let sumdenier = event.currentTarget.attributes['data-somme-denier'].value;
|
||||||
if (game.user.character )
|
let jsondata = event.currentTarget.attributes['data-jsondata'].value
|
||||||
game.user.character.payerDenier(sumdenier);
|
let objData
|
||||||
|
if ( jsondata)
|
||||||
|
objData = JSON.parse(jsondata)
|
||||||
|
console.log("Demande payr : ", objData);
|
||||||
|
if (game.user.character ) {
|
||||||
|
game.user.character.payerDenier(sumdenier, objData);
|
||||||
|
} else {
|
||||||
|
let msgPayer = "Vous devez avoir un acteur relié pour effectuer le paiement";
|
||||||
|
ChatMessage.create( { content: msgPayer, whisper: [game.user] } );
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static createMonnaie( name, valeur_deniers, enc = 0.01) {
|
static createMonnaie( name, valeur_deniers, img = "", enc = 0.01) {
|
||||||
let piece = { name: name, type: 'monnaie', _id: randomID(),
|
let piece = { name: name, type: 'monnaie', _id: randomID(), img: img,
|
||||||
data: {
|
data: {
|
||||||
quantite: 0,
|
quantite: 0,
|
||||||
valeur_deniers: valeur_deniers,
|
valeur_deniers: valeur_deniers,
|
||||||
@ -921,7 +932,28 @@ export class RdDUtility {
|
|||||||
|
|
||||||
let sumtotald = sumd + (sums*100);
|
let sumtotald = sumd + (sums*100);
|
||||||
let msgPayer = "La somme de "+sums+" Sols et "+sumd+" Deniers est à payer, cliquer sur le lien ci-dessous si besoin.<br>";
|
let msgPayer = "La somme de "+sums+" Sols et "+sumd+" Deniers est à payer, cliquer sur le lien ci-dessous si besoin.<br>";
|
||||||
msgPayer += "<a id='payer-button' data-somme-denier='"+sumtotald+"'>Payer</a>"
|
msgPayer += "<a id='payer-button' class='chat-card-button' data-somme-denier='"+sumtotald+"'>Payer</a>"
|
||||||
ChatMessage.create( { content: msgPayer } );
|
ChatMessage.create( { content: msgPayer } );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static chatDataSetup(content, modeOverride, isRoll = false, forceWhisper) {
|
||||||
|
let chatData = {
|
||||||
|
user: game.user._id,
|
||||||
|
rollMode: modeOverride || game.settings.get("core", "rollMode"),
|
||||||
|
content: content
|
||||||
|
};
|
||||||
|
|
||||||
|
if (["gmroll", "blindroll"].includes(chatData.rollMode)) chatData["whisper"] = ChatMessage.getWhisperRecipients("GM").map(u => u.id);
|
||||||
|
if (chatData.rollMode === "blindroll") chatData["blind"] = true;
|
||||||
|
else if (chatData.rollMode === "selfroll") chatData["whisper"] = [game.user];
|
||||||
|
|
||||||
|
if (forceWhisper) { // Final force !
|
||||||
|
chatData["speaker"] = ChatMessage.getSpeaker();
|
||||||
|
chatData["whisper"] = ChatMessage.getWhisperRecipients(forceWhisper);
|
||||||
|
}
|
||||||
|
|
||||||
|
return chatData;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{"_id":"0Vgscex1VV4ybSUQ","name":"Bonnet de laine","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.05,"equipe":false,"resistance":0,"qualite":0,"cout":0.06},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/bonnet_laine.webp","effects":[]}
|
{"_id":"0Vgscex1VV4ybSUQ","name":"Bonnet de laine","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.05,"equipe":false,"resistance":0,"qualite":0,"cout":0.06},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/bonnet_laine.webp","effects":[]}
|
||||||
{"_id":"0ylGrNMzulUaKFP9","name":"Boralm","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"ingredient","data":{"description":"<p>Poudre brune apparaissant sur les parois des grottes.</p>\n<p>VUE/Alchimie à -1.</p>","niveau":0,"encombrement":0.001,"base":0,"quantite":1,"milieu":"Cavernes","rarete":"","categorie":"Alchimie","cout":0.03},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/boralm.webp","effects":[]}
|
{"_id":"0ylGrNMzulUaKFP9","name":"Boralm","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"ingredient","data":{"description":"<p>Poudre brune apparaissant sur les parois des grottes.</p>\n<p>VUE/Alchimie à -1.</p>","niveau":0,"encombrement":0.001,"base":0,"quantite":1,"milieu":"Cavernes","rarete":"","categorie":"Alchimie","cout":0.03},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/boralm.webp","effects":[]}
|
||||||
{"_id":"1Dc4KzZageae7lhI","name":"Balles de jongleur","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":4,"encombrement":0.1,"equipe":false,"resistance":0,"qualite":0,"cout":0.32},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/balle_jongleur.webp","effects":[]}
|
{"_id":"1Dc4KzZageae7lhI","name":"Balles de jongleur","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":4,"encombrement":0.1,"equipe":false,"resistance":0,"qualite":0,"cout":0.32},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/balle_jongleur.webp","effects":[]}
|
||||||
{"_id":"1O7IJiQSDYxJ5VsD","name":"Bouclier moyen","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"","quantite":1,"encombrement":2,"equipe":false,"dommages":"0","force":"11","resistance":15,"competence":"Bouclier","cout":6,"portee_courte":0,"portee_moyenne":0,"portee_extreme":0,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/armes_armures/bouclier_moyen.webp","effects":[]}
|
{"_id":"1O7IJiQSDYxJ5VsD","name":"Bouclier moyen","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"","quantite":1,"encombrement":2,"equipe":false,"dommages":"0","force":"11","resistance":15,"competence":"Bouclier","cout":6,"portee_courte":0,"portee_moyenne":0,"portee_extreme":0,"rapide":false,"deuxmains":false,"unemain":false,"penetration":null},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/armes_armures/bouclier_moyen.webp","effects":[]}
|
||||||
{"_id":"2y61gBIFbATQaKDl","name":"1 m2 de laine","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.2,"equipe":false,"resistance":0,"qualite":0,"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/tissu_laine.webp","effects":[]}
|
{"_id":"2y61gBIFbATQaKDl","name":"1 m2 de laine","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.2,"equipe":false,"resistance":0,"qualite":0,"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/tissu_laine.webp","effects":[]}
|
||||||
{"_id":"3DJePXhrDWQxbUeM","name":"Dé à jouer en os","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.01,"equipe":false,"resistance":0,"qualite":0,"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/des_en_os.webp","effects":[]}
|
{"_id":"3DJePXhrDWQxbUeM","name":"Dé à jouer en os","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.01,"equipe":false,"resistance":0,"qualite":0,"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/des_en_os.webp","effects":[]}
|
||||||
{"_id":"3Wk5dzp3M7Das6wh","name":"Épée dragonne","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"<p>C’est une épée <em>longue</em>, plus robuste que l’esparlongue, pouvant également frapper de taille.</p>","quantite":1,"encombrement":2,"equipe":false,"dommages":"3","force":"11","resistance":12,"competence":"Epée à 1 main","cout":20,"portee_courte":0,"portee_moyenne":0,"portee_extreme":0,"rapide":true,"deuxmains":false,"unemain":true},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/armes_armures/epee_dragonne.webp","effects":[]}
|
{"_id":"3Wk5dzp3M7Das6wh","name":"Épée dragonne","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"<p>C’est une épée <em>longue</em>, plus robuste que l’esparlongue, pouvant également frapper de taille.</p>","quantite":1,"encombrement":2,"equipe":false,"dommages":"3","force":"11","resistance":12,"competence":"Epée à 1 main","cout":20,"portee_courte":0,"portee_moyenne":0,"portee_extreme":0,"rapide":true,"deuxmains":false,"unemain":true},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/armes_armures/epee_dragonne.webp","effects":[]}
|
||||||
@ -96,7 +96,7 @@
|
|||||||
{"_id":"SsnGNjTekvB50uWa","name":"Chapeau de cuir souple","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.08,"equipe":false,"resistance":0,"qualite":0,"cout":0.5},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/chapeau_cuir.webp","effects":[]}
|
{"_id":"SsnGNjTekvB50uWa","name":"Chapeau de cuir souple","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.08,"equipe":false,"resistance":0,"qualite":0,"cout":0.5},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/chapeau_cuir.webp","effects":[]}
|
||||||
{"_id":"T9UiLcJonuHmGNwq","name":"Sols (pièces d'argent)","permission":{"default":0,"Q2G6GTdrotKzYGUC":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.005,"equipe":false,"resistance":0,"qualite":0,"cout":1},"flags":{},"img":"icons/commodities/currency/coins-assorted-mix-silver.webp","effects":[]}
|
{"_id":"T9UiLcJonuHmGNwq","name":"Sols (pièces d'argent)","permission":{"default":0,"Q2G6GTdrotKzYGUC":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.005,"equipe":false,"resistance":0,"qualite":0,"cout":1},"flags":{},"img":"icons/commodities/currency/coins-assorted-mix-silver.webp","effects":[]}
|
||||||
{"_id":"TY6Ft8a6WfxD6pD9","name":"Bobineau de fil","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.01,"equipe":false,"resistance":0,"qualite":0,"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/bobineau.webp","effects":[]}
|
{"_id":"TY6Ft8a6WfxD6pD9","name":"Bobineau de fil","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.01,"equipe":false,"resistance":0,"qualite":0,"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/bobineau.webp","effects":[]}
|
||||||
{"_id":"U6qli6TPbzj8tUdH","name":"Arme d’hast","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"","quantite":1,"encombrement":4,"equipe":false,"dommages":"4","force":"12","resistance":8,"competence":"Dague","cout":10,"portee_courte":0,"portee_moyenne":0,"portee_extreme":0,"rapide":false,"deuxmains":true,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/armes_armures/hast.webp","effects":[]}
|
{"_id":"U6qli6TPbzj8tUdH","name":"Arme d’hast","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"","quantite":1,"encombrement":4,"equipe":false,"dommages":"4","force":"12","resistance":8,"competence":"Dague","cout":10,"portee_courte":0,"portee_moyenne":0,"portee_extreme":0,"rapide":false,"deuxmains":true,"unemain":false,"penetration":null},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/armes_armures/hast.webp","effects":[]}
|
||||||
{"_id":"UDmq6CY3NsttcHe4","name":"Peigne en corne","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.04,"equipe":false,"resistance":0,"qualite":0,"cout":0.4},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/peigne.webp","effects":[]}
|
{"_id":"UDmq6CY3NsttcHe4","name":"Peigne en corne","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.04,"equipe":false,"resistance":0,"qualite":0,"cout":0.4},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/peigne.webp","effects":[]}
|
||||||
{"_id":"UICiMF3wBeLsqm8L","name":"Pipe en bois","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.04,"equipe":false,"resistance":0,"qualite":0,"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/pipe.webp","effects":[]}
|
{"_id":"UICiMF3wBeLsqm8L","name":"Pipe en bois","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.04,"equipe":false,"resistance":0,"qualite":0,"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/pipe.webp","effects":[]}
|
||||||
{"_id":"UMfXFhVhdoVQVEKy","name":"Fronde","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"<p>Peut tirer tous les rounds.</p>","quantite":1,"encombrement":0.08,"equipe":false,"dommages":1,"force":0,"resistance":0,"competence":"Fronde","cout":0.6,"portee_courte":8,"portee_moyenne":15,"portee_extreme":25,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/fronde.webp","effects":[]}
|
{"_id":"UMfXFhVhdoVQVEKy","name":"Fronde","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"<p>Peut tirer tous les rounds.</p>","quantite":1,"encombrement":0.08,"equipe":false,"dommages":1,"force":0,"resistance":0,"competence":"Fronde","cout":0.6,"portee_courte":8,"portee_moyenne":15,"portee_extreme":25,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/fronde.webp","effects":[]}
|
||||||
@ -129,7 +129,7 @@
|
|||||||
{"_id":"dBR6KXvfmjjIcwsc","name":"Pilon en marbre","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.1,"equipe":false,"resistance":0,"qualite":0,"cout":0.2},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/pilon.webp","effects":[]}
|
{"_id":"dBR6KXvfmjjIcwsc","name":"Pilon en marbre","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.1,"equipe":false,"resistance":0,"qualite":0,"cout":0.2},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/pilon.webp","effects":[]}
|
||||||
{"_id":"eK28jEeQiJdd93L3","name":"Bouclier léger","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"","quantite":1,"encombrement":1,"equipe":false,"dommages":"0","force":"8","resistance":13,"competence":"Bouclier","cout":4,"portee_courte":0,"portee_moyenne":0,"portee_extreme":0,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/armes_armures/bouclier_petit.webp","effects":[]}
|
{"_id":"eK28jEeQiJdd93L3","name":"Bouclier léger","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"","quantite":1,"encombrement":1,"equipe":false,"dommages":"0","force":"8","resistance":13,"competence":"Bouclier","cout":4,"portee_courte":0,"portee_moyenne":0,"portee_extreme":0,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/armes_armures/bouclier_petit.webp","effects":[]}
|
||||||
{"_id":"fAzYb7kkW6QxG6i6","name":"Graisse à Bottes 500g","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.2,"equipe":false,"resistance":0,"qualite":0,"cout":0.3},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/graisse_a_cuir.webp","effects":[]}
|
{"_id":"fAzYb7kkW6QxG6i6","name":"Graisse à Bottes 500g","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.2,"equipe":false,"resistance":0,"qualite":0,"cout":0.3},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/graisse_a_cuir.webp","effects":[]}
|
||||||
{"_id":"fDwsTMuug0Z5BdaA","name":"Cuir / Metal","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"armure","data":{"description":"<p>Cuir épais clouté, ou petites plaquettes, écailles ou anneaux de fer cousus sur le cuir. Pectoral ou cotte de cuir/métal + jupon ou cuissards de cuir / métal sur culottes de cuir souple + bottes de cuir / métal + casque de métal.</p>\n<p> </p>","quantite":1,"encombrement":4,"equipe":false,"protection":4,"deterioration":0,"malus":-2,"cout":20},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/armes_armures/cuir_metal.webp","effects":[]}
|
{"_id":"fDwsTMuug0Z5BdaA","name":"Cuir / Metal","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"armure","data":{"description":"<p>Cuir épais clouté, ou petites plaquettes, écailles ou anneaux de fer cousus sur le cuir. Pectoral ou cotte de cuir/métal + jupon ou cuissards de cuir / métal sur culottes de cuir souple + bottes de cuir / métal + casque de métal.</p>\n<p> </p>","quantite":1,"encombrement":4,"equipe":false,"protection":"4","deterioration":0,"malus":-2,"cout":20},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/armes_armures/cuir_metal.webp","effects":[]}
|
||||||
{"_id":"fLKFTvLWoj7juxQE","name":"Flèche, carreau","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.1,"equipe":false,"resistance":0,"qualite":0,"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/fleche.webp","effects":[]}
|
{"_id":"fLKFTvLWoj7juxQE","name":"Flèche, carreau","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.1,"equipe":false,"resistance":0,"qualite":0,"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/fleche.webp","effects":[]}
|
||||||
{"_id":"gYFprGGUUVG1Apcf","name":"Carquois","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"conteneur","data":{"description":"","capacite":2,"encombrement":0.1,"equipe":false,"qualite":0,"contenu":[],"cout":0.5},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/carquois.webp","effects":[]}
|
{"_id":"gYFprGGUUVG1Apcf","name":"Carquois","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"conteneur","data":{"description":"","capacite":2,"encombrement":0.1,"equipe":false,"qualite":0,"contenu":[],"cout":0.5},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/carquois.webp","effects":[]}
|
||||||
{"_id":"gfU7oZL1JYqF3lAW","name":"Robe de lin","permission":{"default":0,"jOzRscDxoXZWpGS6":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.1,"equipe":false,"resistance":0,"qualite":0,"cout":0.6},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/robe_lin.webp","effects":[]}
|
{"_id":"gfU7oZL1JYqF3lAW","name":"Robe de lin","permission":{"default":0,"jOzRscDxoXZWpGS6":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.1,"equipe":false,"resistance":0,"qualite":0,"cout":0.6},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/robe_lin.webp","effects":[]}
|
||||||
@ -152,7 +152,7 @@
|
|||||||
{"_id":"keLCmhsbxHK39UIy","name":"Mirobolant","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"potion","data":{"description":"<p>Fluide.</p>\n<p>Liquide rougeâtre clair et sans dépot.</p>","quantite":1,"encombrement":0.1,"rarete":"","categorie":"Alchimie","cout":2},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/mirobolant.webp","effects":[]}
|
{"_id":"keLCmhsbxHK39UIy","name":"Mirobolant","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"potion","data":{"description":"<p>Fluide.</p>\n<p>Liquide rougeâtre clair et sans dépot.</p>","quantite":1,"encombrement":0.1,"rarete":"","categorie":"Alchimie","cout":2},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/mirobolant.webp","effects":[]}
|
||||||
{"_id":"lJMKVPB5zlG9UqMD","name":"Pourpoint de velours","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.2,"equipe":false,"resistance":0,"qualite":0,"cout":8},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/pourpoint_velours.webp","effects":[]}
|
{"_id":"lJMKVPB5zlG9UqMD","name":"Pourpoint de velours","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.2,"equipe":false,"resistance":0,"qualite":0,"cout":8},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/pourpoint_velours.webp","effects":[]}
|
||||||
{"_id":"lKkYFkzWVs2TZDZP","name":"Petit pot de fard","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.04,"equipe":false,"resistance":0,"qualite":0,"cout":0.3},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/fard.webp","effects":[]}
|
{"_id":"lKkYFkzWVs2TZDZP","name":"Petit pot de fard","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.04,"equipe":false,"resistance":0,"qualite":0,"cout":0.3},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/fard.webp","effects":[]}
|
||||||
{"_id":"lOI2HVu3B6EDY4sE","name":"Arbalète","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"<p>Nie jusqu'à 2 points d'armure.</p>\n<p>Rechargement 1 round.</p>","quantite":1,"encombrement":3,"equipe":false,"dommages":"3","force":0,"resistance":0,"competence":"Arbalète","cout":30,"portee_courte":15,"portee_moyenne":30,"portee_extreme":70,"penetration":2,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/arbalete.webp","effects":[]}
|
{"_id":"lOI2HVu3B6EDY4sE","name":"Arbalète","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"<p>Nie jusqu'à 2 points d'armure.</p>\n<p>Rechargement 1 round.</p>","quantite":1,"encombrement":3,"equipe":false,"dommages":"3","force":"0","resistance":0,"competence":"Arbalète","cout":30,"portee_courte":15,"portee_moyenne":30,"portee_extreme":70,"penetration":2,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/arbalete.webp","effects":[]}
|
||||||
{"_id":"lq7pjDQESNbZOQ3n","name":"1 m2 de soie ou de velours","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0,"equipe":false,"resistance":0,"qualite":0,"cout":3},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/tissu_velours.webp","effects":[]}
|
{"_id":"lq7pjDQESNbZOQ3n","name":"1 m2 de soie ou de velours","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0,"equipe":false,"resistance":0,"qualite":0,"cout":3},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/tissu_velours.webp","effects":[]}
|
||||||
{"_id":"m9yuZjp9DK7pSqPK","name":"Lanterne à bougie","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"conteneur","data":{"description":"","capacite":0.1,"encombrement":1,"equipe":false,"qualite":0,"contenu":[],"cout":3},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/lanterne_bougie.webp","effects":[]}
|
{"_id":"m9yuZjp9DK7pSqPK","name":"Lanterne à bougie","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"conteneur","data":{"description":"","capacite":0.1,"encombrement":1,"equipe":false,"qualite":0,"contenu":[],"cout":3},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/lanterne_bougie.webp","effects":[]}
|
||||||
{"_id":"mOZodpJYobvmZO9o","name":"Le Narcolepton","permission":{"default":0,"jOzRscDxoXZWpGS6":3},"type":"livre","data":{"description":"<p>Cet ouvrage ne peut être assimilé que si l’on possède un niveau minimum de zéro en voie de Narcos. Il confère un bonus de synthèse de +3 aux sept Écailles de Protection présentées dans les règles (Venin, Maladie, Feu, Magie, Projectiles, Lames, Griffes et crocs), mais aucun bonus de points de sorts. Sa difficulté de lecture est de -4, son assimilation requiert 24 points de tâche, périodicité une heure.</p>","auteur":"anonyme","quantite":1,"difficulte":-4,"points_de_tache":24,"encombrement":0,"xp":"","cout":0},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_narcos.png","effects":[]}
|
{"_id":"mOZodpJYobvmZO9o","name":"Le Narcolepton","permission":{"default":0,"jOzRscDxoXZWpGS6":3},"type":"livre","data":{"description":"<p>Cet ouvrage ne peut être assimilé que si l’on possède un niveau minimum de zéro en voie de Narcos. Il confère un bonus de synthèse de +3 aux sept Écailles de Protection présentées dans les règles (Venin, Maladie, Feu, Magie, Projectiles, Lames, Griffes et crocs), mais aucun bonus de points de sorts. Sa difficulté de lecture est de -4, son assimilation requiert 24 points de tâche, périodicité une heure.</p>","auteur":"anonyme","quantite":1,"difficulte":-4,"points_de_tache":24,"encombrement":0,"xp":"","cout":0},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_narcos.png","effects":[]}
|
||||||
@ -200,3 +200,13 @@
|
|||||||
{"_id":"zQWlnUsd8bPySujd","name":"Aiguille à coudre","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.01,"equipe":false,"resistance":0,"qualite":0,"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/aiguille.webp","effects":[]}
|
{"_id":"zQWlnUsd8bPySujd","name":"Aiguille à coudre","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.01,"equipe":false,"resistance":0,"qualite":0,"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/aiguille.webp","effects":[]}
|
||||||
{"_id":"zYI8mDiysWtmsSyy","name":"Carquois","permission":{"default":0,"jOzRscDxoXZWpGS6":3},"type":"conteneur","data":{"description":"","capacite":2,"encombrement":0.1,"equipe":false,"qualite":0,"cout":0.5},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/carquois.webp","effects":[]}
|
{"_id":"zYI8mDiysWtmsSyy","name":"Carquois","permission":{"default":0,"jOzRscDxoXZWpGS6":3},"type":"conteneur","data":{"description":"","capacite":2,"encombrement":0.1,"equipe":false,"qualite":0,"cout":0.5},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/carquois.webp","effects":[]}
|
||||||
{"_id":"zlDa1vwmls6Uf4pt","name":"Bourse de cuir","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"conteneur","data":{"description":"","capacite":0.5,"encombrement":0.01,"equipe":false,"qualite":0,"contenu":[],"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/bourse.webp","effects":[]}
|
{"_id":"zlDa1vwmls6Uf4pt","name":"Bourse de cuir","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"conteneur","data":{"description":"","capacite":0.5,"encombrement":0.01,"equipe":false,"qualite":0,"contenu":[],"cout":0.1},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/bourse.webp","effects":[]}
|
||||||
|
{"_id":"lOI2HVu3B6EDY4sE","name":"Arbalète","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"<p>Nie jusqu'à 2 points d'armure.</p>\n<p>Rechargement 1 round.</p>","quantite":1,"encombrement":3,"equipe":false,"dommages":"3","force":"0","resistance":0,"competence":"Arbalète","cout":34,"portee_courte":15,"portee_moyenne":30,"portee_extreme":70,"penetration":2,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/arbalete.webp","effects":[]}
|
||||||
|
{"_id":"lOI2HVu3B6EDY4sE","name":"Arbalète","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"<p>Nie jusqu'à 2 points d'armure.</p>\n<p>Rechargement 1 round.</p>","quantite":1,"encombrement":3,"equipe":false,"dommages":"3","force":"0","resistance":0,"competence":"Arbalète","cout":30,"portee_courte":15,"portee_moyenne":30,"portee_extreme":70,"penetration":2,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/arbalete.webp","effects":[]}
|
||||||
|
{"_id":"lOI2HVu3B6EDY4sE","name":"Arbalète","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"<p>Nie jusqu'à 2 points d'armure.</p>\n<p>Rechargement 1 round.</p>","quantite":1,"encombrement":3,"equipe":false,"dommages":"3","force":"0","resistance":0,"competence":"Arbalète","cout":30,"portee_courte":15,"portee_moyenne":30,"portee_extreme":70,"penetration":2,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/arbalete.webp","effects":[]}
|
||||||
|
{"_id":"iGHudg5kBOfYWgwV","name":"Arc","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"<p>Nie jusqu'à 2 points d'armure.</p>\n<p>Rechargement 1/2 round (s'il tire en début de round, il pourra recharger durant le reste du round pour tirer de nouveau au début du round suivant).</p>","quantite":1,"encombrement":1,"equipe":false,"dommages":"2","force":"0","resistance":0,"competence":"Arc","cout":10,"portee_courte":10,"portee_moyenne":20,"portee_extreme":50,"penetration":2,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/arc.webp","effects":[]}
|
||||||
|
{"_id":"iCvphbPdxUcfqetd","name":"Aumônière","permission":{"default":0,"jOzRscDxoXZWpGS6":3},"type":"conteneur","data":{"description":"<p>Comme une bourse, mais sous forme d'une coque en cuir rigide.</p>","capacite":0.25,"encombrement":0,"equipe":false,"qualite":0,"cout":0.2,"contenu":[]},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/aumoniere.webp","effects":[]}
|
||||||
|
{"_id":"lOI2HVu3B6EDY4sE","name":"Arbalète","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"<p>Nie jusqu'à 2 points d'armure.</p>\n<p>Rechargement 1 round.</p>","quantite":1,"encombrement":3,"equipe":false,"dommages":"3","force":"0","resistance":0,"competence":"Arbalète","cout":30,"portee_courte":15,"portee_moyenne":30,"portee_extreme":70,"penetration":2,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/arbalete.webp","effects":[]}
|
||||||
|
{"_id":"iGHudg5kBOfYWgwV","name":"Arc","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"<p>Nie jusqu'à 2 points d'armure.</p>\n<p>Rechargement 1/2 round (s'il tire en début de round, il pourra recharger durant le reste du round pour tirer de nouveau au début du round suivant).</p>","quantite":1,"encombrement":1,"equipe":false,"dommages":"2","force":"0","resistance":0,"competence":"Arc","cout":10,"portee_courte":10,"portee_moyenne":20,"portee_extreme":50,"penetration":2,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/arc.webp","effects":[]}
|
||||||
|
{"_id":"iCvphbPdxUcfqetd","name":"Aumônière","permission":{"default":0,"jOzRscDxoXZWpGS6":3},"type":"conteneur","data":{"description":"<p>Comme une bourse, mais sous forme d'une coque en cuir rigide.</p>","capacite":0.25,"encombrement":0,"equipe":false,"qualite":0,"cout":0.2,"contenu":[]},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/aumoniere.webp","effects":[]}
|
||||||
|
{"_id":"iGHudg5kBOfYWgwV","name":"Arc","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"<p>Nie jusqu'à 2 points d'armure.</p>\n<p>Rechargement 1/2 round (s'il tire en début de round, il pourra recharger durant le reste du round pour tirer de nouveau au début du round suivant).</p>","quantite":1,"encombrement":1,"equipe":false,"dommages":"2","force":"0","resistance":0,"competence":"Arc","cout":10,"portee_courte":10,"portee_moyenne":20,"portee_extreme":50,"penetration":2,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/arc.webp","effects":[]}
|
||||||
|
{"_id":"1Dc4KzZageae7lhI","name":"Balles de jongleur","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":4,"encombrement":0.1,"equipe":false,"resistance":0,"qualite":0,"cout":0.32},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/balle_jongleur.webp","effects":[]}
|
||||||
|
@ -1249,4 +1249,31 @@ display: inline-flex;
|
|||||||
.tooltip:hover .tooltiptext {
|
.tooltip:hover .tooltiptext {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chat-card-button {
|
||||||
|
box-shadow: inset 0px 1px 0px 0px #a6827e;
|
||||||
|
background: linear-gradient(to bottom, #21374afc 5%, #152833ab 100%);
|
||||||
|
background-color: #7d5d3b00;
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 2px ridge #846109;
|
||||||
|
display: inline-block;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #ffffff;
|
||||||
|
font-family: CaslonPro;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 4px 12px 0px 12px;
|
||||||
|
text-decoration: none;
|
||||||
|
text-shadow: 0px 1px 0px #4d3534;
|
||||||
|
position: relative;
|
||||||
|
margin:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat-card-button:hover {
|
||||||
|
background: linear-gradient(to bottom, #800000 5%, #3e0101 100%);
|
||||||
|
background-color: red;
|
||||||
|
}
|
||||||
|
.chat-card-button:active {
|
||||||
|
position:relative;
|
||||||
|
top:1px;
|
||||||
|
}
|
||||||
|
@ -614,9 +614,11 @@
|
|||||||
|
|
||||||
{{!-- Equipment Tab --}}
|
{{!-- Equipment Tab --}}
|
||||||
<div class="tab items" data-group="primary" data-tab="items">
|
<div class="tab items" data-group="primary" data-tab="items">
|
||||||
|
<span class="item-name">Argent et Monnaies</b></span> -
|
||||||
<ul class="item-list alterne-list">
|
<ul class="item-list alterne-list">
|
||||||
{{#each data.monnaie as |piece id|}}
|
{{#each data.monnaie as |piece id|}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{piece._id}}">
|
<li class="item flexrow list-item" data-item-id="{{piece._id}}">
|
||||||
|
<img class="sheet-competence-img" src="{{piece.img}}" title="{{piece.name}}"/>
|
||||||
<span class="competence-title competence-label">{{piece.name}}</span>
|
<span class="competence-title competence-label">{{piece.name}}</span>
|
||||||
<span class="competence-title competence-label">{{piece.data.quantite}}</span>
|
<span class="competence-title competence-label">{{piece.data.quantite}}</span>
|
||||||
<span class="competence-title"><a class="monnaie-plus">+</a><a class="monnaie-moins">-</a></span>
|
<span class="competence-title"><a class="monnaie-plus">+</a><a class="monnaie-moins">-</a></span>
|
||||||
|
26
templates/post-item.html
Normal file
26
templates/post-item.html
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<div class="post-item" data-transfer="{{transfer}}">
|
||||||
|
<h3><b>{{name}}</b></h3>
|
||||||
|
{{#if img}}
|
||||||
|
<img src="{{img}}" title="{{name}}" />
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<div class="card-content">{{{data.description}}}</div>
|
||||||
|
|
||||||
|
{{#each properties as |property p|}}
|
||||||
|
<span>{{{property}}}</span><br>
|
||||||
|
{{/each}}
|
||||||
|
<div>
|
||||||
|
{{#if postPrice}}
|
||||||
|
<b>Prix: </b> <span class="postPrice">{{postPrice}} Sols</span>
|
||||||
|
{{/if}}
|
||||||
|
{{#if postQuantity}}
|
||||||
|
<b>Quantité: </b> <span class="postQuantity">{{postQuantity}}</span>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{#if hasPrice}}
|
||||||
|
<span class="chat-card-button-area">
|
||||||
|
<a id='payer-button' class='chat-card-button market-button' data-jsondata='{{jsondata}}' data-somme-denier="{{data.cout_deniers}}">Payer</a>
|
||||||
|
</span>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user