Feast 2.0!
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 

149 行
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. {
  31. constructor(owner:Creature,capacityFactor: number) {
  32. super(
  33. new Noun("paw","paws"),
  34. owner,
  35. new Set<VoreType>([VoreType.Paw]),
  36. capacityFactor,
  37. new Set<ContainerCapability>([
  38. ContainerCapability.Consume,
  39. ContainerCapability.Release
  40. ])
  41. )
  42. }
  43. }
  44. const paw = new Paw(
  45. this,
  46. 25
  47. )
  48. const throat = new Throat(
  49. this,
  50. 25
  51. )
  52. const stomach = new Stomach(
  53. this,
  54. 50,
  55. new StatDamageFormula([
  56. { fraction: 1, stat: Stat.Toughness, type: DamageType.Acid, target: Vigor.Health }
  57. ])
  58. )
  59. stomach.effects.push(new class extends StatusEffect {
  60. constructor () {
  61. super(
  62. "Pinned",
  63. "Prey sometimes can't move.",
  64. "fas fa-sun"
  65. )
  66. }
  67. onApply (creature: Creature): LogEntry {
  68. return new LogLine(
  69. `${stomach.owner.name.capital.possessive} ${stomach.name} is incredibly tight, gripping ${creature.name.objective} like a vice!`
  70. )
  71. }
  72. preAction (creature: Creature): { prevented: boolean; log: LogEntry } {
  73. if (Math.random() < 0.5) {
  74. return {
  75. prevented: true,
  76. log: new LogLine(`${creature.name.capital} can't move!`)
  77. }
  78. } else {
  79. return {
  80. prevented: false,
  81. log: nilLog
  82. }
  83. }
  84. }
  85. }())
  86. paw.effects.push(new class extends StatusEffect {
  87. constructor () {
  88. super(
  89. "Pinned",
  90. "Prey sometimes can't move.",
  91. "fas fa-sun"
  92. )
  93. }
  94. onApply (creature: Creature): LogEntry {
  95. return new LogLine(
  96. `${stomach.owner.name.capital.possessive} ${stomach.name} is incredibly tight, gripping ${creature.name.objective} like a vice!`
  97. )
  98. }
  99. preAction (creature: Creature): { prevented: boolean; log: LogEntry } {
  100. if (Math.random() < 0.5) {
  101. return {
  102. prevented: true,
  103. log: new LogLine(`${creature.name.capital} can't move!`)
  104. }
  105. } else {
  106. return {
  107. prevented: false,
  108. log: nilLog
  109. }
  110. }
  111. }
  112. }())
  113. this.addContainer(throat)
  114. this.addContainer(stomach)
  115. this.addContainer(paw)
  116. throat.connect({
  117. destination: stomach,
  118. direction: ConnectionDirection.Deeper,
  119. description: transferDescription(Words.Swallow, new Preposition("down"))
  120. })
  121. stomach.connect({
  122. destination: throat,
  123. direction: ConnectionDirection.Shallower,
  124. description: transferDescription(new Verb("hork"), new Preposition("up"))
  125. })
  126. stomach.voreRelay.subscribe("onDigested", (sender, args) => {
  127. return Onomatopoeia.makeOnomatopoeia(Onomatopoeia.Burp)
  128. })
  129. this.side = Side.Monsters
  130. this.ai = new VoreAI(this)
  131. }
  132. }