Explorar el Código

Add stat changers; allow setting human/AO control

vintage
Fen Dweller hace 2 años
padre
commit
06a5ecb056
Se han modificado 3 ficheros con 15406 adiciones y 18 borrados
  1. +15315
    -18
      package-lock.json
  2. +7
    -0
      src/components/Statblock.vue
  3. +84
    -0
      src/game/maps/town.ts

+ 15315
- 18
package-lock.json
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 7
- 0
src/components/Statblock.vue Ver fichero

@@ -60,6 +60,8 @@
<button @click.stop="subject.perspective = POV.First">1st</button>
<button @click.stop="subject.perspective = POV.Second">2nd</button>
<button @click.stop="subject.perspective = POV.Third">3rd</button>
<button @click.stop="subject.ai = null">Human</button>
<button @click.stop="subject.ai = makeAI()">AI</button>
<button class="show-profile" @click="$emit('profile', subject)">Show profile</button>
</div>
</div>
@@ -73,6 +75,7 @@ import { Stats, Stat, StatIcons, StatDescs, Vigor, VigorIcons, VigorDescs, VoreS
import ContainerView from '@/components/ContainerView.vue'
import tippy, { delegate, createSingleton } from 'tippy.js'
import 'tippy.js/dist/tippy.css'
import { VoreAI } from '@/game/ai'

@Component({
components: {
@@ -138,6 +141,10 @@ export default class Statblock extends Vue {
})
}

makeAI () {
return new VoreAI()
}

mounted () {
const statEntries = Array.from(this.$el.querySelectorAll(".stat-entry"))
const name = Array.from(this.$el.querySelectorAll(".name"))


+ 84
- 0
src/game/maps/town.ts Ver fichero

@@ -430,6 +430,90 @@ export const Town = (): Place => {
)
)

debug.choices.push(
new Choice(
"Boost agility",
"More agility",
(world, executor) => {
executor.baseStats[Stat.Agility] += 5
executor.takeDamage(new Damage(
{ amount: 5, target: Stat.Agility, type: DamageType.Heal }
))
return new LogLine(`You're stronger now`)
}
)
)

debug.choices.push(
new Choice(
"Boost charm",
"More charm",
(world, executor) => {
executor.baseStats[Stat.Charm] += 5
executor.takeDamage(new Damage(
{ amount: 5, target: Stat.Charm, type: DamageType.Heal }
))
return new LogLine(`You're stronger now`)
}
)
)

debug.choices.push(
new Choice(
"Boost power",
"More power",
(world, executor) => {
executor.baseStats[Stat.Power] += 5
executor.takeDamage(new Damage(
{ amount: 5, target: Stat.Power, type: DamageType.Heal }
))
return new LogLine(`You're stronger now`)
}
)
)

debug.choices.push(
new Choice(
"Boost reflexes",
"More reflexes",
(world, executor) => {
executor.baseStats[Stat.Reflexes] += 5
executor.takeDamage(new Damage(
{ amount: 5, target: Stat.Reflexes, type: DamageType.Heal }
))
return new LogLine(`You're stronger now`)
}
)
)

debug.choices.push(
new Choice(
"Boost toughness",
"More toughness",
(world, executor) => {
executor.baseStats[Stat.Toughness] += 5
executor.takeDamage(new Damage(
{ amount: 5, target: Stat.Toughness, type: DamageType.Heal }
))
return new LogLine(`You're stronger now`)
}
)
)

debug.choices.push(
new Choice(
"Boost willpower",
"More willpower",
(world, executor) => {
executor.baseStats[Stat.Willpower] += 5
executor.takeDamage(new Damage(
{ amount: 5, target: Stat.Willpower, type: DamageType.Heal }
))
return new LogLine(`You're stronger now`)
}
)
)

debug.choices.push(
new Choice(
"Grow",


Cargando…
Cancelar
Guardar