Compare commits

..

7 Commits

14 changed files with 48 additions and 20 deletions

View File

@ -4,7 +4,7 @@
"Career Tables": "Table des Carrières", "Career Tables": "Table des Carrières",
"Character Creation": "Création de Personnage", "Character Creation": "Création de Personnage",
"Core Rulebook": "Livre de Base", "Core Rulebook": "Livre de Base",
"Corruption & Mutation Tables": "ables de Corruption & Mutations", "Corruption & Mutation Tables": "Tables de Corruption & Mutations",
"Critical Hit Tables": "Tables de Critiques", "Critical Hit Tables": "Tables de Critiques",
"GM Booklet": "Livret du MJ", "GM Booklet": "Livret du MJ",
"Hit Location": "Table de Localisation", "Hit Location": "Table de Localisation",

View File

@ -8,7 +8,7 @@
} }
], ],
"url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr", "url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr",
"version": "7.2.1", "version": "7.2.3",
"esmodules": [ "esmodules": [
"modules/babele-register.js", "modules/babele-register.js",
"modules/addon-register.js", "modules/addon-register.js",
@ -117,7 +117,7 @@
} }
], ],
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v10/module.json", "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.2.1.zip", "download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-7.2.3.zip",
"id": "wh4-fr-translation", "id": "wh4-fr-translation",
"compatibility": { "compatibility": {
"minimum": "11", "minimum": "11",

View File

@ -300,7 +300,7 @@ Hooks.once('init', () => {
} }
} }
if (results[0].documentCollection) { if (results[0].documentCollection) {
return game.babele.instance.converters.tableResults(results) return game.babele.converters.tableResults(results)
} }
return results return results
}, },

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,9 @@
let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase(); let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase();
let spellLore = game.wfrp4e.config.magicLores[args.spell.system.lore.value].toLowerCase();
// If channelling corresponding lore // If channelling corresponding lore
if (args.type == "channelling" && args.spell.system.lore.value == lore) if (args.type == "channelling" && spellLore == lore)
args.prefillModifiers.slBonus += 2 args.prefillModifiers.slBonus += 2
// If channelling or casting different lore // If channelling or casting different lore
else if (args.spell.system.lore.value != lore && args.spell.system.lore.value != "petty") else if (spellLore != lore && args.spell.system.lore.value != "petty")
args.prefillModifiers.slBonus -= 1 args.prefillModifiers.slBonus -= 1

View File

@ -1,12 +1,12 @@
// This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor // This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor
let mainEffect = this.item.effects.contents[0]; let mainEffect = this.item.effects.contents[0];
if (mainEffect.name.includes("(Savoir)")) if (mainEffect.name.includes("(Lore)"))
{ {
let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choisissez le Savoir"); let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choisissez le Savoir");
if (choice.length) if (choice.length)
{ {
mainEffect.update({name : mainEffect.name.replace("Savoir", choice[0].name)}) mainEffect.update({name : mainEffect.name.replace("Lore", choice[0].name)})
this.item.update({name : this.item.name += ` (${choice[0].name})`}) this.item.update({name : this.item.name += ` (${choice[0].name})`})
} }
} }

View File

@ -1,8 +1,9 @@
let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase(); let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase();
let spellLore = game.wfrp4e.config.magicLores[args.spell.system.lore.value].toLowerCase();
// If channelling corresponding lore // If channelling corresponding lore
if (args.type == "channelling" && args.spell.system.lore.value == lore) if (args.type == "channelling" && spellLore == lore)
args.prefillModifiers.slBonus += 1 args.prefillModifiers.slBonus += 1
// If channelling or casting different lore // If channelling or casting different lore
else if (args.spell.system.lore.value != lore && args.spell.system.lore.value != "petty") else if (spellLore != lore && args.spell.system.lore.value != "petty")
args.prefillModifiers.slBonus -= 1 args.prefillModifiers.slBonus -= 1

View File

@ -1,4 +1,4 @@
let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "Goes Prone" }}) let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "A Terre" }})
await test.roll(); await test.roll();
if (test.failed) if (test.failed)
{ {

View File

@ -1,2 +1,3 @@
let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase(); let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase();
return !args.spell || (args.type == "cast" && ["petty", lore].includes(args.spell.system.lore.value)); let spellLore = game.wfrp4e.config.magicLores[args.spell.system.lore.value].toLowerCase();
return !args.spell || (args.type == "cast" && [game.wfrp4e.config.magicLores["petty"].toLowerCase(), lore].includes(spellLore));

View File

@ -1,8 +1,9 @@
let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase(); let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase();
let spellLore = game.wfrp4e.config.magicLores[args.spell.system.lore.value].toLowerCase();
// If channelling corresponding lore // If channelling corresponding lore
if (args.type == "channelling" && args.spell.system.lore.value == lore) if (args.type == "channelling" && spellLore == lore)
args.prefillModifiers.slBonus += 3 args.prefillModifiers.slBonus += 3
// If channelling or casting different lore // If channelling or casting different lore
else if (args.spell.system.lore.value != lore && args.spell.system.lore.value != "petty") else if (spellLore != lore && args.spell.system.lore.value != "petty")
args.prefillModifiers.slBonus -= 1 args.prefillModifiers.slBonus -= 1

View File

@ -2,7 +2,7 @@ let aoeDamage = this.effect.sourceTest.result.damage - 5 // Easily handle magic
this.script.scriptMessage(await this.actor.applyBasicDamage(aoeDamage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})) this.script.scriptMessage(await this.actor.applyBasicDamage(aoeDamage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}))
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {skipTargets: true, appendTitle : ` - Ablaze`}) let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {skipTargets: true, appendTitle : ` - En Flammes`})
await test.roll(); await test.roll();

View File

@ -1,5 +1,5 @@
let lore = this.effect.name.split(" ")[2].toLowerCase(); let lore = this.effect.name.split(" ")[2].toLowerCase();
if (args.item.type == "spell" && args.item.system.lore.value == lore) if (args.item.type == "spell" && game.wfrp4e.config.magicLores[args.item.system.lore.value].toLowerCase() == lore)
{ {
args.item.system.cn.value -= 1 args.item.system.cn.value -= 1
} }

View File

@ -1,12 +1,12 @@
// This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor // This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor
let mainEffect = this.item.effects.contents[0]; let mainEffect = this.item.effects.contents[0];
if (mainEffect.name.includes("<Savoir>")) if (mainEffect.name.includes("<Lore>"))
{ {
let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choisissez le Savoir"); let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choisissez le Savoir");
if (choice.length) if (choice.length)
{ {
mainEffect.update({name : mainEffect.name.replace("<Savoir>", choice[0].name)}) mainEffect.update({name : mainEffect.name.replace("<Lore>", choice[0].name)})
this.item.update({name : this.item.name += ` (${choice[0].name})`}) this.item.update({name : this.item.name += ` (${choice[0].name})`})
} }
} }

View File

@ -0,0 +1,24 @@
local lfs = require"lfs"
local src = "../reference_scripts/"
local dst = "../scripts/"
for file in lfs.dir(src) do
if file == '.' or file == '..' then
else
local fp1 = io.open(dst..file, "r+")
local fp2 = io.open(src..file, "r+")
if fp1 and fp2 then
-- Compare files
local content1 = fp1:read("*all")
local content2 = fp2:read("*all")
if content1 == content2 then
print("Identical files: "..file)
end
fp1:close()
fp2:close()
else
print("Error: Could not open file: "..file)
end
end
end