@@ -52,6 +52,7 @@ export enum ConnectionDirection {
export type Connection = {
destination: Container;
direction: ConnectionDirection;
description: (to: Container, from: Container, prey: Creature) => LogEntry;
}
export interface Container extends Actionable {
@@ -237,6 +238,11 @@ export abstract class DefaultContainer implements Container {
new LogLine(`${this.fluid.name.capital} ${this.fluid.sloshVerb.singular} around ${prey.name.objective}.`)
)
}
if (this.wall) {
lines.push(
new LogLine(`The ${this.wall.color} walls ${prey.name.conjugate(Words.Clench)} over ${prey.name.objective} like a vice.`)
)
}
return new LogLine(...lines)
}
@@ -263,7 +269,7 @@ export abstract class DefaultContainer implements Container {
}
digestLine (user: Creature, target: Creature): LogEntry {
return new LogLine(`${user.name.capital.possessive} ${this.name} ${this.name.conjugate(new Verb('finish', ' finishes'))} ${Words.Digest.present} ${target.name.objective} down, ${target.pronouns.possessive} ${Words.Struggle.singular} fading away as ${target.pronouns.subjective} ${target.pronouns.conjugate(Words.Succumb)}.`)
return new LogLine(`${user.name.capital.possessive} ${this.name} finishes ${Words.Digest.present} ${target.name.objective} down, ${target.pronouns.possessive} ${Words.Struggle.singular} fading away as ${target.pronouns.subjective} ${target.pronouns.conjugate(Words.Succumb)}.`)
}
absorbLine (user: Creature, target: Creature): LogEntry {
@@ -388,7 +394,11 @@ export class Stomach extends DefaultContainer {
export class Throat extends DefaultContainer {
fluid = {
color: new Adjective("clear"),
name: new Noun("saliva"),
name: new RandomWord([
new Noun("saliva"),
new Noun("drool"),
new Noun("slobber")
]),
sound: new Verb("squish", "squishes"),
sloshVerb: new Verb("slosh", "sloshes", "sloshing", "sloshed")
}
@@ -407,3 +417,9 @@ export class Throat extends DefaultContainer {
]))
}
}
export function transferDescription (verb: Word, preposition: Preposition): ((from: Container, to: Container, prey: Creature) => LogEntry) {
return (from: Container, to: Container, prey: Creature) => {
return new LogLine(`${from.owner.name.capital} ${verb.singular} ${prey.name.objective} ${preposition} ${to.consumePreposition} ${from.owner.name.possessive} ${to.name}.`)
}
}