diff --git a/compendium/wfrp4e-core.criticals.json b/compendium/wfrp4e-core.criticals.json
index b72978c..869da2a 100644
--- a/compendium/wfrp4e-core.criticals.json
+++ b/compendium/wfrp4e-core.criticals.json
@@ -44,7 +44,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -240,7 +240,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -288,7 +288,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -423,7 +423,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -508,7 +508,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -557,7 +557,7 @@
"effectApplication": "actor",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.fBcZhOBn8IpoVqQ1\").then(injury => {\n let teeth = new Roll(\"1d10\").roll().total\n ChatMessage.create({content : `${this.actor.data.token.name} 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 : `${this.actor.data.token.name} 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",
@@ -640,7 +640,7 @@
"effectApplication": "actor",
"effectTrigger": "oneTime",
"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",
@@ -760,7 +760,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -926,7 +926,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -1074,7 +1074,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -1124,7 +1124,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -1293,7 +1293,7 @@
"effectApplication": "actor",
"effectTrigger": "endCombat",
"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",
@@ -1433,7 +1433,7 @@
"effectApplication": "actor",
"effectTrigger": "oneTime",
"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",
@@ -1481,7 +1481,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -1505,7 +1505,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -1536,7 +1536,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -1664,7 +1664,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -1966,7 +1966,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -1997,7 +1997,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -2178,7 +2178,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -2209,7 +2209,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -2240,7 +2240,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -2291,7 +2291,7 @@
"effectApplication": "actor",
"effectTrigger": "oneTime",
"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",
@@ -2410,7 +2410,7 @@
"effectApplication": "actor",
"effectTrigger": "oneTime",
"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",
@@ -2493,7 +2493,7 @@
"effectApplication": "actor",
"effectTrigger": "oneTime",
"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",
@@ -2612,7 +2612,7 @@
"effectApplication": "actor",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.injuries.fBcZhOBn8IpoVqQ1\").then(injury => {\n let teeth = new Roll(\"1d10\").roll().total\n ChatMessage.create({content : `${this.actor.data.token.name} 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 : `${this.actor.data.token.name} 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",
@@ -2668,7 +2668,7 @@
"effectApplication": "actor",
"effectTrigger": "oneTime",
"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",
@@ -2784,7 +2784,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -2832,7 +2832,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -3074,7 +3074,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -3105,7 +3105,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -3154,7 +3154,7 @@
"effectApplication": "actor",
"effectTrigger": "oneTime",
"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",
@@ -3318,7 +3318,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -3342,7 +3342,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -3464,7 +3464,7 @@
"effectApplication": "actor",
"effectTrigger": "oneTime",
"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",
@@ -3554,7 +3554,7 @@
"effectApplication": "actor",
"effectTrigger": "oneTime",
"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",
diff --git a/compendium/wfrp4e-core.injuries.json b/compendium/wfrp4e-core.injuries.json
index ebc3dca..113f119 100644
--- a/compendium/wfrp4e-core.injuries.json
+++ b/compendium/wfrp4e-core.injuries.json
@@ -28,7 +28,7 @@
"wfrp4e": {
"effectApplication": "actor",
"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",
@@ -137,7 +137,7 @@
"effectApplication": "actor",
"effectTrigger": "prePrepareData",
"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",
@@ -410,7 +410,7 @@
"effectApplication": "actor",
"effectTrigger": "prefillDialog",
"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",
@@ -443,7 +443,7 @@
"effectApplication": "actor",
"effectTrigger": "prePrepareData",
"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",
@@ -546,7 +546,7 @@
"effectApplication": "actor",
"effectTrigger": "prePrepareData",
"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",
@@ -643,7 +643,7 @@
"effectApplication": "actor",
"effectTrigger": "prePrepareData",
"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",
@@ -745,7 +745,7 @@
"effectApplication": "actor",
"effectTrigger": "prePrepareData",
"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",
@@ -856,7 +856,7 @@
"effectApplication": "actor",
"effectTrigger": "prePrepareData",
"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",
@@ -953,7 +953,7 @@
"effectApplication": "actor",
"effectTrigger": "prePrepareData",
"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",
@@ -1103,7 +1103,7 @@
"effectApplication": "actor",
"effectTrigger": "prePrepareData",
"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",
diff --git a/compendium/wfrp4e-core.prayers.json b/compendium/wfrp4e-core.prayers.json
index c4d3dd9..5fabc5e 100644
--- a/compendium/wfrp4e-core.prayers.json
+++ b/compendium/wfrp4e-core.prayers.json
@@ -443,7 +443,7 @@
"wfrp4e": {
"effectApplication": "apply",
"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",
@@ -753,7 +753,7 @@
"wfrp4e": {
"effectApplication": "apply",
"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",
@@ -802,7 +802,7 @@
"wfrp4e": {
"effectApplication": "apply",
"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",
@@ -898,7 +898,7 @@
"wfrp4e": {
"effectApplication": "apply",
"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",
@@ -989,7 +989,7 @@
"wfrp4e": {
"effectApplication": "apply",
"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",
@@ -1105,7 +1105,7 @@
"wfrp4e": {
"effectApplication": "apply",
"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",
@@ -1235,7 +1235,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"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",
@@ -1334,7 +1334,7 @@
"wfrp4e": {
"effectApplication": "apply",
"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",
diff --git a/compendium/wfrp4e-core.spells.json b/compendium/wfrp4e-core.spells.json
index 803a07f..a9de5dc 100644
--- a/compendium/wfrp4e-core.spells.json
+++ b/compendium/wfrp4e-core.spells.json
@@ -40,7 +40,7 @@
"effectApplication": "apply",
"effectTrigger": "prePrepareItems",
"preventDuplicateEffects": true,
- "script": "this.actor.data.data.characteristics.i.value = 10"
+ "script": "this.actor.characteristics.i.value = 10"
}
},
"icon": "modules/wfrp4e-core/icons/spells/slaanesh.png",
@@ -72,7 +72,7 @@
"effectApplication": "apply",
"effectTrigger": "prepareData",
"preventDuplicateEffects": true,
- "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/blank.png",
@@ -104,7 +104,7 @@
"effectApplication": "apply",
"effectTrigger": "prepareData",
"preventDuplicateEffects": true,
- "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/spells/beasts.png",
@@ -152,7 +152,7 @@
"effectApplication": "apply",
"effectTrigger": "prepareData",
"preventDuplicateEffects": true,
- "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/spells/daemonology.png",
@@ -184,7 +184,7 @@
"effectApplication": "apply",
"effectTrigger": "prepareData",
"preventDuplicateEffects": true,
- "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/spells/death.png",
@@ -201,7 +201,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -232,7 +232,7 @@
"effectApplication": "apply",
"effectTrigger": "prepareData",
"preventDuplicateEffects": true,
- "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/spells/fire.png",
@@ -249,7 +249,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -280,7 +280,7 @@
"effectApplication": "apply",
"effectTrigger": "prepareData",
"preventDuplicateEffects": true,
- "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/spells/heavens.png",
@@ -328,7 +328,7 @@
"effectApplication": "apply",
"effectTrigger": "prepareData",
"preventDuplicateEffects": true,
- "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/spells/life.png",
@@ -345,7 +345,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -376,7 +376,7 @@
"effectApplication": "apply",
"effectTrigger": "prepareData",
"preventDuplicateEffects": true,
- "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/spells/light.png",
@@ -393,7 +393,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -424,7 +424,7 @@
"effectApplication": "apply",
"effectTrigger": "prepareData",
"preventDuplicateEffects": true,
- "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/spells/metal.png",
@@ -472,7 +472,7 @@
"effectApplication": "apply",
"effectTrigger": "prepareData",
"preventDuplicateEffects": true,
- "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/spells/necromancy.png",
@@ -504,7 +504,7 @@
"effectApplication": "apply",
"effectTrigger": "prepareData",
"preventDuplicateEffects": true,
- "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/spells/shadow.png",
@@ -579,7 +579,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -602,7 +602,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -648,7 +648,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -671,7 +671,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -775,7 +775,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -833,7 +833,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -856,7 +856,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -902,7 +902,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -925,7 +925,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -1008,7 +1008,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(this.effect.origin).then(caster=> {\n if (caster&& (args.actor.has(game.i18n.localize(\"NAME.Undead\")) || args.actor.has(game.i18n.localize(\"NAME.Daemonic\"))))\n {\n let wp = caster.data.data.characteristics.wp.value\n if (wp > args.actor.data.data.characteristics.t.value)\n {\n if (args.actor.has(game.i18n.localize(\"NAME.Unstable\")))\n {\n args.actor.update({\"data.status.wounds.value\" : 0})\n args.actor.addCondition(\"dead\")\n }\n else\n {\n fromUuid(\"Compendium.wfrp4e-core.traits.D0ImWEIMSDgElsnl\").then(item => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n ChatMessage.create({content : `Added Unstable to ${args.actor.data.token.name}`, speaker : {alias: caster.name}})\n })\n }\n }\n }\n })"
+ "script": "fromUuid(this.effect.origin).then(caster=> {\n if (caster&& (args.actor.has(game.i18n.localize(\"NAME.Undead\")) || args.actor.has(game.i18n.localize(\"NAME.Daemonic\"))))\n {\n let wp = caster.characteristics.wp.value\n if (wp > args.actor.characteristics.t.value)\n {\n if (args.actor.has(game.i18n.localize(\"NAME.Unstable\")))\n {\n args.actor.update({\"data.status.wounds.value\" : 0})\n args.actor.addCondition(\"dead\")\n }\n else\n {\n fromUuid(\"Compendium.wfrp4e-core.traits.D0ImWEIMSDgElsnl\").then(item => {\n args.actor.createEmbeddedEntity(\"OwnedItem\", item)\n ChatMessage.create({content : `Added Unstable to ${args.actor.data.token.name}`, speaker : {alias: caster.name}})\n })\n }\n }\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/banishment.png",
@@ -1025,7 +1025,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -1067,7 +1067,7 @@
"effectApplication": "apply",
"effectTrigger": "prePrepareItems",
"preventDuplicateEffects": false,
- "script": "args.actor.data.data.characteristics.t.bonus += 2\nargs.actor.data.data.characteristics.t.calculationBonusModifier -= 2"
+ "script": "args.actor.characteristics.t.bonus += 2\nargs.actor.characteristics.t.calculationBonusModifier -= 2"
}
},
"icon": "modules/wfrp4e-core/icons/spells/barkskin.png",
@@ -1084,7 +1084,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -1242,7 +1242,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -1265,7 +1265,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -1311,7 +1311,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -1334,7 +1334,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -1409,7 +1409,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"bleeding\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"bleeding\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/witchcraft.png",
@@ -1440,7 +1440,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "if (args.actor.owner)\n args.actor.addCondition(\"blinded\", {{SL}})"
+ "script": "if (args.actor.isOwner)\n args.actor.addCondition(\"blinded\", {{SL}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/blinding-light.png",
@@ -1457,7 +1457,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -1515,7 +1515,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -1538,7 +1538,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -1584,7 +1584,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -1607,7 +1607,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -1717,7 +1717,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -1740,7 +1740,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -1786,7 +1786,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -1809,7 +1809,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -1919,7 +1919,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -1942,7 +1942,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -1988,7 +1988,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -2011,7 +2011,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -2100,7 +2100,7 @@
"effectApplication": "damage",
"effectTrigger": "applyDamage",
"preventDuplicateEffects": false,
- "script": "let applyAP = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_TB || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\nlet applyTB = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\n\n\nif (applyAP) \n{\n let AP = args.AP\n\n args.totalWoundLoss += AP.used\n let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"AP\")))\n args.messageElements[apIndex] = \"0/\" + AP.value + \" \" + game.i18n.localize(\"AP\")\n}\n\nif (applyTB)\n{\n let TB = args.actor.data.data.characteristics.t.bonus\n args.totalWoundLoss += TB\n let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"TB\")))\n args.messageElements[apIndex] = \"0/\" + TB + \" \" + game.i18n.localize(\"TB\")\n}\n\nlet woundsGained = Math.min(args.totalWoundLoss, args.actor.data.data.status.wounds.value)\n\nwoundsGained = Math.floor(woundsGained / 2)\n\nlet attackerWounds = duplicate(args.attacker.data.data.status.wounds)\n\nattackerWounds.value += woundsGained\n\nif (attackerWounds.value >= attackerWounds.max)\n attackerWounds.value = attackerWounds.max\n\nargs.attacker.update({ \"data.status.wounds\": attackerWounds })\n\nChatMessage.create({ content: `${args.attacker.data.token.name} gains ${woundsGained} Wounds` })"
+ "script": "let applyAP = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_TB || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\nlet applyTB = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\n\n\nif (applyAP) \n{\n let AP = args.AP\n\n args.totalWoundLoss += AP.used\n let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"AP\")))\n args.messageElements[apIndex] = \"0/\" + AP.value + \" \" + game.i18n.localize(\"AP\")\n}\n\nif (applyTB)\n{\n let TB = args.actor.characteristics.t.bonus\n args.totalWoundLoss += TB\n let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"TB\")))\n args.messageElements[apIndex] = \"0/\" + TB + \" \" + game.i18n.localize(\"TB\")\n}\n\nlet woundsGained = Math.min(args.totalWoundLoss, args.actor.status.wounds.value)\n\nwoundsGained = Math.floor(woundsGained / 2)\n\nlet attackerWounds = duplicate(args.attacker.status.wounds)\n\nattackerWounds.value += woundsGained\n\nif (attackerWounds.value >= attackerWounds.max)\n attackerWounds.value = attackerWounds.max\n\nargs.attacker.update({ \"data.status.wounds\": attackerWounds })\n\nChatMessage.create({ content: `${args.attacker.data.token.name} gains ${woundsGained} Wounds` })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/caress-of-laniph.png",
@@ -2117,7 +2117,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -2148,7 +2148,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "let roll = new Roll(\"1d10\").roll()\nroll.toMessage({flavor: \"Wounds Healed\", speaker : {alias : args.actor.name}})\n\nlet wounds = duplicate(args.actor.data.data.status.wounds);\n\nwounds.value += roll.total;\n\nif (wounds.value > wounds.max)\n wounds.value = wounds.max;\n\nargs.actor.update({\"data.status.wounds\" : wounds})\n\nlet bleeding = args.actor.hasCondition(\"bleeding\")\nif (bleeding)\n args.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)"
+ "script": "let roll = new Roll(\"1d10\").roll()\nroll.toMessage({flavor: \"Wounds Healed\", speaker : {alias : args.actor.name}})\n\nlet wounds = duplicate(args.actor.status.wounds);\n\nwounds.value += roll.total;\n\nif (wounds.value > wounds.max)\n wounds.value = wounds.max;\n\nargs.actor.update({\"data.status.wounds\" : wounds})\n\nlet bleeding = args.actor.hasCondition(\"bleeding\")\nif (bleeding)\n args.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)"
}
},
"icon": "modules/wfrp4e-core/icons/spells/cauterise.png",
@@ -2165,7 +2165,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -2196,7 +2196,7 @@
"effectApplication": "apply",
"effectTrigger": "preTakeDamage",
"preventDuplicateEffects": false,
- "script": "if ((args.opposeData.attackerTestResult.weapon && args.opposeData.attackerTestResult.weapon.attackType == \"melee\") || (args.opposeData.attackerTestResult.trait && !args.opposeData.attackerTestResult.trait.name.includes(\"Ranged\")))\n{\n args.actor.data.AP[args.opposeData.hitloc.value].value += {{SL}}\n}"
+ "script": "if ((args.opposedTest.attackerTest.item && args.opposedTest.attackerTest.item.attackType == \"melee\") || (args.opposedTest.attackerTest.item && !args.opposedTest.attackerTest.item.name.includes(\"Ranged\")))\n{\n args.actor.status.armour[args.opposedTest.result.hitloc.value].value += {{SL}}\n}"
}
},
"icon": "modules/wfrp4e-core/icons/spells/cerulean-shield.png",
@@ -2221,7 +2221,7 @@
"effectApplication": "apply",
"effectTrigger": "preOpposedDefender",
"preventDuplicateEffects": false,
- "script": "if ((args.attackerTest.weapon && args.attackerTest.weapon.attackType == \"melee\") || (args.attackerTest.trait && !args.attackerTest.trait.name.includes(\"Ranged\")))\n{\n let content = `${args.attackerTest.actor.token.name} takes ${this.actor.data.data.characteristics.wp.bonus} Damage from Cerulean Shield if they used a metal weapon.`\n args.opposeResult.other.push(content);\n}"
+ "script": "if ((args.attackerTest.weapon && args.attackerTest.weapon.attackType == \"melee\") || (args.attackerTest.trait && !args.attackerTest.trait.name.includes(\"Ranged\")))\n{\n let content = `${args.attackerTest.actor.token.name} takes ${this.actor.characteristics.wp.bonus} Damage from Cerulean Shield if they used a metal weapon.`\n args.opposedTest.result.other.push(content);\n}"
}
},
"icon": "modules/wfrp4e-core/icons/spells/cerulean-shield.png",
@@ -2296,7 +2296,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -2319,7 +2319,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -2365,7 +2365,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -2388,7 +2388,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -2511,7 +2511,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -2725,7 +2725,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -2773,7 +2773,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -2869,7 +2869,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -2917,7 +2917,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -3068,7 +3068,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"bleeding\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"bleeding\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/witchcraft.png",
@@ -3099,7 +3099,7 @@
"effectApplication": "apply",
"effectTrigger": "prefillDialog",
"preventDuplicateEffects": false,
- "script": "if (args.type == \"cast\" || args.type == \"channelling\")\n{\n if (args.item.data.lore.value == \"fire\")\n args.prefillModifiers.modifier += 10\n}"
+ "script": "if (args.type == \"cast\" || args.type == \"channelling\")\n{\n if (args.item.lore.value == \"fire\")\n args.prefillModifiers.modifier += 10\n}"
}
},
"icon": "modules/wfrp4e-core/icons/spells/crown-of-flame.png",
@@ -3116,7 +3116,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -3162,7 +3162,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"bleeding\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"bleeding\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/witchcraft.png",
@@ -3193,7 +3193,7 @@
"effectApplication": "apply",
"effectTrigger": "prePrepareData",
"preventDuplicateEffects": false,
- "script": "args.actor.data.data.status.fortune.value = 0"
+ "script": "args.actor.status.fortune.value = 0"
}
},
"icon": "modules/wfrp4e-core/icons/spells/curse-of-ill-fortune.png",
@@ -3235,7 +3235,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"bleeding\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"bleeding\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/witchcraft.png",
@@ -3258,7 +3258,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -3316,7 +3316,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -3339,7 +3339,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -3385,7 +3385,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -3408,7 +3408,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -3585,7 +3585,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n return \nfromUuid(this.effect.origin).then(caster => {\n if (caster)\n {\n let wp = caster.data.data.characteristics.wp\n if (this.actor.data.data.characteristics.wp.value >= wp.value)\n return\n this.actor.applyBasicDamage(wp.bonus, { damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL})\n }\n})"
+ "script": "if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n return \nfromUuid(this.effect.origin).then(caster => {\n if (caster)\n {\n let wp = caster.characteristics.wp\n if (this.actor.characteristics.wp.value >= wp.value)\n return\n this.actor.applyBasicDamage(wp.bonus, { damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL})\n }\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/destroy-lesser-daemon.png",
@@ -3752,7 +3752,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -3800,7 +3800,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -3896,7 +3896,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -3944,7 +3944,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -4130,7 +4130,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -4153,7 +4153,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -4199,7 +4199,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -4222,7 +4222,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -4328,7 +4328,7 @@
"effectApplication": "damage",
"effectTrigger": "applyDamage",
"preventDuplicateEffects": false,
- "script": "let wounds = duplicate(args.attacker.data.data.status.wounds)\nwounds.value+=1\n\nif (wounds.value > wounds.max)\n wounds.value = wounds.max\n\nargs.attacker.update({\"data.status.wounds\" : wounds})\n\nChatMessage.create({content: `${args.attacker.data.token.name} récupère 1 blessure.`})"
+ "script": "let wounds = duplicate(args.attacker.status.wounds)\nwounds.value+=1\n\nif (wounds.value > wounds.max)\n wounds.value = wounds.max\n\nargs.attacker.update({\"data.status.wounds\" : wounds})\n\nChatMessage.create({content: `${args.attacker.data.token.name} récupère 1 blessure.`})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/petty.png",
@@ -4387,7 +4387,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -4410,7 +4410,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -4456,7 +4456,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -4479,7 +4479,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -4554,7 +4554,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -4585,7 +4585,7 @@
"effectApplication": "apply",
"effectTrigger": "endRound",
"preventDuplicateEffects": false,
- "script": "fromUuid(this.effect.origin).then(caster => {\n if (caster)\n {\n let bonus = caster.data.data.characteristics.wp.bonus\n let wounds = duplicate(this.actor.data.data.status.wounds)\n wounds.value += bonus\n if (wounds.value > wounds.max)\n wounds.value = wounds.max\n this.actor.update({\"data.status.wounds\" : wounds})\n ChatMessage.create({content: `${this.actor.data.token.name} gagne ${bonus} Blessures (si en contact direct avec le sol)`, speaker : {alias : this.effect.label}})\n }\n})"
+ "script": "fromUuid(this.effect.origin).then(caster => {\n if (caster)\n {\n let bonus = caster.characteristics.wp.bonus\n let wounds = duplicate(this.actor.status.wounds)\n wounds.value += bonus\n if (wounds.value > wounds.max)\n wounds.value = wounds.max\n this.actor.update({\"data.status.wounds\" : wounds})\n ChatMessage.create({content: `${this.actor.data.token.name} gagne ${bonus} Blessures (si en contact direct avec le sol)`, speaker : {alias : this.effect.label}})\n }\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/earthblood.png",
@@ -4602,7 +4602,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -4625,7 +4625,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -4685,7 +4685,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "args.actor.addCondition(\"entangled\", {{spell.overcasts.other.current}})"
+ "script": "args.actor.addCondition(\"entangled\", {{result.overcast.other.current}})"
}
},
"icon": "modules/wfrp4e-core/icons/blank.png",
@@ -4717,7 +4717,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "args.actor.addCondition(\"entangled\", {{spell.overcasts.other.current}})"
+ "script": "args.actor.addCondition(\"entangled\", {{result.overcast.other.current}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/beasts.png",
@@ -4765,7 +4765,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "args.actor.addCondition(\"entangled\", {{spell.overcasts.other.current}})"
+ "script": "args.actor.addCondition(\"entangled\", {{result.overcast.other.current}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/daemonology.png",
@@ -4797,7 +4797,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "args.actor.addCondition(\"entangled\", {{spell.overcasts.other.current}})"
+ "script": "args.actor.addCondition(\"entangled\", {{result.overcast.other.current}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -4814,7 +4814,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -4845,7 +4845,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "args.actor.addCondition(\"entangled\", {{spell.overcasts.other.current}})"
+ "script": "args.actor.addCondition(\"entangled\", {{result.overcast.other.current}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -4862,7 +4862,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -4893,7 +4893,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "args.actor.addCondition(\"entangled\", {{spell.overcasts.other.current}})"
+ "script": "args.actor.addCondition(\"entangled\", {{result.overcast.other.current}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/heavens.png",
@@ -4941,7 +4941,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "args.actor.addCondition(\"entangled\", {{spell.overcasts.other.current}})"
+ "script": "args.actor.addCondition(\"entangled\", {{result.overcast.other.current}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -4958,7 +4958,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -4989,7 +4989,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "args.actor.addCondition(\"entangled\", {{spell.overcasts.other.current}})"
+ "script": "args.actor.addCondition(\"entangled\", {{result.overcast.other.current}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -5006,7 +5006,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -5037,7 +5037,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "args.actor.addCondition(\"entangled\", {{spell.overcasts.other.current}})"
+ "script": "args.actor.addCondition(\"entangled\", {{result.overcast.other.current}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/metal.png",
@@ -5085,7 +5085,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "args.actor.addCondition(\"entangled\", {{spell.overcasts.other.current}})"
+ "script": "args.actor.addCondition(\"entangled\", {{result.overcast.other.current}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/necromancy.png",
@@ -5117,7 +5117,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "args.actor.addCondition(\"entangled\", {{spell.overcasts.other.current}})"
+ "script": "args.actor.addCondition(\"entangled\", {{result.overcast.other.current}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/shadow.png",
@@ -5157,7 +5157,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -5365,7 +5365,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -5413,7 +5413,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -5509,7 +5509,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -5557,7 +5557,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -5806,7 +5806,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -5829,7 +5829,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -5852,7 +5852,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -5883,7 +5883,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.data.data.specification.value = this.actor.data.data.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})"
+ "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.specification.value = this.actor.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
}
},
"icon": "modules/wfrp4e-core/icons/blank.png",
@@ -5915,7 +5915,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.data.data.specification.value = this.actor.data.data.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})"
+ "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.specification.value = this.actor.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/beasts.png",
@@ -5963,7 +5963,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.data.data.specification.value = this.actor.data.data.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})"
+ "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.specification.value = this.actor.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/daemonology.png",
@@ -5995,7 +5995,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.data.data.specification.value = this.actor.data.data.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})"
+ "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.specification.value = this.actor.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -6012,7 +6012,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -6043,7 +6043,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.data.data.specification.value = this.actor.data.data.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})"
+ "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.specification.value = this.actor.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -6060,7 +6060,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -6091,7 +6091,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.data.data.specification.value = this.actor.data.data.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})"
+ "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.specification.value = this.actor.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/heavens.png",
@@ -6139,7 +6139,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.data.data.specification.value = this.actor.data.data.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})"
+ "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.specification.value = this.actor.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -6156,7 +6156,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -6187,7 +6187,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.data.data.specification.value = this.actor.data.data.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})"
+ "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.specification.value = this.actor.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -6204,7 +6204,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -6235,7 +6235,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.data.data.specification.value = this.actor.data.data.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})"
+ "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.specification.value = this.actor.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/metal.png",
@@ -6283,7 +6283,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.data.data.specification.value = this.actor.data.data.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})"
+ "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.specification.value = this.actor.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/necromancy.png",
@@ -6315,7 +6315,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.data.data.specification.value = this.actor.data.data.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})"
+ "script": "fromUuid(\"Compendium.wfrp4e-core.traits.EO05HX7jql0g605A\").then(item => {\n item.specification.value = this.actor.characteristics.ag.value\n this.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/shadow.png",
@@ -6401,7 +6401,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -6478,7 +6478,7 @@
"effectApplication": "apply",
"effectTrigger": "prefillDialog",
"preventDuplicateEffects": false,
- "script": "if (args.type == \"characteristic\" && args.item == \"fel\")\n {\n if (args.item == \"fel\")\n args.prefillModifiers.modifier -= 10\n }\n else if (args.type == \"skill\")\n {\n if (args.item.data.characteristic.value == \"fel\")\n args.prefillModifiers.modifier -= 10\n }"
+ "script": "if (args.type == \"characteristic\" && args.item == \"fel\")\n {\n if (args.item == \"fel\")\n args.prefillModifiers.modifier -= 10\n }\n else if (args.type == \"skill\")\n {\n if (args.item.characteristic.value == \"fel\")\n args.prefillModifiers.modifier -= 10\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/goodwill.png",
@@ -6543,7 +6543,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -6572,7 +6572,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"bleeding\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"bleeding\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/witchcraft.png",
@@ -6603,7 +6603,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(this.effect.origin).then(caster => {\n if (caster)\n {\n let healed= caster.data.data.characteristics.wp.bonus + caster.data.data.characteristics.int.bonus\n let wounds = duplicate(args.actor.data.data.status.wounds)\n wounds.value+=healed\n \n if (wounds.value > wounds.max)\n wounds.value = wounds.max\n \n args.actor.update({\"data.status.wounds\" : wounds})\n ChatMessage.create({content: `${this.actor.data.token.name} regains ${healed} Wounds`, speaker : {alias : this.effect.label}})\n }\n})\n\nthis.actor.setupSkill(\"Résistance\", {absolute : {difficulty : \"vhard\"}, context : {success : \"1 Corruption point that was gained within the last hour is removed.\", failure: \"Nothing happens\"}}).then(setupData => {\n this.actor.basicTest(setupData)\n})"
+ "script": "fromUuid(this.effect.origin).then(caster => {\n if (caster)\n {\n let healed= caster.characteristics.wp.bonus + caster.characteristics.int.bonus\n let wounds = duplicate(args.actor.status.wounds)\n wounds.value+=healed\n \n if (wounds.value > wounds.max)\n wounds.value = wounds.max\n \n args.actor.update({\"data.status.wounds\" : wounds})\n ChatMessage.create({content: `${this.actor.data.token.name} regains ${healed} Wounds`, speaker : {alias : this.effect.label}})\n }\n})\n\nthis.actor.setupSkill(\"Résistance\", {absolute : {difficulty : \"vhard\"}, context : {success : \"1 Corruption point that was gained within the last hour is removed.\", failure: \"Nothing happens\"}}).then(setupData => {\n this.actor.basicTest(setupData)\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/healing-light.png",
@@ -6620,7 +6620,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -6723,7 +6723,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -6746,7 +6746,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -6816,7 +6816,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -6839,7 +6839,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -6885,7 +6885,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -6908,7 +6908,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -7076,7 +7076,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -7099,7 +7099,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -7145,7 +7145,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -7168,7 +7168,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -7278,7 +7278,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -7301,7 +7301,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -7347,7 +7347,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -7370,7 +7370,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -7545,7 +7545,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -7576,7 +7576,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(this.effect.origin).then(caster => {\n if (caster)\n {\n let healed= caster.data.data.characteristics.wp.bonus\n let wounds = duplicate(args.actor.data.data.status.wounds)\n wounds.value+=healed\n \n if (wounds.value > wounds.max)\n wounds.value = wounds.max\n \n args.actor.update({\"data.status.wounds\" : wounds})\n ChatMessage.create({content: `${this.actor.data.token.name} regains ${healed} Wounds`, speaker : {alias : this.effect.label}})\n }\n})"
+ "script": "fromUuid(this.effect.origin).then(caster => {\n if (caster)\n {\n let healed= caster.characteristics.wp.bonus\n let wounds = duplicate(args.actor.status.wounds)\n wounds.value+=healed\n \n if (wounds.value > wounds.max)\n wounds.value = wounds.max\n \n args.actor.update({\"data.status.wounds\" : wounds})\n ChatMessage.create({content: `${this.actor.data.token.name} regains ${healed} Wounds`, speaker : {alias : this.effect.label}})\n }\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/nostrum.png",
@@ -7651,7 +7651,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -7734,7 +7734,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -7771,7 +7771,7 @@
"effectApplication": "apply",
"effectTrigger": "prepareData",
"preventDuplicateEffects": false,
- "script": "let AP = args.actor.data.AP\n\n AP[\"head\"].value += args.actor.data.data.characteristics.wp.bonus\n AP[\"rArm\"].value += args.actor.data.data.characteristics.wp.bonus\n AP[\"lArm\"].value += args.actor.data.data.characteristics.wp.bonus\n AP[\"body\"].value += args.actor.data.data.characteristics.wp.bonus\n AP[\"lLeg\"].value += args.actor.data.data.characteristics.wp.bonus\n AP[\"rLeg\"].value += args.actor.data.data.characteristics.wp.bonus"
+ "script": "let AP = args.actor.status.armour\n\n AP[\"head\"].value += args.actor.characteristics.wp.bonus\n AP[\"rArm\"].value += args.actor.characteristics.wp.bonus\n AP[\"lArm\"].value += args.actor.characteristics.wp.bonus\n AP[\"body\"].value += args.actor.characteristics.wp.bonus\n AP[\"lLeg\"].value += args.actor.characteristics.wp.bonus\n AP[\"rLeg\"].value += args.actor.characteristics.wp.bonus"
}
},
"icon": "modules/wfrp4e-core/icons/spells/purple-pall-of-shyish.png",
@@ -7796,7 +7796,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "fromUuid(\"Compendium.wfrp4e-core.traits.pTorrE0l3VybAbtn\").then(item => {\nitem.data.data.specification.value = {{spell.overcasts.other.current}}\nthis.actor.createEmbeddedEntity(\"OwnedItem\", item.data)\n})"
+ "script": "fromUuid(\"Compendium.wfrp4e-core.traits.pTorrE0l3VybAbtn\").then(item => {\nitem.specification.value = {{result.overcast.other.current}}\nthis.actor.createEmbeddedEntity(\"OwnedItem\", item)\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/purple-pall-of-shyish.png",
@@ -7813,7 +7813,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -7871,7 +7871,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -7894,7 +7894,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -7940,7 +7940,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -7963,7 +7963,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -8058,7 +8058,7 @@
"effectApplication": "apply",
"effectTrigger": "endRound",
"preventDuplicateEffects": false,
- "script": "let chatData = {content: \"\", whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n\nlet wounds = this.actor.data.data.status.wounds\nlet regen = new Roll(\"1d10\").roll().total\n\nif (wounds.value >= wounds.max)\n return\n\nif (wounds.value > 0)\n{\n wounds.value += regen\n if (wounds.value > wounds.max) \n wounds.value = wounds.max\n chatData.content += `${this.actor.name} regains ${regen} Wounds.`\n \n if (regen == 10)\n chatData.content += `
Additionally, they regenerate a Critical Wound.`\n}\nelse if (regen >= 8)\n{\n chatData.content += `${this.actor.name} rolled a ${regen} and regains 1 Wound.`\n wounds.value += 1\n if (regen == 10)\n chatData.content += `
Additionally, they regenerate a Critical Wound.`\n}\nelse\n{\n chatData.content += `${this.actor.name} Regenerate roll of ${regen} - No effect.`\n}\n\nthis.actor.update({\"data.status.wounds\" : wounds})\nChatMessage.create(chatData)"
+ "script": "let chatData = {content: \"\", whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n\nlet wounds = this.actor.status.wounds\nlet regen = new Roll(\"1d10\").roll().total\n\nif (wounds.value >= wounds.max)\n return\n\nif (wounds.value > 0)\n{\n wounds.value += regen\n if (wounds.value > wounds.max) \n wounds.value = wounds.max\n chatData.content += `${this.actor.name} regains ${regen} Wounds.`\n \n if (regen == 10)\n chatData.content += `
Additionally, they regenerate a Critical Wound.`\n}\nelse if (regen >= 8)\n{\n chatData.content += `${this.actor.name} rolled a ${regen} and regains 1 Wound.`\n wounds.value += 1\n if (regen == 10)\n chatData.content += `
Additionally, they regenerate a Critical Wound.`\n}\nelse\n{\n chatData.content += `${this.actor.name} Regenerate roll of ${regen} - No effect.`\n}\n\nthis.actor.update({\"data.status.wounds\" : wounds})\nChatMessage.create(chatData)"
}
},
"icon": "modules/wfrp4e-core/icons/spells/regenerate.png",
@@ -8075,7 +8075,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -8104,7 +8104,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -8135,7 +8135,7 @@
"effectApplication": "damage",
"effectTrigger": "applyDamage",
"preventDuplicateEffects": false,
- "script": "args.actor.setupSkill(\"Cool\", { context: { failure: \"Gained a @Condition[Broken] Condition\", success: \"Resisted the @Condition[Broken] Condition\" } }).then(setupData => {\n args.actor.basicTest(setupData).then(test => {\n if (test.result == \"failure\")s\n args.actor.addCondition(\"broken\")\n })\n})"
+ "script": "args.actor.setupSkill(\"Cool\", { context: { failure: \"Gained a @Condition[Broken] Condition\", success: \"Resisted the @Condition[Broken] Condition\" } }).then(setupData => {\n args.actor.basicTest(setupData).then(test => {\n if (test.result.outcome == \"failure\")s\n args.actor.addCondition(\"broken\")\n })\n})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/screaming-skull.png",
@@ -8159,7 +8159,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -8320,7 +8320,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -8383,7 +8383,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -8443,7 +8443,7 @@
"effectApplication": "damage",
"effectTrigger": "applyDamage",
"preventDuplicateEffects": true,
- "script": "let applyAP = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_TB || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\n\nif (applyAP) \n{\n let AP = args.AP\n\n args.totalWoundLoss += AP.used\n let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"AP\")))\n args.messageElements[apIndex] = \"0/\" + AP.value + \" \" + game.i18n.localize(\"AP\")\n}\n\nlet woundsGained = Math.min(args.actor.data.data.status.wounds.value, args.totalWoundLoss)\nwoundsGained = Math.ceil(woundsGained / 2)\n\nlet attackerWounds = duplicate(args.attacker.data.data.status.wounds)\n\nattackerWounds.value += woundsGained\n\nif (attackerWounds.value >= attackerWounds.max)\n attackerWounds.value = attackerWounds.max\n\nargs.attacker.update({\"data.status.wounds\" : attackerWounds})\n\nargs.actor.addCondition(\"fatigued\")\n\nChatMessage.create({content: `${args.attacker.data.token.name} gains ${woundsGained} Wounds`, alias : {speaker : this.effect.label}})"
+ "script": "let applyAP = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_TB || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\n\nif (applyAP) \n{\n let AP = args.AP\n\n args.totalWoundLoss += AP.used\n let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"AP\")))\n args.messageElements[apIndex] = \"0/\" + AP.value + \" \" + game.i18n.localize(\"AP\")\n}\n\nlet woundsGained = Math.min(args.actor.status.wounds.value, args.totalWoundLoss)\nwoundsGained = Math.ceil(woundsGained / 2)\n\nlet attackerWounds = duplicate(args.attacker.status.wounds)\n\nattackerWounds.value += woundsGained\n\nif (attackerWounds.value >= attackerWounds.max)\n attackerWounds.value = attackerWounds.max\n\nargs.attacker.update({\"data.status.wounds\" : attackerWounds})\n\nargs.actor.addCondition(\"fatigued\")\n\nChatMessage.create({content: `${args.attacker.data.token.name} gains ${woundsGained} Wounds`, alias : {speaker : this.effect.label}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/steal-life.png",
@@ -8460,7 +8460,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -8489,7 +8489,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -8595,7 +8595,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -8618,7 +8618,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -8664,7 +8664,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -8687,7 +8687,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -8823,7 +8823,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -8846,7 +8846,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -8892,7 +8892,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -8915,7 +8915,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
@@ -9038,7 +9038,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"bleeding\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"bleeding\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/witchcraft.png",
@@ -9069,7 +9069,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "let fortunePoints = {{spell.overcasts.other.current}}\nlet current = this.actor.data.data.status.fortune.value\n\nthis.actor.update({\"data.status.fortune.value\" : fortunePoints + current})\n\nChatMessage.create({content : `${this.actor.data.token.name} fortune points increased from ${current} to ${fortunePoints + current}`, speaker : {alias : this.effect.label}})"
+ "script": "let fortunePoints = {{result.overcast.other.current}}\nlet current = this.actor.status.fortune.value\n\nthis.actor.update({\"data.status.fortune.value\" : fortunePoints + current})\n\nChatMessage.create({content : `${this.actor.data.token.name} fortune points increased from ${current} to ${fortunePoints + current}`, speaker : {alias : this.effect.label}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/the-first-portent-of-amul.png",
@@ -9117,7 +9117,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "let fortunePoints = {{spell.overcasts.other.current}}\nlet current = this.actor.data.data.status.fortune.value\n\nthis.actor.update({\"data.status.fortune.value\" : fortunePoints + current})\n\nChatMessage.create({content : `${this.actor.data.token.name} fortune points increased from ${current} to ${fortunePoints + current}`, speaker : {alias : this.effect.label}})"
+ "script": "let fortunePoints = {{result.overcast.other.current}}\nlet current = this.actor.status.fortune.value\n\nthis.actor.update({\"data.status.fortune.value\" : fortunePoints + current})\n\nChatMessage.create({content : `${this.actor.data.token.name} fortune points increased from ${current} to ${fortunePoints + current}`, speaker : {alias : this.effect.label}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/the-second-portent-of-amul.png",
@@ -9165,7 +9165,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"preventDuplicateEffects": false,
- "script": "let current = this.actor.data.data.status.fate.value\n\nthis.actor.update({\"data.status.fate.value\" : current + 1})\n\nChatMessage.create({content : `${this.actor.data.token.name} fate points increased from ${current} to ${current + 1}`, speaker : {alias : this.effect.label}})"
+ "script": "let current = this.actor.status.fate.value\n\nthis.actor.update({\"data.status.fate.value\" : current + 1})\n\nChatMessage.create({content : `${this.actor.data.token.name} fate points increased from ${current} to ${current + 1}`, speaker : {alias : this.effect.label}})"
}
},
"icon": "modules/wfrp4e-core/icons/spells/the-third-portent-of-amul.png",
@@ -9213,7 +9213,7 @@
"effectApplication": "damage",
"effectTrigger": "applyDamage",
"preventDuplicateEffects": false,
- "script": "let applyTB = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\n\n\nif (applyTB)\n{\n let TB = args.actor.data.data.characteristics.t.bonus\n\n args.totalWoundLoss += TB\n let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"TB\")))\n args.messageElements[apIndex] = \"0/\" + TB + \" \" + game.i18n.localize(\"TB\")\n}\n\nargs.actor.addCondition(\"blinded\")\nargs.actor.addCondition(\"deafened\")\nargs.actor.addCondition(\"stunned\")"
+ "script": "let applyTB = (args.damageType == game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP || args.damageType == game.wfrp4e.config.DAMAGE_TYPE.NORMAL)\n\n\nif (applyTB)\n{\n let TB = args.actor.characteristics.t.bonus\n\n args.totalWoundLoss += TB\n let apIndex = args.messageElements.findIndex(i => i.includes(game.i18n.localize(\"TB\")))\n args.messageElements[apIndex] = \"0/\" + TB + \" \" + game.i18n.localize(\"TB\")\n}\n\nargs.actor.addCondition(\"blinded\")\nargs.actor.addCondition(\"deafened\")\nargs.actor.addCondition(\"stunned\")"
}
},
"icon": "modules/wfrp4e-core/icons/spells/transmutation-of-chamon.png",
@@ -9238,7 +9238,7 @@
"effectApplication": "apply",
"effectTrigger": "prepareData",
"preventDuplicateEffects": false,
- "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/spells/transmutation-of-chamon.png",
@@ -9303,7 +9303,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n args.actor.setupSkill(\"Résistance\", {context : {failure: \"1 Corruption Point Gained\", success : \"1 Fortune Point Gained\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.result == \"success\" && args.actor.data.type == \"character\")\n {\n args.actor.update({\"data.status.fortune.value\" : args.actor.data.data.status.fortune.value + 1})\n }\n else if (test.result.result == \"failure\" && args.actor.data.type == \"character\")\n {\n args.actor.update({\"data.status.corruption.value\" : args.actor.data.data.status.corruption.value + 1})\n }\n })\n })"
+ "script": "\n if (args.actor.isOwner)\n args.actor.setupSkill(\"Résistance\", {context : {failure: \"1 Corruption Point Gained\", success : \"1 Fortune Point Gained\"}}).then(setupData => {\n args.actor.basicTest(setupData).then(test => \n {\n if (test.result.outcome == \"success\" && args.actor.data.type == \"character\")\n {\n args.actor.update({\"data.status.fortune.value\" : args.actor.status.fortune.value + 1})\n }\n else if (test.result.outcome == \"failure\" && args.actor.data.type == \"character\")\n {\n args.actor.update({\"data.status.corruption.value\" : args.actor.status.corruption.value + 1})\n }\n })\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/tzeentch.png",
@@ -9373,7 +9373,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"fatigued\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/death.png",
@@ -9396,7 +9396,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n if (args.actor.owner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
+ "script": "\n if (args.actor.isOwner)\n {\n args.actor.addCondition(\"ablaze\")\n }"
}
},
"icon": "modules/wfrp4e-core/icons/spells/fire.png",
@@ -9442,7 +9442,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n if (!this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) && !this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n {\n let bleeding = this.actor.hasCondition(\"bleeding\")\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (bleeding) this.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n if (fatigued) this.actor.removeCondition(\"fatigued\", fatigued.flags.wfrp4e.value)\n }\n else if (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n this.actor.applyBasicDamage(caster.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/life.png",
@@ -9465,7 +9465,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
- "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.owner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.data.data.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
+ "script": "\n fromUuid(this.effect.origin).then(caster => {\n if (this.actor.isOwner)\n {\n let bleeding = this.actor.addCondition(\"blinded\")\n if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))\n this.actor.applyBasicDamage(caster.characteristics.int.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n }\n })"
}
},
"icon": "modules/wfrp4e-core/icons/spells/light.png",
diff --git a/compendium/wfrp4e-core.talents.json b/compendium/wfrp4e-core.talents.json
index 27cdd9b..7b00457 100644
--- a/compendium/wfrp4e-core.talents.json
+++ b/compendium/wfrp4e-core.talents.json
@@ -64,7 +64,7 @@
"effectApplication": "actor",
"effectTrigger": "rollChannellingTest",
"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",
@@ -97,7 +97,7 @@
"effectApplication": "actor",
"effectTrigger": "preRollTest",
"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",
@@ -176,7 +176,7 @@
"effectApplication": "actor",
"effectTrigger": "preRollTest",
"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(`${this.effect.label}: 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(`${this.effect.label}: 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",
@@ -216,7 +216,7 @@
"effectApplication": "actor",
"effectTrigger": "preRollTest",
"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(`${this.effect.label}: 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(`${this.effect.label}: 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",
@@ -270,7 +270,7 @@
"effectApplication": "actor",
"effectTrigger": "rollWeaponTest",
"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",
@@ -317,7 +317,7 @@
"effectApplication": "actor",
"effectTrigger": "preRollTest",
"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",
@@ -393,7 +393,7 @@
"effectApplication": "actor",
"effectTrigger": "preRollTest",
"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",
@@ -746,7 +746,7 @@
"effectApplication": "actor",
"effectTrigger": "prePrepareData",
"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",
@@ -779,7 +779,7 @@
"effectApplication": "actor",
"effectTrigger": "prePrepareItems",
"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",
@@ -826,7 +826,7 @@
"effectApplication": "actor",
"effectTrigger": "preRollTest",
"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",
@@ -859,7 +859,7 @@
"effectApplication": "actor",
"effectTrigger": "prefillDialog",
"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",
@@ -932,7 +932,7 @@
"effectApplication": "actor",
"effectTrigger": "prePrepareItem",
"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",
@@ -1033,7 +1033,7 @@
"effectApplication": "actor",
"effectTrigger": "rollCastTest",
"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",
@@ -1463,7 +1463,7 @@
"effectApplication": "actor",
"effectTrigger": "prepareData",
"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",
@@ -1557,7 +1557,7 @@
"effectApplication": "actor",
"effectTrigger": "rollWeaponTest",
"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",
@@ -1611,7 +1611,7 @@
"effectApplication": "actor",
"effectTrigger": "takeDamage",
"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",
@@ -1795,7 +1795,7 @@
"effectApplication": "actor",
"effectTrigger": "opposedDefender",
"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(`${this.effect.label}: 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(`${this.effect.label}: 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",
@@ -1835,7 +1835,7 @@
"effectApplication": "actor",
"effectTrigger": "calculateOpposedDamage",
"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",
@@ -1889,7 +1889,7 @@
"effectApplication": "actor",
"effectTrigger": "prepareData",
"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",
@@ -1989,7 +1989,7 @@
"effectApplication": "actor",
"effectTrigger": "rollWeaponTest",
"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",
@@ -2060,7 +2060,7 @@
"effectApplication": "actor",
"effectTrigger": "prePrepareItems",
"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",
@@ -2146,7 +2146,7 @@
"effectApplication": "actor",
"effectTrigger": "prePrepareItems",
"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",
@@ -2223,7 +2223,7 @@
"effectApplication": "actor",
"effectTrigger": "preRollTest",
"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(`${this.effect.label}: 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(`${this.effect.label}: 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",
diff --git a/compendium/wfrp4e-core.trappings.json b/compendium/wfrp4e-core.trappings.json
index 5956793..f82d03c 100644
--- a/compendium/wfrp4e-core.trappings.json
+++ b/compendium/wfrp4e-core.trappings.json
@@ -494,7 +494,7 @@
"effectApplication": "actor",
"effectTrigger": "invoke",
"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",
@@ -651,7 +651,7 @@
"effectApplication": "actor",
"effectTrigger": "invoke",
"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",
@@ -1356,7 +1356,7 @@
"effectApplication": "apply",
"effectTrigger": "oneTime",
"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",
@@ -1592,7 +1592,7 @@
"effectApplication": "actor",
"effectTrigger": "invoke",
"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",
@@ -1648,7 +1648,7 @@
"effectApplication": "apply",
"effectTrigger": "prefillDialog",
"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",
diff --git a/compendium/wfrp4e-dotr.dotr-items.json b/compendium/wfrp4e-dotr.dotr-items.json
index 40f69ae..52eda49 100644
--- a/compendium/wfrp4e-dotr.dotr-items.json
+++ b/compendium/wfrp4e-dotr.dotr-items.json
@@ -322,7 +322,7 @@
{
"id": "Luxury Cabin",
"name": "Luxury Cabin",
- "description": "
The Empire’s wealthy like to travel in comfort and the kind of cabin that one finds on a noble’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 Fellowship Tests made by the owner of a luxury cabin gain a +10 bonus, provided they are made within the cabin itself.
" + "description": "The Empire’s wealthy like to travel in comfort and the kind of cabin that one finds on a noble’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 Fellowship Tests made by the.isOwner of a luxury cabin gain a +10 bonus, provided they are made within the cabin itself.
" }, { "id": "Mage-Leaf", @@ -357,27 +357,27 @@ { "id": "Racing Hull", "name": "Racing Hull", - "description": "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.
\nA boat with a racing hull is tricky to control, though, and requires a Difficult (−10) Boat Handling Test every hour. On a Marginal (−1 SL) or Normal Failure, Movement cannot exceed the normal rate; on an Impressive Failure (−4 SL), Movement is half normal; and on an Astounding Failure (−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.
\nNormal 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.
\n\n" + "description": "Foundry Note: Encumbrance and Price reflects 10 ft. of length. Modify this item according to the ship it's being applied to.
\n
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.
\nA boat with a racing hull is tricky to control, though, and requires a Difficult (−10) Boat Handling Test every hour. On a Marginal (−1 SL) or Normal Failure, Movement cannot exceed the normal rate; on an Impressive Failure (−4 SL), Movement is half normal; and on an Astounding Failure (−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.
\nNormal 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.
\n\n" }, { "id": "Racing Rig (Fishing Skiff)", "name": "Racing Rig (Fishing Skiff)", - "description": "Foundry Note: Encumbrance and Price reflects 10 ft. of length. Modify this item according to the ship it's being applied to.
\n
As well as developing racing hulls (see above), the wealthy boat-owners of the Empire — or rather, the talented boat-builders in their employ — 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%
\nA racing rig includes a @Item[Flying Jib (Fishing Skiff)]{flying jib}, and the advantages of the two do not stack.
\nThis speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of −10 to all Boat Handling Tests. In addition, all hits to the rigging cause double normal Damage.
" + "description": "As well as developing racing hulls (see above), the wealthy boat.isOwners of the Empire — or rather, the talented boat-builders in their employ — 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%
\nA racing rig includes a @Item[Flying Jib (Fishing Skiff)]{flying jib}, and the advantages of the two do not stack.
\nThis speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of −10 to all Boat Handling Tests. In addition, all hits to the rigging cause double normal Damage.
" }, { "id": "Racing Rig (Large Barge)", "name": "Racing Rig (Large Barge)", - "description": "As well as developing racing hulls (see above), the wealthy boat-owners of the Empire — or rather, the talented boat-builders in their employ — 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%
\nA racing rig includes a @Item[Flying Jib (Large Barge)]{flying jib}, and the advantages of the two do not stack.
\nThis speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of −10 to all Boat Handling Tests. In addition, all hits to the rigging cause double normal Damage.
" + "description": "As well as developing racing hulls (see above), the wealthy boat.isOwners of the Empire — or rather, the talented boat-builders in their employ — 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%
\nA racing rig includes a @Item[Flying Jib (Large Barge)]{flying jib}, and the advantages of the two do not stack.
\nThis speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of −10 to all Boat Handling Tests. In addition, all hits to the rigging cause double normal Damage.
" }, { "id": "Racing Rig (Row Boat)", "name": "Racing Rig (Row Boat)", - "description": "As well as developing racing hulls (see above), the wealthy boat-owners of the Empire — or rather, the talented boat-builders in their employ — 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%
\nA racing rig includes a @Item[Flying Jib (Row Boat)]{flying jib}, and the advantages of the two do not stack.
\nThis speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of −10 to all Boat Handling Tests. In addition, all hits to the rigging cause double normal Damage.
" + "description": "As well as developing racing hulls (see above), the wealthy boat.isOwners of the Empire — or rather, the talented boat-builders in their employ — 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%
\nA racing rig includes a @Item[Flying Jib (Row Boat)]{flying jib}, and the advantages of the two do not stack.
\nThis speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of −10 to all Boat Handling Tests. In addition, all hits to the rigging cause double normal Damage.
" }, { "id": "Racing Rig (Typical Barge or Patrol Boat)", "name": "Racing Rig (Typical Barge or Patrol Boat)", - "description": "As well as developing racing hulls (see above), the wealthy boat-owners of the Empire — or rather, the talented boat-builders in their employ — 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%
\nA racing rig includes a @Item[Flying Jib (Typical Barge or Patrol Boat)]{flying jib}, and the advantages of the two do not stack.
\nThis speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of −10 to all Boat Handling Tests. In addition, all hits to the rigging cause double normal Damage.
" + "description": "As well as developing racing hulls (see above), the wealthy boat.isOwners of the Empire — or rather, the talented boat-builders in their employ — 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%
\nA racing rig includes a @Item[Flying Jib (Typical Barge or Patrol Boat)]{flying jib}, and the advantages of the two do not stack.
\nThis speed comes at a cost, though. The complex racing rig requires an expert crew, imposing a penalty of −10 to all Boat Handling Tests. In addition, all hits to the rigging cause double normal Damage.
" }, { "id": "Raised Gunwales (Fishing Skiff)", diff --git a/module.json b/module.json index 6d70ba0..1a85bdb 100644 --- a/module.json +++ b/module.json @@ -2,7 +2,7 @@ "name": "WH4-fr-translation", "title": "WFRP4e - Core Module en français.", "description": "Traduction Française pour Warhammer v4.", - "version": "4.0.2", + "version": "4.0.3", "minimumCoreVersion" : "0.8.0", "compatibleCoreVersion": "0.8.8", "author": "LeRatierBretonnien", diff --git a/modules/config-patch.js b/modules/config-patch.js index 4af8352..ceb5ad4 100644 --- a/modules/config-patch.js +++ b/modules/config-patch.js @@ -395,12 +395,12 @@ export class WH4FRPatchConfig { else difficulty = "veasy" - if (args.actor.owner) + if (args.actor.isOwner) { args.actor.setupSkill("Résistance", {absolute: {difficulty}}).then(setupData => { args.actor.basicTest(setupData).then(test => { - if (test.result.result == "failure") + if (test.result.outcome == "failure") args.actor.addCondition("dead") }) }) @@ -428,7 +428,7 @@ export class WH4FRPatchConfig { } else if (args.type == "skill") { - if (applicableCharacteristics.includes(args.item.data.characteristic.value)) + if (applicableCharacteristics.includes(args.item.characteristic.value)) args.prefillModifiers.modifier -= 10 } `} @@ -460,7 +460,7 @@ export class WH4FRPatchConfig { } else if (args.type == "skill") { - if (applicableCharacteristics.includes(args.item.data.characteristic.value)) + if (applicableCharacteristics.includes(args.item.characteristic.value)) args.prefillModifiers.modifier += modifier } }` @@ -489,7 +489,7 @@ export class WH4FRPatchConfig { } else if (args.type == "skill") { - if (applicableCharacteristics.includes(args.item.data.characteristic.value)) + if (applicableCharacteristics.includes(args.item.characteristic.value)) args.prefillModifiers.modifier -= 10 }`, "otherEffects" : ["blight", "wounded"] @@ -543,7 +543,7 @@ export class WH4FRPatchConfig { } else if (args.type == "skill") { - if (args.item.data.characteristic.value == "fel") + if (args.item.characteristic.value == "fel") args.prefillModifiers.modifier -= 10 } }` @@ -583,14 +583,14 @@ export class WH4FRPatchConfig { "effectTrigger": "rollTest", "symptom" : true, "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"] - if (applicableCharacteristics.includes(args.result.characteristic)) + if (applicableCharacteristics.includes(args.test.result.characteristic)) 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") - else if (args.result.weapon) + else if (args.test.result.weapon) this.actor.addCondition("stunned") } @@ -613,7 +613,7 @@ export class WH4FRPatchConfig { args.prefillModifiers.modifier -= 10 else if (args.type == "skill") { - if (args.item.data.characteristic.value == "fel") + if (args.item.characteristic.value == "fel") args.prefillModifiers.modifier -= 10 } }` @@ -630,12 +630,12 @@ export class WH4FRPatchConfig { "effectTrigger": "invoke", "symptom" : true, "script": ` - if (args.actor.owner) + if (args.actor.isOwner) { args.actor.setupSkill("Résistance", {absolute: {difficulty : "average"}}).then(setupData => { args.actor.basicTest(setupData).then(test => { - if (test.result.result == "failure") + if (test.result.outcome == "failure") fromUuid("Compendium.wfrp4e-core.diseases.kKccDTGzWzSXCBOb").then(disease => { args.actor.createEmbeddedEntity("OwnedItem", disease.data) }) @@ -781,7 +781,7 @@ export class WH4FRPatchConfig { actor : l'acteur qui encaisse les dégâts 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...) `, "applyDamage" : @@ -791,7 +791,7 @@ export class WH4FRPatchConfig { actor : l'acteur qui encaisse les dégâts 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...) totalWoundLoss : les Blessures perdues après calculs 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 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...) `, @@ -817,7 +817,7 @@ export class WH4FRPatchConfig { actor : l'acteur qui encaisse les dégâts 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...) totalWoundLoss : les Blessures perdues après calculs AP : les données concernant les PA utilisés @@ -867,7 +867,7 @@ export class WH4FRPatchConfig { 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) `, "preRollWeaponTest" : @@ -875,7 +875,7 @@ export class WH4FRPatchConfig { 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) `, @@ -884,7 +884,7 @@ export class WH4FRPatchConfig { 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) `, @@ -893,7 +893,7 @@ export class WH4FRPatchConfig { 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) `, @@ -902,7 +902,7 @@ export class WH4FRPatchConfig { 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) `, @@ -911,7 +911,7 @@ export class WH4FRPatchConfig { 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) `, @@ -920,7 +920,7 @@ export class WH4FRPatchConfig { 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) `, "rollIncomeTest" : @@ -928,7 +928,7 @@ export class WH4FRPatchConfig { 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) `, @@ -937,7 +937,7 @@ export class WH4FRPatchConfig { 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) `, @@ -946,7 +946,7 @@ export class WH4FRPatchConfig { 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) `, @@ -955,7 +955,7 @@ export class WH4FRPatchConfig { 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) `, @@ -964,7 +964,7 @@ export class WH4FRPatchConfig { 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) `, @@ -973,7 +973,7 @@ export class WH4FRPatchConfig { 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) `, @@ -984,7 +984,7 @@ export class WH4FRPatchConfig { attackerTest: le résultat du test de l'attaquant defenderTest: le résultat du test du défenseur - opposeResult: l'objet opposeResult, avant calcul + opposedTest.result: l'objet opposedTest.result, avant calcul `, "preOpposedDefender" : `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 defenderTest: le résultat du test du défenseur - opposeResult: l'objet opposeResult, avant calcul + opposedTest.result: l'objet opposedTest.result, avant calcul `, "opposedAttacker" : @@ -1003,7 +1003,7 @@ export class WH4FRPatchConfig { attackerTest: le résultat du test de l'attaquant defenderTest: le résultat du test du défenseur - opposeResult: l'objet opposeResult, avant calcul + opposedTest.result: l'objet opposedTest.result, avant calcul `, "opposedDefender" : @@ -1013,7 +1013,7 @@ export class WH4FRPatchConfig { attackerTest: le résultat du test de l'attaquant defenderTest: le résultat du test du défenseur - opposeResult: l'objet opposeResult, avant calcul + opposedTest.result: l'objet opposedTest.result, avant calcul `, "calculateOpposedDamage" : @@ -1024,7 +1024,7 @@ export class WH4FRPatchConfig { damage : calcul initial des dégâts avant multiplications 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 - opposeResult: détail à propos du Test Opposé + opposedTest.result: détail à propos du Test Opposé `, "getInitiativeFormula" : diff --git a/tools/convert_compendium_for_v4.lua b/tools/convert_compendium_for_v4.lua new file mode 100644 index 0000000..2fa5378 --- /dev/null +++ b/tools/convert_compendium_for_v4.lua @@ -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()