import { Creature, POV, Entity } from '../entity' import { Stat, Damage, DamageType, TransferAction, Vigor, StatTest, FeedAction, DigestAction, EatenAction, AttackAction } from '../combat' import { ProperNoun, TheyPronouns, ImproperNoun, POVPair, FemalePronouns, POVPairArgs } from '../language' import { VoreType, Stomach, InnerStomach, Container } from '../vore' import { LogLine, LogLines, LogEntry, FAElem, CompositeLog, ImgElem } from '../interface' class BelchAction extends AttackAction { successLines = new POVPairArgs([ [[POV.First, POV.Third], (user, target, args) => new CompositeLog(new LogLine( `You belch on ${target.name} for `, args.damage.renderShort() ), new ImgElem('./media/cafat/images/belch.webp'))], [[POV.Third, POV.First], (user, target, args) => new CompositeLog(new LogLine( `${user.name.capital} belches on you for `, args.damage.renderShort() ), new ImgElem('./media/cafat/images/belch.webp'))], [[POV.Third, POV.Third], (user, target, args) => new CompositeLog(new LogLine( `${user.name.capital} belches on ${target.name} for `, args.damage.renderShort() ), new ImgElem('./media/cafat/images/belch.webp'))] ]) constructor (damage: Damage) { super(damage) this.name = 'Belch' } } class CrushAction extends EatenAction { lines: POVPair = new POVPair([ [[POV.First, POV.Third], (user, target) => new LogLine(`You crush ${target.name} `, new FAElem('fas fa-skull'))], [[POV.Third, POV.First], (user, target) => new CompositeLog(new LogLine(`${user.name.capital} crushes you; ${user.pronouns.subjective} belches as ${user.pronouns.possessive} gut lets out a fatal CRUNCH `, new FAElem('fas fa-skull')), new ImgElem('./media/cafat/images/crunch.webp'))], [[POV.Third, POV.Third], (user, target) => new LogLine(`${user.name.capital} crushes ${target.name}; ${user.pronouns.subjective} belches as ${user.pronouns.possessive} gut lets out a fatal CRUNCH `, new FAElem('fas fa-skull'))] ]) private damage: Damage = new Damage( { amount: 99, type: DamageType.Crush, target: Vigor.Health } ) constructor (container: Container) { super(container, "Crush", "Crush 'em!") } execute (user: Creature, target: Creature): LogEntry { target.takeDamage(this.damage) return this.lines.run(user, target) } } export class Cafat extends Creature { constructor () { super(new ProperNoun('Cafat'), [TheyPronouns, FemalePronouns][Math.floor(Math.random() * 2)], { [Stat.STR]: 30, [Stat.DEX]: 15, [Stat.CON]: 25 }, new Set([VoreType.Oral, VoreType.Anal]), new Set([VoreType.Oral, VoreType.Anal]), 150) this.vigors.Health = 200 this.maxVigors.Health = 200 this.vigors.Stamina = 250 this.maxVigors.Stamina = 250 this.vigors.Willpower = 150 this.maxVigors.Willpower = 150 const stomach = new Stomach(this, 100, new Damage( { amount: 20, type: DamageType.Acid, target: Vigor.Health }, { amount: 10, type: DamageType.Crush, target: Vigor.Stamina }, { amount: 10, type: DamageType.Dominance, target: Vigor.Willpower } )) stomach.name = new ImproperNoun("upper stomach", "upper stomachs").all this.containers.push(stomach) const lowerStomach = new InnerStomach(this, 100, new Damage( { amount: 40, type: DamageType.Acid, target: Vigor.Health }, { amount: 20, type: DamageType.Crush, target: Vigor.Stamina }, { amount: 20, type: DamageType.Dominance, target: Vigor.Willpower } ), stomach) lowerStomach.name = new ImproperNoun("lower stomach", "lower stomachs").all stomach.consumeLines = new POVPair([ [[POV.First, POV.Third], (user, target) => new LogLines(`You devour ${target.name}`)], [[POV.Third, POV.First], (user, target) => new CompositeLog(new LogLines(`${user.name.capital} devours you`), new ImgElem('./media/cafat/images/stomach.webp'))], [[POV.Third, POV.Third], (user, target) => new LogLines(`${user.name.capital} munches ${target.name.capital}`)] ]) const crush = new CrushAction(lowerStomach) lowerStomach.actions.push(crush) this.containers.push(lowerStomach) const transfer = new TransferAction(stomach, lowerStomach) transfer.lines = new POVPairArgs([ [[POV.First, POV.Third], (user, target, args) => new LogLine(`You squeeze ${target.name} from your ${args.from.name} to your ${args.to.name}`)], [[POV.Third, POV.First], (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}`)] ]) this.actions.push(transfer) this.actions.push(new TransferAction(lowerStomach, stomach)) this.actions.push(new BelchAction(new Damage( { amount: 100, target: Vigor.Willpower, type: DamageType.Acid } ))) this.otherActions.push(new FeedAction(stomach)) } }