diff --git a/modules/pegasus-item-sheet.js b/modules/pegasus-item-sheet.js index 57c3dc4..655ffb4 100644 --- a/modules/pegasus-item-sheet.js +++ b/modules/pegasus-item-sheet.js @@ -348,6 +348,11 @@ export class PegasusItemSheet extends ItemSheet { specArray.push( newItem ); await this.object.update( { 'data.recoveryrollspec': specArray} ); } + if ( event.toElement.className =='drop-effect-specaffected') { + let specArray = duplicate(this.object.data.data.specaffected); + specArray.push( newItem ); + await this.object.update( { 'data.specaffected': specArray} ); + } } /* -------------------------------------------- */ diff --git a/modules/pegasus-utility.js b/modules/pegasus-utility.js index 10d4602..f669777 100644 --- a/modules/pegasus-utility.js +++ b/modules/pegasus-utility.js @@ -23,7 +23,11 @@ export class PegasusUtility { Handlebars.registerHelper('upper', function (text) { return text.toUpperCase(); - }); + }); + Handlebars.registerHelper('upperFirst', function (text) { + if (typeof text !== 'string') return text + return text.charAt(0).toUpperCase() + text.slice(1) + }); } diff --git a/styles/simple.css b/styles/simple.css index 5388ba8..be5b928 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1160,6 +1160,7 @@ ul, li { .ul-level1 { padding-left: 2rem; } +.drop-effect-specaffected, .drop-effect-spec, .drop-ability-weapon, .drop-ability-armor, diff --git a/system.json b/system.json index b61a752..1ee8f11 100644 --- a/system.json +++ b/system.json @@ -100,9 +100,9 @@ "styles": [ "styles/simple.css" ], - "templateVersion": 49, + "templateVersion": 51, "title": "Pegasus RPG", "url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg", - "version": "0.0.49", + "version": "0.0.51", "background" : "./images/ui/pegasus_welcome_page.webp" } \ No newline at end of file diff --git a/template.json b/template.json index 0ee0ff2..348c09d 100644 --- a/template.json +++ b/template.json @@ -180,6 +180,7 @@ "genre": "", "effectlevel": 0, "stataffected": "", + "specaffected": [], "statdice": false, "bonusdice": false, "otherdice": false, diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 18a0978..67734b3 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -230,8 +230,9 @@