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 } from '../entity'
  2. import { Damage, DamageType, ConstantDamageFormula, Vigor, Side, GroupAction } from '../combat'
  3. import { ImproperNoun, POVPair, ProperNoun, FemalePronouns, RandomWord, Adjective } from '../language'
  4. import { LogLine, LogLines, LogEntry } from '../interface'
  5. import { VoreType, Stomach, Container } from '../vore'
  6. import { AttackAction, FeedAction } from '../combat/actions'
  7. import { TogetherCondition } from '../combat/conditions'
  8. import { InstantKill } from '../combat/effects'
  9. const huge = new RandomWord([
  10. new Adjective('massive'),
  11. new Adjective('colossal'),
  12. new Adjective('big ol\''),
  13. new Adjective('heavy'),
  14. new Adjective('crushing'),
  15. new Adjective('huge')
  16. ])
  17. class BiteAction extends AttackAction {
  18. constructor () {
  19. super(new ConstantDamageFormula(new Damage({ amount: 50, type: DamageType.Slash, target: Vigor.Health })))
  20. this.name = "Bite"
  21. }
  22. }
  23. class StompAction extends GroupAction {
  24. lines: POVPair<Creature, Creature> = new POVPair([
  25. [[POV.First, POV.Third], (user: Creature, target: Creature) => new LogLine(`You flatten ${target.name} under your foot!`)],
  26. [[POV.Third, POV.First], (user: Creature) => new LogLine(`${user.name.capital} flattens you under ${user.pronouns.possessive} ${huge} foot!`)],
  27. [[POV.Third, POV.Third], (user: Creature, target: Creature) => new LogLine(`${user.name.capital} flattens ${target.name} under ${user.pronouns.possessive} ${huge} foot!`)]
  28. ])
  29. execute (user: Creature, target: Creature): LogEntry {
  30. return new LogLines(this.lines.run(user, target), new InstantKill().apply(target))
  31. }
  32. describe (user: Creature, target: Creature): LogEntry {
  33. return new LogLine('Stomp one sucker')
  34. }
  35. describeGroup (user: Creature, targets: Array<Creature>): LogEntry {
  36. return new LogLine('Stomp all ', targets.length.toString(), ' of \'em!')
  37. }
  38. constructor () {
  39. super('Stomp', 'STOMP!', [
  40. new TogetherCondition()
  41. ])
  42. }
  43. }
  44. class DevourAllAction extends GroupAction {
  45. lines: POVPair<Creature, Creature> = new POVPair([
  46. [[POV.First, POV.Third], (user: Creature, target: Creature) => new LogLine(`You scoop up ${target.name}!`)],
  47. [[POV.Third, POV.First], (user: Creature) => new LogLine(`${user.name.capital} scoops you up!`)],
  48. [[POV.Third, POV.Third], (user: Creature, target: Creature) => new LogLine(`${user.name.capital} scoops ${target.name} up!`)]
  49. ])
  50. execute (user: Creature, target: Creature): LogEntry {
  51. this.container.consume(target)
  52. return new LogLines(this.lines.run(user, target))
  53. }
  54. describe (user: Creature, target: Creature): LogEntry {
  55. return new LogLine('Stomp one sucker')
  56. }
  57. executeGroup (user: Creature, targets: Array<Creature>): LogEntry {
  58. return new LogLines(...targets.map(target => this.execute(user, target)).concat(
  59. [new LogLine(`All ${targets.length} of them are ${user.kind} chow now`)]
  60. ))
  61. }
  62. describeGroup (user: Creature, targets: Array<Creature>): LogEntry {
  63. return new LogLine('Eat all ', targets.length.toString(), ' of \'em!')
  64. }
  65. constructor (private container: Container) {
  66. super('Devour All', 'GULP!', [
  67. new TogetherCondition()
  68. ])
  69. }
  70. }
  71. export class Withers extends Creature {
  72. constructor () {
  73. super(
  74. new ProperNoun('Withers'),
  75. new ImproperNoun('hellhound', 'hellhounds'),
  76. FemalePronouns,
  77. { Toughness: 60, Power: 70, 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. }