Predilections et warning

This commit is contained in:
LeRatierBretonnien 2023-12-21 21:02:11 +01:00
parent 71c1e1cd29
commit c331604393
5 changed files with 30 additions and 27 deletions

View File

@ -1,25 +1,25 @@
{ {
"ACTOR": { "TYPES": {
"TypePersonnage": "Personnage", "Actor": {
"TypeCellule": "Cellule", "personnage": "Personnage",
"TypeCreature": "Créature" "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": { "HAWKMOON": {
"ui": { "ui": {
"editContact": "Modifier le contact", "editContact": "Modifier le contact",

View File

@ -374,7 +374,7 @@ export class HawkmoonUtility {
//console.log("BEFORE COMP", rollData) //console.log("BEFORE COMP", rollData)
if (rollData.competence) { 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 let compmod = (rollData.competence.system.niveau == 0) ? -3 : 0
rollData.diceFormula += `+${rollData.attr.value}+${rollData.competence.system.niveau}+${rollData.modificateur}+${compmod}` rollData.diceFormula += `+${rollData.attr.value}+${rollData.competence.system.niveau}+${rollData.modificateur}+${compmod}`

View File

@ -1,7 +1,7 @@
{ {
"id": "fvtt-hawkmoon-cyd", "id": "fvtt-hawkmoon-cyd",
"description": "Hawkmoon RPG for FoundryVTT (CYD system - French)", "description": "Hawkmoon RPG for FoundryVTT (CYD system - French)",
"version": "11.0.8", "version": "11.0.9",
"authors": [ "authors": [
{ {
"name": "Uberwald/LeRatierBretonnien", "name": "Uberwald/LeRatierBretonnien",
@ -35,7 +35,7 @@
"gridUnits": "m", "gridUnits": "m",
"license": "LICENSE.txt", "license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/raw/branch/master/system.json", "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": [ "languages": [
{ {
"lang": "fr", "lang": "fr",
@ -188,7 +188,7 @@
"url": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd", "url": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd",
"background": "systems/fvtt-hawkmoon-cyd/assets/ui/fond_hawkmoon.webp", "background": "systems/fvtt-hawkmoon-cyd/assets/ui/fond_hawkmoon.webp",
"compatibility": { "compatibility": {
"minimum": "10", "minimum": "11",
"verified": "11" "verified": "11"
} }
} }

View File

@ -206,7 +206,7 @@
<span class="predilection-text"> <span class="predilection-text">
{{#each skill.system.predilections as |pred key|}} {{#each skill.system.predilections as |pred key|}}
{{#if pred.acquise}} {{#if (and pred.acquise (not pred.used))}}
{{pred.name}}, {{pred.name}},
{{/if}} {{/if}}
{{/each}} {{/each}}

View File

@ -86,8 +86,11 @@
{{#each predilections as |pred key|}} {{#each predilections as |pred key|}}
<li> <li>
{{#if (and (and pred.acquise (not pred.maitrise)) (not pred.used))}}
<button class="chat-card-button predilection-reroll" data-predilection-index="{{key}}">Predilection : <button class="chat-card-button predilection-reroll" data-predilection-index="{{key}}">Predilection :
{{pred.name}}</button> {{pred.name}}
</button>
{{/if}}
</li> </li>
{{/each}} {{/each}}