Browse Source

Re-add rubbing

master
Fen Dweller 3 years ago
parent
commit
f0d4e6f906
3 changed files with 25 additions and 4 deletions
  1. +7
    -2
      src/game/combat/actions.ts
  2. +5
    -2
      src/game/vore.ts
  3. +13
    -0
      src/game/words.ts

+ 7
- 2
src/game/combat/actions.ts View File

@@ -7,6 +7,7 @@ import { LogLine, LogLines, LogEntry } from '@/game/interface'
import { Connection, Container } from '@/game/vore'
import { CapableCondition, UserDrainedVigorCondition, TogetherCondition, EnemyCondition, SoloCondition, PairCondition, ContainsCondition, ContainedByCondition, HasRoomCondition } from '@/game/combat/conditions'
import { ConsumeConsequence } from '@/game/combat/consequences'
import * as Words from '@/game/words'

/**
* The PassAction has no effect.
@@ -276,8 +277,12 @@ export class RubAction extends Action {
}

execute (user: Creature, target: Creature): LogEntry {
const results = this.container.tick(60)
return new LogLines(results)
const results: Array<LogEntry> = []
results.push(new LogLine(
`${user.name.capital} ${user.name.conjugate(Words.Rub)} ${user.pronouns.possessive} ${Words.Full} ${this.container.name}.`
))
results.push(this.container.tick(60))
return new LogLines(...results)
}

describe (user: Creature, target: Creature): LogEntry {


+ 5
- 2
src/game/vore.ts View File

@@ -144,6 +144,9 @@ export abstract class DefaultContainer implements Container {
this.actions.push(new ReleaseAction(this))
this.actions.push(new StruggleAction(this))
}
if (capabilities.has(ContainerCapability.Digest)) {
this.actions.push(new RubAction(this))
}
}

connect (connection: Connection): void {
@@ -258,7 +261,7 @@ export abstract class DefaultContainer implements Container {
const options = [
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} ${user.name.conjugate(Words.Churns)}, ${Words.Churns.present} ${target.name.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 ${Words.Churns.singular} ${target.pronouns.objective} for `, args.damage.renderShort(), `.`)
new LogLine(`${target.name.capital} ${target.name.conjugate(Words.Struggle)} ${this.strugglePreposition} ${user.name.possessive} ${Words.Slick} ${this.name} as it ${Words.Churns.singular} ${target.pronouns.objective} for `, args.damage.renderShort(), `.`)
]

if (this.fluid) {
@@ -420,6 +423,6 @@ 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}.`)
return new LogLine(`${from.owner.name.capital} ${verb.singular} ${prey.name.objective} ${preposition} ${to.consumePreposition} ${from.owner.pronouns.possessive} ${to.name}.`)
}
}

+ 13
- 0
src/game/words.ts View File

@@ -125,3 +125,16 @@ export const Stuck = new RandomWord([
new Adjective("trapped"),
new Adjective("imprisoned")
])

export const Rub = new RandomWord([
new Verb("rub", "rubs", "rubbing", "rubbed"),
new Verb("knead", "kneads", "kneading", "kneaded"),
new Verb("press over", "presses over", "pressing over", "pressed over")
])

export const Full = new RandomWord([
new Adjective("full"),
new Adjective("stuffed"),
new Adjective("packed"),
new Adjective("bulging")
])

Loading…
Cancel
Save