diff --git a/src/game/creatures/cafat.ts b/src/game/creatures/cafat.ts index 0f427d8..d71ead1 100644 --- a/src/game/creatures/cafat.ts +++ b/src/game/creatures/cafat.ts @@ -1,6 +1,6 @@ import { Creature, Entity } from '../entity' import { Stat, Damage, DamageType, Vigor, ConstantDamageFormula, Side } from '../combat' -import { ProperNoun, TheyPronouns, ImproperNoun, POVPair, FemalePronouns, Verb, POV, PairLineArgs, PairLine } from '../language' +import { ProperNoun, TheyPronouns, ImproperNoun, FemalePronouns, Verb, POV, PairLineArgs, PairLine } from '../language' import { VoreType, Stomach, InnerStomach, VoreContainer } from '../vore' import { LogLine, LogLines, LogEntry, FAElem, CompositeLog, ImgElem } from '../interface' import { AttackAction, EatenAction, TransferAction, FeedAction } from '../combat/actions' diff --git a/src/game/creatures/withers.ts b/src/game/creatures/withers.ts index 032b206..c104473 100644 --- a/src/game/creatures/withers.ts +++ b/src/game/creatures/withers.ts @@ -1,6 +1,6 @@ import { Creature } from '../entity' import { Damage, DamageType, ConstantDamageFormula, Vigor, Side, GroupAction, CombatTest, Stat, DamageFormula, UniformRandomDamageFormula, Action, DamageInstance, StatDamageFormula, VoreStat } from '../combat' -import { ImproperNoun, POVPair, ProperNoun, FemalePronouns, RandomWord, Adjective, Verb, POV } from '../language' +import { ImproperNoun, ProperNoun, FemalePronouns, RandomWord, Adjective, Verb, POV, PairLine } from '../language' import { LogLine, LogLines, LogEntry, Newline } from '../interface' import { VoreType, Stomach, VoreContainer, Vore, NormalContainer, Container } from '../vore' import { AttackAction, FeedAction, TransferAction, EatenAction } from '../combat/actions' @@ -51,15 +51,13 @@ class LevelDrain extends Action { } } class HypnotizeAction extends Action { - lines = new POVPair([ - [[POV.Second, POV.Third], (user, target) => new LogLine(`Your hypnotic gaze enthralls ${target.name}, putting ${target.pronouns.objective} under your control!`)], - [[POV.Third, POV.Second], (user, target) => new LogLine(`${user.name.capital}'s hypnotic gaze enthralls you, putting you under ${user.pronouns.possessive} control!`)], - [[POV.Third, POV.Third], (user, target) => new LogLine(`${user.name.capital}'s hypnotic gaze enthralls ${target.name}, putting ${target.pronouns.objective} under ${user.pronouns.possessive} control!`)] - ]) + line: PairLine = (user, target) => new LogLine( + `${user.name.capital.possessive} hypnotic gaze enthralls ${target.name}, putting ${target.pronouns.objective} under ${user.pronouns.possessive} control!` + ) execute (user: Creature, target: Creature): LogEntry { target.side = user.side - return this.lines.run(user, target) + return this.line(user, target) } describe (user: Creature, target: Creature): LogEntry { @@ -83,24 +81,6 @@ class MawContainer extends NormalContainer { releaseVerb = new Verb('release') struggleVerb = new Verb('struggle', 'struggles', 'struggling', 'struggled') - consumeLines = new POVPair([ - [[POV.Second, POV.Third], (user, target) => new LogLine(`You snatch ${target.name} up in your jaws`)], - [[POV.Third, POV.Second], (user, target) => new LogLine(`${user.name.capital} snatches you up in ${user.pronouns.possessive} maw`)], - [[POV.Third, POV.Third], (user, target) => new LogLine(`${user.name.capital} snatches ${target.name} up in ${user.pronouns.possessive} maw`)] - ]) - - releaseLines = new POVPair([ - [[POV.Second, POV.Third], (user, target) => new LogLine(`You let out ${target.name}`)], - [[POV.Third, POV.Second], (user, target) => new LogLine(`${user.name.capital} lets you out `)], - [[POV.Third, POV.Third], (user, target) => new LogLine(`${user.name.capital} lets out ${target.name}`)] - ]) - - struggleLines = new POVPair([ - [[POV.Second, POV.Third], (user, target) => new LogLine(`You claw your way free of ${target.name}`)], - [[POV.Third, POV.Second], (user, target) => new LogLine(`${user.name.capital} forces ${user.pronouns.possessive} way free!`)], - [[POV.Third, POV.Third], (user, target) => new LogLine(`${user.name.capital} escapes from ${target.name}`)] - ]) - constructor (owner: Vore, stomach: VoreContainer) { super(new ImproperNoun('maw'), owner, new Set([VoreType.Oral]), 50) @@ -135,24 +115,6 @@ class FlexToesAction extends GroupAction { } class BootContainer extends NormalContainer { - consumeLines = new POVPair([ - [[POV.Second, POV.Third], (user, target) => new LogLine(`You stuff ${target.name} into your boot.`)], - [[POV.Third, POV.Second], (user, target) => new LogLine(`${user.name.capital} stuffs you in ${user.pronouns.possessive} boot, pinning you between toes and insole.`)], - [[POV.Third, POV.Third], (user, target) => new LogLine(`${user.name.capital} stuffs ${target.name} in ${user.pronouns.possessive} boot.`)] - ]) - - releaseLines = new POVPair([ - [[POV.Second, POV.Third], (user, target) => new LogLine(`You dump ${target.name} out from your boot.`)], - [[POV.Third, POV.Second], (user, target) => new LogLine(`${user.name.capital} dumps you out from ${user.pronouns.possessive} boot.`)], - [[POV.Third, POV.Third], (user, target) => new LogLine(`${user.name.capital} dumps ${target.name} out from ${user.pronouns.possessive} boot.`)] - ]) - - struggleLines = new POVPair([ - [[POV.Second, POV.Third], (user, target) => new LogLine(`You slip out from ${target.name}'s boot.`)], - [[POV.Third, POV.Second], (user, target) => new LogLine(`${user.name.capital} squeezes ${user.pronouns.possessive} way free of your footwear!`)], - [[POV.Third, POV.Third], (user, target) => new LogLine(`${user.name.capital} escapes from ${target.name}'s boot.`)] - ]) - consumeVerb = new Verb('trap', 'traps', 'trapped', 'trapping') releaseVerb = new Verb('dump') struggleVerb = new Verb('struggle', 'struggles', 'struggling', 'struggled') @@ -230,14 +192,12 @@ class ChewAction extends GroupAction { } class StompAction extends GroupAction { - lines: POVPair = new POVPair([ - [[POV.Second, POV.Third], (user: Creature, target: Creature) => new LogLine(`You flatten ${target.name} under your foot!`)], - [[POV.Third, POV.Second], (user: Creature) => new LogLine(`${user.name.capital} flattens you under ${user.pronouns.possessive} ${huge} foot!`)], - [[POV.Third, POV.Third], (user: Creature, target: Creature) => new LogLine(`${user.name.capital} flattens ${target.name} under ${user.pronouns.possessive} ${huge} foot!`)] - ]) + line: PairLine = (user, target) => new LogLine( + `${user.name.capital} ${user.name.conjugate(new Verb('flatten'))} ${target.name.objective} under ${user.pronouns.possessive} ${huge} foot!` + ) execute (user: Creature, target: Creature): LogEntry { - return new LogLines(this.lines.run(user, target), new InstantKill().apply(target)) + return new LogLines(this.line(user, target), new InstantKill().apply(target)) } describe (user: Creature, target: Creature): LogEntry { @@ -258,11 +218,9 @@ class StompAction extends GroupAction { } class StompAllyAction extends Action { - lines: POVPair = new POVPair([ - [[POV.Second, POV.Third], (user: Creature, target: Creature) => new LogLine(`You flatten ${target.name} under your boot!`)], - [[POV.Third, POV.Second], (user: Creature) => new LogLine(`${user.name.capital} flattens you under ${user.pronouns.possessive} ${huge} boot!`)], - [[POV.Third, POV.Third], (user: Creature, target: Creature) => new LogLine(`${user.name.capital} flattens ${target.name} under ${user.pronouns.possessive} ${huge} boot!`)] - ]) + line: PairLine = (user, target) => new LogLine( + `${user.name.capital} ${user.name.conjugate(new Verb('flatten'))} ${target.name.objective} under ${user.pronouns.possessive} ${huge} boot!` + ) execute (user: Creature, target: Creature): LogEntry { const damages: Array = Object.keys(Stat).map(stat => ({ @@ -278,7 +236,7 @@ class StompAllyAction extends Action { target.destroyed = true return new LogLines( - this.lines.run(user, target), + this.line(user, target), new InstantKill().apply(target), new LogLine(`${user.name.capital} absorbs ${target.pronouns.possessive} power, gaining `, heal.renderShort()) ) diff --git a/src/game/language.ts b/src/game/language.ts index 40ff637..94ec711 100644 --- a/src/game/language.ts +++ b/src/game/language.ts @@ -8,22 +8,6 @@ export type SoloLineArgs = (user: T, args: V) => LogEntry export type PairLine = (user: T, target: T) => LogEntry export type PairLineArgs = (user: T, target: T, args: V) => LogEntry -export class POVPair { - run (user: K, target: V): LogEntry { - const choice = this.options.find(element => element[0][0] === user.perspective && element[0][1] === target.perspective) - - if (choice === undefined) { - return new LogLine("Fen didn't write any text for this...") - } else { - return choice[1](user, target) - } - } - - constructor (private options: Array<[[POV, POV], (user: K, target: V) => LogEntry]>) { - - } -} - enum NounKind { Specific, Nonspecific,