import { Creature, POV, Entity } from '../entity' import { Stat, Damage, DamageType, Vigor, ConstantDamageFormula } from '../combat' import { ProperNoun, TheyPronouns, ImproperNoun, POVPair, FemalePronouns, POVPairArgs } from '../language' import { VoreType, Stomach, InnerStomach, VoreContainer, NormalContainer, Vore } from '../vore' import { LogLine, LogLines, LogEntry, FAElem, CompositeLog, ImgElem } from '../interface' import { AttackAction, EatenAction, TransferAction, FeedAction } from '../combat/actions' import { InstantKill } from '../combat/effects' class BellyCrushAction extends AttackAction { successLines = new POVPairArgs([ [[POV.First, POV.Third], (user, target, args) => new CompositeLog(new LogLine( `You crush on ${target.name} with your belly for `, args.damage.renderShort() ), new ImgElem('./media/cafat/images/belly-crush.webp'))], [[POV.Third, POV.First], (user, target, args) => new CompositeLog(new LogLine( `${user.name.capital} crushes on you with ${user.pronouns.possessive} belly for `, args.damage.renderShort() ), new ImgElem('./media/cafat/images/belly-crush.webp'))], [[POV.Third, POV.Third], (user, target, args) => new CompositeLog(new LogLine( `${user.name.capital} crushes on ${target.name} with ${user.pronouns.possessive} belly for `, args.damage.renderShort() ), new ImgElem('./media/cafat/images/belly-crush.webp'))] ]) constructor (_damage: Damage) { super({ calc (user) { return _damage.scale(user.bulk / 25) }, describe (user) { return new LogLine('Deal ', _damage.scale(user.bulk / 25).renderShort(), ` with your ${user.bulk} `, new FAElem('fas fa-weight-hanging')) } }) this.name = 'Belly Crush' this.desc = 'Use your weight!' } describe (user: Creature, target: Creature): LogEntry { return new LogLine(`Crush ${target.name} under your gut. `, this.damage.describe(user, target)) } } 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(new ConstantDamageFormula(damage)) this.name = 'Belch' this.desc = 'Drain your foe\'s stats with a solid BELCH' } } class CrushAction extends EatenAction { lines: POVPair = new POVPair([ [[POV.First, POV.Third], (user, target) => new LogLine(`You crush ${target.name} `)], [[POV.Third, POV.First], (user) => new CompositeLog(new LogLine(`${user.name.capital} crushes you; ${user.pronouns.subjective} ${user.pronouns.isPlural ? 'belch' : 'belches'} as ${user.pronouns.possessive} gut lets out a fatal CRUNCH `), new ImgElem('./media/cafat/images/crunch.webp'))], [[POV.Third, POV.Third], (user, target) => new LogLine(`${user.name.capital} crushes ${target.name}; ${user.pronouns.subjective} ${user.pronouns.isPlural ? 'belch' : 'belches'} as ${user.pronouns.possessive} gut lets out a fatal CRUNCH `)] ]) constructor (container: VoreContainer) { super(container, "Crush", "Crush 'em!") this.desc = "Crush somebody in your gut" } execute (user: Creature, target: Creature): LogEntry { return new LogLines(this.lines.run(user, target), new InstantKill().apply(target)) } describe (user: Creature, target: Creature): LogEntry { return new LogLine(`Crush ${target.name} in your ${this.container.name} for massive, unavoidable damage.`) } } export class Cafat extends Creature { constructor () { super(new ProperNoun('Cafat'), new ImproperNoun('taur', 'taurs'), [TheyPronouns, FemalePronouns][Math.floor(Math.random() * 2)], { [Stat.Toughness]: 30, [Stat.Power]: 30, [Stat.Speed]: 15, [Stat.Willpower]: 25, [Stat.Charm]: 20 }, 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.Resolve = 150 this.maxVigors.Resolve = 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.Resolve } )) 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.Resolve } ), stomach) lowerStomach.name = new ImproperNoun("lower stomach", "lower stomachs").all stomach.consumeLines = new POVPair([ [[POV.First, POV.Third], (user, target) => new LogLine(`You devour ${target.name}`)], [[POV.Third, POV.First], (user) => new CompositeLog(new LogLine(`${user.name.capital} devours you`), new ImgElem('./media/cafat/images/stomach.webp'))], [[POV.Third, POV.Third], (user, target) => new LogLine(`${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 AttackAction(new ConstantDamageFormula(new Damage({ amount: 40, type: DamageType.Crush, target: Vigor.Health })))) this.actions.push(new BellyCrushAction(new Damage({ amount: 10, type: DamageType.Crush, target: Vigor.Health }, { amount: 10, type: DamageType.Dominance, target: Vigor.Resolve }))) this.actions.push(new BelchAction(new Damage( { amount: 10, target: Stat.Toughness, type: DamageType.Acid }, { amount: 10, target: Stat.Power, type: DamageType.Acid }, { amount: 10, target: Stat.Speed, type: DamageType.Acid }, { amount: 10, target: Stat.Willpower, type: DamageType.Acid }, { amount: 10, target: Stat.Charm, type: DamageType.Acid } ))) this.otherActions.push(new FeedAction(stomach)) } }