Feast 2.0!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

150 lines
7.4 KiB

  1. import { Creature, POV, Entity } from '../entity'
  2. import { Stat, Damage, DamageType, Vigor, ConstantDamageFormula } from '../combat'
  3. import { ProperNoun, TheyPronouns, ImproperNoun, POVPair, FemalePronouns, POVPairArgs } from '../language'
  4. import { VoreType, Stomach, InnerStomach, VoreContainer, NormalContainer, Vore } from '../vore'
  5. import { LogLine, LogLines, LogEntry, FAElem, CompositeLog, ImgElem } from '../interface'
  6. import { AttackAction, EatenAction, TransferAction, FeedAction } from '../combat/actions'
  7. import { InstantKill } from '../combat/effects'
  8. class BellyCrushAction extends AttackAction {
  9. successLines = new POVPairArgs<Entity, Entity, { damage: Damage }>([
  10. [[POV.First, POV.Third], (user, target, args) => new CompositeLog(new LogLine(
  11. `You crush on ${target.name} with your belly for `,
  12. args.damage.renderShort()
  13. ), new ImgElem('./media/cafat/images/belly-crush.webp'))],
  14. [[POV.Third, POV.First], (user, target, args) => new CompositeLog(new LogLine(
  15. `${user.name.capital} crushes on you with ${user.pronouns.possessive} belly for `,
  16. args.damage.renderShort()
  17. ), new ImgElem('./media/cafat/images/belly-crush.webp'))],
  18. [[POV.Third, POV.Third], (user, target, args) => new CompositeLog(new LogLine(
  19. `${user.name.capital} crushes on ${target.name} with ${user.pronouns.possessive} belly for `,
  20. args.damage.renderShort()
  21. ), new ImgElem('./media/cafat/images/belly-crush.webp'))]
  22. ])
  23. constructor (_damage: Damage) {
  24. super({
  25. calc (user) { return _damage.scale(user.bulk / 25) },
  26. describe (user) { return new LogLine('Deal ', _damage.scale(user.bulk / 25).renderShort(), ` with your ${user.bulk} `, new FAElem('fas fa-weight-hanging')) }
  27. })
  28. this.name = 'Belly Crush'
  29. this.desc = 'Use your weight!'
  30. }
  31. describe (user: Creature, target: Creature): LogEntry {
  32. return new LogLine(`Crush ${target.name} under your gut. `, this.damage.describe(user, target))
  33. }
  34. }
  35. class BelchAction extends AttackAction {
  36. successLines = new POVPairArgs<Entity, Entity, { damage: Damage }>([
  37. [[POV.First, POV.Third], (user, target, args) => new CompositeLog(new LogLine(
  38. `You belch on ${target.name} for `,
  39. args.damage.renderShort()
  40. ), new ImgElem('./media/cafat/images/belch.webp'))],
  41. [[POV.Third, POV.First], (user, target, args) => new CompositeLog(new LogLine(
  42. `${user.name.capital} belches on you for `,
  43. args.damage.renderShort()
  44. ), new ImgElem('./media/cafat/images/belch.webp'))],
  45. [[POV.Third, POV.Third], (user, target, args) => new CompositeLog(new LogLine(
  46. `${user.name.capital} belches on ${target.name} for `,
  47. args.damage.renderShort()
  48. ), new ImgElem('./media/cafat/images/belch.webp'))]
  49. ])
  50. constructor (damage: Damage) {
  51. super(new ConstantDamageFormula(damage))
  52. this.name = 'Belch'
  53. this.desc = 'Drain your foe\'s stats with a solid BELCH'
  54. }
  55. }
  56. class CrushAction extends EatenAction {
  57. lines: POVPair<Entity, Entity> = new POVPair([
  58. [[POV.First, POV.Third], (user, target) => new LogLine(`You crush ${target.name} `)],
  59. [[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'))],
  60. [[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 `)]
  61. ])
  62. constructor (container: VoreContainer) {
  63. super(container, "Crush", "Crush 'em!")
  64. this.desc = "Crush somebody in your gut"
  65. }
  66. execute (user: Creature, target: Creature): LogEntry {
  67. return new LogLines(this.lines.run(user, target), new InstantKill().apply(target))
  68. }
  69. describe (user: Creature, target: Creature): LogEntry {
  70. return new LogLine(`Crush ${target.name} in your ${this.container.name} for massive, unavoidable damage.`)
  71. }
  72. }
  73. export class Cafat extends Creature {
  74. constructor () {
  75. super(new ProperNoun('Cafat'), new ImproperNoun('taur', 'taurs'), [TheyPronouns, FemalePronouns][Math.floor(Math.random() * 2)], {
  76. [Stat.Toughness]: 30,
  77. [Stat.Power]: 30,
  78. [Stat.Speed]: 15,
  79. [Stat.Willpower]: 25,
  80. [Stat.Charm]: 20
  81. }, new Set([VoreType.Oral, VoreType.Anal]), new Set([VoreType.Oral, VoreType.Anal]), 150)
  82. this.vigors.Health = 200
  83. this.maxVigors.Health = 200
  84. this.vigors.Stamina = 250
  85. this.maxVigors.Stamina = 250
  86. this.vigors.Resolve = 150
  87. this.maxVigors.Resolve = 150
  88. const stomach = new Stomach(this, 100, new Damage(
  89. { amount: 20, type: DamageType.Acid, target: Vigor.Health },
  90. { amount: 10, type: DamageType.Crush, target: Vigor.Stamina },
  91. { amount: 10, type: DamageType.Dominance, target: Vigor.Resolve }
  92. ))
  93. stomach.name = new ImproperNoun("upper stomach", "upper stomachs").all
  94. this.containers.push(stomach)
  95. const lowerStomach = new InnerStomach(this, 100, new Damage(
  96. { amount: 40, type: DamageType.Acid, target: Vigor.Health },
  97. { amount: 20, type: DamageType.Crush, target: Vigor.Stamina },
  98. { amount: 20, type: DamageType.Dominance, target: Vigor.Resolve }
  99. ), stomach)
  100. lowerStomach.name = new ImproperNoun("lower stomach", "lower stomachs").all
  101. stomach.consumeLines = new POVPair([
  102. [[POV.First, POV.Third], (user, target) => new LogLine(`You devour ${target.name}`)],
  103. [[POV.Third, POV.First], (user) => new CompositeLog(new LogLine(`${user.name.capital} devours you`), new ImgElem('./media/cafat/images/stomach.webp'))],
  104. [[POV.Third, POV.Third], (user, target) => new LogLine(`${user.name.capital} munches ${target.name.capital}`)]
  105. ])
  106. const crush = new CrushAction(lowerStomach)
  107. lowerStomach.actions.push(crush)
  108. this.containers.push(lowerStomach)
  109. const transfer = new TransferAction(stomach, lowerStomach)
  110. transfer.lines = new POVPairArgs([
  111. [[POV.First, POV.Third], (user, target, args) => new LogLine(`You squeeze ${target.name} from your ${args.from.name} to your ${args.to.name}`)],
  112. [[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'))],
  113. [[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}`)]
  114. ])
  115. this.actions.push(transfer)
  116. this.actions.push(new TransferAction(lowerStomach, stomach))
  117. this.actions.push(new AttackAction(new ConstantDamageFormula(new Damage({ amount: 40, type: DamageType.Crush, target: Vigor.Health }))))
  118. this.actions.push(new BellyCrushAction(new Damage({ amount: 10, type: DamageType.Crush, target: Vigor.Health }, { amount: 10, type: DamageType.Dominance, target: Vigor.Resolve })))
  119. this.actions.push(new BelchAction(new Damage(
  120. { amount: 10, target: Stat.Toughness, type: DamageType.Acid },
  121. { amount: 10, target: Stat.Power, type: DamageType.Acid },
  122. { amount: 10, target: Stat.Speed, type: DamageType.Acid },
  123. { amount: 10, target: Stat.Willpower, type: DamageType.Acid },
  124. { amount: 10, target: Stat.Charm, type: DamageType.Acid }
  125. )))
  126. this.otherActions.push(new FeedAction(stomach))
  127. }
  128. }