Pārlūkot izejas kodu

Allow the player to boost their stats and heal at home

master
Fen Dweller pirms 5 gadiem
vecāks
revīzija
5fcf12e36d
1 mainītis faili ar 30 papildinājumiem un 1 dzēšanām
  1. +30
    -1
      src/game/maps/town.ts

+ 30
- 1
src/game/maps/town.ts Parādīt failu

@@ -1,6 +1,6 @@
import { Place, Choice, Direction } from '../world'
import { ProperNoun, ImproperNoun, MalePronouns, FemalePronouns, TheyPronouns } from '../language'
import { Encounter } from '../combat'
import { Encounter, Stat, Damage, DamageType, Vigor } from '../combat'
import * as Creatures from '../creatures'
import * as Items from '../items'
import { LogLine, nilLog, LogLines } from '../interface'
@@ -159,6 +159,35 @@ 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",
"Become not dead",
(world, executor) => {
Object.keys(Vigor).forEach(vigor => {
executor.vigors[vigor as Vigor] = executor.maxVigors[vigor as Vigor]
})
return new LogLine(`You're stronger now`)
}
)
)

bossEncounters.forEach(encounter => {
bosses.choices.push(
new Choice(


Notiek ielāde…
Atcelt
Saglabāt