diff --git a/src/game/creatures/monsters/werewolf.ts b/src/game/creatures/monsters/werewolf.ts index 1b1139b..b5b4a7e 100644 --- a/src/game/creatures/monsters/werewolf.ts +++ b/src/game/creatures/monsters/werewolf.ts @@ -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) } diff --git a/src/game/onomatopoeia.ts b/src/game/onomatopoeia.ts index 13cc352..4a9cbe1 100644 --- a/src/game/onomatopoeia.ts +++ b/src/game/onomatopoeia.ts @@ -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] + ]) +]) diff --git a/src/game/vore.ts b/src/game/vore.ts index 98ec01c..1991739 100644 --- a/src/game/vore.ts +++ b/src/game/vore.ts @@ -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 = { diff --git a/src/game/words.ts b/src/game/words.ts index 3e57bf2..cc46a58 100644 --- a/src/game/words.ts +++ b/src/game/words.ts @@ -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([