Feast 2.0!
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

113 líneas
4.0 KiB

  1. import { Creature, POV, Entity } from '../entity'
  2. import { Stat, Damage, DamageType, ConstantDamageFormula, Vigor, Side, PairAction, CombatTest, GroupAction } from '../combat'
  3. import { MalePronouns, ImproperNoun, POVPair, POVPairArgs, ProperNoun, TheyPronouns, FemalePronouns, RandomWord, Adjective } from '../language'
  4. import { LogLine, LogLines, LogEntry } from '../interface'
  5. import { VoreType, Stomach, Bowels, Container } from '../vore'
  6. import { StatTest } from '../combat/tests'
  7. import { AttackAction, TransferAction, FeedAction } from '../combat/actions'
  8. import { TogetherCondition } from '../combat/conditions'
  9. import { InstantKill } from '../combat/effects'
  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, target: 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, target: 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. execute (user: Creature, target: Creature): LogEntry {
  52. this.container.consume(target)
  53. return new LogLines(this.lines.run(user, target))
  54. }
  55. describe (user: Creature, target: Creature): LogEntry {
  56. return new LogLine('Stomp one sucker')
  57. }
  58. executeGroup (user: Creature, targets: Array<Creature>): LogEntry {
  59. return new LogLines(...targets.map(target => this.execute(user, target)).concat(
  60. [new LogLine('GULP!')]
  61. ))
  62. }
  63. describeGroup (user: Creature, targets: Array<Creature>): LogEntry {
  64. return new LogLine('Eat all ', targets.length.toString(), ' of \'em!')
  65. }
  66. constructor (private container: Container) {
  67. super('Devour All', 'GULP!', [
  68. new TogetherCondition()
  69. ])
  70. }
  71. }
  72. export class Withers extends Creature {
  73. constructor () {
  74. super(
  75. new ProperNoun('Withers'),
  76. FemalePronouns,
  77. { Toughness: 60, Power: 100, Speed: 40, Willpower: 60, Charm: 120 },
  78. new Set(),
  79. new Set([VoreType.Oral]),
  80. 5000)
  81. this.actions.push(new BiteAction())
  82. this.groupActions.push(new StompAction())
  83. this.side = Side.Monsters
  84. const stomach = new Stomach(this, 50, new Damage(
  85. { amount: 30, type: DamageType.Acid, target: Vigor.Health },
  86. { amount: 20, type: DamageType.Crush, target: Vigor.Stamina },
  87. { amount: 20, type: DamageType.Dominance, target: Vigor.Resolve }
  88. ))
  89. this.containers.push(stomach)
  90. this.otherActions.push(new FeedAction(stomach))
  91. this.groupActions.push(new DevourAllAction(stomach))
  92. }
  93. }