From 364157bf1b2eba483be9a5656648f6c14ec37468 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Wed, 11 Nov 2020 10:51:01 -0500 Subject: [PATCH] Enable CV for Tal; make destroy-lines customizable --- src/game/creature.ts | 14 +++++++------- src/game/creatures/taluthus.ts | 7 +++++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/game/creature.ts b/src/game/creature.ts index ff0088d..6afa4a5 100644 --- a/src/game/creature.ts +++ b/src/game/creature.ts @@ -289,11 +289,11 @@ export class Creature extends Entity { }) } - destroy (): LogEntry { - const line: SoloLine = (victim) => new LogLine( - `${victim.name.capital} ${victim.name.conjugate(new Verb('die'))}` - ) + destroyLine: SoloLine = (victim) => new LogLine( + `${victim.name.capital} ${victim.name.conjugate(new Verb('die'))}` + ) + destroy (): LogEntry { const released: Array = this.containers.flatMap(container => { return container.contents.map(prey => { prey.containedIn = this.containedIn @@ -309,17 +309,17 @@ export class Creature extends Entity { if (released.length > 0) { if (this.containedIn === null) { return new LogLines( - line(this), + this.destroyLine(this), new LogLine(names + ` spill out!`) ) } else { return new LogLines( - line(this), + this.destroyLine(this), new LogLine(names + ` spill out into ${this.containedIn.owner.name}'s ${this.containedIn.name}!`) ) } } else { - return line(this) + return this.destroyLine(this) } } } diff --git a/src/game/creatures/taluthus.ts b/src/game/creatures/taluthus.ts index 0289da7..451cb40 100644 --- a/src/game/creatures/taluthus.ts +++ b/src/game/creatures/taluthus.ts @@ -4,6 +4,7 @@ import { MalePronouns, ProperNoun, Verb } from '../language' import { Stomach, Bowels, Cock, Balls, anyVore, biconnectContainers, Tail } from '../vore' import { AttackAction, TransferAction, FeedAction, WillingTransferAction } from '../combat/actions' import { VoreAI } from '../ai' +import { LogLine } from '../interface' export class Taluthus extends Creature { constructor () { @@ -92,9 +93,11 @@ export class Taluthus extends Creature { cock ) - // this.containers.push(balls) - // this.containers.push(cock) + this.containers.push(balls) + this.containers.push(cock) biconnectContainers(cock, balls) + + this.destroyLine = victim => new LogLine(`${victim.name.capital} ${victim.name.conjugate(new Verb("yeet"))}`) } }