From 793490ef8382687ed4b94c1a7be4b411a4307f1c Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Wed, 7 Aug 2019 15:24:36 -0400 Subject: [PATCH] Add some basic digestion --- stories/mass-vore.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/stories/mass-vore.js b/stories/mass-vore.js index 5183c6e..79f2246 100644 --- a/stories/mass-vore.js +++ b/stories/mass-vore.js @@ -2,6 +2,12 @@ function devour(state, count) { state.player.stats.stomach.value += 100; } + function digest(state, count) { + if (count === undefined) { + count = state.player.stats.stomach.value / 10; + } + state.player.stats.stomach.value -= count; + } stories.push({ id: "mass-vore", name: "Mass Vore", @@ -27,6 +33,19 @@ max: 10000, color: "rgb(200,20,100)" }; + + startTimer({ + id: "digestion", + func: state => { + digest(state); + return true; + }, + delay: 100, + loop: true, + classes: [ + + ] + }, state); }, intro: state => { print(["Munch time"]);