Fix spell damages

This commit is contained in:
LeRatierBretonnien 2023-11-12 00:22:44 +01:00
parent db1bf4e23a
commit bd113b6ef3
14 changed files with 8 additions and 2 deletions

View File

@ -544,6 +544,7 @@ Hooks.once('init', () => {
var translw = value;
var re = /(.*) Bonus (\w*)/i;
var res = re.exec(value);
console.log("RES1:", res);
var unit = "";
if (res) { // Test "<charac> Bonus <unit>" pattern
if (res[1]) { // We have char name, then convert it
@ -570,7 +571,12 @@ Hooks.once('init', () => {
if (unit == "days") unit = "jours";
if (unit == "yard") unit = "mètre";
if (unit == "yards") unit = "mètres";
translw += " " + unit;
if (unit == "Bonus") { // Another weird management
translw = "Bonus de " + translw;
} else {
translw += " " + unit;
}
console.log("Spell duration/range/damage/target :", value, translw);
return translw;
}
});

View File

@ -116,7 +116,7 @@
}
],
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v10/module.json",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-7.0.19.zip",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-7.0.20.zip",
"id": "wh4-fr-translation",
"compatibility": {
"minimum": "11",

Binary file not shown.

Binary file not shown.