Browse Source

Add a description of burping, plus burp onomatopoeia

master
Fen Dweller 3 years ago
parent
commit
18de183083
4 changed files with 43 additions and 5 deletions
  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 View File

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


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


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

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


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

@@ -90,3 +90,30 @@ export const Crunch = new RandomWord([
["!", 1, 1] ["!", 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 View File

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


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


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


wall = { wall = {


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

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


export const Digest = new RandomWord([ export const Digest = new RandomWord([
new Verb("digest"), new Verb("digest"),
new Verb("melt down", "melts down", "melting down", "melted down"),
new Verb("dissolve", "dissolves", "dissolving", "dissolved"), 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([ export const Absorb = new RandomWord([


Loading…
Cancel
Save