diff --git a/icons/objets/.directory b/icons/objets/.directory index a0f4debc..a74062ca 100644 --- a/icons/objets/.directory +++ b/icons/objets/.directory @@ -1,6 +1,6 @@ [Dolphin] -SortOrder=1 -Timestamp=2020,11,21,8,49,55 +SortRole=modificationtime +Timestamp=2021,1,1,20,0,59 Version=4 ViewMode=1 VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails diff --git a/icons/objets/piece_argent_sol.webp b/icons/objets/piece_argent_sol.webp new file mode 100644 index 00000000..69e826f0 Binary files /dev/null and b/icons/objets/piece_argent_sol.webp differ diff --git a/icons/objets/piece_bronze_epees.webp b/icons/objets/piece_bronze_epees.webp new file mode 100644 index 00000000..572637af Binary files /dev/null and b/icons/objets/piece_bronze_epees.webp differ diff --git a/icons/objets/piece_etain_poisson.webp b/icons/objets/piece_etain_poisson.webp new file mode 100644 index 00000000..4c57feba Binary files /dev/null and b/icons/objets/piece_etain_poisson.webp differ diff --git a/icons/objets/piece_or_sol.webp b/icons/objets/piece_or_sol.webp new file mode 100644 index 00000000..d9af8674 Binary files /dev/null and b/icons/objets/piece_or_sol.webp differ diff --git a/module/actor.js b/module/actor.js index 5d0a7414..463c1a4d 100644 --- a/module/actor.js +++ b/module/actor.js @@ -98,35 +98,35 @@ export class RdDActor extends Actor { /** * Prepare Character type specific data */ - _prepareCharacterData(actorData) { + async _prepareCharacterData(actorData) { // Initialize empty items RdDUtility.computeCarac(actorData.data); this.computeEncombrementTotalEtMalusArmure(); 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); if (!piece) { - let piece = RdDUtility.createMonnaie("Etain (1 denier)", 1); - this.createOwnedItem( piece ); + let piece = RdDUtility.createMonnaie("Etain (1 denier)", 1, "systems/foundryvtt-reve-de-dragon/icons/objets/piece_etain_poisson.webp" ); + const updated = await this.createOwnedItem( piece ); } piece = this.data.items.find( item => item.type =='monnaie' && Number(item.data.valeur_deniers) == 10); if (!piece) { - let piece = RdDUtility.createMonnaie("Bronze (10 deniers)", 10); - this.createOwnedItem( piece ); + let piece = RdDUtility.createMonnaie("Bronze (10 deniers)", 10, "systems/foundryvtt-reve-de-dragon/icons/objets/piece_bronze_epees.webp"); + const updated = await this.createOwnedItem( piece ); } piece = this.data.items.find( item => item.type =='monnaie' && Number(item.data.valeur_deniers) == 100); if (!piece) { - let piece = RdDUtility.createMonnaie("Argent (1 sol)", 100); - this.createOwnedItem( piece ); + let piece = RdDUtility.createMonnaie("Argent (1 sol)", 100, "systems/foundryvtt-reve-de-dragon/icons/objets/piece_argent_sol.webp"); + const updated = await this.createOwnedItem( piece ); } piece = this.data.items.find( item => item.type =='monnaie' && Number(item.data.valeur_deniers) == 1000); if (!piece) { - let piece = RdDUtility.createMonnaie("Or (10 sols)", 1000); - this.createOwnedItem( piece ); + let piece = RdDUtility.createMonnaie("Or (10 sols)", 1000, "systems/foundryvtt-reve-de-dragon/icons/objets/piece_or_sol.webp"); + const updated = await this.createOwnedItem( piece ); } } @@ -2147,7 +2147,7 @@ export class RdDActor extends Actor { } /* -------------------------------------------- */ - payerDenier( sumDenier ) { + async payerDenier( sumDenier, dataObj ) { sumDenier = Number(sumDenier); let denierDisponible = 0; 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); } console.log("DENIER", game.user.character, sumDenier, denierDisponible); + + let msg = ""; if ( denierDisponible >= sumDenier) { denierDisponible -= sumDenier; this.optimizeArgent(denierDisponible); + msg = `Vous avez payé ${sumDenier} Deniers, qui ont été soustraits de votre argent.`; } else { - let message = { - whisper: ChatUtility.getWhisperRecipientsAndGMs( this.name ), - content : "Vous n'avez pas assez d'argent pour paye cette somme !" - }; - ChatMessage.create( message ); + msg = "Vous n'avez pas assez d'argent pour paye cette somme !"; } + + if ( dataObj ) { + dataObj.payload.data.cout = sumDenier / 100; // Mise à jour du prix en sols , avec le prix acheté + await this.createOwnedItem( dataObj.payload ); + msg += `
Et l'objet ${dataObj.payload.name} a été ajouté à votre inventaire.`; + } + + let message = { + whisper: ChatUtility.getWhisperRecipientsAndGMs( this.name ), + content : msg + }; + ChatMessage.create( message ); } /* -------------------------------------------- */ diff --git a/module/item-rdd.js b/module/item-rdd.js new file mode 100644 index 00000000..e77f0e39 --- /dev/null +++ b/module/item-rdd.js @@ -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 : + ` + +

Modifier la prix?

+
+ + +
+ `, + 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 = [ + `Encombrement: ${data.encombrement}` + ] + return properties; + } + /* -------------------------------------------- */ + _armeChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Compétence: ${data.competence}`, + `Dommages: ${data.dommages}`, + `Force minimum: ${data.force}`, + `Resistance: ${data.resistance}`, + `Encombrement: ${data.encombrement}` + ] + return properties; + } + /* -------------------------------------------- */ + _conteneurChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Capacité: ${data.capacite} Enc.`, + `Encombrement: ${data.encombrement}` + ] + return properties; + } + /* -------------------------------------------- */ + _munitionChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Encombrement: ${data.encombrement}` + ] + return properties; + } + /* -------------------------------------------- */ + _armureChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Protection: ${data.protection}`, + `Détérioration: ${data.deterioration}`, + `Malus armure: ${data.malus}`, + `Encombrement: ${data.encombrement}` + ] + return properties; + } + /* -------------------------------------------- */ + _competenceChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Catégorie: ${data.categorie}`, + `Niveau: ${data.niveau}`, + `Caractéristique par défaut: ${data.carac_defaut}`, + `XP: ${data.xp}` + ] + return properties; + } + /* -------------------------------------------- */ + _competencecreatureChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Catégorie: ${data.categorie}`, + `Niveau: ${data.niveau}`, + `Caractéristique: ${data.carac_value}`, + `XP: ${data.xp}` + ] + return properties; + } + /* -------------------------------------------- */ + _sortChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Draconic: ${data.draconic}`, + `Difficulté: ${data.difficulte}`, + `Case TMR: ${data.caseTMR}`, + `Points de Rêve: ${data.ptreve}` + ] + return properties; + } + /* -------------------------------------------- */ + _herbeChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Milieu: ${data.milieu}`, + `Rareté: ${data.rarete}`, + `Catégorie: ${data.categorie}`, + ] + return properties; + } + /* -------------------------------------------- */ + _ingredientChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Milieu: ${data.milieu}`, + `Rareté: ${data.rarete}`, + `Catégorie: ${data.categorie}`, + ] + return properties; + } + /* -------------------------------------------- */ + _tacheChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Caractéristique: ${data.carac}`, + `Compétence: ${data.competence}`, + `Périodicité: ${data.periodicite}`, + `Fatigue: ${data.fatigue}`, + `Difficulté: ${data.difficulte}`, + `Points de Tâche: ${data.points_de_tache}`, + `Points de Tâche atteints: ${data.points_de_tache_courant}` + ] + return properties; + } + /* -------------------------------------------- */ + _livreChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Compétence: ${data.competence}`, + `Auteur: ${data.auteur}`, + `Difficulté: ${data.difficulte}`, + `Points de Tâche: ${data.points_de_tache}`, + `Encombrement: ${data.encombrement}` + ] + return properties; + } + /* -------------------------------------------- */ + _potionChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Rareté: ${data.rarete}`, + `Catégorie: ${data.categorie}`, + `Encombrement: ${data.encombrement}`, + ] + return properties; + } + /* -------------------------------------------- */ + _queueChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Refoulement: ${data.refoulement}` + ] + return properties; + } + /* -------------------------------------------- */ + _ombreChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Refoulement: ${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 = [ + `Concept: ${data.concept}`, + `Aspect: ${data.aspect}`, + ] + return properties; + } + /* -------------------------------------------- */ + _nombreastralChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Valeur: ${data.value}`, + `Jour: ${data.jourlabel}`, + ] + return properties; + } + /* -------------------------------------------- */ + _monnaieChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Valeur en Deniers: ${data.valeur_deniers}`, + `Encombrement: ${data.encombrement}` + ] + return properties; + } + /* -------------------------------------------- */ + _meditationChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Thème: ${data.theme}`, + `Compétence: ${data.competence}`, + `Support: ${data.support}`, + `Heure: ${data.heure}`, + `Purification: ${data.purification}`, + `Vêture: ${data.veture}`, + `Comportement: ${data.comportement}`, + `Case TMR: ${data.tmr}` + ] + return properties; + } + /* -------------------------------------------- */ + _casetmrChatData() { + const data = duplicate(this.data.data); + let properties = [ + `Coordonnée: ${data.coord}`, + `Spécificité: ${data.specific}` + ] + return properties; + } + +} diff --git a/module/item-sheet.js b/module/item-sheet.js index 4b216f39..836b456b 100644 --- a/module/item-sheet.js +++ b/module/item-sheet.js @@ -1,5 +1,6 @@ import { RdDItemSort } from "./item-sort.js"; import { RdDUtility } from "./rdd-utility.js"; +import { RdDItem } from "./item-rdd.js"; /** * 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 */ setPosition(options={}) { const position = super.setPosition(options); diff --git a/module/rdd-utility.js b/module/rdd-utility.js index c4672192..dfe8fb23 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -195,7 +195,9 @@ export class RdDUtility { 'systems/foundryvtt-reve-de-dragon/templates/editor-notes-mj.html', // HUD '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); @@ -886,14 +888,23 @@ export class RdDUtility { // Gestion du bouton payer html.on("click", '#payer-button', event => { let sumdenier = event.currentTarget.attributes['data-somme-denier'].value; - if (game.user.character ) - game.user.character.payerDenier(sumdenier); + let jsondata = event.currentTarget.attributes['data-jsondata'].value + 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) { - let piece = { name: name, type: 'monnaie', _id: randomID(), + static createMonnaie( name, valeur_deniers, img = "", enc = 0.01) { + let piece = { name: name, type: 'monnaie', _id: randomID(), img: img, data: { quantite: 0, valeur_deniers: valeur_deniers, @@ -921,7 +932,28 @@ export class RdDUtility { 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.
"; - msgPayer += "Payer" + msgPayer += "Payer" 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; + } + } diff --git a/packs/equipement.db b/packs/equipement.db index 405075ac..3d9e964d 100644 --- a/packs/equipement.db +++ b/packs/equipement.db @@ -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":"0ylGrNMzulUaKFP9","name":"Boralm","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"ingredient","data":{"description":"

Poudre brune apparaissant sur les parois des grottes.

\n

VUE/Alchimie à -1.

","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":"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":"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":"

C’est une épée longue, plus robuste que l’esparlongue, pouvant également frapper de taille.

","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":"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":"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":"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":"

Peut tirer tous les rounds.

","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":"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":"fDwsTMuug0Z5BdaA","name":"Cuir / Metal","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"armure","data":{"description":"

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.

\n

 

","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":"

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.

\n

 

","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":"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":[]} @@ -152,7 +152,7 @@ {"_id":"keLCmhsbxHK39UIy","name":"Mirobolant","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"potion","data":{"description":"

Fluide.

\n

Liquide rougeâtre clair et sans dépot.

","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":"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":"

Nie jusqu'à 2 points d'armure.

\n

Rechargement 1 round.

","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":"

Nie jusqu'à 2 points d'armure.

\n

Rechargement 1 round.

","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":"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":"

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.

","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":"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":"lOI2HVu3B6EDY4sE","name":"Arbalète","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"

Nie jusqu'à 2 points d'armure.

\n

Rechargement 1 round.

","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":"

Nie jusqu'à 2 points d'armure.

\n

Rechargement 1 round.

","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":"

Nie jusqu'à 2 points d'armure.

\n

Rechargement 1 round.

","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":"

Nie jusqu'à 2 points d'armure.

\n

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).

","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":"

Comme une bourse, mais sous forme d'une coque en cuir rigide.

","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":"

Nie jusqu'à 2 points d'armure.

\n

Rechargement 1 round.

","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":"

Nie jusqu'à 2 points d'armure.

\n

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).

","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":"

Comme une bourse, mais sous forme d'une coque en cuir rigide.

","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":"

Nie jusqu'à 2 points d'armure.

\n

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).

","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":[]} diff --git a/styles/simple.css b/styles/simple.css index e190cb0d..2bf7790a 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1249,4 +1249,31 @@ display: inline-flex; .tooltip:hover .tooltiptext { visibility: visible; opacity: 1; -} \ No newline at end of file +} + +.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; +} diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 5efded6b..69803ff8 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -614,9 +614,11 @@ {{!-- Equipment Tab --}}
+ Argent et Monnaies -