Fix effects in translated compendiums

This commit is contained in:
sladecraven 2021-07-15 14:28:19 +02:00
parent 4822f260f0
commit 09bd399c0e
10 changed files with 401 additions and 314 deletions

View File

@ -44,7 +44,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "takeDamage", "effectTrigger": "takeDamage",
"script": "if (args.opposeData.hitloc.value == \"body\")\n args.actor.addCondition(\"bleeding\", 2)" "script": "if (args.opposedTest.result.hitloc.value == \"body\")\n args.actor.addCondition(\"bleeding\", 2)"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png",
@ -240,7 +240,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.opposeData.hitloc.value == \"body\") \n args.actor.addCondition(\"bleeding\", 1)" "script": "if (args.opposedTest.result.hitloc.value == \"body\") \n args.actor.addCondition(\"bleeding\", 1)"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png",
@ -288,7 +288,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.opposeData.hitloc.value == \"body\") \n args.actor.addCondition(\"bleeding\", 1)" "script": "if (args.opposedTest.result.hitloc.value == \"body\") \n args.actor.addCondition(\"bleeding\", 1)"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png",
@ -423,7 +423,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.opposeData.hitloc.value == \"body\") \n args.actor.addCondition(\"bleeding\", 2)" "script": "if (args.opposedTest.result.hitloc.value == \"body\") \n args.actor.addCondition(\"bleeding\", 2)"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png",
@ -508,7 +508,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prefillDialog", "effectTrigger": "prefillDialog",
"script": "if (args.type == \"skill\" && args.item.data.characteristic.value == \"ag\")\n args.prefillModifiers.modifier -= 10\n\nif (args.type == \"characteristic\" && args.item == \"ag\")\n args.prefillModifiers.modifier -= 10" "script": "if (args.type == \"skill\" && args.item.characteristic.value == \"ag\")\n args.prefillModifiers.modifier -= 10\n\nif (args.type == \"characteristic\" && args.item == \"ag\")\n args.prefillModifiers.modifier -= 10"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png",
@ -557,7 +557,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "fromUuid(\"Compendium.wfrp4e-core.injuries.fBcZhOBn8IpoVqQ1\").then(injury => {\n let teeth = new Roll(\"1d10\").roll().total\n ChatMessage.create({content : `<b>${this.actor.data.token.name}</b> a perdu ${teeth} dents`, speaker : {alias: this.effect.label}})\ninjury.data.data.location.value = `${teeth} ${injury.data.data.location.value}`\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury.data)\n})" "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.fBcZhOBn8IpoVqQ1\").then(injury => {\n let teeth = new Roll(\"1d10\").roll().total\n ChatMessage.create({content : `<b>${this.actor.data.token.name}</b> a perdu ${teeth} dents`, speaker : {alias: this.effect.label}})\ninjury.location.value = `${teeth} ${injury.location.value}`\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury.data)\n})"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/head.png", "icon": "modules/wfrp4e-core/icons/injuries/head.png",
@ -640,7 +640,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "if (args.actor.owner)\n{\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"difficult\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"stunned\")\n })\n })\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.4lj1ik958mbgAlaF\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\n}" "script": "if (args.actor.isOwner)\n{\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"difficult\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"stunned\")\n })\n })\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.4lj1ik958mbgAlaF\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png",
@ -760,7 +760,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prefillDialog", "effectTrigger": "prefillDialog",
"script": "if (args.type == \"skill\" && args.item.data.characteristic.value == \"ag\")\n args.prefillModifiers.modifier -= 10\n\nif (args.type == \"characteristic\" && args.item == \"ag\")\n args.prefillModifiers.modifier -= 10" "script": "if (args.type == \"skill\" && args.item.characteristic.value == \"ag\")\n args.prefillModifiers.modifier -= 10\n\nif (args.type == \"characteristic\" && args.item == \"ag\")\n args.prefillModifiers.modifier -= 10"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -926,7 +926,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "takeDamage", "effectTrigger": "takeDamage",
"script": "if(args.opposeData.hitloc.value == \"head\" && (args.opposeData.attackerTestResult.extra.critical || args.actor.data.data.status.wounds.value - args.totalWoundLoss < 0))\n{\n\n if (args.actor.owner) {\n args.actor.setupSkill(\"Résistance\", { absolute: { difficulty: \"average\" } }).then(setupData => {\n args.actor.basicTest(setupData).then(test => {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })\n }\n}" "script": "if(args.opposedTest.result.hitloc.value == \"head\" && (args.opposedTest.attackerTest.result.critical || args.actor.status.wounds.value - args.totalWoundLoss < 0))\n{\n\n if (args.actor.isOwner) {\n args.actor.setupSkill(\"Résistance\", { absolute: { difficulty: \"average\" } }).then(setupData => {\n args.actor.basicTest(setupData).then(test => {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })\n }\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/head.png", "icon": "modules/wfrp4e-core/icons/injuries/head.png",
@ -1074,7 +1074,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.actor.owner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"average\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })" "script": "if (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"average\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -1124,7 +1124,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.actor.owner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"easy\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })" "script": "if (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"easy\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png",
@ -1293,7 +1293,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "endCombat", "effectTrigger": "endCombat",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "if (this.actor.owner)\n this.actor.setupSkill(\"Résistance\").then(setupData => {\n this.actor.basicTest(setupData).then(test => {\n if (test.result.result == \"failure\") {\n fromUuid(\"Compendium.wfrp4e-core.injuries.ZhMADOqoo0y8Q9bx\").then(injury => {\n this.actor.createEmbeddedEntity(\"OwnedItem\", injury.data)\n this.actor.deleteEmbeddedEntity(\"ActiveEffect\", this.effect._id)\n })\n }\n })\n })" "script": "if (this.actor.isOwner)\n this.actor.setupSkill(\"Résistance\").then(setupData => {\n this.actor.basicTest(setupData).then(test => {\n if (test.result.outcome == \"failure\") {\n fromUuid(\"Compendium.wfrp4e-core.injuries.ZhMADOqoo0y8Q9bx\").then(injury => {\n this.actor.createEmbeddedEntity(\"OwnedItem\", injury.data)\n this.actor.deleteEmbeddedEntity(\"ActiveEffect\", this.effect._id)\n })\n }\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -1433,7 +1433,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "fromUuid(\"Compendium.wfrp4e-core.injuries.GlShFJF2TpsNh1FX\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\nif (args.actor.owner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })" "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.GlShFJF2TpsNh1FX\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\nif (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png",
@ -1481,7 +1481,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "takeDamage", "effectTrigger": "takeDamage",
"script": "if (args.opposeData.hitloc.value == \"LEG_LOCATION_HERE\") // rLeg or lLeg\n args.actor.addCondition(\"bleeding\", 1)" "script": "if (args.opposedTest.result.hitloc.value == \"LEG_LOCATION_HERE\") // rLeg or lLeg\n args.actor.addCondition(\"bleeding\", 1)"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -1505,7 +1505,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.actor.owner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })" "script": "if (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -1536,7 +1536,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.actor.owner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"stunned\", 3)\n })\n })" "script": "if (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"stunned\", 3)\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png",
@ -1664,7 +1664,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "takeDamage", "effectTrigger": "takeDamage",
"script": "if (args.opposeData.hitloc.value == \"ARM_LOCATION_HERE\") // lArm or rArm\n args.actor.addCondition(\"bleeding\", 2)" "script": "if (args.opposedTest.result.hitloc.value == \"ARM_LOCATION_HERE\") // lArm or rArm\n args.actor.addCondition(\"bleeding\", 2)"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png",
@ -1966,7 +1966,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.actor.owner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })" "script": "if (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png",
@ -1997,7 +1997,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.actor.owner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n {\n args.actor.addCondition(\"prone\")\n args.actor.addCondition(\"stunned\")\n }\n \n })\n })" "script": "if (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n {\n args.actor.addCondition(\"prone\")\n args.actor.addCondition(\"stunned\")\n }\n \n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png",
@ -2178,7 +2178,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.actor.owner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"stunned\")\n })\n })" "script": "if (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"stunned\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -2209,7 +2209,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prefillDialog", "effectTrigger": "prefillDialog",
"script": "if (args.type == \"skill\" && args.item.data.characteristic.value == \"ag\")\n args.prefillModifiers.modifier -= 20\n\nif (args.type == \"characteristic\" && args.item == \"ag\")\n args.prefillModifiers.modifier -= 20" "script": "if (args.type == \"skill\" && args.item.characteristic.value == \"ag\")\n args.prefillModifiers.modifier -= 20\n\nif (args.type == \"characteristic\" && args.item == \"ag\")\n args.prefillModifiers.modifier -= 20"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -2240,7 +2240,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prefillDialog", "effectTrigger": "prefillDialog",
"script": "if (args.type == \"skill\" && args.item.data.characteristic.value == \"ag\")\n args.prefillModifiers.modifier -= 20\n\nif (args.type == \"characteristic\" && args.item == \"ag\")\n args.prefillModifiers.modifier -= 20" "script": "if (args.type == \"skill\" && args.item.characteristic.value == \"ag\")\n args.prefillModifiers.modifier -= 20\n\nif (args.type == \"characteristic\" && args.item == \"ag\")\n args.prefillModifiers.modifier -= 20"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -2291,7 +2291,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "fromUuid(\"Compendium.wfrp4e-core.injuries.QluSTTTq3viHJJUh\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.owner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })" "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.QluSTTTq3viHJJUh\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png",
@ -2410,7 +2410,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "fromUuid(\"Compendium.wfrp4e-core.injuries.7mCcI3q7hgWcmbBU\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.owner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"stunned\")\n })\n })" "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.7mCcI3q7hgWcmbBU\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"stunned\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -2493,7 +2493,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "fromUuid(\"Compendium.wfrp4e-core.injuries.hCadFsTRvLN9faaY\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\nif (args.actor.owner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })" "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.hCadFsTRvLN9faaY\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\nif (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/head.png", "icon": "modules/wfrp4e-core/icons/injuries/head.png",
@ -2612,7 +2612,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "fromUuid(\"Compendium.wfrp4e-core.injuries.fBcZhOBn8IpoVqQ1\").then(injury => {\n let teeth = new Roll(\"1d10\").roll().total\n ChatMessage.create({content : `<b>${this.actor.data.token.name}</b> loses ${teeth} teeth`, speaker : {alias: this.effect.label}})\ninjury.data.data.location.value = `${teeth} ${injury.data.data.location.value}`\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury.data)\n})\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.rkJA1DlK51QuRlJy\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.hCadFsTRvLN9faaY\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.owner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })" "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.fBcZhOBn8IpoVqQ1\").then(injury => {\n let teeth = new Roll(\"1d10\").roll().total\n ChatMessage.create({content : `<b>${this.actor.data.token.name}</b> loses ${teeth} teeth`, speaker : {alias: this.effect.label}})\ninjury.location.value = `${teeth} ${injury.location.value}`\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury.data)\n})\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.rkJA1DlK51QuRlJy\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\nfromUuid(\"Compendium.wfrp4e-core.injuries.hCadFsTRvLN9faaY\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/head.png", "icon": "modules/wfrp4e-core/icons/injuries/head.png",
@ -2668,7 +2668,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "fromUuid(\"Compendium.wfrp4e-core.injuries.zyocWSzEZEC826NS\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.owner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n { \n args.actor.addCondition(\"prone\")\n args.actor.addCondition(\"stunned\")\n }\n })\n })" "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.zyocWSzEZEC826NS\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n { \n args.actor.addCondition(\"prone\")\n args.actor.addCondition(\"stunned\")\n }\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png",
@ -2784,7 +2784,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.actor.owner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })" "script": "if (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -2832,7 +2832,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.actor.owner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"stunned\")\n })\n })" "script": "if (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"stunned\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/head.png", "icon": "modules/wfrp4e-core/icons/injuries/head.png",
@ -3074,7 +3074,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prefillDialog", "effectTrigger": "prefillDialog",
"script": "if (args.type == \"skill\" && args.item.data.characteristic.value == \"ag\")\n args.prefillModifiers.modifier -= 10\n\nif (args.type == \"characteristic\" && args.item == \"ag\")\n args.prefillModifiers.modifier -= 10" "script": "if (args.type == \"skill\" && args.item.characteristic.value == \"ag\")\n args.prefillModifiers.modifier -= 10\n\nif (args.type == \"characteristic\" && args.item == \"ag\")\n args.prefillModifiers.modifier -= 10"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -3105,7 +3105,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.actor.owner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })" "script": "if (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\").then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -3154,7 +3154,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "if(args.actor.owner) {\n args.actor.setupSkill(\"Résistance\", { absolute: { difficulty: \"average\" } }).then(setupData => {\n args.actor.basicTest(setupData).then(test => {\n if (test.result.result == \"failure\") {\n args.actor.addCondition(\"prone\")\n fromUuid(\"Compendium.wfrp4e-core.injuries.ZhMADOqoo0y8Q9bx\").then(injury => {\n injury.data.data.location.value = `${Math.clamped(Math.abs(test.result.SL) + 1, 1, 5)} ${injury.data.data.location.value}`\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury.data)\n })\n }\n })\n })\n }" "script": "if(args.actor.isOwner) {\n args.actor.setupSkill(\"Résistance\", { absolute: { difficulty: \"average\" } }).then(setupData => {\n args.actor.basicTest(setupData).then(test => {\n if (test.result.outcome == \"failure\") {\n args.actor.addCondition(\"prone\")\n fromUuid(\"Compendium.wfrp4e-core.injuries.ZhMADOqoo0y8Q9bx\").then(injury => {\n injury.location.value = `${Math.clamped(Math.abs(test.result.outcome.SL) + 1, 1, 5)} ${injury.location.value}`\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury.data)\n })\n }\n })\n })\n }"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -3318,7 +3318,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "if (args.actor.owner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"average\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })" "script": "if (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"average\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"prone\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png",
@ -3342,7 +3342,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareData", "effectTrigger": "prePrepareData",
"script": "args.actor.data.data.details.move.value /= 2" "script": "args.actor.details.move.value /= 2"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornbody.png", "icon": "modules/wfrp4e-core/icons/injuries/tornbody.png",
@ -3464,7 +3464,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "fromUuid(\"Compendium.wfrp4e-core.injuries.3S4OYOZLauXctmev\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.owner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })" "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.3S4OYOZLauXctmev\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -3554,7 +3554,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "fromUuid(\"Compendium.wfrp4e-core.injuries.MnMZv7ZXoRqoH9dS\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.owner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })" "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.MnMZv7ZXoRqoH9dS\").then(injury => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", injury)\n})\n\n\nif (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {absolute: {difficulty: \"hard\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"failure\")\n args.actor.addCondition(\"unconscious\")\n })\n })"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornarm.png", "icon": "modules/wfrp4e-core/icons/injuries/tornarm.png",

View File

@ -28,7 +28,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prefillDialog", "effectTrigger": "prefillDialog",
"script": "if (args.type == \"characteristic\" && args.item == \"fel\")\n args.prefillModifiers.modifier -= 5\n\n else if (args.type == \"skill\") {\n if (args.item.data.characteristic.value == \"fel\")\n args.prefillModifiers.modifier -= 5\n }" "script": "if (args.type == \"characteristic\" && args.item == \"fel\")\n args.prefillModifiers.modifier -= 5\n\n else if (args.type == \"skill\") {\n if (args.item.characteristic.value == \"fel\")\n args.prefillModifiers.modifier -= 5\n }"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/amputatedear.png", "icon": "modules/wfrp4e-core/icons/injuries/amputatedear.png",
@ -137,7 +137,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareData", "effectTrigger": "prePrepareData",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.details.move.value /= 2" "script": "args.actor.details.move.value /= 2"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/amputatedfoot.png", "icon": "modules/wfrp4e-core/icons/injuries/amputatedfoot.png",
@ -410,7 +410,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prefillDialog", "effectTrigger": "prefillDialog",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "if (args.type == \"characteristic\" && args.item == \"fel\")\n args.prefillModifiers.modifier -= 5\n\n else if (args.type == \"skill\") {\n if (args.item.data.characteristic.value == \"fel\")\n args.prefillModifiers.modifier -= 5\n }" "script": "if (args.type == \"characteristic\" && args.item == \"fel\")\n args.prefillModifiers.modifier -= 5\n\n else if (args.type == \"skill\") {\n if (args.item.characteristic.value == \"fel\")\n args.prefillModifiers.modifier -= 5\n }"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/amputatedeye.png", "icon": "modules/wfrp4e-core/icons/injuries/amputatedeye.png",
@ -443,7 +443,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareData", "effectTrigger": "prePrepareData",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.details.move.value /= 2" "script": "args.actor.details.move.value /= 2"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/amputatedleg.png", "icon": "modules/wfrp4e-core/icons/injuries/amputatedleg.png",
@ -546,7 +546,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareData", "effectTrigger": "prePrepareData",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.details.move.value /= 2" "script": "args.actor.details.move.value /= 2"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/broken-leg.png", "icon": "modules/wfrp4e-core/icons/injuries/broken-leg.png",
@ -643,7 +643,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareData", "effectTrigger": "prePrepareData",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.details.move.value /= 2" "script": "args.actor.details.move.value /= 2"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/broken-body.png", "icon": "modules/wfrp4e-core/icons/injuries/broken-body.png",
@ -745,7 +745,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareData", "effectTrigger": "prePrepareData",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.details.move.value /= 2" "script": "args.actor.details.move.value /= 2"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/broken-leg.png", "icon": "modules/wfrp4e-core/icons/injuries/broken-leg.png",
@ -856,7 +856,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareData", "effectTrigger": "prePrepareData",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.details.move.value /= 2" "script": "args.actor.details.move.value /= 2"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/broken-body.png", "icon": "modules/wfrp4e-core/icons/injuries/broken-body.png",
@ -953,7 +953,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareData", "effectTrigger": "prePrepareData",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.details.move.value /= 2" "script": "args.actor.details.move.value /= 2"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",
@ -1103,7 +1103,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareData", "effectTrigger": "prePrepareData",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.details.move.value /= 2" "script": "args.actor.details.move.value /= 2"
} }
}, },
"icon": "modules/wfrp4e-core/icons/injuries/tornleg.png", "icon": "modules/wfrp4e-core/icons/injuries/tornleg.png",

