瀏覽代碼

Add a debug room with stat boosts/growth/shrinking

master
Fen Dweller 5 年之前
父節點
當前提交
82fbd44ceb
共有 1 個文件被更改,包括 44 次插入16 次删除
  1. +44
    -16
      src/game/maps/town.ts

+ 44
- 16
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)


Loading…
取消
儲存