Explorar el Código

Add werewolves to the woods

master
Fen Dweller hace 5 años
padre
commit
7cdcc3ba0a
Se han modificado 3 ficheros con 88 adiciones y 1 borrados
  1. +2
    -1
      src/game/creatures.ts
  2. +68
    -0
      src/game/creatures/werewolf.ts
  3. +18
    -0
      src/game/maps/town.ts

+ 2
- 1
src/game/creatures.ts Ver fichero

@@ -9,5 +9,6 @@ import { Shingo } from './creatures/shingo'
import { Goldeneye } from './creatures/goldeneye'
import { Kuro } from './creatures/kuro'
import { Geta } from './creatures/geta'
import { Werewolf } from './creatures/werewolf'

export { Wolf, Player, Cafat, Human, Withers, Kenzie, Dragon, Shingo, Goldeneye, Kuro, Geta }
export { Wolf, Player, Cafat, Human, Withers, Kenzie, Dragon, Shingo, Goldeneye, Kuro, Geta, Werewolf }

+ 68
- 0
src/game/creatures/werewolf.ts Ver fichero

@@ -0,0 +1,68 @@
import { Creature } from "../creature"
import { Damage, DamageType, ConstantDamageFormula, Vigor, Side, StatDamageFormula, Stat } from '../combat'
import { MalePronouns, ImproperNoun, Verb } from '../language'
import { Stomach, Bowels, Cock, Balls, anyVore, biconnectContainers } from '../vore'
import { AttackAction, TransferAction, FeedAction } from '../combat/actions'
import { VoreAI } from '../ai'

export class Werewolf extends Creature {
constructor () {
super(
new ImproperNoun('werewolf', 'werewolves'),
new ImproperNoun('werewolf', 'werewolves'),
MalePronouns,
{ Toughness: 40, Power: 50, Reflexes: 40, Agility: 30, Willpower: 20, Charm: 50 },
anyVore,
anyVore,
100
)
this.actions.push(
new AttackAction(
new StatDamageFormula([
{ fraction: 1, stat: Stat.Power, target: Vigor.Health, type: DamageType.Pierce },
{ fraction: 0.5, stat: Stat.Power, target: Vigor.Health, type: DamageType.Crush }
]),
new Verb("bite")
)
)

this.ai = new VoreAI()
this.side = Side.Monsters

const stomach = new Stomach(this, 2, new ConstantDamageFormula(new Damage(
{ amount: 60, type: DamageType.Acid, target: Vigor.Health },
{ amount: 30, type: DamageType.Crush, target: Vigor.Stamina },
{ amount: 30, type: DamageType.Dominance, target: Vigor.Resolve }
)))
this.containers.push(stomach)

const bowels = new Bowels(this, 2, new ConstantDamageFormula(new Damage(
{ amount: 30, type: DamageType.Crush, target: Vigor.Health },
{ amount: 60, type: DamageType.Crush, target: Vigor.Stamina },
{ amount: 60, type: DamageType.Dominance, target: Vigor.Resolve }
)))

this.containers.push(bowels)

this.actions.push(new TransferAction(bowels, stomach))

this.otherActions.push(new FeedAction(stomach))

const cock = new Cock(this, 2, new ConstantDamageFormula(new Damage(
{ amount: 30, type: DamageType.Crush, target: Vigor.Health },
{ amount: 60, type: DamageType.Crush, target: Vigor.Stamina },
{ amount: 60, type: DamageType.Dominance, target: Vigor.Resolve }
)))

const balls = new Balls(this, 2, new ConstantDamageFormula(new Damage(
{ amount: 30, type: DamageType.Crush, target: Vigor.Health },
{ amount: 60, type: DamageType.Crush, target: Vigor.Stamina },
{ amount: 60, type: DamageType.Dominance, target: Vigor.Resolve }
)), cock)

this.containers.push(balls)
this.containers.push(cock)

biconnectContainers(cock, balls)
}
}

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

@@ -137,6 +137,24 @@ export const Town = (): Place => {
)
)

woods.choices.push(
new Choice(
"Fight a werewolf",
"yolo",
(world, executor) => {
world.encounter = new Encounter(
{
name: "You punched a werewolf",
intro: (world: World) => new LogLine(`You punched a werewolf. The werewolf is angry.`)
},
[executor, new Creatures.Werewolf()]
)

return new LogLine(`FIGHT TIME`)
}
)
)

woods.choices.push(
new Choice(
"Fight a dragon",


Cargando…
Cancelar
Guardar