From c9bcd0d8e65d266bcdf0a51667bfed40660a0416 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Mon, 14 Feb 2022 20:16:41 +0100 Subject: [PATCH] Fix 63 - again 2 --- compendium/wfrp4e-core.trappings.json | 12 ++++++++++-- module.json | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/compendium/wfrp4e-core.trappings.json b/compendium/wfrp4e-core.trappings.json index 52b5b37..f94f22c 100644 --- a/compendium/wfrp4e-core.trappings.json +++ b/compendium/wfrp4e-core.trappings.json @@ -494,6 +494,8 @@ "effectApplication": "actor", "effectTrigger": "invoke", "preventDuplicateEffects": false, + "reduceQuantity":true, + "hide":false, "script": "let bleeding = this.actor.hasCondition(\"bleeding\")\nif (bleeding){\nui.notifications.notify(`Suppression ${bleeding.flags.wfrp4e.value} d'états Hemoragiques`)\nthis.actor.removeCondition(\"bleeding\", bleeding.flags.wfrp4e.value)\n}" } }, @@ -651,7 +653,9 @@ "effectApplication": "actor", "effectTrigger": "invoke", "preventDuplicateEffects": false, - "script": "let wounds = this.actor.status.wounds\nif (wounds.value == 0) return ui.notifications.error(\"Aucun effet à 9 Blessures\")\nui.notifications.notify(`Guérison de ${this.actor.characteristics.t.bonus} Blessures`)\nthis.actor.modifyWounds(this.actor.characteristics.t.bonus)" + "reduceQuantity":true, + "hide":false, + "script": "let wounds = this.actor.status.wounds\nif (wounds.value == 0) return ui.notifications.error(\"Aucun effet à 0 Blessures\")\nui.notifications.notify(`Guérison de ${this.actor.characteristics.t.bonus} Blessures`)\nthis.actor.modifyWounds(this.actor.characteristics.t.bonus)" } }, "icon": "modules/wfrp4e-core/icons/equipment/herbs_and_draughts/healing-draught.png", @@ -1356,7 +1360,9 @@ "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}" + "reduceQuantity":true, + "hide":false, + "script": "let stunned= this.actor.hasCondition(\"stunned\")\nif (stunned) {\nui.notifications.notify(`1 état Assommé enlevé`)\nthis.actor.removeCondition(\"stunned\", 1)\n}" } }, "icon": "modules/wfrp4e-core/icons/equipment/herbs_and_draughts/salwort.png", @@ -1592,6 +1598,8 @@ "effectApplication": "actor", "effectTrigger": "invoke", "preventDuplicateEffects": false, + "reduceQuantity":true, + "hide":false, "script": "let fatigued= this.actor.hasCondition(\"fatigued\")\nif (fatigued){\nui.notifications.notify(`Suppression de ${fatigued.conditionValue} étast Extenués`)\nthis.actor.removeCondition(\"fatigued\", fatigued.conditionValue)}" } }, diff --git a/module.json b/module.json index 4aedee4..8928200 100644 --- a/module.json +++ b/module.json @@ -6,7 +6,7 @@ "authors": [], "url": "https://gitlab.com/LeRatierBretonnien/foundryvtt-wh4-lang-fr-fr", "flags": {}, - "version": "5.1.1", + "version": "5.1.2", "minimumCoreVersion": "0.8.0", "compatibleCoreVersion": "9", "scripts": [],