From f4517f4b509b8dd4bfa9903a1832864ac280e8ce Mon Sep 17 00:00:00 2001 From: cha0s Date: Sun, 19 Apr 2020 23:56:15 -0500 Subject: [PATCH] fix: potion harm --- common/combat/harm.hooks.js | 1 + server/fixtures/potion.entity.js | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/combat/harm.hooks.js b/common/combat/harm.hooks.js index 7de1fa8..e674aa0 100644 --- a/common/combat/harm.hooks.js +++ b/common/combat/harm.hooks.js @@ -118,5 +118,6 @@ export function harmTypes() { 'sharp', 'fire', 'ice', + 'potion', ]; } diff --git a/server/fixtures/potion.entity.js b/server/fixtures/potion.entity.js index b89fbe8..427d8ae 100644 --- a/server/fixtures/potion.entity.js +++ b/server/fixtures/potion.entity.js @@ -4,8 +4,8 @@ import {AFFINITY_NONE} from '../../common/combat/constants'; // Healing potion. export function potionJSON() { - const causeHealing = buildInvoke(['wielder', 'takeHarmFrom'], [ - buildTraversal(['item']), + const causeHealing = buildInvoke(['item', 'harm'], [ + buildTraversal(['wielder']), ]); const decrement = buildInvoke( ['item', 'decrementQuantity'], @@ -19,8 +19,7 @@ export function potionJSON() { params: { harmSpecs: [ { - affinity: AFFINITY_NONE, - lock: 0, + type: 'potion', power: -50, variance: 0.1, },