Fix effects in translated compendiums

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

View File

@ -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",