diff --git a/src/game/combat/actions.ts b/src/game/combat/actions.ts index ebf92fb..6cf9f78 100644 --- a/src/game/combat/actions.ts +++ b/src/game/combat/actions.ts @@ -322,9 +322,7 @@ export class TransferAction extends Action { ) } - line: PairLineArgs = (user, target, args) => new LogLine( - `${user.name.capital} ${user.name.conjugate(this.verb)} ${target.name.objective} from ${user.pronouns.possessive} ${args.from.name} to ${user.pronouns.possessive} ${args.to.destination.name}` - ) + line: PairLineArgs = (user, target, args) => this.to.description(this.from, this.to.destination, target) allowed (user: Creature, target: Creature) { if (target.containedIn === this.from && this.from.contents.includes(target)) { diff --git a/src/game/creatures/monsters/werewolf.ts b/src/game/creatures/monsters/werewolf.ts index 6d302ee..532befb 100644 --- a/src/game/creatures/monsters/werewolf.ts +++ b/src/game/creatures/monsters/werewolf.ts @@ -1,8 +1,10 @@ import { VoreAI } from '@/game/ai' import { DamageType, Side, Stat, StatDamageFormula, Vigor } from '@/game/combat' import { Creature } from '@/game/creature' -import { ImproperNoun, MalePronouns, ObjectPronouns } from '@/game/language' -import { anyVore, ConnectionDirection, Stomach, Throat } from '@/game/vore' +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' export default class Werewolf extends Creature { constructor () { @@ -41,12 +43,14 @@ export default class Werewolf extends Creature { throat.connect({ destination: stomach, - direction: ConnectionDirection.Deeper + direction: ConnectionDirection.Deeper, + description: transferDescription(Words.Swallow, new Preposition("down")) }) stomach.connect({ destination: throat, - direction: ConnectionDirection.Shallower + direction: ConnectionDirection.Shallower, + description: transferDescription(new Verb("hork"), new Preposition("up")) }) this.side = Side.Monsters diff --git a/src/game/vore.ts b/src/game/vore.ts index 6294a1d..e07b482 100644 --- a/src/game/vore.ts +++ b/src/game/vore.ts @@ -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}.`) + } +} diff --git a/src/game/words.ts b/src/game/words.ts index cc37152..124e87e 100644 --- a/src/game/words.ts +++ b/src/game/words.ts @@ -21,8 +21,7 @@ export const Slick = new RandomWord([ export const Swallow = new RandomWord([ new Verb("swallow"), - new Verb("gulp"), - new Verb("consume", "consumes", "consuming", "consumed") + new Verb("gulp") ]) export const Churns = new RandomWord([