Feast 2.0!
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 

96 lignes
2.6 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 } from '@/game/language'
  7. import { anyVore, ConnectionDirection, Container, Stomach, Throat, transferDescription } from '@/game/vore'
  8. import * as Words from '@/game/words'
  9. import * as Onomatopoeia from '@/game/onomatopoeia'
  10. export default class Werewolf extends Creature {
  11. constructor () {
  12. super(
  13. new ImproperNoun("werewolf", "werewolves"),
  14. new ImproperNoun("werewolf", "werewolves"),
  15. MalePronouns,
  16. {
  17. Power: 45,
  18. Toughness: 30,
  19. Agility: 25,
  20. Reflexes: 25,
  21. Charm: 10,
  22. Willpower: 15
  23. },
  24. anyVore,
  25. anyVore,
  26. 75
  27. )
  28. const throat = new Throat(
  29. this,
  30. 25
  31. )
  32. const stomach = new Stomach(
  33. this,
  34. 50,
  35. new StatDamageFormula([
  36. { fraction: 1, stat: Stat.Toughness, type: DamageType.Acid, target: Vigor.Health }
  37. ])
  38. )
  39. stomach.effects.push(new class extends StatusEffect {
  40. constructor () {
  41. super(
  42. "Pinned",
  43. "Prey sometimes can't move.",
  44. "fas fa-sun"
  45. )
  46. }
  47. onApply (creature: Creature): LogEntry {
  48. return new LogLine(
  49. `${stomach.owner.name.capital.possessive} ${stomach.name} is incredibly tight, gripping ${creature.name.objective} like a vice!`
  50. )
  51. }
  52. preAction (creature: Creature): { prevented: boolean; log: LogEntry } {
  53. if (Math.random() < 0.5) {
  54. return {
  55. prevented: true,
  56. log: new LogLine(`${creature.name.capital} can't move!`)
  57. }
  58. } else {
  59. return {
  60. prevented: false,
  61. log: nilLog
  62. }
  63. }
  64. }
  65. }())
  66. this.addContainer(throat)
  67. this.addContainer(stomach)
  68. throat.connect({
  69. destination: stomach,
  70. direction: ConnectionDirection.Deeper,
  71. description: transferDescription(Words.Swallow, new Preposition("down"))
  72. })
  73. stomach.connect({
  74. destination: throat,
  75. direction: ConnectionDirection.Shallower,
  76. description: transferDescription(new Verb("hork"), new Preposition("up"))
  77. })
  78. stomach.voreRelay.subscribe("onDigested", (sender, args) => {
  79. return Onomatopoeia.makeOnomatopoeia(Onomatopoeia.Burp)
  80. })
  81. this.side = Side.Monsters
  82. this.ai = new VoreAI(this)
  83. }
  84. }