diff --git a/module/actor.js b/module/actor.js
index b6f9c58d..5c3a61ed 100644
--- a/module/actor.js
+++ b/module/actor.js
@@ -1630,7 +1630,7 @@ export class RdDActor extends Actor {
return 0;
}
// selon l'heure de naissance...
- return game.system.rdd.calendrier.getAjustementAstrologique(this.data.data.heure);
+ return game.system.rdd.calendrier.getAjustementAstrologique(this.data.data.heure, this.data.name);
}
/* -------------------------------------------- */
checkDesirLancinant( ) {
@@ -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/module/rdd-calendrier.js b/module/rdd-calendrier.js
index 2040fee1..401a08e7 100644
--- a/module/rdd-calendrier.js
+++ b/module/rdd-calendrier.js
@@ -264,19 +264,24 @@ export class RdDCalendrier extends Application {
}
/* -------------------------------------------- */
- getAjustementAstrologique(heureNaissance)
+ getAjustementAstrologique(heureNaissance, name='inconnu')
{
- let hn = heuresDef[heureNaissance].heure;
- let chiffreAstral = this.getCurrentNombreAstral();
- let heureCourante = this.calendrier.heureRdD;
- let ecartChance = (hn + chiffreAstral - heureCourante)%12;
- console.log("ajustementAstrologique", heureNaissance, hn, chiffreAstral, heureCourante, ecartChance);
- switch (ecartChance)
- {
- case 0: return 4;
- case 4: case 8: return 2;
- case 6: return -4;
- case 3: case 9: return -2;
+ if (heureNaissance && heuresDef[heureNaissance]) {
+ let hn = heuresDef[heureNaissance].heure;
+ let chiffreAstral = this.getCurrentNombreAstral();
+ let heureCourante = this.calendrier.heureRdD;
+ let ecartChance = (hn + chiffreAstral - heureCourante)%12;
+ console.log("ajustementAstrologique", heureNaissance, hn, chiffreAstral, heureCourante, ecartChance);
+ switch (ecartChance)
+ {
+ case 0: return 4;
+ case 4: case 8: return 2;
+ case 6: return -4;
+ case 3: case 9: return -2;
+ }
+ }
+ else {
+ ui.notifications.warn(, this.data.name + " n'a pas d'heure de naissance, ou elle est incorrecte");
}
return 0;
}
diff --git a/module/rdd-combat.js b/module/rdd-combat.js
index d6fafbb2..8c8bc831 100644
--- a/module/rdd-combat.js
+++ b/module/rdd-combat.js
@@ -396,7 +396,7 @@ export class RdDCombat {
console.log("RdDCombat._onParadeEchec >>>", rollData);
let explications = "
Parade échouée, encaissement ! ";
- explications += this.descriptionSurprise(rollData.surprise);
+ explications += RdDCombat.descriptionSurprise(rollData.surprise);
if (rollData.needSignificative) {
explications += " Significative nécessaire!";
}
diff --git a/module/rdd-main.js b/module/rdd-main.js
index f31bd739..92684b77 100644
--- a/module/rdd-main.js
+++ b/module/rdd-main.js
@@ -155,7 +155,7 @@ Hooks.once("init", async function() {
"standard": "Standard",
"experimental": "Expérimental"
},
- default: "standard"
+ default: "experimental"
});
/* -------------------------------------------- */
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.
\nRechargement 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.
\nRechargement 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.
\nLiquide 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.
\nRechargement 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.
\nRechargement 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 @@ +