diff --git a/images/icons/icon_vehicle_mobilitymodule.webp b/images/icons/icon_vehicle_mobilitymodule.webp new file mode 100644 index 0000000..55db752 Binary files /dev/null and b/images/icons/icon_vehicle_mobilitymodule.webp differ diff --git a/images/icons/icon_vehicle_propulsionmodule.webp b/images/icons/icon_vehicle_propulsionmodule.webp new file mode 100644 index 0000000..7936b6b Binary files /dev/null and b/images/icons/icon_vehicle_propulsionmodule.webp differ diff --git a/images/icons/icon_vehicule_combatmodule.webp b/images/icons/icon_vehicule_combatmodule.webp new file mode 100644 index 0000000..65aaef5 Binary files /dev/null and b/images/icons/icon_vehicule_combatmodule.webp differ diff --git a/images/icons/icon_vehicule_hull.webp b/images/icons/icon_vehicule_hull.webp new file mode 100644 index 0000000..001c0cc Binary files /dev/null and b/images/icons/icon_vehicule_hull.webp differ diff --git a/images/icons/icon_vehicule_module.webp b/images/icons/icon_vehicule_module.webp new file mode 100644 index 0000000..30af086 Binary files /dev/null and b/images/icons/icon_vehicule_module.webp differ diff --git a/images/icons/icon_vehicule_powercore.webp b/images/icons/icon_vehicule_powercore.webp new file mode 100644 index 0000000..0999885 Binary files /dev/null and b/images/icons/icon_vehicule_powercore.webp differ diff --git a/modules/pegasus-actor-sheet.js b/modules/pegasus-actor-sheet.js index f1e6b44..a5f2840 100644 --- a/modules/pegasus-actor-sheet.js +++ b/modules/pegasus-actor-sheet.js @@ -160,6 +160,7 @@ export class PegasusActorSheet extends ActorSheet { const li = $(ev.currentTarget).parents(".item"); let itemId = li.data("item-id"); this.actor.updatePerkStatus( itemId, ev.currentTarget.value) + this.render() }); html.find('.power-cost-spent').change(ev => { diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index 7d3698f..950dcf2 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -858,7 +858,8 @@ export class PegasusActor extends Actor { if (item.data.data.status == status) return;// Ensure we are really changing the status if (this.checkNoPerksAllowed() ) { - ChatMessage( {content: "No perks activation allowed due to effect !"}) + await this.updateEmbeddedDocuments('Item', [{ _id: item.id, 'data.status': "ready" }]) + ChatMessage.create( {content: "No perks activation allowed due to effect !"}) return } @@ -908,7 +909,7 @@ export class PegasusActor extends Actor { } this.disableWeaverPerk(item) PegasusUtility.createChatWithRollMode(item.name, { - content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-perk-ready.html`, { name: this.name, perk: item }) + content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-perk-ready.html`, { name: this.name, perk: duplicate(item) }) }) } if (status == "activated") { @@ -954,7 +955,7 @@ export class PegasusActor extends Actor { await this.update({ 'data.nrg': nrg }) } PegasusUtility.createChatWithRollMode(item.name, { - content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-perk-activated.html`, { name: this.name, perk: item }) + content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-perk-activated.html`, { name: this.name, perk: duplicate(item) }) }) this.enableWeaverPerk(item) } @@ -1387,7 +1388,7 @@ export class PegasusActor extends Actor { if (effect.data.effectstatlevel) { effect.data.effectlevel = this.data.data.statistics[effect.data.effectstat].value } - if (this.getTraumaState() == "none") { + if (this.getTraumaState() == "none" && !this.checkNoBonusDice()) { rollData.effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel }) } else { if (!effect.data.bonusdice) { // Do not push bonus dice effect when TraumaState is activated diff --git a/modules/pegasus-item.js b/modules/pegasus-item.js index c1a16bc..c35b9aa 100644 --- a/modules/pegasus-item.js +++ b/modules/pegasus-item.js @@ -17,6 +17,13 @@ export const defaultItemImg = { money: "systems/fvtt-pegasus-rpg/images/icons/icon_money.webp", vice: "systems/fvtt-pegasus-rpg/images/icons/icon_vice.webp", virtue: "systems/fvtt-pegasus-rpg/images/icons/icon_virtue.webp", + vehiclehull:"systems/fvtt-pegasus-rpg/images/icons/icon_vehicule_hull.webp", + powercoremodule:"systems/fvtt-pegasus-rpg/images/icons/icon_vehicule_powercore.webp", + mobilitymodule: "systems/fvtt-pegasus-rpg/images/icons/icon_vehicle_mobilitymodule.webp", + combatmodule: "systems/fvtt-pegasus-rpg/images/icons/icon_vehicule_combatmodule.webp", + propulsionmodule: "systems/fvtt-pegasus-rpg/images/icons/icon_vehicle_propulsionmodule.webp", + vehiclemodule: "systems/fvtt-pegasus-rpg/images/icons/icon_vehicule_module.webp", + vehicleweaponmodule: "systems/fvtt-pegasus-rpg/images/icons/icon_vehicule_combatmodule.webp" } /** diff --git a/modules/pegasus-utility.js b/modules/pegasus-utility.js index a898609..00523ca 100644 --- a/modules/pegasus-utility.js +++ b/modules/pegasus-utility.js @@ -35,7 +35,7 @@ export class PegasusUtility { PegasusCommands.init(); Handlebars.registerHelper('count', function (list) { - return list.length; + return (list) ? list.length : 0; }) Handlebars.registerHelper('includes', function (array, val) { return array.includes(val); @@ -443,7 +443,8 @@ export class PegasusUtility { 'systems/fvtt-pegasus-rpg/templates/partial-actor-status.html', 'systems/fvtt-pegasus-rpg/templates/partial-item-nav.html', 'systems/fvtt-pegasus-rpg/templates/partial-item-description.html', - 'systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html' + 'systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html', + "systems/fvtt-pegasus-rpg/templates/partial-options-vehicle-speed.html" ] return loadTemplates(templatePaths); } diff --git a/system.json b/system.json index 5160da4..427c44f 100644 --- a/system.json +++ b/system.json @@ -180,9 +180,9 @@ "styles": [ "styles/simple.css" ], - "templateVersion": 100, + "templateVersion": 103, "title": "Pegasus RPG", "url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg", - "version": "0.6.10", + "version": "0.6.13", "background" : "./images/ui/pegasus_welcome_page.webp" } diff --git a/template.json b/template.json index d32d063..76451c6 100644 --- a/template.json +++ b/template.json @@ -339,9 +339,9 @@ "powercoremodule", "mobilitymodule", "combatmodule", + "propulsionmodule", "vehiclemodule", - "vehicleweaponmodule", - "propulsionmodule" + "vehicleweaponmodule" ], "effect": { "type": "", @@ -512,6 +512,7 @@ "action": "", "type": "", "powersource": "", + "powerlevel": 0, "effects": "", "activated": false, "purchasedeffects": "", @@ -600,12 +601,15 @@ "hulltype": "", "hr": 0, "man": 0, - "vms": 0 + "vms": 0, + "cost": 0 }, "powercoremodule": { "coretype": "", "pc": 0, - "nrg": 0 + "nrg": 0, + "cost": 0, + "space": 0 }, "mobilitymodule": { "vehiclecategory": "", @@ -614,15 +618,21 @@ "ts_f": "", "ts_s": "", "ts_r": "", - "man": "" + "man": "", + "cost": 0, + "space": 0 }, "propulsionmodule": { "quality": "", - "ad": "" + "ad": "", + "cost": 0, + "space": 0 }, "combatmodule": { "combattype": "", - "fc": "" + "fc": "", + "cost": 0, + "space": 0 }, "vehiclemodule": { "category": "", @@ -636,7 +646,9 @@ "shielddicevalue": "", "securitydicevalue": "", "range": "", - "idr": "" + "idr": "", + "cost": 0, + "space": 0 }, "vehicleweaponmodule": { "location": "", @@ -651,7 +663,8 @@ "range": "", "turret": "", "linkedweapon": "", - "idr": "" + "idr": "", + "cost": 0 } } } \ No newline at end of file diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 385c3b1..e2b3392 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -430,6 +430,9 @@ + + + {{#each powers as |power key|}} @@ -469,6 +472,8 @@ + + {{power.data.powerlevel}}
 
diff --git a/templates/chat-generic-result.html b/templates/chat-generic-result.html index fe9cfc4..7374b56 100644 --- a/templates/chat-generic-result.html +++ b/templates/chat-generic-result.html @@ -36,10 +36,9 @@ {{#if weaponName}}
  • Weapon : {{weaponName}}
  • - Damage Type: Piercing 1 {{/if}} {{#if weapon}} -
  • Damage type : {{weapon.data.damagetype}} {{weapon.data.damagetypelevel}}
  • +
  • Damage type : {{weapon.weapon.data.damagetype}} {{weapon.weapon.data.damagetypelevel}}
  • {{/if}} {{#if isResistance}} diff --git a/templates/item-combatmodule-sheet.html b/templates/item-combatmodule-sheet.html index 394a4c8..a1d47c5 100644 --- a/templates/item-combatmodule-sheet.html +++ b/templates/item-combatmodule-sheet.html @@ -34,6 +34,15 @@ {{/select}} + +
  • + +
  • + +
  • + +
  • +
    diff --git a/templates/item-effect-sheet.html b/templates/item-effect-sheet.html index 6c232f9..998fb5a 100644 --- a/templates/item-effect-sheet.html +++ b/templates/item-effect-sheet.html @@ -40,7 +40,7 @@
  • -
  • +
  • @@ -61,7 +61,7 @@
  • - +
  • diff --git a/templates/item-mobilitymodule-sheet.html b/templates/item-mobilitymodule-sheet.html index 69cdd97..03f5d09 100644 --- a/templates/item-mobilitymodule-sheet.html +++ b/templates/item-mobilitymodule-sheet.html @@ -84,6 +84,13 @@ {{/select}} +
  • + +
  • + +
  • + +
  • diff --git a/templates/item-power-sheet.html b/templates/item-power-sheet.html index abb84fb..3aa2886 100644 --- a/templates/item-power-sheet.html +++ b/templates/item-power-sheet.html @@ -58,6 +58,11 @@ + +
  • + +
  • +
  • +
  • + +
  • + +
  • + +
  • diff --git a/templates/item-propulsionmodule-sheet.html b/templates/item-propulsionmodule-sheet.html index 3825e41..9f78f6e 100644 --- a/templates/item-propulsionmodule-sheet.html +++ b/templates/item-propulsionmodule-sheet.html @@ -31,7 +31,15 @@ {{{optionsDiceList}}} {{/select}} - + +
  • + +
  • + +
  • + +
  • + diff --git a/templates/item-vehiclemodule-sheet.html b/templates/item-vehiclemodule-sheet.html index 6f47e55..f4191b7 100644 --- a/templates/item-vehiclemodule-sheet.html +++ b/templates/item-vehiclemodule-sheet.html @@ -108,6 +108,13 @@ {{/select}} +
  • + +
  • + +
  • + +
  • diff --git a/templates/item-vehicleweaponmodule-sheet.html b/templates/item-vehicleweaponmodule-sheet.html index 1f51e84..4ee2199 100644 --- a/templates/item-vehicleweaponmodule-sheet.html +++ b/templates/item-vehicleweaponmodule-sheet.html @@ -31,10 +31,6 @@ -
  • - -
  • -
  • @@ -124,6 +120,14 @@ +
  • + +
  • + +
  • + +
  • +