@@ -101,16 +87,18 @@ export class DevourAction extends Action {
export class FeedAction extends Action {
private test: StatTest
protected failLines: POVPair<Entity, Entity> = new POVPair([
[[POV.Second, POV.Third], (user, target) => new LogLine(`You fail to feed yourself to ${target.name}`)],
[[POV.Third, POV.Second], (user, target) => new LogLine(`${user.name.capital} tries to feed ${user.pronouns.possessive} to you, but fails`)],
[[POV.Third, POV.Third], (user, target) => new LogLine(`${user.name.capital} unsuccessfully tries to feed ${user.pronouns.possessive} to ${target.name}`)]
])
protected successLine: PairLine<Entity> = (user, target) => new LogLine(
`${user.name.capital} ${user.name.conjugate(new Verb('feed'))} ${user.pronouns.reflexive} to ${target.name}. `
)
protected failLine: PairLine<Entity> = (user, target) => new LogLine(
`${user.name.capital} ${user.name.conjugate(new Verb('fail'))} to feed ${user.pronouns.reflexive} to ${target.name}. `
protected lines: POVPair<Entity, Entity> = new POVPair([])
allowed (user: Creature, target: Creature) {
if (this.container.owner === user && this.container.contents.length > 0) {
return super.allowed(user, target)
@@ -249,11 +235,11 @@ export class ReleaseAction extends Action {
}
export class TransferAction extends Action {
lines: POVPairArgs<Entity, Entity, { from: Container; to: Container }> = new POVPairArgs([
[[POV.Second, POV.Third], (user, target, args) => new LogLine(`You squeeze ${target.name} from your ${args.from.name} to your ${args.to.name}`)],
[[POV.Third, POV.Second], (user, target, args) => new LogLine(`You're squeezed from ${user.name}'s ${args.from.name} to ${user.pronouns.possessive} ${args.to.name}`)],
[[POV.Third, POV.Third], (user, target, args) => new LogLine(`${user.name} sends ${target.name} from ${user.pronouns.possessive} ${args.from.name.all} to ${user.pronouns.possessive} ${args.to.name.all}`)]
])
verb: Verb = new Verb('send')
line: PairLineArgs<Creature, { from: Container; to: Container }> = (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.name}`
)
allowed (user: Creature, target: Creature) {
if (target.containedIn === this.from && this.from.contents.includes(target)) {
@@ -274,7 +260,7 @@ export class TransferAction extends Action {
import { AttackAction, EatenAction, TransferAction, FeedAction } from '../combat/actions'
@@ -116,11 +116,8 @@ export class Cafat extends Creature {
const transfer = new TransferAction(stomach, lowerStomach)
transfer.lines = new POVPairArgs([
[[POV.Second, POV.Third], (user, target, args) => new LogLine(`You squeeze ${target.name} from your ${args.from.name} to your ${args.to.name}`)],
[[POV.Third, POV.Second], (user, target, args) => new CompositeLog(new LogLine(`You're squeezed from ${user.name}'s ${args.from.name} to ${user.pronouns.possessive} ${args.to.name}`), new ImgElem('./media/cafat/images/lower-stomach.webp'))],
[[POV.Third, POV.Third], (user, target, args) => new LogLine(`${user.name} squeezes ${target.name} from ${user.pronouns.possessive} ${args.from.name} to ${user.pronouns.possessive} ${args.to.name}`)]
return new LogLine(`${user.name.capital} ${user.name.conjugate(new Verb('hork'))} ${target.name.objective} up from ${user.pronouns.possessive} ${args.container.name}.`)