Feast 2.0!
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

148 строки
4.0 KiB

  1. import { VoreAI } from '@/game/ai'
  2. import { DamageType, Side, Stat, StatDamageFormula, StatusEffect, Vigor } from '@/game/combat'
  3. import { DigestionPowerEffect } from '@/game/combat/effects'
  4. import { Creature } from '@/game/creature'
  5. import { LogEntry, LogLine, nilLog } from '@/game/interface'
  6. import { ImproperNoun, MalePronouns, ObjectPronouns, Preposition, Verb, ProperNoun, Noun } from '@/game/language'
  7. import { anyVore, ConnectionDirection, Container, ContainerCapability, DefaultContainer, Stomach, Throat, transferDescription, VoreType } from '@/game/vore'
  8. import * as Words from '@/game/words'
  9. import * as Onomatopoeia from '@/game/onomatopoeia'
  10. import { ConsumeConsequence } from '@/game/combat/consequences'
  11. export default class SheenTheGryph extends Creature {
  12. constructor () {
  13. super(
  14. new ProperNoun("Sheen"),
  15. new ImproperNoun("gryphon", "gryphons"),
  16. MalePronouns,
  17. {
  18. Power: 60,
  19. Toughness: 35,
  20. Agility: 15,
  21. Reflexes: 10,
  22. Charm: 20,
  23. Willpower: 20
  24. },
  25. anyVore,
  26. anyVore,
  27. 250
  28. )
  29. class Paw extends DefaultContainer{
  30. constructor(owner : Creature,capacityFactor : number) {
  31. super(
  32. new Noun("paw", "paws"),
  33. owner,
  34. new Set<VoreType>([VoreType.Paw]),
  35. capacityFactor,
  36. new Set<ContainerCapability>([
  37. ContainerCapability.Consume,
  38. ContainerCapability.Release
  39. ])
  40. )
  41. }
  42. }
  43. const paw = new Paw(
  44. this,
  45. 25
  46. )
  47. const throat = new Throat(
  48. this,
  49. 25
  50. )
  51. const stomach = new Stomach(
  52. this,
  53. 50,
  54. new StatDamageFormula([
  55. { fraction: 1, stat: Stat.Toughness, type: DamageType.Acid, target: Vigor.Health }
  56. ])
  57. )
  58. stomach.effects.push(new class extends StatusEffect {
  59. constructor () {
  60. super(
  61. "Pinned",
  62. "Prey sometimes can't move.",
  63. "fas fa-sun"
  64. )
  65. }
  66. onApply (creature: Creature): LogEntry {
  67. return new LogLine(
  68. `${stomach.owner.name.capital.possessive} ${stomach.name} is incredibly tight, gripping ${creature.name.objective} like a vice!`
  69. )
  70. }
  71. preAction (creature: Creature): { prevented: boolean; log: LogEntry } {
  72. if (Math.random() < 0.5) {
  73. return {
  74. prevented: true,
  75. log: new LogLine(`${creature.name.capital} can't move!`)
  76. }
  77. } else {
  78. return {
  79. prevented: false,
  80. log: nilLog
  81. }
  82. }
  83. }
  84. }())
  85. paw.effects.push(new class extends StatusEffect {
  86. constructor () {
  87. super(
  88. "Pinned",
  89. "Prey sometimes can't move.",
  90. "fas fa-sun"
  91. )
  92. }
  93. onApply (creature: Creature): LogEntry {
  94. return new LogLine(
  95. `${stomach.owner.name.capital.possessive} ${stomach.name} is incredibly tight, gripping ${creature.name.objective} like a vice!`
  96. )
  97. }
  98. preAction (creature: Creature): { prevented: boolean; log: LogEntry } {
  99. if (Math.random() < 0.5) {
  100. return {
  101. prevented: true,
  102. log: new LogLine(`${creature.name.capital} can't move!`)
  103. }
  104. } else {
  105. return {
  106. prevented: false,
  107. log: nilLog
  108. }
  109. }
  110. }
  111. }())
  112. this.addContainer(throat)
  113. this.addContainer(stomach)
  114. this.addContainer(paw)
  115. throat.connect({
  116. destination: stomach,
  117. direction: ConnectionDirection.Deeper,
  118. description: transferDescription(Words.Swallow, new Preposition("down"))
  119. })
  120. stomach.connect({
  121. destination: throat,
  122. direction: ConnectionDirection.Shallower,
  123. description: transferDescription(new Verb("hork"), new Preposition("up"))
  124. })
  125. stomach.voreRelay.subscribe("onDigested", (sender, args) => {
  126. return Onomatopoeia.makeOnomatopoeia(Onomatopoeia.Burp)
  127. })
  128. this.side = Side.Monsters
  129. this.ai = new VoreAI(this)
  130. }
  131. }