From 131629fdb546db7b3b80958b7c95f77636b25061 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Fri, 23 Apr 2021 13:59:10 +0200 Subject: [PATCH] Fix armes de tir --- modules/vadentis-actor.js | 2 +- system.json | 2 +- templates/actor-sheet.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/vadentis-actor.js b/modules/vadentis-actor.js index ee091a6..7d002a2 100644 --- a/modules/vadentis-actor.js +++ b/modules/vadentis-actor.js @@ -394,7 +394,7 @@ export class VadentisActor extends Actor { if ( target ) { let arme = this.data.items.find( item => (item.type == 'armecc' || item.type == 'tir') && item._id == armeId); if (arme) { - if ( arme == 'tir' && arme.data.munition <= 0 ) { + if ( arme.type == 'tir' && arme.data.munition <= 0 ) { ui.notifications.warn("Vous n'avez plus de munitions avec cette arme."); return; } diff --git a/system.json b/system.json index 3d45915..f5d7541 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "name": "foundryvtt-vadentis", "title": "Vadentis", "description": "Système Vadentis pour FoundryVTT", - "version": "0.1.4", + "version": "0.1.5", "manifestPlusVersion": "1.0.0", "minimumCoreVersion": "0.7.5", "compatibleCoreVersion": "0.7.9", diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 5db98f8..0f9df60 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -271,7 +271,7 @@ {{#if arme.data.equipee}}
  • - {{arme.name}} + {{arme.name}} {{#if (eq arme.type "tir")}}({{arme.data.munition}}){{/if}} {{arme.data.damage}} / {{arme.data.criticaldamage}}
  • {{/if}} @@ -338,7 +338,7 @@ {{#each armes as |arme key|}}
  • - {{arme.name}} + {{arme.name}} {{#if (eq arme.type "tir")}}({{arme.data.munition}}){{/if}}