diff --git a/modules/hawkmoon-item-sheet.js b/modules/hawkmoon-item-sheet.js index 25d1d62..05a4f1d 100644 --- a/modules/hawkmoon-item-sheet.js +++ b/modules/hawkmoon-item-sheet.js @@ -129,13 +129,21 @@ export class HawkmoonItemSheet extends ItemSheet { html.find('.delete-subitem').click(ev => { this.deleteSubitem(ev); }) - html.find('.edit-prediction').change(ev => { + html.find('.edit-predilection').change(ev => { const li = $(ev.currentTarget).parents(".prediction-item") let index = li.data("prediction-index") let pred = duplicate(this.object.system.predilections) pred[index].name = ev.currentTarget.value this.object.update( { 'data.predilections': pred }) }) + html.find('.edit-predilection-description').change(ev => { + const li = $(ev.currentTarget).parents(".prediction-item") + let index = li.data("prediction-index") + let pred = duplicate(this.object.system.predilections) + pred[index].description = ev.currentTarget.value + this.object.update( { 'data.predilections': pred }) + }) + html.find('.delete-prediction').click(ev => { const li = $(ev.currentTarget).parents(".prediction-item") let index = li.data("prediction-index") @@ -143,7 +151,14 @@ export class HawkmoonItemSheet extends ItemSheet { pred.splice(index,1) this.object.update( { 'data.predilections': pred }) }) - html.find('.use-prediction').change(ev => { + html.find('.predilection-maitrise').change(ev => { + const li = $(ev.currentTarget).parents(".prediction-item") + let index = li.data("prediction-index") + let pred = duplicate(this.object.system.predilections) + pred[index].maitrise = ev.currentTarget.checked + this.object.update( { 'data.predilections': pred }) + }) + html.find('.predilection-used').change(ev => { const li = $(ev.currentTarget).parents(".prediction-item") let index = li.data("prediction-index") let pred = duplicate(this.object.system.predilections) diff --git a/system.json b/system.json index cfecc3e..a26ed86 100644 --- a/system.json +++ b/system.json @@ -1,7 +1,7 @@ { "id": "fvtt-hawkmoon-cyd", "description": "Hawmoon RPG for FoundryVTT (CYD system - French)", - "version": "10.0.1", + "version": "10.0.2", "authors": [ { "name": "Uberwald/LeRatierBretonnien", @@ -15,7 +15,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-10.0.1.zip", + "download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-10.0.2.zip", "packs": [ { "type": "Item", diff --git a/template.json b/template.json index 3c4e650..d9a7cde 100644 --- a/template.json +++ b/template.json @@ -125,12 +125,10 @@ "utilisation": "", "prerequis": "", "isbonus": false, + "bonusformula": "", + "bonusvalue": 0, "isbonusba": false, "coutba": 0, - "bonus": 0, - "bonuscompetence": "", - "duree": "", - "pointame": 0, "templates": [ "base" ] @@ -150,6 +148,7 @@ "talentsaguerri": "", "prerequismaitre": "", "talentsmaitre": "", + "celluleinfo": "", "equipement": "", "templates": [ "base" diff --git a/templates/item-competence-sheet.html b/templates/item-competence-sheet.html index c004ea0..af91b0b 100644 --- a/templates/item-competence-sheet.html +++ b/templates/item-competence-sheet.html @@ -65,17 +65,18 @@ {{#each system.predilections as |predilection key|}}
  • + value="{{predilection.name}}" data-dtype="String" />
  • + data-dtype="String">{{predilection.description}}
  • - - + + +
  • diff --git a/templates/item-profil-sheet.html b/templates/item-profil-sheet.html index de45cbe..683b241 100644 --- a/templates/item-profil-sheet.html +++ b/templates/item-profil-sheet.html @@ -50,36 +50,36 @@
  • - +
  • - +
  • - +
  • - +
  • - +
  • @@ -88,6 +88,14 @@
  • +
  • + +
  • +
  • + +
  • +