Selaa lähdekoodia

Add stat reduction and renaming to the debug room

master
Fen Dweller 5 vuotta sitten
vanhempi
commit
729b1aac46
1 muutettua tiedostoa jossa 32 lisäystä ja 0 poistoa
  1. +32
    -0
      src/game/maps/town.ts

+ 32
- 0
src/game/maps/town.ts Näytä tiedosto

@@ -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)


Loading…
Peruuta
Tallenna