From d035c6923eaf2ae217de839a16faebc2ca83c793 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 9 Aug 2020 10:57:20 -0400 Subject: [PATCH] Make healing also remove status effects and predation --- src/game/maps/town.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/game/maps/town.ts b/src/game/maps/town.ts index 49f6bc4..0dbc767 100644 --- a/src/game/maps/town.ts +++ b/src/game/maps/town.ts @@ -186,12 +186,18 @@ export const Town = (): Place => { home.choices.push( new Choice( "Heal", - "Become not dead", + "Become not dead and/or eaten", (world, executor) => { Object.keys(Vigor).forEach(vigor => { executor.vigors[vigor as Vigor] = executor.maxVigors[vigor as Vigor] }) - return new LogLine(`You're stronger now`) + if (executor.containedIn !== null) { + executor.containedIn.release(executor) + } + executor.statusEffects.forEach(effect => { + executor.removeEffect(effect) + }) + return new LogLine(`You're healthy again`) } ) )