View File

@ -443,7 +443,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "apply", "effectApplication": "apply",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "let wounds = args.actor.data.data.status.wounds\n\nif (wounds.value < wounds.max)\n args.actor.update({\"data.status.wounds.value\" : wounds.value + 1})" "script": "let wounds = args.actor.status.wounds\n\nif (wounds.value < wounds.max)\n args.actor.update({\"data.status.wounds.value\" : wounds.value + 1})"
} }
}, },
"icon": "modules/wfrp4e-core/icons/prayers/blessings.png", "icon": "modules/wfrp4e-core/icons/prayers/blessings.png",
@ -753,7 +753,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "apply", "effectApplication": "apply",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "fromUuid(\"Compendium.wfrp4e-core.psychologies.5hH73j2NgPdsLCZN\").then(item => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})" "script": "fromUuid(\"Compendium.wfrp4e-core.psychologies.5hH73j2NgPdsLCZN\").then(item => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
} }
}, },
"icon": "modules/wfrp4e-core/icons/prayers/miracles.png", "icon": "modules/wfrp4e-core/icons/prayers/miracles.png",
@ -802,7 +802,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "apply", "effectApplication": "apply",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "fromUuid(\"Compendium.wfrp4e-core.talents.J9MK0AIaTbvd5oF6\").then(item => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})" "script": "fromUuid(\"Compendium.wfrp4e-core.talents.J9MK0AIaTbvd5oF6\").then(item => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
} }
}, },
"icon": "modules/wfrp4e-core/icons/prayers/miracles.png", "icon": "modules/wfrp4e-core/icons/prayers/miracles.png",
@ -898,7 +898,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "apply", "effectApplication": "apply",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "fromUuid(\"Compendium.wfrp4e-core.talents.CV9btQn09S9Fn8Jk\").then(item => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})" "script": "fromUuid(\"Compendium.wfrp4e-core.talents.CV9btQn09S9Fn8Jk\").then(item => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
} }
}, },
"icon": "modules/wfrp4e-core/icons/prayers/miracles.png", "icon": "modules/wfrp4e-core/icons/prayers/miracles.png",
@ -989,7 +989,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "apply", "effectApplication": "apply",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"script": "fromUuid(\"Compendium.wfrp4e-core.talents.g4Q6AtzZuo5iIvD4\").then(item => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})" "script": "fromUuid(\"Compendium.wfrp4e-core.talents.g4Q6AtzZuo5iIvD4\").then(item => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
} }
}, },
"icon": "modules/wfrp4e-core/icons/prayers/miracles.png", "icon": "modules/wfrp4e-core/icons/prayers/miracles.png",
@ -1105,7 +1105,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "apply", "effectApplication": "apply",
"effectTrigger": "prepareData", "effectTrigger": "prepareData",
"script": "let AP = args.actor.data.AP\n\nAP[\"head\"].value += 1\nAP[\"rArm\"].value += 1\nAP[\"lArm\"].value += 1\nAP[\"body\"].value += 1\nAP[\"lLeg\"].value += 1\nAP[\"rLeg\"].value += 1" "script": "let AP = args.actor.status.armour\n\nAP[\"head\"].value += 1\nAP[\"rArm\"].value += 1\nAP[\"lArm\"].value += 1\nAP[\"body\"].value += 1\nAP[\"lLeg\"].value += 1\nAP[\"rLeg\"].value += 1"
} }
}, },
"icon": "modules/wfrp4e-core/icons/prayers/miracles.png", "icon": "modules/wfrp4e-core/icons/prayers/miracles.png",
@ -1235,7 +1235,7 @@
"effectApplication": "apply", "effectApplication": "apply",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "fromUuid(\"Compendium.wfrp4e-core.traits.pLW9SVX0TVTYPiPv\").then(item => {\n item.data.data.specification.value = 3\n this.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})\n\nfromUuid(\"Compendium.wfrp4e-core.traits.AtpAudHA4ybXVlWM\").then(item => {\n item.data.data.specification.value = 4\n this.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})" "script": "fromUuid(\"Compendium.wfrp4e-core.traits.pLW9SVX0TVTYPiPv\").then(item => {\n item.specification.value = 3\n this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})\n\nfromUuid(\"Compendium.wfrp4e-core.traits.AtpAudHA4ybXVlWM\").then(item => {\n item.specification.value = 4\n this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
} }
}, },
"icon": "modules/wfrp4e-core/icons/prayers/miracles.png", "icon": "modules/wfrp4e-core/icons/prayers/miracles.png",
@ -1334,7 +1334,7 @@
"wfrp4e": { "wfrp4e": {
"effectApplication": "apply", "effectApplication": "apply",
"effectTrigger": "prefillDialog", "effectTrigger": "prefillDialog",
"script": "if (args.type == \"characteristic\" && args.item == \"int\")\n {\n args.prefillModifiers.modifier += 20\n }\n else if (args.type == \"skill\")\n {\n if (args.item.data.characteristic.value == \"int\")\n args.prefillModifiers.modifier += 20\n }" "script": "if (args.type == \"characteristic\" && args.item == \"int\")\n {\n args.prefillModifiers.modifier += 20\n }\n else if (args.type == \"skill\")\n {\n if (args.item.characteristic.value == \"int\")\n args.prefillModifiers.modifier += 20\n }"
} }
}, },
"icon": "modules/wfrp4e-core/icons/prayers/miracles.png", "icon": "modules/wfrp4e-core/icons/prayers/miracles.png",

