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.
 
 
 
 
 

134 lines
5.6 KiB

  1. import { Creature, POV } from '../entity'
  2. import { Damage, DamageType, ConstantDamageFormula, Vigor, Side, GroupAction } from '../combat'
  3. import { ImproperNoun, POVPair, ProperNoun, FemalePronouns, RandomWord, Adjective, POVPairArgs, POVSoloArgs } from '../language'
  4. import { LogLine, LogLines, LogEntry, Newline } from '../interface'
  5. import { VoreType, Stomach, Container, Vore } from '../vore'
  6. import { AttackAction, FeedAction } from '../combat/actions'
  7. import { TogetherCondition } from '../combat/conditions'
  8. import { InstantKill } from '../combat/effects'
  9. import * as Words from '../words'
  10. const huge = new RandomWord([
  11. new Adjective('massive'),
  12. new Adjective('colossal'),
  13. new Adjective('big ol\''),
  14. new Adjective('heavy'),
  15. new Adjective('crushing'),
  16. new Adjective('huge')
  17. ])
  18. class BiteAction extends AttackAction {
  19. constructor () {
  20. super(new ConstantDamageFormula(new Damage({ amount: 50, type: DamageType.Slash, target: Vigor.Health })))
  21. this.name = "Bite"
  22. }
  23. }
  24. class StompAction extends GroupAction {
  25. lines: POVPair<Creature, Creature> = new POVPair([
  26. [[POV.First, POV.Third], (user: Creature, target: Creature) => new LogLine(`You flatten ${target.name} under your foot!`)],
  27. [[POV.Third, POV.First], (user: Creature) => new LogLine(`${user.name.capital} flattens you under ${user.pronouns.possessive} ${huge} foot!`)],
  28. [[POV.Third, POV.Third], (user: Creature, target: Creature) => new LogLine(`${user.name.capital} flattens ${target.name} under ${user.pronouns.possessive} ${huge} foot!`)]
  29. ])
  30. execute (user: Creature, target: Creature): LogEntry {
  31. return new LogLines(this.lines.run(user, target), new InstantKill().apply(target))
  32. }
  33. describe (user: Creature, target: Creature): LogEntry {
  34. return new LogLine('Stomp one sucker')
  35. }
  36. describeGroup (user: Creature, targets: Array<Creature>): LogEntry {
  37. return new LogLine('Stomp all ', targets.length.toString(), ' of \'em!')
  38. }
  39. constructor () {
  40. super('Stomp', 'STOMP!', [
  41. new TogetherCondition()
  42. ])
  43. }
  44. }
  45. class DevourAllAction extends GroupAction {
  46. lines: POVPair<Creature, Creature> = new POVPair([
  47. [[POV.First, POV.Third], (user: Creature, target: Creature) => new LogLine(`You scoop up ${target.name}!`)],
  48. [[POV.Third, POV.First], (user: Creature) => new LogLine(`${user.name.capital} scoops you up!`)],
  49. [[POV.Third, POV.Third], (user: Creature, target: Creature) => new LogLine(`${user.name.capital} scoops ${target.name} up!`)]
  50. ])
  51. groupLines = new POVSoloArgs<Creature, { count: number }>([
  52. [[POV.First], (user, args) => new LogLine(`${Words.SwallowSound.allCaps}! All ${args.count} of your prey pour down your ${Words.Slick} throat. They're just ${user.kind.all} chow now`)],
  53. [[POV.Third], (user, args) => new LogLine(`${Words.SwallowSound.allCaps}! All ${args.count} of ${user.pronouns.possessive} prey pour down ${user.name}'s ${Words.Slick} gullet as ${user.pronouns.subjective} ${Words.Swallows.singular}; they're just ${user.kind.all} chow now`)]
  54. ])
  55. execute (user: Creature, target: Creature): LogEntry {
  56. this.container.consume(target)
  57. return new LogLines(this.lines.run(user, target))
  58. }
  59. describe (user: Creature, target: Creature): LogEntry {
  60. return new LogLine('Stomp one sucker')
  61. }
  62. executeGroup (user: Creature, targets: Array<Creature>): LogEntry {
  63. return new LogLines(...targets.map(target => this.execute(user, target)).concat(
  64. [
  65. new Newline(),
  66. this.groupLines.run(user, { count: targets.length })
  67. ]
  68. ))
  69. }
  70. describeGroup (user: Creature, targets: Array<Creature>): LogEntry {
  71. return new LogLine('Eat all ', targets.length.toString(), ' of \'em!')
  72. }
  73. constructor (private container: Container) {
  74. super('Devour All', 'GULP!', [
  75. new TogetherCondition()
  76. ])
  77. }
  78. }
  79. export class Withers extends Creature {
  80. constructor () {
  81. super(
  82. new ProperNoun('Withers'),
  83. new ImproperNoun('hellhound', 'hellhounds'),
  84. FemalePronouns,
  85. { Toughness: 60, Power: 70, Speed: 40, Willpower: 60, Charm: 120 },
  86. new Set(),
  87. new Set([VoreType.Oral]),
  88. 5000)
  89. this.actions.push(new BiteAction())
  90. this.groupActions.push(new StompAction())
  91. this.side = Side.Monsters
  92. const stomach = new Stomach(this, 50, new Damage(
  93. { amount: 300, type: DamageType.Acid, target: Vigor.Health },
  94. { amount: 200, type: DamageType.Crush, target: Vigor.Stamina },
  95. { amount: 200, type: DamageType.Dominance, target: Vigor.Resolve }
  96. ))
  97. stomach.tickLines = new POVPairArgs<Vore, Vore, { damage: Damage }>([
  98. [[POV.First, POV.Third], (user, target, args) => new LogLine(`Your stomach ${Words.Churns.singular} ${target.name} for `, args.damage.renderShort())],
  99. [[POV.Third, POV.First], (user, target, args) => new LogLine(`${user.name.capital}'s stomach ${Words.Churns.singular} you for `, args.damage.renderShort())],
  100. [[POV.Third, POV.Third], (user, target, args) => new LogLine(`${user.name.capital} ${Words.Churns.singular} ${target.name} for `, args.damage.renderShort())]
  101. ])
  102. stomach.digestLines = new POVPair<Vore, Vore>([
  103. [[POV.First, POV.Third], (user, target) => new LogLine(`Your stomach ${Words.Digests.singular} ${target.name}`)],
  104. [[POV.Third, POV.First], (user, target) => new LogLine(`${user.name.capital}'s stomach ${Words.Digests.singular} you`)],
  105. [[POV.Third, POV.Third], (user, target) => new LogLine(`${target.name.capital}'s squirms fade as the ${target.kind.all} is ${Words.Digests.past} by the ${user.kind}'s ${stomach.name}.`)]
  106. ])
  107. this.containers.push(stomach)
  108. this.otherActions.push(new FeedAction(stomach))
  109. this.groupActions.push(new DevourAllAction(stomach))
  110. }
  111. }