Sfoglia il codice sorgente

Add a description of burping, plus burp onomatopoeia

master
Fen Dweller 3 anni fa
parent
commit
18de183083
4 ha cambiato i file con 43 aggiunte e 5 eliminazioni
  1. +5
    -0
      src/game/creatures/monsters/werewolf.ts
  2. +27
    -0
      src/game/onomatopoeia.ts
  3. +10
    -2
      src/game/vore.ts
  4. +1
    -3
      src/game/words.ts

+ 5
- 0
src/game/creatures/monsters/werewolf.ts Vedi File

@@ -6,6 +6,7 @@ import { LogEntry, LogLine } from '@/game/interface'
import { ImproperNoun, MalePronouns, ObjectPronouns, Preposition, Verb } from '@/game/language'
import { anyVore, ConnectionDirection, Container, Stomach, Throat, transferDescription } from '@/game/vore'
import * as Words from '@/game/words'
import * as Onomatopoeia from '@/game/onomatopoeia'

export default class Werewolf extends Creature {
constructor () {
@@ -54,6 +55,10 @@ export default class Werewolf extends Creature {
description: transferDescription(new Verb("hork"), new Preposition("up"))
})

stomach.voreRelay.subscribe("onDigested", (sender, args) => {
return Onomatopoeia.makeOnomatopoeia(Onomatopoeia.Burp)
})

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


+ 27
- 0
src/game/onomatopoeia.ts Vedi File

@@ -90,3 +90,30 @@ export const Crunch = new RandomWord([
["!", 1, 1]
])
])

export const Burp = new RandomWord([
new Onomatopoeia([
["B", 1, 1],
["U", 5, 12],
["R", 3, 6],
["P", 1, 1],
["!", 1, 3]
]),
new Onomatopoeia([
["H", 1, 1],
["U", 1, 4],
["O", 4, 6],
["R", 2, 3],
["P", 4, 6],
["H", 2, 3],
["!", 1, 3]
]),
new Onomatopoeia([
["B", 1, 1],
["W", 1, 2],
["A", 6, 11],
["R", 2, 4],
["P", 2, 3],
["!", 1, 3]
])
])

+ 10
- 2
src/game/vore.ts Vedi File

@@ -35,6 +35,7 @@ export type Gas = {
smell: Adjective;
bubbleVerb: Verb;
releaseVerb: Verb;
exit: Noun;
}

export enum ContainerCapability {
@@ -394,7 +395,13 @@ export abstract class DefaultContainer implements Container {
}

digest (preys: Creature[]): LogEntry {
return new LogLines(...preys.map(prey => this.digestLine(this.owner, prey)))
const results = preys.map(prey => this.digestLine(this.owner, prey))
if (preys.length > 0 && this.gas) {
results.push(new LogLine(
`A crass ${this.gas.releaseVerb} escapes ${this.owner.name.possessive} ${this.gas.exit} as ${this.owner.name.possessive} prey is digested, spewing ${this.gas.color} ${this.gas.name}.`
))
}
return new LogLines(...results)
}

onAbsorb (prey: Creature): LogEntry {
@@ -419,7 +426,8 @@ export class Stomach extends DefaultContainer {
color: new Adjective("hazy"),
name: new Noun("fume", "fumes"),
releaseVerb: new Verb("belch", "belches", "belching", "belched"),
smell: new Adjective("acrid")
smell: new Adjective("acrid"),
exit: new Noun("jaws")
}

wall = {


+ 1
- 3
src/game/words.ts Vedi File

@@ -44,10 +44,8 @@ export const Dark = new RandomWord([

export const Digest = new RandomWord([
new Verb("digest"),
new Verb("melt down", "melts down", "melting down", "melted down"),
new Verb("dissolve", "dissolves", "dissolving", "dissolved"),
new Verb("mulch", "mulches", "mulching", "mulched"),
new Verb("break down", "breaks down", "breaking down", "broken down")
new Verb("mulch", "mulches", "mulching", "mulched")
])

export const Absorb = new RandomWord([


Loading…
Annulla
Salva