Feast 2.0!
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 

179 lines
6.4 KiB

  1. import { Creature } from "../creature"
  2. import { Damage, DamageType, ConstantDamageFormula, Vigor, Side, StatDamageFormula, Stat, Action, DamageFormula } from '../combat'
  3. import { ImproperNoun, ProperNoun, FemalePronouns, MalePronouns, Verb, PairLineArgs, PairLine, TextLike } from '../language'
  4. import { VoreType, Stomach, Bowels, NormalContainer, InnerContainer, VoreContainer, Container, Vore } from '../vore'
  5. import { AttackAction, TransferAction, FeedAction, StruggleAction, DamageAction } from '../combat/actions'
  6. import { LogLine, LogEntry, LogLines } from '../interface'
  7. import { ContainsCondition, CapableCondition, EnemyCondition } from '../combat/conditions'
  8. import { StatTest } from '../combat/tests'
  9. export class TrappedAction extends DamageAction {
  10. protected test: StatTest
  11. constructor (name: TextLike, desc: TextLike, protected verb: Verb, protected damage: DamageFormula, container: Container) {
  12. super(
  13. name,
  14. desc,
  15. damage,
  16. [new CapableCondition(), new ContainsCondition(container), new EnemyCondition()]
  17. )
  18. this.test = new StatTest(Stat.Power)
  19. }
  20. describe (user: Creature, target: Creature): LogEntry {
  21. return new LogLine(`Chew on ${target.name}. `, this.damage.describe(user, target), '. ', this.test.explain(user, target))
  22. }
  23. successLine: PairLineArgs<Creature, { damage: Damage }> = (user, target, args) => new LogLine(
  24. `${user.name.capital} ${user.name.conjugate(this.verb)} ${target.name.objective} for `,
  25. target.effectiveDamage(args.damage).renderShort()
  26. )
  27. failLine: PairLine<Creature> = (user, target) => new LogLine(
  28. `${user.name.capital} can't quite get ${user.pronouns.possessive} teeth around ${target.name.objective}.`
  29. )
  30. }
  31. class Hand extends NormalContainer {
  32. consumeVerb: Verb = new Verb('grab', 'grabs', 'grabbing', 'grabbed')
  33. releaseVerb: Verb = new Verb('release', 'releases', 'releasing', 'released')
  34. struggleVerb: Verb = new Verb('squirm', 'squirms', 'squirming', 'squirmed')
  35. constructor (owner: Creature) {
  36. super(new ImproperNoun('hand', 'hands'), owner, new Set(), 100)
  37. this.actions.push(new TrappedAction(
  38. "Grip",
  39. "Give your victim the squeeze",
  40. new Verb(
  41. 'squeeze'
  42. ),
  43. new ConstantDamageFormula(
  44. new Damage(
  45. { amount: 200, target: Vigor.Health, type: DamageType.Crush }
  46. )
  47. ),
  48. this
  49. ))
  50. }
  51. consumeLine: PairLineArgs<Vore, { container: Container }> = (user, target, args) => {
  52. return new LogLine(`${user.name.capital} ${user.name.conjugate(this.consumeVerb)} ${target.name.objective} up in ${user.pronouns.possessive} ${args.container.name}, giving ${target.pronouns.objective} a firm squeeze in ${user.pronouns.possessive} fingers.`)
  53. }
  54. }
  55. class Paw extends NormalContainer {
  56. consumeVerb: Verb = new Verb('pin', 'pins', 'pinning', 'pinbed')
  57. releaseVerb: Verb = new Verb('release', 'releases', 'releasing', 'released')
  58. struggleVerb: Verb = new Verb('squirm', 'squirms', 'squirming', 'squirmed')
  59. constructor (owner: Creature) {
  60. super(new ImproperNoun('paw', 'paws'), owner, new Set([VoreType.Oral]), 100)
  61. this.actions.push(new TrappedAction(
  62. "Smother",
  63. "Bury your victim under your toes",
  64. new Verb(
  65. 'smother'
  66. ),
  67. new ConstantDamageFormula(
  68. new Damage(
  69. { amount: 10, target: Stat.Toughness, type: DamageType.Crush },
  70. { amount: 10, target: Stat.Power, type: DamageType.Crush },
  71. { amount: 10, target: Stat.Speed, type: DamageType.Crush }
  72. )
  73. ),
  74. this
  75. ))
  76. }
  77. consumeLine: PairLineArgs<Vore, { container: Container }> = (user, target, args) => {
  78. return new LogLine(`${user.name.capital} ${user.name.conjugate(this.consumeVerb)} ${target.name.objective} beneath ${user.pronouns.possessive} ${args.container.name}.`)
  79. }
  80. }
  81. class Maw extends NormalContainer {
  82. consumeVerb: Verb = new Verb('grab', 'grabs', 'grabbing', 'grabbed')
  83. releaseVerb: Verb = new Verb('release', 'releases', 'releasing', 'released')
  84. struggleVerb: Verb = new Verb('squirm', 'squirms', 'squirming', 'squirmed')
  85. constructor (owner: Creature) {
  86. super(new ImproperNoun('maw', 'maws'), owner, new Set([VoreType.Oral]), 100)
  87. this.actions = []
  88. this.actions.push(new StruggleAction(this))
  89. this.actions.push(new TrappedAction(
  90. "Chew",
  91. "Chew on your victim",
  92. new Verb(
  93. 'bite down on',
  94. 'bites down on',
  95. 'biting down on',
  96. 'bit down on'
  97. ),
  98. new ConstantDamageFormula(
  99. new Damage(
  100. { amount: 200, target: Vigor.Health, type: DamageType.Crush }
  101. )
  102. ),
  103. this
  104. ))
  105. }
  106. }
  107. export class Shingo extends Creature {
  108. constructor () {
  109. super(
  110. new ProperNoun('Shingo'),
  111. new ImproperNoun('red panda', 'red pandas'),
  112. MalePronouns,
  113. { Toughness: 40, Power: 50, Speed: 30, Willpower: 30, Charm: 60 },
  114. new Set(),
  115. new Set([VoreType.Oral]),
  116. 3000
  117. )
  118. this.actions.push(
  119. new AttackAction(
  120. new StatDamageFormula(
  121. [
  122. { fraction: 0.5, stat: Stat.Power, target: Vigor.Health, type: DamageType.Crush }
  123. ]
  124. )
  125. )
  126. )
  127. this.side = Side.Monsters
  128. const stomach = new Stomach(this, 50, new Damage(
  129. { amount: 200, type: DamageType.Acid, target: Vigor.Health },
  130. { amount: 100, type: DamageType.Crush, target: Vigor.Stamina },
  131. { amount: 100, type: DamageType.Dominance, target: Vigor.Resolve }
  132. ))
  133. this.containers.push(stomach)
  134. this.otherActions.push(new FeedAction(stomach))
  135. const hand = new Hand(this)
  136. const maw = new Maw(this)
  137. this.otherContainers.push(hand)
  138. this.otherContainers.push(maw)
  139. const stuff = new TransferAction(hand, maw)
  140. stuff.verb = new Verb('stuff')
  141. stuff.line = (user, target, args) => new LogLine(
  142. `${user.name.capital} ${user.name.conjugate(stuff.verb)} ${target.name.objective} into ${user.pronouns.possessive} ${args.to.name}!`
  143. )
  144. this.actions.push(stuff)
  145. const gulp = new TransferAction(maw, stomach)
  146. gulp.verb = new Verb('gulp')
  147. gulp.line = (user, target, args) => new LogLine(
  148. `${user.name.capital} ${user.name.conjugate(gulp.verb)} ${target.name.objective} down ${user.pronouns.possessive} tight, inescapable gullet, sending ${target.pronouns.objective} down to ${user.pronouns.possessive} ${args.to.name}`
  149. )
  150. this.actions.push(gulp)
  151. this.otherContainers.push(new Paw(this))
  152. }
  153. }