From a02e5a7d7d046e6198642ec0e57cacc9e22b3044 Mon Sep 17 00:00:00 2001 From: Samuel Dweller Date: Sat, 4 Jun 2022 18:25:26 -0500 Subject: [PATCH] Added old recruting/eating choices from old map to new map --- src/game/maps/Newtown.ts | 57 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/src/game/maps/Newtown.ts b/src/game/maps/Newtown.ts index ba7ec8a..7483b8a 100644 --- a/src/game/maps/Newtown.ts +++ b/src/game/maps/Newtown.ts @@ -88,6 +88,11 @@ export const Newtown = (): Place => { "Town street north of the Town square" ) + const northTownShop = new Place( + new ProperNoun("North Town Shop"), + "A shop for your impulsive buying needs" + ) + const eastTownStreet = new Place( new ProperNoun("East Town Street"), "Town street east of the Town square" @@ -187,6 +192,58 @@ export const Newtown = (): Place => { ) ) + townSquare.choices.push( + new Choice( + "Eat someone", + "Slurp", + (world, executor) => { + const snack = new Human(new ProperNoun(["Snack", "Treat", "Tasty", "Dinner", "Appetizer"][Math.floor(Math.random() * 5)]), [MalePronouns, FemalePronouns, TheyPronouns][Math.floor(Math.random() * 3)]) + snack.applyEffect(new SurrenderEffect()) + const options = executor.validActions(snack).filter(action => action instanceof DevourAction) + return options[Math.floor(options.length * Math.random())].execute(executor, snack) + } + ) + ) + + townSquare.choices.push( + new Choice( + "Fight someone", + "Ow", + (world) => { + const enemy = new Human(new ProperNoun("Nerd"), TheyPronouns) + enemy.side = Side.Monsters + enemy.ai = new VoreAI(enemy) + enemy.equip(new Items.Sword(), Items.EquipmentSlot.MainHand) + enemy.addPerk(new DeliciousPerk()) + const encounter = new Encounter( + { + name: "Fight some tasty nerd", + intro: () => new LogLine(`You find some nerd to fight.`) + }, + [world.player, enemy].concat(world.party) + ) + world.encounter = encounter + return nilLog + } + ) + ) + + townSquare.choices.push( + new Choice( + "Recruit someone", + "Not ow", + (world) => { + const ally = new Human(new ProperNoun("Ally"), TheyPronouns) + ally.side = Side.Heroes + ally.ai = new VoreAI(ally) + ally.equip(new Items.Sword(), Items.EquipmentSlot.MainHand) + world.party.push(ally) + + return new LogLine(`You recruit a nerd`) + } + ) + ) + debug.choices.push( new Choice( "Cut stats",