File diff suppressed because it is too large Load Diff

View File

@ -64,7 +64,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "rollChannellingTest", "effectTrigger": "rollChannellingTest",
"preventDuplicateEffects": true, "preventDuplicateEffects": true,
"script": "// Remove the miscast if doubles rolled and succeeded\nif(args.result.result == \"success\" && args.result.extra.minormis && args.result.roll % 11 == 0)\n{\n delete args.result.extra.minormis\n}\n// Decrement the major miscast to minor miscast\nelse if(args.result.result == \"success\" && args.result.extra.majormis && args.result.roll % 11 == 0)\n{\n delete args.result.extra.majormis\n args.result.extra.minormis = game.i18n.localize(\"ROLL.MinorMis\")\n}" "script": "// Remove the miscast if doubles rolled and succeeded\nif(args.test.result.outcome == \"success\" && args.test.result.minormis && args.test.result.roll % 11 == 0)\n{\n delete args.test.result.minormis\n}\n// Decrement the major miscast to minor miscast\nelse if(args.test.result.outcome == \"success\" && args.test.result.majormis && args.test.result.roll % 11 == 0)\n{\n delete args.test.result.majormis\n args.test.result.minormis = game.i18n.localize(\"ROLL.MinorMis\")\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/aethyric-attunement.png", "icon": "modules/wfrp4e-core/icons/talents/aethyric-attunement.png",
@ -97,7 +97,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "preRollTest", "effectTrigger": "preRollTest",
"preventDuplicateEffects": true, "preventDuplicateEffects": true,
"script": "if (args.testData.extra.skill && args.testData.extra.skill.name == \"Discrétion (Urbain)\")\n args.testData.extra.canReverse = true" "script": "if (args.test.item && args.test.item.name == \"Discrétion (Urbain)\")\n args.test.extra.canReverse = true"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/alley-cat.png", "icon": "modules/wfrp4e-core/icons/talents/alley-cat.png",
@ -176,7 +176,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "preRollTest", "effectTrigger": "preRollTest",
"preventDuplicateEffects": true, "preventDuplicateEffects": true,
"script": "if (args.testData.extra.skill && args.testData.extra.skill.name == \"Charme\" && (args.testData.roll <= 5 || args.testData.roll <= args.testData.target))\n{\n\nlet SL = Math.floor(args.testData.target / 10) - Math.floor(args.testData.roll / 10)\nlet ones = Number(args.testData.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.testData.extra.other.push(`<b>${this.effect.label}</b>: Peut utiliser l'unité comme DR de base (+${args.testData.successBonus + args.testData.slBonus} bonus DR) lors d'un débat.`)\n}" "script": "if (args.test.item && args.test.item.name == \"Charme\" && (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>: Peut utiliser l'unité comme DR de base (+${args.test.successBonus + args.test.slBonus} bonus DR) lors d'un débat.`)\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/argumentative.png", "icon": "modules/wfrp4e-core/icons/talents/argumentative.png",
@ -216,7 +216,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "preRollTest", "effectTrigger": "preRollTest",
"preventDuplicateEffects": true, "preventDuplicateEffects": true,
"script": "if (args.testData.extra.skill && args.testData.extra.skill.name == \"Charme\" && (args.testData.roll <= 5 || args.testData.roll <= args.testData.target))\n{\n\nlet SL = Math.floor(args.testData.target / 10) - Math.floor(args.testData.roll / 10)\nlet ones = Number(args.testData.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.testData.extra.other.push(`<b>${this.effect.label}</b>: Peut utiliser les unités comme DR de base (+${args.testData.successBonus + args.testData.slBonus} bonus DR) si la cible est attirée par vous.`)\n}" "script": "if (args.test.item && args.test.item.name == \"Charme\" && (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>: Peut utiliser les unités comme DR de base (+${args.test.successBonus + args.test.slBonus} bonus DR) si la cible est attirée par vous.`)\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/attractive.png", "icon": "modules/wfrp4e-core/icons/talents/attractive.png",
@ -270,7 +270,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "rollWeaponTest", "effectTrigger": "rollWeaponTest",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "if (args.result.charging)\n{\n args.result.damage += 1\n args.additionalDamage += 1\n}" "script": "if (args.test.result.charging)\n{\n args.test.result.damage += 1\n args.additionalDamage += 1\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/berserk-charge.png", "icon": "modules/wfrp4e-core/icons/talents/berserk-charge.png",
@ -317,7 +317,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "preRollTest", "effectTrigger": "preRollTest",
"preventDuplicateEffects": true, "preventDuplicateEffects": true,
"script": "if (args.testData.extra.skill && args.testData.extra.skill.name == \"Recherche\")\n args.testData.extra.canReverse = true" "script": "if (args.test.item && args.test.item.name == \"Recherche\")\n args.test.extra.canReverse = true"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/bookish.png", "icon": "modules/wfrp4e-core/icons/talents/bookish.png",
@ -393,7 +393,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "preRollTest", "effectTrigger": "preRollTest",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "if (args.testData.extra.skill && args.testData.extra.skill.name == \"Résistance à l'alcool\")\n args.testData.extra.canReverse = true" "script": "if (args.test.item && args.test.item.name == \"Résistance à l'alcool\")\n args.test.extra.canReverse = true"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/carouser.png", "icon": "modules/wfrp4e-core/icons/talents/carouser.png",
@ -746,7 +746,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareData", "effectTrigger": "prePrepareData",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.details.move.value += 1" "script": "args.actor.details.move.value += 1"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/fleet-footed.png", "icon": "modules/wfrp4e-core/icons/talents/fleet-footed.png",
@ -779,7 +779,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareItems", "effectTrigger": "prePrepareItems",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.characteristics.s.bonus += 1\nargs.actor.data.data.characteristics.s.calculationBonusModifier -= 1" "script": "args.actor.characteristics.s.bonus += 1\nargs.actor.characteristics.s.calculationBonusModifier -= 1"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/frenzy.png", "icon": "modules/wfrp4e-core/icons/talents/frenzy.png",
@ -826,7 +826,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "preRollTest", "effectTrigger": "preRollTest",
"preventDuplicateEffects": true, "preventDuplicateEffects": true,
"script": "if (args.testData.extra.skill && args.testData.extra.skill.name == \"Ragot\")\n args.testData.extra.canReverse = true" "script": "if (args.test.item && args.test.item.name == \"Ragot\")\n args.test.extra.canReverse = true"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/gregarious.png", "icon": "modules/wfrp4e-core/icons/talents/gregarious.png",
@ -859,7 +859,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prefillDialog", "effectTrigger": "prefillDialog",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "if (args.options.reload && args.options.weapon && args.options.weapon.data.weaponGroup.value == \"blackpowder\")\n args.prefillModifiers.slBonus += 1" "script": "if (args.options.reload && args.options.weapon && args.options.weapon.weaponGroup.value == \"blackpowder\")\n args.prefillModifiers.slBonus += 1"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/gunner.png", "icon": "modules/wfrp4e-core/icons/talents/gunner.png",
@ -932,7 +932,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareItem", "effectTrigger": "prePrepareItem",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "if (args.item.type == \"prayer\" && (args.item.data.damage.value || args.item.data.damage.dice))\n args.item.data.damage.value += \"+1\"" "script": "if (args.item.type == \"prayer\" && (args.item.damage.value || args.item.damage.dice))\n args.item.damage.value += \"+1\""
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/holy-hatred.png", "icon": "modules/wfrp4e-core/icons/talents/holy-hatred.png",
@ -1033,7 +1033,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "rollCastTest", "effectTrigger": "rollCastTest",
"preventDuplicateEffects": true, "preventDuplicateEffects": true,
"script": "// Remove the miscast if doubles rolled and succeeded\nif(args.result.result == \"success\" && args.result.extra.minormis && args.result.roll % 11 == 0)\n{\n delete args.result.extra.minormis\n}\n// Decrement the major miscast to minor miscast\nelse if(args.result.result == \"success\" && args.result.extra.majormis && args.result.roll % 11 == 0)\n{\n delete args.result.extra.majormis\n args.result.extra.minormis = game.i18n.localize(\"ROLL.MinorMis\")\n}" "script": "// Remove the miscast if doubles rolled and succeeded\nif(args.test.result.outcome == \"success\" && args.test.result.minormis && args.test.result.roll % 11 == 0)\n{\n delete args.test.result.minormis\n}\n// Decrement the major miscast to minor miscast\nelse if(args.test.result.outcome == \"success\" && args.test.result.majormis && args.test.result.roll % 11 == 0)\n{\n delete args.test.result.majormis\n args.test.result.minormis = game.i18n.localize(\"ROLL.MinorMis\")\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/instinctive-diction.png", "icon": "modules/wfrp4e-core/icons/talents/instinctive-diction.png",
@ -1463,7 +1463,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prepareData", "effectTrigger": "prepareData",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.status.corruption.max += 1" "script": "args.actor.status.corruption.max += 1"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/pure-soul.png", "icon": "modules/wfrp4e-core/icons/talents/pure-soul.png",
@ -1557,7 +1557,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "rollWeaponTest", "effectTrigger": "rollWeaponTest",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "if (args.result.charging)\n{\n args.result.damage += 1\n args.additionalDamage += 1\n}" "script": "if (args.test.result.charging)\n{\n args.test.result.damage += 1\n args.additionalDamage += 1\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/resolute.png", "icon": "modules/wfrp4e-core/icons/talents/resolute.png",
@ -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.opposeData.attackerTestResult.weapon\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.includes(game.i18n.localize(\"PROPERTY.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",
@ -1795,7 +1795,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "opposedDefender", "effectTrigger": "opposedDefender",
"preventDuplicateEffects": true, "preventDuplicateEffects": true,
"script": "if (args.opposeResult.winner == \"attacker\") {\n if (args.opposeResult.defenderTestResult.weapon && args.opposeResult.defenderTestResult.weapon.properties.qualities.find(q => q.includes(\"Shield\"))) {\n let shieldsman = this.actor.data.talents.find(t => t.name == this.effect.label)\n ui.notifications.notify(`<b>${this.effect.label}</b>: Gain de ${shieldsman.data.advances.value} avantages`)\n this.actor.modifyAdvantage(shieldsman.data.advances.value)\n }\n}" "script": "if (args.opposedTest.result.winner == \"attacker\") {\n if (args.opposedTest.result.defenderTest.item && args.opposedTest.result.defenderTest.item.properties.qualities.find(q => q.includes(\"Shield\"))) {\n let shieldsman = this.actor.data.talents.find(t => t.name == this.effect.label)\n ui.notifications.notify(`<b>${this.effect.label}</b>: Gain de ${shieldsman.data.advances.value} avantages`)\n this.actor.modifyAdvantage(shieldsman.data.advances.value)\n }\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/shieldsman.png", "icon": "modules/wfrp4e-core/icons/talents/shieldsman.png",
@ -1835,7 +1835,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "calculateOpposedDamage", "effectTrigger": "calculateOpposedDamage",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "if (args.sizeDiff <= -2 && args.opposeData.attackerTestResult.extra.critical)\n args.damageMultiplier = Math.abs(args.sizeDiff)\n\n let sBonusDiff = args.opposeData.defenderTestResult.actor.data.characteristics.t.bonus - args.opposeData.attackerTestResult.actor.data.characteristics.s.bonus\n let weapon = args.opposeData.attackerTestResult.weapon\n if (sBonusDiff > 0 && weapon && weapon.data.damage.value.includes(\"SB\"))\n args.damage += sBonusDiff" "script": "if (args.sizeDiff <= -2 && args.opposedTest.attackerTest.result.critical)\n args.damageMultiplier = Math.abs(args.sizeDiff)\n\n let sBonusDiff = args.opposedTest.defenderTest.result.actor.characteristics.t.bonus - args.opposedTest.attackerTest.result.actor.characteristics.s.bonus\n let weapon = args.opposedTest.attackerTest.item\n if (sBonusDiff > 0 && weapon && weapon.damage.value.includes(\"SB\"))\n args.damage += sBonusDiff"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/slayer.png", "icon": "modules/wfrp4e-core/icons/talents/slayer.png",
@ -1889,7 +1889,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prepareData", "effectTrigger": "prepareData",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.details.move.run += 2" "script": "args.actor.details.move.run += 2"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/sprinter.png", "icon": "modules/wfrp4e-core/icons/talents/sprinter.png",
@ -1989,7 +1989,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "rollWeaponTest", "effectTrigger": "rollWeaponTest",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "if(args.result.extra.critical)\n{\n args.result.damage +=1 \n args.result.additionalDamage += 1\n}" "script": "if(args.test.result.critical)\n{\n args.test.result.damage +=1 \n args.test.result.additionalDamage += 1\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/strike-to-injure.png", "icon": "modules/wfrp4e-core/icons/talents/strike-to-injure.png",
@ -2060,7 +2060,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareItems", "effectTrigger": "prePrepareItems",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.status.encumbrance.max += 1" "script": "args.actor.status.encumbrance.max += 1"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/strong-back.png", "icon": "modules/wfrp4e-core/icons/talents/strong-back.png",
@ -2146,7 +2146,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "prePrepareItems", "effectTrigger": "prePrepareItems",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "args.actor.data.data.status.encumbrance.max += 2" "script": "args.actor.status.encumbrance.max += 2"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/sturdy.png", "icon": "modules/wfrp4e-core/icons/talents/sturdy.png",
@ -2223,7 +2223,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "preRollTest", "effectTrigger": "preRollTest",
"preventDuplicateEffects": true, "preventDuplicateEffects": true,
"script": "if (args.testData.extra.skill && args.testData.extra.skill.data.characteristic.value == \"fel\" && (args.testData.roll <= 5 || args.testData.roll <= args.testData.target))\n{\n\nlet SL = Math.floor(args.testData.target / 10) - Math.floor(args.testData.roll / 10)\nlet ones = Number(args.testData.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.testData.extra.other.push(`<b>${this.effect.label}</b>: Peu utiliser l'unité comme DR de base (+${args.testData.successBonus + args.testData.slBonus} bonus DR)lorsque vous influencez des PNJs avec un statut social plus élevé.`)\n}" "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}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/talents/supportive.png", "icon": "modules/wfrp4e-core/icons/talents/supportive.png",

View File

@ -494,7 +494,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "invoke", "effectTrigger": "invoke",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "let item = duplicate(this.item)\nitem.data.quantity.value--\nif (item.data.quantity.value < 0)\n return ui.notifications.error(\"Plus de Faxtoryll\")\n\nthis.actor.updateEmbeddedEntity(\"OwnedItem\", item)\n\nlet bleeding = this.actor.hasCondition(\"bleeding\")\nif (bleeding)\n{\n ui.notifications.notify(`Cleared ${bleeding.flags.wfrp4e.value} Bleeding Conditions`)\n this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n}" "script": "let item = duplicate(this.item)\nitem.quantity.value--\nif (item.quantity.value < 0)\n return ui.notifications.error(\"Plus de Faxtoryll\")\n\nthis.actor.updateEmbeddedEntity(\"OwnedItem\", item)\n\nlet bleeding = this.actor.hasCondition(\"bleeding\")\nif (bleeding)\n{\n ui.notifications.notify(`Cleared ${bleeding.flags.wfrp4e.value} Bleeding Conditions`)\n this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/equipment/herbs_and_draughts/faxtoryll.png", "icon": "modules/wfrp4e-core/icons/equipment/herbs_and_draughts/faxtoryll.png",
@ -651,7 +651,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "invoke", "effectTrigger": "invoke",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "let item = duplicate(this.item)\nitem.data.quantity.value--\nif (item.data.quantity.value < 0)\n return ui.notifications.error(\"Plus de potions\")\n\nthis.actor.updateEmbeddedEntity(\"OwnedItem\", item)\n\nlet wounds = this.actor.data.data.status.wounds\nif (wounds.value == 0)\n return ui.notifications.error(\"Aucun effet à 0 points de blessure\")\nwounds.value += this.actor.data.data.characteristics.t.bonus\n\nui.notifications.notify(`Healed ${this.actor.data.data.characteristics.t.bonus} Wounds`)\n\nif (wounds.value > wounds.max)\n wounds.value = wounds.max\n\nthis.actor.update({\"data.status.wounds\" : wounds})" "script": "let item = duplicate(this.item)\nitem.quantity.value--\nif (item.quantity.value < 0)\n return ui.notifications.error(\"Plus de potions\")\n\nthis.actor.updateEmbeddedEntity(\"OwnedItem\", item)\n\nlet wounds = this.actor.status.wounds\nif (wounds.value == 0)\n return ui.notifications.error(\"Aucun effet à 0 points de blessure\")\nwounds.value += this.actor.characteristics.t.bonus\n\nui.notifications.notify(`Healed ${this.actor.characteristics.t.bonus} Wounds`)\n\nif (wounds.value > wounds.max)\n wounds.value = wounds.max\n\nthis.actor.update({\"data.status.wounds\" : wounds})"
} }
}, },
"icon": "modules/wfrp4e-core/icons/equipment/herbs_and_draughts/healing-draught.png", "icon": "modules/wfrp4e-core/icons/equipment/herbs_and_draughts/healing-draught.png",
@ -1356,7 +1356,7 @@
"effectApplication": "apply", "effectApplication": "apply",
"effectTrigger": "oneTime", "effectTrigger": "oneTime",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "let item = duplicate(this.item)\nitem.data.quantity.value--\nif (item.data.quantity.value < 0)\n return ui.notifications.error(\"Plus de Soude Commune disponible\")\n\nthis.actor.updateEmbeddedEntity(\"OwnedItem\", item)\n\nlet stunned= this.actor.hasCondition(\"stunned\")\nif (stunned)\n{\n ui.notifications.notify(`Un Etat Assomé a été enlevé`)\n this.actor.removeCondition(\"stunned\", 1)\n}" "script": "let item = duplicate(this.item)\nitem.quantity.value--\nif (item.quantity.value < 0)\n return ui.notifications.error(\"Plus de Soude Commune disponible\")\n\nthis.actor.updateEmbeddedEntity(\"OwnedItem\", item)\n\nlet stunned= this.actor.hasCondition(\"stunned\")\nif (stunned)\n{\n ui.notifications.notify(`Un Etat Assomé a été enlevé`)\n this.actor.removeCondition(\"stunned\", 1)\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/equipment/herbs_and_draughts/salwort.png", "icon": "modules/wfrp4e-core/icons/equipment/herbs_and_draughts/salwort.png",
@ -1592,7 +1592,7 @@
"effectApplication": "actor", "effectApplication": "actor",
"effectTrigger": "invoke", "effectTrigger": "invoke",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "let item = duplicate(this.item)\nitem.data.quantity.value--\nif (item.data.quantity.value < 0)\n return ui.notifications.error(\"Plus de potion disponible\")\n\nthis.actor.updateEmbeddedEntity(\"OwnedItem\", item)\n\nlet fatigued = this.actor.hasCondition(\"fatigued\")\nif (fatigued)\n{\n ui.notifications.notify(`${fatigued.flags.wfrp4e.value} Etats Extenué enlevés`)\n this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n}" "script": "let item = duplicate(this.item)\nitem.quantity.value--\nif (item.quantity.value < 0)\n return ui.notifications.error(\"Plus de potion disponible\")\n\nthis.actor.updateEmbeddedEntity(\"OwnedItem\", item)\n\nlet fatigued = this.actor.hasCondition(\"fatigued\")\nif (fatigued)\n{\n ui.notifications.notify(`${fatigued.flags.wfrp4e.value} Etats Extenué enlevés`)\n this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/equipment/herbs_and_draughts/vitality-draught.png", "icon": "modules/wfrp4e-core/icons/equipment/herbs_and_draughts/vitality-draught.png",
@ -1648,7 +1648,7 @@
"effectApplication": "apply", "effectApplication": "apply",
"effectTrigger": "prefillDialog", "effectTrigger": "prefillDialog",
"preventDuplicateEffects": false, "preventDuplicateEffects": false,
"script": "if (args.type == \"characteristic\") {\n if (args.item == \"wp\" || args.item == \"t\")\n args.prefillModifiers.modifier += 10\n else if (args.item == \"ag\" || args.item == \"i\" || args.item == \"int\")\n args.prefillModifiers.modifier -= 10\n}\nelse if (args.type == \"skill\") {\n if (args.item.data.characteristic.value == \"wp\" || args.item.data.characteristic.value == \"t\")\n args.prefillModifiers.modifier += 10\n else if (args.item.data.characteristic.value == \"ag\" || args.item.data.characteristic.value == \"i\" || args.item.data.characteristic.value == \"int\")\n args.prefillModifiers.modifier -= 10\n}\nelse if (args.type == \"cast\") {\n args.prefillModifiers.modifier -= 10\n}\nelse if (args.type == \"channelling\") {\n args.prefillModifiers.modifier += 10\n}" "script": "if (args.type == \"characteristic\") {\n if (args.item == \"wp\" || args.item == \"t\")\n args.prefillModifiers.modifier += 10\n else if (args.item == \"ag\" || args.item == \"i\" || args.item == \"int\")\n args.prefillModifiers.modifier -= 10\n}\nelse if (args.type == \"skill\") {\n if (args.item.characteristic.value == \"wp\" || args.item.characteristic.value == \"t\")\n args.prefillModifiers.modifier += 10\n else if (args.item.characteristic.value == \"ag\" || args.item.characteristic.value == \"i\" || args.item.characteristic.value == \"int\")\n args.prefillModifiers.modifier -= 10\n}\nelse if (args.type == \"cast\") {\n args.prefillModifiers.modifier -= 10\n}\nelse if (args.type == \"channelling\") {\n args.prefillModifiers.modifier += 10\n}"
} }
}, },
"icon": "modules/wfrp4e-core/icons/equipment/drugs_and_poisons/weirdroot.png", "icon": "modules/wfrp4e-core/icons/equipment/drugs_and_poisons/weirdroot.png",

