From c3316043934c91078e628627c73187b5beb44ee2 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Thu, 21 Dec 2023 21:02:11 +0100 Subject: [PATCH] Predilections et warning --- lang/fr.json | 40 +++++++++++++++--------------- modules/hawkmoon-utility.js | 2 +- system.json | 6 ++--- templates/actor-sheet.html | 2 +- templates/chat-generic-result.html | 7 ++++-- 5 files changed, 30 insertions(+), 27 deletions(-) diff --git a/lang/fr.json b/lang/fr.json index 450963c..018cee9 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -1,25 +1,25 @@ { - "ACTOR": { - "TypePersonnage": "Personnage", - "TypeCellule": "Cellule", - "TypeCreature": "Créature" + "TYPES": { + "Actor": { + "personnage": "Personnage", + "cellule": "Cellule", + "creature": "Créature" + }, + "Item": { + "artefact": "Artefact", + "arme": "Arme", + "talent": "Talent", + "historique": "Historique", + "profil": "Profil", + "competence": "Compétence", + "protection": "Protection", + "monnaie": "Monnaie", + "equipement": "Equipement", + "ressource": "Ressource", + "contact": "Contact" + + } }, - - "ITEM": { - "TypeArtefact": "Artefact", - "TypeArme": "Arme", - "TypeTalent": "Talent", - "TypeHistorique": "Historique", - "TypeProfil": "Profil", - "TypeCompetence": "Compétence", - "TypeProtection": "Protection", - "TypeMonnaie": "Monnaie", - "TypeEquipement": "Equipement", - "TypeRessource": "Ressource", - "TypeContact": "Contact" - - }, - "HAWKMOON": { "ui": { "editContact": "Modifier le contact", diff --git a/modules/hawkmoon-utility.js b/modules/hawkmoon-utility.js index 0ae3e5d..d78115b 100644 --- a/modules/hawkmoon-utility.js +++ b/modules/hawkmoon-utility.js @@ -374,7 +374,7 @@ export class HawkmoonUtility { //console.log("BEFORE COMP", rollData) if (rollData.competence) { - rollData.predilections = duplicate(rollData.competence.system.predilections.filter(pred => pred.acquise && !pred.maitrise && !pred.used) || []) + rollData.predilections = duplicate(rollData.competence.system.predilections || []) let compmod = (rollData.competence.system.niveau == 0) ? -3 : 0 rollData.diceFormula += `+${rollData.attr.value}+${rollData.competence.system.niveau}+${rollData.modificateur}+${compmod}` diff --git a/system.json b/system.json index 5ab2706..2fb0cb9 100644 --- a/system.json +++ b/system.json @@ -1,7 +1,7 @@ { "id": "fvtt-hawkmoon-cyd", "description": "Hawkmoon RPG for FoundryVTT (CYD system - French)", - "version": "11.0.8", + "version": "11.0.9", "authors": [ { "name": "Uberwald/LeRatierBretonnien", @@ -35,7 +35,7 @@ "gridUnits": "m", "license": "LICENSE.txt", "manifest": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/raw/branch/master/system.json", - "download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-11.0.8.zip", + "download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-11.0.9.zip", "languages": [ { "lang": "fr", @@ -188,7 +188,7 @@ "url": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd", "background": "systems/fvtt-hawkmoon-cyd/assets/ui/fond_hawkmoon.webp", "compatibility": { - "minimum": "10", + "minimum": "11", "verified": "11" } } \ No newline at end of file diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index a101ac9..6e7a50f 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -206,7 +206,7 @@ {{#each skill.system.predilections as |pred key|}} - {{#if pred.acquise}} + {{#if (and pred.acquise (not pred.used))}} {{pred.name}}, {{/if}} {{/each}} diff --git a/templates/chat-generic-result.html b/templates/chat-generic-result.html index be1d1cf..1d47258 100644 --- a/templates/chat-generic-result.html +++ b/templates/chat-generic-result.html @@ -86,8 +86,11 @@ {{#each predilections as |pred key|}}
  • - + {{#if (and (and pred.acquise (not pred.maitrise)) (not pred.used))}} + + {{/if}}
  • {{/each}}