From 938ace62a4ddbc9f3a72d79bbff201b30ce00944 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Mon, 14 Feb 2022 13:59:57 +0100 Subject: [PATCH] Fix #63 - again --- compendium/wfrp4e-core.trappings.json | 6 +++--- module.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compendium/wfrp4e-core.trappings.json b/compendium/wfrp4e-core.trappings.json index 1a5e04e..52b5b37 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 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}" } }, "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.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})" + "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)" } }, "icon": "modules/wfrp4e-core/icons/equipment/herbs_and_draughts/healing-draught.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 fatigued= this.actor.hasCondition(\"fatigued\")\nif (fatigued){\nui.notifications.notify(`Suppression de ${fatigued.conditionValue} étast Extenués`)\nthis.actor.removeCondition(\"fatigued\", fatigued.conditionValue)}" } }, "icon": "modules/wfrp4e-core/icons/equipment/herbs_and_draughts/vitality-draught.png", diff --git a/module.json b/module.json index 17228b7..4aedee4 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.0", + "version": "5.1.1", "minimumCoreVersion": "0.8.0", "compatibleCoreVersion": "9", "scripts": [],