From db9a12abad13b21d0c6942b8211874f9a6b16718 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 15 Dec 2020 23:17:05 +0100 Subject: [PATCH] =?UTF-8?q?P=C3=A9n=C3=A9tration=20pour=20les=20arcs/arbal?= =?UTF-8?q?=C3=A8tes=20#68?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A noter, il faut modifier les arcs/arbalètes des personnages existants --- module/actor.js | 3 ++- packs/equipement.db | 4 ++-- system.json | 2 +- template.json | 1 + templates/item-arme-sheet.html | 4 ++++ 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/module/actor.js b/module/actor.js index b6f9c58d..3fef86ea 100644 --- a/module/actor.js +++ b/module/actor.js @@ -1914,6 +1914,7 @@ export class RdDActor extends Actor { this.updateEmbeddedEntity("OwnedItem", update); } } + protection = Math.max(protection - Misc.toInt(arme.data.penetration), 0); protection += this.getProtectionNaturelle(); console.log("Final protect", protection); return protection; @@ -1932,7 +1933,7 @@ export class RdDActor extends Actor { dmg: attackerRoll.dmg.total, armure: armure }).roll(); - RdDDice.show(rollEncaissement, ) + RdDDice.show(rollEncaissement); let result = RdDUtility.computeBlessuresSante(rollEncaissement.total, attackerRoll.mortalite, attackerRoll.dmg.loc); result.endurance = Math.max(result.endurance, -Number(this.data.data.sante.endurance.value)); await this.santeIncDec("vie", result.vie); diff --git a/packs/equipement.db b/packs/equipement.db index 3d484275..b2478ed1 100644 --- a/packs/equipement.db +++ b/packs/equipement.db @@ -136,7 +136,7 @@ {"_id":"hVgd4APvAW8sbXf0","name":"Grande hache","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"","quantite":1,"encombrement":3,"equipe":false,"dommages":"4","force":"13","resistance":8,"competence":"Hache à 2 mains","cout":15,"portee_courte":0,"portee_moyenne":0,"portee_extreme":0,"rapide":false,"deuxmains":true,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/armes_armures/grande_hache.webp","effects":[]} {"_id":"hjsIxUmanyz5otLJ","name":"Marmite de fer (3 litres)","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"conteneur","data":{"description":"","capacite":1.5,"encombrement":0.6,"equipe":false,"qualite":0,"contenu":[],"cout":0.6},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/marmite.webp","effects":[]} {"_id":"iCvphbPdxUcfqetd","name":"Aumônière","permission":{"default":0,"jOzRscDxoXZWpGS6":3},"type":"conteneur","data":{"description":"

Comme une bourse, mais sous forme d'une coque en cuir rigide.

