Synw with 4.3.0

This commit is contained in:
sladecraven 2021-11-26 12:54:58 +01:00
parent 6184241407
commit 897a22290a
4 changed files with 1082 additions and 606 deletions

View File

@ -1611,7 +1611,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "takeDamage", "effectTrigger": "takeDamage",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.totalWoundLoss -= 1\nargs.messageElements.push(\"1 Robuste\")\n\nif (args.totalWoundLoss <= 0)\n{\nlet weapon = args.opposedTest.attackerTest.item\nif \n(weapon && weapon.properties.flaws.includes(game.i18n.localize(\"PROPERTY.Undamaging\")))\n args.totalWoundLoss = 0\nelse\n args.totalWoundLoss = 1\n}" "script": "args.totalWoundLoss -= 1\nargs.messageElements.push(\"1 Robuste\")\n\nif (args.totalWoundLoss <= 0)\n{\nlet weapon = args.opposedTest.attackerTest.item\nif \n(weapon && weapon.properties.flaws.undamaging)\n args.totalWoundLoss = 0\nelse\n args.totalWoundLoss = 1\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/robust.png", "icon": "modules/wfrp4e-core/icons/talents/robust.png",
@ -2223,7 +2223,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "preRollTest", "effectTrigger": "preRollTest",
"preventDuplicateEffects": true, "preventDuplicateEffects": true,
"script": "if (args.test.item && args.test.item.data.characteristic.value == \"fel\" && (args.test.result.roll <= 5 || args.test.result.roll <= args.test.target))\n{\n\nlet SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\nlet ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.test.result.other.push(`<b>${this.effect.label}</b>: Peu utiliser l'unité comme DR de base (+${args.test.successBonus + args.test.slBonus} bonus DR)lorsque vous influencez des PNJs avec un statut social plus élevé.`)\n}" "script": "if (args.test.item && args.test.characteristicKey== \"fel\" && (args.test.result.roll <= 5 || args.test.result.roll <= args.test.target))\n{\n\nlet SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\nlet ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.test.result.other.push(`<b>${this.effect.label}</b>: ${ones + args.test.successBonus + args.test.slBonus} DR pour influencer les personnes avec un statut social supérieur.`)\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/supportive.png", "icon": "modules/wfrp4e-core/icons/talents/supportive.png",

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
"name": "WH4-fr-translation", "name": "WH4-fr-translation",
"title": "WFRP4e - Core Module en français.", "title": "WFRP4e - Core Module en français.",
"description": "Traduction Française pour Warhammer v4.", "description": "Traduction Française pour Warhammer v4.",
"version": "4.2.14", "version": "4.3.0",
"minimumCoreVersion" : "0.8.0", "minimumCoreVersion" : "0.8.0",
"compatibleCoreVersion": "0.8.9", "compatibleCoreVersion": "0.8.9",
"author": "LeRatierBretonnien", "author": "LeRatierBretonnien",

View File

@ -0,0 +1,31 @@
package.path = package.path .. ";luajson/?.lua"
local JSON = require"json"
--local talent_db = "../../WFRP4e-FoundryVTT/packs/talents.db"
local traitdb ='/home/morr/.local/share/FoundryVTT/Data/modules/wfrp4e-core/packs/traits.db'
local f1 = io.open(traitdb)
local function trim1(s)
return (s:gsub("^%s*(.-)%s*$", "%1"))
end
local line = f1:read()
while line do
--print(line)
local trait = JSON.decode( line )
if trait.effects then
for _, effect in pairs(trait.effects) do
if effect.flags and effect.flags.wfrp4e and effect.flags.wfrp4e.script then
print( trait.name )
print( JSON.encode (trait.effects) )
print ()
end
end
end
line = f1:read()
end
f1:close()