diff --git a/src/game/language.ts b/src/game/language.ts index 28444e0..cc59c8f 100644 --- a/src/game/language.ts +++ b/src/game/language.ts @@ -365,6 +365,24 @@ export class Verb extends Word { } } +export class Preposition extends Word { + constructor (private word: string, public opt: WordOptions = emptyConfig) { + super(opt) + } + + configure (opts: WordOptions): Word { + return new Preposition(this.word, opts) + } + + toString (): string { + if (this.opt.capital) { + return this.word.slice(0, 1).toUpperCase() + this.word.slice(1) + } else { + return this.word + } + } +} + // this one is obnoxious export class ToBe extends Word { constructor (protected opts: WordOptions = emptyConfig) { diff --git a/src/game/vore.ts b/src/game/vore.ts index 6cc130e..931f890 100644 --- a/src/game/vore.ts +++ b/src/game/vore.ts @@ -1,6 +1,6 @@ import { Damage, DamageType, Actionable, Action, Vigor, DamageInstance, DamageFormula } from './combat' import { LogLines, LogEntry, LogLine, nilLog, RandomEntry } from './interface' -import { Noun, ImproperNoun, Verb, RandomWord, Word } from './language' +import { Noun, ImproperNoun, Verb, RandomWord, Word, Preposition } from './language' import { RubAction, DevourAction, ReleaseAction, StruggleAction, TransferAction } from './combat/actions' import * as Words from './words' import { Creature } from './creature' @@ -53,8 +53,11 @@ export abstract class NormalContainer implements Container { actions: Array = [] consumeVerb = new Verb('trap') + consumePreposition = new Preposition("in") releaseVerb = new Verb('release', 'releases', 'releasing', 'released') + releasePreposition = new Preposition("from") struggleVerb = new Verb('struggle', 'struggles', 'struggling', 'struggled') + strugglePreposition = new Preposition("in") constructor (name: Noun, public owner: Creature, public voreTypes: Set, public capacityFactor: number) { this.name = name.all @@ -68,15 +71,15 @@ export abstract class NormalContainer implements Container { } consumeLine (user: Creature, target: Creature): LogEntry { - return new LogLine(`${user.name.capital} ${user.name.conjugate(this.consumeVerb)} ${target.name.objective} in ${user.pronouns.possessive} ${this.name}.`) + return new LogLine(`${user.name.capital} ${user.name.conjugate(this.consumeVerb)} ${target.name.objective} ${this.consumePreposition} ${user.pronouns.possessive} ${this.name}.`) } releaseLine (user: Creature, target: Creature): LogEntry { - return new LogLine(`${user.name.capital} ${user.name.conjugate(this.releaseVerb)} ${target.name.objective} up from ${user.pronouns.possessive} ${this.name}.`) + return new LogLine(`${user.name.capital} ${user.name.conjugate(this.releaseVerb)} ${target.name.objective} ${this.releasePreposition} ${user.pronouns.possessive} ${this.name}.`) } struggleLine (user: Creature, target: Creature): LogEntry { - return new LogLine(`${user.name.capital} ${user.name.conjugate(this.struggleVerb)} within ${target.name.possessive} ${this.name}.`) + return new LogLine(`${user.name.capital} ${user.name.conjugate(this.struggleVerb)} ${this.strugglePreposition} ${target.name.possessive} ${this.name}.`) } get fullness (): number { @@ -170,8 +173,11 @@ export interface VoreContainer extends Container { export abstract class NormalVoreContainer extends NormalContainer implements VoreContainer { consumeVerb = new Verb('devour') + consumePreposition = new Preposition("into") releaseVerb = new Verb('release', 'releases', 'releasing', 'released') + releasePreposition = new Preposition("out from") struggleVerb = new Verb('struggle', 'struggles', 'struggling', 'struggled') + strugglePreposition = new Preposition("within") fluidColor = "#00ff0088" digested: Array = [] @@ -195,16 +201,16 @@ export abstract class NormalVoreContainer extends NormalContainer implements Vor consumeLine (user: Creature, target: Creature) { return new RandomEntry( - new LogLine(`${user.name.capital} ${user.name.conjugate(this.consumeVerb)} ${target.name.objective}, forcing ${target.pronouns.objective} into ${user.pronouns.possessive} ${this.name}.`), - new LogLine(`${user.name.capital} ${user.name.conjugate(new Verb("pounce"))} on ${target.name.objective} and ${user.name.conjugate(this.consumeVerb)} ${target.pronouns.objective}, ${Words.Force.present} ${target.pronouns.objective} into ${user.pronouns.possessive} ${this.name}.`) + new LogLine(`${user.name.capital} ${user.name.conjugate(this.consumeVerb)} ${target.name.objective}, forcing ${target.pronouns.objective} ${this.consumePreposition} ${user.pronouns.possessive} ${this.name}.`), + new LogLine(`${user.name.capital} ${user.name.conjugate(new Verb("pounce"))} on ${target.name.objective} and ${user.name.conjugate(this.consumeVerb)} ${target.pronouns.objective}, ${Words.Force.present} ${target.pronouns.objective} ${this.consumePreposition} ${user.pronouns.possessive} ${this.name}.`) ) } tickLine (user: Creature, target: Creature, args: { damage: Damage }): LogEntry { return new RandomEntry( - new LogLine(`${user.name.capital} ${user.name.conjugate(Words.Churns)} ${target.name.objective} in ${user.pronouns.possessive} ${this.name} for `, args.damage.renderShort(), `.`), + new LogLine(`${user.name.capital} ${user.name.conjugate(Words.Churns)} ${target.name.objective} ${this.strugglePreposition} ${user.pronouns.possessive} ${this.name} for `, args.damage.renderShort(), `.`), new LogLine(`${user.name.capital.possessive} ${this.name} ${this.name.conjugate(Words.Churns)}, stewing ${target.name.objective} for `, args.damage.renderShort(), `.`), - new LogLine(`${target.name.capital} ${target.name.conjugate(new Verb("thrash", "thrashes"))} in ${user.name.possessive} ${Words.Slick} ${this.name} as it churns ${target.pronouns.objective} for `, args.damage.renderShort(), `.`) + new LogLine(`${target.name.capital} ${target.name.conjugate(new Verb("thrash", "thrashes"))} ${this.strugglePreposition} ${user.name.possessive} ${Words.Slick} ${this.name} as it churns ${target.pronouns.objective} for `, args.damage.renderShort(), `.`) ) }