","capacite":0.25,"encombrement":0,"equipe":false,"qualite":0,"cout":0.2,"contenu":[]},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/aumoniere.webp","effects":[]} -{"_id":"iGHudg5kBOfYWgwV","name":"Arc","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"

Nie jusqu'à 2 points d'armure.

\n

Rechargement 1/2 round (s'il tire en début de round, il pourra recharger durant le reste du round pour tirer de nouveau au début du round suivant).

","quantite":1,"encombrement":1,"equipe":false,"dommages":2,"force":0,"resistance":0,"competence":"Arc","cout":10,"portee_courte":10,"portee_moyenne":20,"portee_extreme":50,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/arc.webp","effects":[]} +{"_id":"iGHudg5kBOfYWgwV","name":"Arc","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"

Nie jusqu'à 2 points d'armure.

\n

Rechargement 1/2 round (s'il tire en début de round, il pourra recharger durant le reste du round pour tirer de nouveau au début du round suivant).

","quantite":1,"encombrement":1,"equipe":false,"dommages":"2","force":"0","resistance":0,"competence":"Arc","cout":10,"portee_courte":10,"portee_moyenne":20,"portee_extreme":50,"penetration":2,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/arc.webp","effects":[]} {"_id":"ijCebH1Pr3LmzdOj","name":"Épée cyane","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"

Long cimeterre à l’acier bleuté, exclusivement fabriqué par les Cyans ou Hommes bleus.

","quantite":1,"encombrement":2,"equipe":false,"dommages":"3","force":"11","resistance":12,"competence":"Epée à 1 main","cout":25,"portee_courte":0,"portee_moyenne":0,"portee_extreme":0,"rapide":true,"deuxmains":false,"unemain":true},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/armes_armures/epee_cyane.webp","effects":[]} {"_id":"iq8ZZgphxOUgC1bi","name":"Flûte traversière de roseau","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.08,"equipe":false,"resistance":0,"qualite":0,"cout":0.12},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/flute_traversiere.webp","effects":[]} {"_id":"iuSOVPBsK8Zg6hoY","name":"1 m² de bâche","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.5,"equipe":false,"resistance":0,"qualite":0,"cout":0.2},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/bache.webp","effects":[]} @@ -149,7 +149,7 @@ {"_id":"keLCmhsbxHK39UIy","name":"Mirobolant","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"potion","data":{"description":"

Fluide.

\n

Liquide rougeâtre clair et sans dépot.

","quantite":1,"encombrement":0.1,"rarete":"","categorie":"Alchimie","cout":2},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/mirobolant.webp","effects":[]} {"_id":"lJMKVPB5zlG9UqMD","name":"Pourpoint de velours","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.2,"equipe":false,"resistance":0,"qualite":0,"cout":8},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/pourpoint_velours.webp","effects":[]} {"_id":"lKkYFkzWVs2TZDZP","name":"Petit pot de fard","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0.04,"equipe":false,"resistance":0,"qualite":0,"cout":0.3},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/fard.webp","effects":[]} -{"_id":"lOI2HVu3B6EDY4sE","name":"Arbalète","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"

Nie jusqu'à 2 points d'armure.

\n

Rechargement 1 round.

","quantite":1,"encombrement":3,"equipe":false,"dommages":3,"force":0,"resistance":0,"competence":"Arbalète","cout":30,"portee_courte":15,"portee_moyenne":30,"portee_extreme":70,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/arbalete.webp","effects":[]} +{"_id":"lOI2HVu3B6EDY4sE","name":"Arbalète","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"arme","data":{"description":"

Nie jusqu'à 2 points d'armure.

\n

Rechargement 1 round.

","quantite":1,"encombrement":3,"equipe":false,"dommages":"3","force":0,"resistance":0,"competence":"Arbalète","cout":30,"portee_courte":15,"portee_moyenne":30,"portee_extreme":70,"penetration":2,"rapide":false,"deuxmains":false,"unemain":false},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/arbalete.webp","effects":[]} {"_id":"lq7pjDQESNbZOQ3n","name":"1 m2 de soie ou de velours","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"objet","data":{"description":"","quantite":1,"encombrement":0,"equipe":false,"resistance":0,"qualite":0,"cout":3},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/tissu_velours.webp","effects":[]} {"_id":"m9yuZjp9DK7pSqPK","name":"Lanterne à bougie","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"conteneur","data":{"description":"","capacite":0.1,"encombrement":1,"equipe":false,"qualite":0,"contenu":[],"cout":3},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/objets/lanterne_bougie.webp","effects":[]} {"_id":"mOZodpJYobvmZO9o","name":"Le Narcolepton","permission":{"default":0,"jOzRscDxoXZWpGS6":3},"type":"livre","data":{"description":"

Cet ouvrage ne peut être assimilé que si l’on possède un niveau minimum de zéro en voie de Narcos. Il confère un bonus de synthèse de +3 aux sept Écailles de Protection présentées dans les règles (Venin, Maladie, Feu, Magie, Projectiles, Lames, Griffes et crocs), mais aucun bonus de points de sorts. Sa difficulté de lecture est de -4, son assimilation requiert 24 points de tâche, périodicité une heure.

","auteur":"anonyme","quantite":1,"difficulte":-4,"points_de_tache":24,"encombrement":0,"xp":"","cout":0},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_narcos.png","effects":[]} diff --git a/system.json b/system.json index 82c818fa..21c33285 100644 --- a/system.json +++ b/system.json @@ -5,7 +5,7 @@ "version": "1.1.10", "minimumCoreVersion": "0.7.5", "compatibleCoreVersion": "0.7.8", - "templateVersion": 70, + "templateVersion": 71, "author": "LeRatierBretonnien", "esmodules": [ "module/rdd-main.js", "module/hook-renderChatLog.js" ], "styles": ["styles/simple.css"], diff --git a/template.json b/template.json index 35fdbc9e..db882bc1 100644 --- a/template.json +++ b/template.json @@ -568,6 +568,7 @@ "encombrement": 0, "equipe": false, "dommages": "0", + "penetration": 0, "force": "0", "resistance": 0, "competence": "", diff --git a/templates/item-arme-sheet.html b/templates/item-arme-sheet.html index 1302efeb..0225be03 100644 --- a/templates/item-arme-sheet.html +++ b/templates/item-arme-sheet.html @@ -56,6 +56,10 @@ +
+ + +