From 604ab94eaa2f38e372da4f9622a0cbe72816e3f3 Mon Sep 17 00:00:00 2001 From: hitechyeti <53953660+hitechyeti@users.noreply.github.com> Date: Tue, 5 Oct 2021 11:39:08 -0700 Subject: [PATCH] Update game.js --- game.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/game.js b/game.js index 1a90933..8848d77 100644 --- a/game.js +++ b/game.js @@ -46,7 +46,8 @@ const textNodes = [ options: [ { text: 'Take the goo', - setState: { blueGoo: true }, + //setState: { blueGoo: true }, + setState: { money: 10 } nextText: 2 }, { @@ -61,7 +62,7 @@ const textNodes = [ options: [ { text: 'Trade the goo for a sword', - requiredState: (currentState) => currentState.blueGoo, + requiredState: (currentState) => currentState.money > 5, setState: { blueGoo: false, sword: true }, nextText: 3 }, @@ -192,4 +193,4 @@ const textNodes = [ } ] -startGame() \ No newline at end of file +startGame()