From 729b1aac4654c6a1fb883b4a6eae6e06525d81eb Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sat, 8 Aug 2020 18:20:20 -0400 Subject: [PATCH] Add stat reduction and renaming to the debug room --- src/game/maps/town.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/game/maps/town.ts b/src/game/maps/town.ts index 3a88d12..20d66b0 100644 --- a/src/game/maps/town.ts +++ b/src/game/maps/town.ts @@ -281,6 +281,22 @@ export const Town = (): Place => { ) }) + debug.choices.push( + new Choice( + "Cut stats", + "Make your stats less good-er", + (world, executor) => { + Object.keys(Stat).forEach(stat => { + executor.baseStats[stat as Stat] -= 5 + executor.takeDamage(new Damage( + { amount: 5, target: (stat as Stat), type: DamageType.Pure } + )) + }) + return new LogLine(`You're weaker now`) + } + ) + ) + debug.choices.push( new Choice( "Boost stats", @@ -319,6 +335,22 @@ export const Town = (): Place => { ) ) + debug.choices.push( + new Choice( + "Set Name", + "Set your name", + (world, executor) => { + const input = prompt("Enter a name") + if (input !== null) { + executor.baseName = new ProperNoun(input) + return new LogLine(`Your new name is ${executor.baseName}.`) + } else { + return new LogLine(`nvm`) + } + } + ) + ) + home.biconnect(Direction.South, debug) home.biconnect(Direction.North, westAve) westAve.biconnect(Direction.West, westRoad)