View File

@ -322,7 +322,7 @@
{ {
"id": "Luxury Cabin", "id": "Luxury Cabin",
"name": "Luxury Cabin", "name": "Luxury Cabin",
"description": "<p>The Empire&rsquo;s wealthy like to travel in comfort and the kind of cabin that one finds on a noble&rsquo;s barge is very different from one on a trading or passenger vessel. For the indicated cost, and taking the space of two normal cabins, a traveller can ply the rivers in comfort and style. At your discretion, any <strong>Fellowship </strong>Tests made by the owner of a luxury cabin gain a +10 bonus, provided they are made within the cabin itself.</p>" "description": "<p>The Empire&rsquo;s wealthy like to travel in comfort and the kind of cabin that one finds on a noble&rsquo;s barge is very different from one on a trading or passenger vessel. For the indicated cost, and taking the space of two normal cabins, a traveller can ply the rivers in comfort and style. At your discretion, any <strong>Fellowship </strong>Tests made by the.isOwner of a luxury cabin gain a +10 bonus, provided they are made within the cabin itself.</p>"
}, },
{ {
"id": "Mage-Leaf", "id": "Mage-Leaf",
@ -357,27 +357,27 @@
{ {
"id": "Racing Hull", "id": "Racing Hull",
"name": "Racing Hull", "name": "Racing Hull",
"description": "<p>Wealthy nobles are addicted to contests and wagering, as everyone knows. In an effort to outdo their fellows, some wealthy boat owners have sunk immense sums into research and craftsmanship, in search of the perfect hull shape for speed. A racing hull is as smooth as glass and cunningly shaped to reduce drag to a bare minimum, allowing the boat to travel at up to twice its normal Movement rate.</p>\n<p>A boat with a racing hull is tricky to control, though, and requires a <strong>Difficult (&minus;10) Boat Handling</strong> Test every hour. On a Marginal (&minus;1 SL) or Normal Failure, Movement cannot exceed the normal rate; on an Impressive Failure (&minus;4 SL), Movement is half normal; and on an Astounding Failure (&minus;6 SL or less), the hull is damaged and the boat cannot exceed half normal Movement until it is repaired at a cost equal to half the cost of the hull, as above.</p>\n<p>Normal repairs to a racing hull cost twice the @JournalEntry[Repairing Boats]{normal rate given}, and require finer craftsmanship: all relevant Tests are one step more difficult than usual.</p>\n<blockquote>\n<p><strong>Foundry Note:&nbsp;</strong><em>Encumbrance and Price reflects 10 ft. of length. Modify this item according to the ship it's being applied to.</em></p>\n</blockquote>" "description": "<p>Wealthy nobles are addicted to contests and wagering, as everyone knows. In an effort to outdo their fellows, some wealthy boat.isOwners have sunk immense sums into research and craftsmanship, in search of the perfect hull shape for speed. A racing hull is as smooth as glass and cunningly shaped to reduce drag to a bare minimum, allowing the boat to travel at up to twice its normal Movement rate.</p>\n<p>A boat with a racing hull is tricky to control, though, and requires a <strong>Difficult (&minus;10) Boat Handling</strong> Test every hour. On a Marginal (&minus;1 SL) or Normal Failure, Movement cannot exceed the normal rate; on an Impressive Failure (&minus;4 SL), Movement is half normal; and on an Astounding Failure (&minus;6 SL or less), the hull is damaged and the boat cannot exceed half normal Movement until it is repaired at a cost equal to half the cost of the hull, as above.</p>\n<p>Normal repairs to a racing hull cost twice the @JournalEntry[Repairing Boats]{normal rate given}, and require finer craftsmanship: all relevant Tests are one step more difficult than usual.</p>\n<blockquote>\n<p><strong>Foundry Note:&nbsp;</strong><em>Encumbrance and Price reflects 10 ft. of length. Modify this item according to the ship it's being applied to.</em></p>\n</blockquote>"
}, },
{ {
"id": "Racing Rig (Fishing Skiff)", "id": "Racing Rig (Fishing Skiff)",
"name": "Racing Rig (Fishing Skiff)", "name": "Racing Rig (Fishing Skiff)",
"description": "<p>As well as developing racing hulls (see above), the wealthy boat-owners of the Empire &mdash; or rather, the talented boat-builders in their employ &mdash; have developed a system of sails and rigging designed for speed, at the expense of some sturdiness. A racing rig allows a boat an extra +10% Movement over the amount given in the @Table[wind]{wind table}, but only in a tailwind or a sidewind. In a headwind, the Movement penalty is reduced by -5%</p>\n<p>A racing rig includes a @Item[Flying Jib (Fishing Skiff)]{flying jib}, and the advantages of the two do not stack.</p>\n<p>This speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of &minus;10 to all <strong>Boat Handling</strong> Tests. In addition, all hits to the rigging cause double normal Damage.</p>" "description": "<p>As well as developing racing hulls (see above), the wealthy boat.isOwners of the Empire &mdash; or rather, the talented boat-builders in their employ &mdash; have developed a system of sails and rigging designed for speed, at the expense of some sturdiness. A racing rig allows a boat an extra +10% Movement over the amount given in the @Table[wind]{wind table}, but only in a tailwind or a sidewind. In a headwind, the Movement penalty is reduced by -5%</p>\n<p>A racing rig includes a @Item[Flying Jib (Fishing Skiff)]{flying jib}, and the advantages of the two do not stack.</p>\n<p>This speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of &minus;10 to all <strong>Boat Handling</strong> Tests. In addition, all hits to the rigging cause double normal Damage.</p>"
}, },
{ {
"id": "Racing Rig (Large Barge)", "id": "Racing Rig (Large Barge)",
"name": "Racing Rig (Large Barge)", "name": "Racing Rig (Large Barge)",
"description": "<p>As well as developing racing hulls (see above), the wealthy boat-owners of the Empire &mdash; or rather, the talented boat-builders in their employ &mdash; have developed a system of sails and rigging designed for speed, at the expense of some sturdiness. A racing rig allows a boat an extra +10% Movement over the amount given in the @Table[wind]{wind table}, but only in a tailwind or a sidewind. In a headwind, the Movement penalty is reduced by -5%</p>\n<p>A racing rig includes a @Item[Flying Jib (Large Barge)]{flying jib}, and the advantages of the two do not stack.</p>\n<p>This speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of &minus;10 to all&nbsp;<strong>Boat Handling</strong>&nbsp;Tests. In addition, all hits to the rigging cause double normal Damage.</p>" "description": "<p>As well as developing racing hulls (see above), the wealthy boat.isOwners of the Empire &mdash; or rather, the talented boat-builders in their employ &mdash; have developed a system of sails and rigging designed for speed, at the expense of some sturdiness. A racing rig allows a boat an extra +10% Movement over the amount given in the @Table[wind]{wind table}, but only in a tailwind or a sidewind. In a headwind, the Movement penalty is reduced by -5%</p>\n<p>A racing rig includes a @Item[Flying Jib (Large Barge)]{flying jib}, and the advantages of the two do not stack.</p>\n<p>This speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of &minus;10 to all&nbsp;<strong>Boat Handling</strong>&nbsp;Tests. In addition, all hits to the rigging cause double normal Damage.</p>"
}, },
{ {
"id": "Racing Rig (Row Boat)", "id": "Racing Rig (Row Boat)",
"name": "Racing Rig (Row Boat)", "name": "Racing Rig (Row Boat)",
"description": "<p>As well as developing racing hulls (see above), the wealthy boat-owners of the Empire &mdash; or rather, the talented boat-builders in their employ &mdash; have developed a system of sails and rigging designed for speed, at the expense of some sturdiness. A racing rig allows a boat an extra +10% Movement over the amount given in the @Table[wind]{wind table}, but only in a tailwind or a sidewind. In a headwind, the Movement penalty is reduced by -5%</p>\n<p>A racing rig includes a @Item[Flying Jib (Row Boat)]{flying jib}, and the advantages of the two do not stack.</p>\n<p>This speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of &minus;10 to all&nbsp;<strong>Boat Handling</strong>&nbsp;Tests. In addition, all hits to the rigging cause double normal Damage.</p>" "description": "<p>As well as developing racing hulls (see above), the wealthy boat.isOwners of the Empire &mdash; or rather, the talented boat-builders in their employ &mdash; have developed a system of sails and rigging designed for speed, at the expense of some sturdiness. A racing rig allows a boat an extra +10% Movement over the amount given in the @Table[wind]{wind table}, but only in a tailwind or a sidewind. In a headwind, the Movement penalty is reduced by -5%</p>\n<p>A racing rig includes a @Item[Flying Jib (Row Boat)]{flying jib}, and the advantages of the two do not stack.</p>\n<p>This speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of &minus;10 to all&nbsp;<strong>Boat Handling</strong>&nbsp;Tests. In addition, all hits to the rigging cause double normal Damage.</p>"
}, },
{ {
"id": "Racing Rig (Typical Barge or Patrol Boat)", "id": "Racing Rig (Typical Barge or Patrol Boat)",
"name": "Racing Rig (Typical Barge or Patrol Boat)", "name": "Racing Rig (Typical Barge or Patrol Boat)",
"description": "<p>As well as developing racing hulls (see above), the wealthy boat-owners of the Empire &mdash; or rather, the talented boat-builders in their employ &mdash; have developed a system of sails and rigging designed for speed, at the expense of some sturdiness. A racing rig allows a boat an extra +10% Movement over the amount given in the @Table[wind]{wind table}, but only in a tailwind or a sidewind. In a headwind, the Movement penalty is reduced by -5%</p>\n<p>A racing rig includes a @Item[Flying Jib (Typical Barge or Patrol Boat)]{flying jib}, and the advantages of the two do not stack.</p>\n<p>This speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of &minus;10 to all&nbsp;<strong>Boat Handling</strong>&nbsp;Tests. In addition, all hits to the rigging cause double normal Damage.</p>" "description": "<p>As well as developing racing hulls (see above), the wealthy boat.isOwners of the Empire &mdash; or rather, the talented boat-builders in their employ &mdash; have developed a system of sails and rigging designed for speed, at the expense of some sturdiness. A racing rig allows a boat an extra +10% Movement over the amount given in the @Table[wind]{wind table}, but only in a tailwind or a sidewind. In a headwind, the Movement penalty is reduced by -5%</p>\n<p>A racing rig includes a @Item[Flying Jib (Typical Barge or Patrol Boat)]{flying jib}, and the advantages of the two do not stack.</p>\n<p>This speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of &minus;10 to all&nbsp;<strong>Boat Handling</strong>&nbsp;Tests. In addition, all hits to the rigging cause double normal Damage.</p>"
}, },
{ {
"id": "Raised Gunwales (Fishing Skiff)", "id": "Raised Gunwales (Fishing Skiff)",

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.0.2", "version": "4.0.3",
"minimumCoreVersion" : "0.8.0", "minimumCoreVersion" : "0.8.0",
"compatibleCoreVersion": "0.8.8", "compatibleCoreVersion": "0.8.8",
"author": "LeRatierBretonnien", "author": "LeRatierBretonnien",

View File

@ -395,12 +395,12 @@ export class WH4FRPatchConfig {
else else
difficulty = "veasy" difficulty = "veasy"
if (args.actor.owner) if (args.actor.isOwner)
{ {
args.actor.setupSkill("Résistance", {absolute: {difficulty}}).then(setupData => { args.actor.setupSkill("Résistance", {absolute: {difficulty}}).then(setupData => {
args.actor.basicTest(setupData).then(test => args.actor.basicTest(setupData).then(test =>
{ {
if (test.result.result == "failure") if (test.result.outcome == "failure")
args.actor.addCondition("dead") args.actor.addCondition("dead")
}) })
}) })
@ -428,7 +428,7 @@ export class WH4FRPatchConfig {
} }
else if (args.type == "skill") else if (args.type == "skill")
{ {
if (applicableCharacteristics.includes(args.item.data.characteristic.value)) if (applicableCharacteristics.includes(args.item.characteristic.value))
args.prefillModifiers.modifier -= 10 args.prefillModifiers.modifier -= 10
} }
`} `}
@ -460,7 +460,7 @@ export class WH4FRPatchConfig {
} }
else if (args.type == "skill") else if (args.type == "skill")
{ {
if (applicableCharacteristics.includes(args.item.data.characteristic.value)) if (applicableCharacteristics.includes(args.item.characteristic.value))
args.prefillModifiers.modifier += modifier args.prefillModifiers.modifier += modifier
} }
}` }`
@ -489,7 +489,7 @@ export class WH4FRPatchConfig {
} }
else if (args.type == "skill") else if (args.type == "skill")
{ {
if (applicableCharacteristics.includes(args.item.data.characteristic.value)) if (applicableCharacteristics.includes(args.item.characteristic.value))
args.prefillModifiers.modifier -= 10 args.prefillModifiers.modifier -= 10
}`, }`,
"otherEffects" : ["blight", "wounded"] "otherEffects" : ["blight", "wounded"]
@ -543,7 +543,7 @@ export class WH4FRPatchConfig {
} }
else if (args.type == "skill") else if (args.type == "skill")
{ {
if (args.item.data.characteristic.value == "fel") if (args.item.characteristic.value == "fel")
args.prefillModifiers.modifier -= 10 args.prefillModifiers.modifier -= 10
} }
}` }`
@ -583,14 +583,14 @@ export class WH4FRPatchConfig {
"effectTrigger": "rollTest", "effectTrigger": "rollTest",
"symptom" : true, "symptom" : true,
"script": ` "script": `
if (this.actor.owner && args.result.result == "failure") if (this.actor.isOwner && args.test.result.outcome == "failure")
{ {
let applicableCharacteristics = ["ws", "bs", "s", "fel", "ag", "t", "dex"] let applicableCharacteristics = ["ws", "bs", "s", "fel", "ag", "t", "dex"]
if (applicableCharacteristics.includes(args.result.characteristic)) if (applicableCharacteristics.includes(args.test.result.characteristic))
this.actor.addCondition("stunned") this.actor.addCondition("stunned")
else if (args.result.skill && applicableCharacteristics.includes(args.result.skill.data.characteristic.value)) else if (args.test.result.skill && applicableCharacteristics.includes(args.test.result.skill.data.characteristic.value))
this.actor.addCondition("stunned") this.actor.addCondition("stunned")
else if (args.result.weapon) else if (args.test.result.weapon)
this.actor.addCondition("stunned") this.actor.addCondition("stunned")
} }
@ -613,7 +613,7 @@ export class WH4FRPatchConfig {
args.prefillModifiers.modifier -= 10 args.prefillModifiers.modifier -= 10
else if (args.type == "skill") else if (args.type == "skill")
{ {
if (args.item.data.characteristic.value == "fel") if (args.item.characteristic.value == "fel")
args.prefillModifiers.modifier -= 10 args.prefillModifiers.modifier -= 10
} }
}` }`
@ -630,12 +630,12 @@ export class WH4FRPatchConfig {
"effectTrigger": "invoke", "effectTrigger": "invoke",
"symptom" : true, "symptom" : true,
"script": ` "script": `
if (args.actor.owner) if (args.actor.isOwner)
{ {
args.actor.setupSkill("Résistance", {absolute: {difficulty : "average"}}).then(setupData => { args.actor.setupSkill("Résistance", {absolute: {difficulty : "average"}}).then(setupData => {
args.actor.basicTest(setupData).then(test => args.actor.basicTest(setupData).then(test =>
{ {
if (test.result.result == "failure") if (test.result.outcome == "failure")
fromUuid("Compendium.wfrp4e-core.diseases.kKccDTGzWzSXCBOb").then(disease => { fromUuid("Compendium.wfrp4e-core.diseases.kKccDTGzWzSXCBOb").then(disease => {
args.actor.createEmbeddedEntity("OwnedItem", disease.data) args.actor.createEmbeddedEntity("OwnedItem", disease.data)
}) })
@ -781,7 +781,7 @@ export class WH4FRPatchConfig {
actor : l'acteur qui encaisse les dégâts actor : l'acteur qui encaisse les dégâts
attacker : l'acteur qui porte l'attaque attacker : l'acteur qui porte l'attaque
opposeData : l'objet qui détaille le Test Opposé opposedTest : l'objet qui détaille le Test Opposé
damageType : le type de dégâts sélectionné (ignorer le Bonus d'Endurance, les PA, etc...) damageType : le type de dégâts sélectionné (ignorer le Bonus d'Endurance, les PA, etc...)
`, `,
"applyDamage" : "applyDamage" :
@ -791,7 +791,7 @@ export class WH4FRPatchConfig {
actor : l'acteur qui encaisse les dégâts actor : l'acteur qui encaisse les dégâts
attacker : l'acteur qui porte l'attaque attacker : l'acteur qui porte l'attaque
opposeData : l'objet qui détaille le Test Opposé opposedTest : l'objet qui détaille le Test Opposé
damageType : le type de dégâts sélectionné (ignorer le Bonus d'Endurance, les PA, etc...) damageType : le type de dégâts sélectionné (ignorer le Bonus d'Endurance, les PA, etc...)
totalWoundLoss : les Blessures perdues après calculs totalWoundLoss : les Blessures perdues après calculs
AP : les données concernant les PA utilisés AP : les données concernant les PA utilisés
@ -806,7 +806,7 @@ export class WH4FRPatchConfig {
actor : l'acteur qui encaisse les dégâts actor : l'acteur qui encaisse les dégâts
attacker : l'acteur qui porte l'attaque attacker : l'acteur qui porte l'attaque
opposeData : l'objet qui détaille le Test Opposé opposedTest : l'objet qui détaille le Test Opposé
damageType : le type de dégâts sélectionné (ignorer le Bonus d'Endurance, les PA, etc...) damageType : le type de dégâts sélectionné (ignorer le Bonus d'Endurance, les PA, etc...)
`, `,
@ -817,7 +817,7 @@ export class WH4FRPatchConfig {
actor : l'acteur qui encaisse les dégâts actor : l'acteur qui encaisse les dégâts
attacker : l'acteur qui porte l'attaque attacker : l'acteur qui porte l'attaque
opposeData : l'objet qui détaille le Test Opposé opposedTest : l'objet qui détaille le Test Opposé
damageType : le type de dégâts sélectionné (ignorer le Bonus d'Endurance, les PA, etc...) damageType : le type de dégâts sélectionné (ignorer le Bonus d'Endurance, les PA, etc...)
totalWoundLoss : les Blessures perdues après calculs totalWoundLoss : les Blessures perdues après calculs
AP : les données concernant les PA utilisés AP : les données concernant les PA utilisés
@ -867,7 +867,7 @@ export class WH4FRPatchConfig {
args: args:
testData: Toutes les donnnées pour évaluer le résultat du test test: Toutes les donnnées pour évaluer le résultat du test
cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc) cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc)
`, `,
"preRollWeaponTest" : "preRollWeaponTest" :
@ -875,7 +875,7 @@ export class WH4FRPatchConfig {
args: args:
testData: Toutes les donnnées pour évaluer le résultat du test test: Toutes les donnnées pour évaluer le résultat du test
cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc) cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc)
`, `,
@ -884,7 +884,7 @@ export class WH4FRPatchConfig {
args: args:
testData: Toutes les donnnées pour évaluer le résultat du test test: Toutes les donnnées pour évaluer le résultat du test
cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc) cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc)
`, `,
@ -893,7 +893,7 @@ export class WH4FRPatchConfig {
args: args:
testData: Toutes les donnnées pour évaluer le résultat du test test: Toutes les donnnées pour évaluer le résultat du test
cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc) cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc)
`, `,
@ -902,7 +902,7 @@ export class WH4FRPatchConfig {
args: args:
testData: Toutes les donnnées pour évaluer le résultat du test test: Toutes les donnnées pour évaluer le résultat du test
cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc) cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc)
`, `,
@ -911,7 +911,7 @@ export class WH4FRPatchConfig {
args: args:
testData: Toutes les donnnées pour évaluer le résultat du test test: Toutes les donnnées pour évaluer le résultat du test
cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc) cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc)
`, `,
@ -920,7 +920,7 @@ export class WH4FRPatchConfig {
args: args:
testData: Toutes les donnnées pour évaluer le résultat du test test: Toutes les donnnées pour évaluer le résultat du test
cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc) cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc)
`, `,
"rollIncomeTest" : "rollIncomeTest" :
@ -928,7 +928,7 @@ export class WH4FRPatchConfig {
args: args:
testData: Toutes les donnnées pour évaluer le résultat du test test: Toutes les donnnées pour évaluer le résultat du test
cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc) cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc)
`, `,
@ -937,7 +937,7 @@ export class WH4FRPatchConfig {
args: args:
testData: Toutes les donnnées pour évaluer le résultat du test test: Toutes les donnnées pour évaluer le résultat du test
cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc) cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc)
`, `,
@ -946,7 +946,7 @@ export class WH4FRPatchConfig {
args: args:
testData: Toutes les donnnées pour évaluer le résultat du test test: Toutes les donnnées pour évaluer le résultat du test
cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc) cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc)
`, `,
@ -955,7 +955,7 @@ export class WH4FRPatchConfig {
args: args:
testData: Toutes les donnnées pour évaluer le résultat du test test: Toutes les donnnées pour évaluer le résultat du test
cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc) cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc)
`, `,
@ -964,7 +964,7 @@ export class WH4FRPatchConfig {
args: args:
testData: Toutes les donnnées pour évaluer le résultat du test test: Toutes les donnnées pour évaluer le résultat du test
cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc) cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc)
`, `,
@ -973,7 +973,7 @@ export class WH4FRPatchConfig {
args: args:
testData: Toutes les donnnées pour évaluer le résultat du test test: Toutes les donnnées pour évaluer le résultat du test
cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc) cardOptions: Les données pour l'affichage dans le Tchat (titre, template, etc)
`, `,
@ -984,7 +984,7 @@ export class WH4FRPatchConfig {
attackerTest: le résultat du test de l'attaquant attackerTest: le résultat du test de l'attaquant
defenderTest: le résultat du test du défenseur defenderTest: le résultat du test du défenseur
opposeResult: l'objet opposeResult, avant calcul opposedTest.result: l'objet opposedTest.result, avant calcul
`, `,
"preOpposedDefender" : "preOpposedDefender" :
`Cet effet s'applique avant le calcul du résultat d'un Test Opposé, en tant que défenseur. `Cet effet s'applique avant le calcul du résultat d'un Test Opposé, en tant que défenseur.
@ -993,7 +993,7 @@ export class WH4FRPatchConfig {
attackerTest: le résultat du test de l'attaquant attackerTest: le résultat du test de l'attaquant
defenderTest: le résultat du test du défenseur defenderTest: le résultat du test du défenseur
opposeResult: l'objet opposeResult, avant calcul opposedTest.result: l'objet opposedTest.result, avant calcul
`, `,
"opposedAttacker" : "opposedAttacker" :
@ -1003,7 +1003,7 @@ export class WH4FRPatchConfig {
attackerTest: le résultat du test de l'attaquant attackerTest: le résultat du test de l'attaquant
defenderTest: le résultat du test du défenseur defenderTest: le résultat du test du défenseur
opposeResult: l'objet opposeResult, avant calcul opposedTest.result: l'objet opposedTest.result, avant calcul
`, `,
"opposedDefender" : "opposedDefender" :
@ -1013,7 +1013,7 @@ export class WH4FRPatchConfig {
attackerTest: le résultat du test de l'attaquant attackerTest: le résultat du test de l'attaquant
defenderTest: le résultat du test du défenseur defenderTest: le résultat du test du défenseur
opposeResult: l'objet opposeResult, avant calcul opposedTest.result: l'objet opposedTest.result, avant calcul
`, `,
"calculateOpposedDamage" : "calculateOpposedDamage" :
@ -1024,7 +1024,7 @@ export class WH4FRPatchConfig {
damage : calcul initial des dégâts avant multiplications damage : calcul initial des dégâts avant multiplications
damageMultiplier : facteur mutiplicateur basé sur la différence de taille damageMultiplier : facteur mutiplicateur basé sur la différence de taille
sizeDiff : la différence numérique en taille, sera utilisé pour ajouter les dégâts/impact sizeDiff : la différence numérique en taille, sera utilisé pour ajouter les dégâts/impact
opposeResult: détail à propos du Test Opposé opposedTest.result: détail à propos du Test Opposé
`, `,
"getInitiativeFormula" : "getInitiativeFormula" :

View File

@ -0,0 +1,87 @@
package.path = package.path .. ";luajson/?.lua"
local JSON = require"json"
local lfs = require"lfs"
local mypath = '../compendium/'
local function convert( jsondb)
jsondb = jsondb:gsub("test.result", "test.result.outcome")
jsondb = jsondb:gsub("result.result", "result.outcome")
jsondb = jsondb:gsub("result.extra", "result")
jsondb = jsondb:gsub("actor.data.AP", "actor.status.armour")
jsondb = jsondb:gsub("item.data.APdamage", "item.getFlag('wfrp4e', 'APdamage')")
jsondb = jsondb:gsub("data.data.", "")
jsondb = jsondb:gsub("item.data", "item")
jsondb = jsondb:gsub("weapon.data", "weapon")
jsondb = jsondb:gsub("spell.data", "spell")
jsondb = jsondb:gsub("prayer.data", "prayer")
jsondb = jsondb:gsub("trait.data", "trait")
jsondb = jsondb:gsub("testData.extra.characteristic", "testData.item")
jsondb = jsondb:gsub("testData.extra.skill", "testData.item")
jsondb = jsondb:gsub("testData.extra.weapon", "testData.item")
jsondb = jsondb:gsub("testData.extra.spell", "testData.item")
jsondb = jsondb:gsub("testData.extra.prayer", "testData.item")
jsondb = jsondb:gsub("testData.extra.trait", "testData.item")
jsondb = jsondb:gsub("testData.roll", "test.result.roll")
jsondb = jsondb:gsub("testData", "test")
jsondb = jsondb:gsub("item._id", "item.id")
jsondb = jsondb:gsub("result.ammo", "test.ammo")
jsondb = jsondb:gsub("args.result", "args.test.result")
jsondb = jsondb:gsub(".owner", ".isOwner")
jsondb = jsondb:gsub("spell.overcasts", "result.overcast")
jsondb = jsondb:gsub("opposeResult", "opposedTest.result")
jsondb = jsondb:gsub("opposeData.hitloc", "opposeData.result.hitloc")
jsondb = jsondb:gsub("opposeData", "opposedTest")
jsondb = jsondb:gsub("extra.critical", "critical")
jsondb = jsondb:gsub("attackerTestResult.weapon", "attackerTest.item")
jsondb = jsondb:gsub("defenderTestResult.weapon", "defenderTest.item")
jsondb = jsondb:gsub("attackerTestResult.trait", "attackerTest.item")
jsondb = jsondb:gsub("defenderTestResult.trait", "defenderTest.item")
jsondb = jsondb:gsub("attackerTestResult.spell", "attackerTest.item")
jsondb = jsondb:gsub("defenderTestResult.spell", "defenderTest.item")
jsondb = jsondb:gsub("attackerTestResult.prayer", "attackerTest.item")
jsondb = jsondb:gsub("defenderTestResult.prayer", "defenderTest.item")
jsondb = jsondb:gsub("attackerTestResult.skill", "attackerTest.item")
jsondb = jsondb:gsub("defenderTestResult.skill", "defenderTest.item")
jsondb = jsondb:gsub("attackerTestResult", "attackerTest.result")
jsondb = jsondb:gsub("defenderTestResult", "defenderTest.result")
jsondb = jsondb:gsub("actor.data.characteristics", "actor.characteristics")
jsondb = jsondb:gsub("test.result.outcome.result", "test.result.outcome")
jsondb = jsondb:gsub("test.item.characteristic.value", "test.item.characteristic.key")
jsondb = jsondb:gsub("test.extra.other", "test.result.other")
return jsondb
end
local function parse_folder( mypath )
--print("*** ENTERING", mypath)
for file in lfs.dir(mypath) do
--print(file)
if file == '.' or file == '..' then
else
local fp = io.open(mypath .."/".. file, "r+")
local jsondb = fp:read("*a")
fp:close()
jsondb = convert( jsondb)
fp = io.open(mypath .."/".. file, "w+")
fp:write(jsondb)
fp:close()
end
end
end
--parse_folder( mypath )
local fp = io.open("../modules/config-patch.js", "r+")
local jsondb = fp:read("*a")
fp:close()
jsondb = convert(jsondb)
fp = io.open("../modules/config-patch.js", "w+")
fp:write(jsondb)
fp:close()