From 82fbd44ceb26c4d187eaf7b21107b713c3716d11 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sat, 8 Aug 2020 17:52:20 -0400 Subject: [PATCH] Add a debug room with stat boosts/growth/shrinking --- src/game/maps/town.ts | 60 +++++++++++++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 16 deletions(-) diff --git a/src/game/maps/town.ts b/src/game/maps/town.ts index a47d730..3a88d12 100644 --- a/src/game/maps/town.ts +++ b/src/game/maps/town.ts @@ -65,6 +65,11 @@ export const Town = (): Place => { "A very home-y place" ) + const debug = new Place( + new ProperNoun("Debug Room"), + "Where weird stuff happens" + ) + const westAve = new Place( new ImproperNoun('West Avenue'), "Streets of Sim City" @@ -196,22 +201,6 @@ export const Town = (): Place => { ) ) - home.choices.push( - new Choice( - "Boost stats", - "Make your stats more 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.Heal } - )) - }) - return new LogLine(`You're stronger now`) - } - ) - ) - home.choices.push( new Choice( "Heal", @@ -292,6 +281,45 @@ export const Town = (): Place => { ) }) + debug.choices.push( + new Choice( + "Boost stats", + "Make your stats more 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.Heal } + )) + }) + return new LogLine(`You're stronger now`) + } + ) + ) + + debug.choices.push( + new Choice( + "Grow", + "Make yourself larger", + (world, executor) => { + executor.voreStats.Mass *= 1.5 + return new LogLine(`You're larger now`) + } + ) + ) + + debug.choices.push( + new Choice( + "Shrink", + "Make yourself smaller", + (world, executor) => { + executor.voreStats.Mass /= 1.5 + return new LogLine(`You're smaller now`) + } + ) + ) + + home.biconnect(Direction.South, debug) home.biconnect(Direction.North, westAve) westAve.biconnect(Direction.West, westRoad) westAve.biconnect(Direction.North, alley)