From 44131734bdddced14b812dec85298aca73f1671b Mon Sep 17 00:00:00 2001 From: sladecraven Date: Fri, 28 Jan 2022 17:27:01 +0100 Subject: [PATCH] Sync effetcts + initiative --- modules/pegasus-actor.js | 25 +++++++++ modules/pegasus-main.js | 4 +- modules/pegasus-roll-dialog.js | 62 +++++++++++++++++++++- modules/pegasus-utility.js | 5 ++ packs/effect.db | 25 +++++++++ system.json | 2 +- template.json | 5 ++ templates/actor-sheet.html | 19 ------- templates/item-equipment-sheet.html | 26 +++++++++ templates/partial-roll-select-effects.html | 51 +++++++++++++++--- 10 files changed, 193 insertions(+), 31 deletions(-) diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index 5ee571f..4d5f3d7 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -232,6 +232,10 @@ export class PegasusActor extends Actor { getEquipments() { return this.data.items.filter(item => item.type == 'shield' || item.type == 'armor' || item.type == "weapon" || item.type == "equipment"); } + /* ------------------------------------------- */ + getEquipmentsOnly() { + return duplicate( this.data.items.filter(item => item.type == "equipment") || [] ) + } /* -------------------------------------------- */ getActiveEffects(matching = it => true) { @@ -568,6 +572,25 @@ export class PegasusActor extends Actor { } } } + addWeapons(rollData, statKey) { + let weapons = this.getWeapons() + for (let weapon of weapons) { + if (weapon.data.equipped && weapon.data.statistic == statKey) { + rollData.weaponsList.push( {label: `Attack ${weapon.name}`, type: "attack", applied: false, weapon: weapon, value: 0 } ) + } + if (weapon.data.equipped && weapon.data.damagestatistic == statKey) { + rollData.weaponsList.push( {label: `Damage ${weapon.name}`, type: "damage", applied: false, weapon: weapon, value: weapon.data.damage } ) + } + } + } + addEquipments(rollData, statKey) { + let equipments = this.getEquipmentsOnly() + for (let equip of equipments) { + if (equip.data.equipped && equip.data.stataffected == statKey) { + rollData.equipmentsList.push( {label: `Item ${equip.name}`, type: "item", applied: false, equip: equip, value: equip.data.level } ) + } + } + } /* -------------------------------------------- */ getCommonRollData(statKey = undefined, useShield = false) { @@ -589,6 +612,8 @@ export class PegasusActor extends Actor { this.addEffects( rollData) this.addArmorsShields(rollData, statKey, useShield) + this.addWeapons(rollData, statKey, useShield) + this.addEquipments(rollData, statKey) return rollData } diff --git a/modules/pegasus-main.js b/modules/pegasus-main.js index f07c123..2a112e2 100644 --- a/modules/pegasus-main.js +++ b/modules/pegasus-main.js @@ -81,8 +81,8 @@ function welcomeMessage() {

The Pegasus Engine is a available for free on our website. It is also available as a PDF and in Print format at an affordable price.

This project has been made possible thanks to all the Official GMD Members and Patreon Members that have supported me and as a result made it possible to supply this interface for free.

In return I have made available a fully detailed Compendium for FREE for all members, which can be obtained from the Members page on my website.

-

You too can become a supporter for future projects and enjoy amazing rewards. -
Sign up Here: https://www.gmdonline.co.uk/gmdmemberspage/

+

You too can become a supporter for future projects and enjoy amazing rewards. +
Sign up Here : https://www.gmdonline.co.uk/gmdmemberspage/

GMD Online, GMD CORE RPG logo are © 2018 CORE Worlds and Game Rules © 2001. Interface © 2021 All rights reserved.

Enjoy and become the hero you were born to be!

` }); diff --git a/modules/pegasus-roll-dialog.js b/modules/pegasus-roll-dialog.js index a23e954..948fd62 100644 --- a/modules/pegasus-roll-dialog.js +++ b/modules/pegasus-roll-dialog.js @@ -60,7 +60,7 @@ export class PegasusRollDialog extends Dialog { if (effectData.data.bonusdice) { idVal = "#bonusDicesLevel" } - if (effectData.data.reducedicevalue) { + if (effectData.data.reducedicevalue || effectData.data.statdice) { idVal = "#statDicesLevel" } if (effectData.data.otherdice) { @@ -116,6 +116,56 @@ export class PegasusRollDialog extends Dialog { console.log("Armor", armorIdx, toggled) } + /* -------------------------------------------- */ + manageWeapons( weaponIdx, toggled) { + let weapon = this.rollData.weaponsList[weaponIdx] + if (weapon) { + weapon.applied = toggled + if (weapon.type == 'damage' ) { + if (toggled) { + this.rollData.otherDicesLevel += Number(weapon.value) + } else { + this.rollData.otherDicesLevel -= Number(weapon.value) + this.rollData.otherDicesLevel = (this.rollData.otherDicesLevel<0) ? 0 : this.rollData.otherDicesLevel + } + $("#otherDicesLevel").val(this.rollData.otherDicesLevel) + } + } + console.log("Weapon", weaponIdx, toggled, this.rollData.otherDicesLevel, weapon) + } + + /* -------------------------------------------- */ + manageEquip( equipIdx, toggled) { + let equip = this.rollData.equipmentsList[equipIdx] + if (equip) { + equip.applied = toggled + let idVal = "#otherDicesLevel" // Default + if (equip.equip.data.bonusdice) { + idVal = "#bonusDicesLevel" + } + if (equip.equip.data.statdice) { + idVal = "#statDicesLevel" + } + if (equip.equip.data.otherdice) { + idVal = "#otherDicesLevel" + } + let newLevel = Number($(idVal).val()) + if (toggled) { + newLevel += Number(equip.value) + } else { + newLevel -= Number(equip.value) + } + newLevel = (newLevel <0) ? 0 : newLevel + $(idVal).val(newLevel) + // Then refresh + this.rollData.statDicesLevel = $('#statDicesLevel').val() + this.rollData.specDicesLevel = $('#specDicesLevel').val() + this.rollData.bonusDicesLevel = $('#bonusDicesLevel').val() + this.rollData.hindranceDicesLevel = $('#hindranceDicesLevel').val() + this.rollData.otherDicesLevel = $('#otherDicesLevel').val() + } + } + /* -------------------------------------------- */ activateListeners(html) { super.activateListeners(html); @@ -160,6 +210,16 @@ export class PegasusRollDialog extends Dialog { let armorIdx = $(event.currentTarget).data("armor-idx") this.manageArmors( armorIdx, toggled) }); + html.find('.weapon-clicked').change((event) => { + let toggled = event.currentTarget.checked + let weaponIdx = $(event.currentTarget).data("weapon-idx") + this.manageWeapons( weaponIdx, toggled) + }); + html.find('.equip-clicked').change((event) => { + let toggled = event.currentTarget.checked + let equipIdx = $(event.currentTarget).data("equip-idx") + this.manageEquip( equipIdx, toggled) + }); } diff --git a/modules/pegasus-utility.js b/modules/pegasus-utility.js index 88efba5..e3c906c 100644 --- a/modules/pegasus-utility.js +++ b/modules/pegasus-utility.js @@ -32,6 +32,9 @@ export class PegasusUtility { if (typeof text !== 'string') return text return text.charAt(0).toUpperCase() + text.slice(1) }); + Handlebars.registerHelper('notEmpty', function (list) { + return list.length > 0; + }); } @@ -587,6 +590,8 @@ export class PegasusUtility { specDicesLevel: 0, effectsList: [], armorsList: [], + weaponsList: [], + equipmentsList: [], optionsDiceList: PegasusUtility.getOptionsDiceList() } PegasusUtility.updateWithTarget(rollData) diff --git a/packs/effect.db b/packs/effect.db index aa4548f..955a36f 100644 --- a/packs/effect.db +++ b/packs/effect.db @@ -48,3 +48,28 @@ {"_id":"wtl84r5MezEwyDBd","name":"Bonus Dice STR","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"str","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}} {"_id":"yrJYjyHColPtif8t","name":"Poisoned","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"all","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"phy","recoveryroll":true,"recoveryrollstat":"phy","recoveryrollspec":[],"description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}} {"_id":"zbPfPn6c0XqlsGtp","name":"Hindrance Dice PHY","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"phy","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}} +{"_id":"EVOlHfNom2oXiMVk","name":"Bonus Dice MR","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"mr","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"

See Pegasus Engine CORE RPG

"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}} +{"_id":"s1gG2e5o8n3ksta2","name":"Other Dice AGI","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"agi","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":true,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"V8rLXdttufhDSphq","name":"Other Dice ALL","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"all","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":true,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}} +{"_id":"k0tkMV5ukd4tvK9Z","name":"Other Dice COM","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"com","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":true,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"dlg0m258LqFY2QWw","name":"Other Dice DEF","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"def","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":true,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"OnUAoq7LIhWV19pc","name":"Other Dice FOC","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"foc","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":true,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"zJu3oHXmliYG9LE0","name":"Other Dice MND","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"mnd","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":true,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"4p2gvEUvyvfM5vDC","name":"Other Dice MR","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"mr","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":true,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"JoY6sGrZ5b4B72O1","name":"Other Dice PER","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"per","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":true,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"7Qdb9RrtP3NaAIIu","name":"Other Dice PHY","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"phy","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":true,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"9R1LnO0BBmI39IM0","name":"Other Dice SOC","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"soc","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":true,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"cm1FsEXKEr1onFTV","name":"Other Dice STL","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"stl","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":true,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"apRzagTKiX98fa6p","name":"Other Dice STR","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"str","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":true,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"SOdJ90uKClUvLfKS","name":"Stat Dice AGI","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"agi","specaffected":[],"statdice":true,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"LGGPjj1GuHDxTBoV","name":"Stat Dice ALL","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"all","specaffected":[],"statdice":true,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}} +{"_id":"UiKhbZ8rq16hg9IO","name":"Stat Dice COM","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"com","specaffected":[],"statdice":true,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"szUdOnqtQognnTUM","name":"Stat Dice DEF","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"def","specaffected":[],"statdice":true,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"GXWaj3FI3gKWmQYp","name":"Stat Dice FOC","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"foc","specaffected":[],"statdice":true,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"EqPbQaMw1LoFL9nr","name":"Stat Dice MND","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"mnd","specaffected":[],"statdice":true,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"ejVHT07ZzMkMv1ZI","name":"Stat Dice MR","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"mr","specaffected":[],"statdice":true,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"iSz0XqiAK8CtoLBI","name":"Stat Dice PER","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"per","specaffected":[],"statdice":true,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"VV7Fp5cGkoDIZtE3","name":"Stat Dice PHY","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"phy","specaffected":[],"statdice":true,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"q9ZPZA1rqOv2jqlA","name":"Stat Dice SOC","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"soc","specaffected":[],"statdice":true,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"bQb5yo6QUS3m2FKh","name":"Stat Dice STL","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"stl","specaffected":[],"statdice":true,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} +{"_id":"Q0JTdXDF4sgc1hiA","name":"Stat Dice STR","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"str","specaffected":[],"statdice":true,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.V8rLXdttufhDSphq"}}} diff --git a/system.json b/system.json index f6be718..73c262e 100644 --- a/system.json +++ b/system.json @@ -183,6 +183,6 @@ "templateVersion": 63, "title": "Pegasus RPG", "url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg", - "version": "0.2.3", + "version": "0.2.4", "background" : "./images/ui/pegasus_welcome_page.webp" } diff --git a/template.json b/template.json index 7388722..ad36c86 100644 --- a/template.json +++ b/template.json @@ -430,6 +430,11 @@ "idr": "", "quantity": 0, "equipped": false, + "stataffected": "", + "level": 0, + "statdice": false, + "bonusdice": false, + "otherdice": false, "description":"" }, "money" : { diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 8e23ee8..ac3980e 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -276,25 +276,6 @@ - -

Weapons

-
- - diff --git a/templates/item-equipment-sheet.html b/templates/item-equipment-sheet.html index 3674197..bb41315 100644 --- a/templates/item-equipment-sheet.html +++ b/templates/item-equipment-sheet.html @@ -18,6 +18,32 @@ {{/select}} + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • diff --git a/templates/partial-roll-select-effects.html b/templates/partial-roll-select-effects.html index 743d7c4..defa62a 100644 --- a/templates/partial-roll-select-effects.html +++ b/templates/partial-roll-select-effects.html @@ -1,3 +1,6 @@ + +{{#if (notEmpty effectsList)}} + +{{/if}} - +{{/if}} + +{{#if (notEmpty weaponsList)}} + + +{{/if}} + +{{#if (notEmpty equipmentsList)}} + + +{{/if}}