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

View File

@ -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}`

View File

@ -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"
}
}

View File

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

View File

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