diff --git a/src/game/creatures/characters/SheenTheGryph.ts b/src/game/creatures/characters/SheenTheGryph.ts new file mode 100644 index 0000000..bfd620c --- /dev/null +++ b/src/game/creatures/characters/SheenTheGryph.ts @@ -0,0 +1,148 @@ +import { VoreAI } from '@/game/ai' +import { DamageType, Side, Stat, StatDamageFormula, StatusEffect, Vigor } from '@/game/combat' +import { DigestionPowerEffect } from '@/game/combat/effects' +import { Creature } from '@/game/creature' +import { LogEntry, LogLine, nilLog } from '@/game/interface' +import { ImproperNoun, MalePronouns, ObjectPronouns, Preposition, Verb, ProperNoun, Noun } from '@/game/language' +import { anyVore, ConnectionDirection, Container, ContainerCapability, DefaultContainer, Stomach, Throat, transferDescription, VoreType } from '@/game/vore' +import * as Words from '@/game/words' +import * as Onomatopoeia from '@/game/onomatopoeia' +import { ConsumeConsequence } from '@/game/combat/consequences' + +export default class SheenTheGryph extends Creature { + constructor () { + super( + new ProperNoun("Sheen"), + new ImproperNoun("gryphon", "gryphons"), + MalePronouns, + { + Power: 60, + Toughness: 35, + Agility: 15, + Reflexes: 10, + Charm: 20, + Willpower: 20 + }, + anyVore, + anyVore, + 250 + ) + + class Paw extends DefaultContainer + { + constructor(owner:Creature,capacityFactor: number) { + super( + new Noun("paw","paws"), + owner, + new Set([VoreType.Paw]), + capacityFactor, + new Set([ + ContainerCapability.Consume, + ContainerCapability.Release + ]) + ) + } + } + + const paw = new Paw( + this, + 25 + ) + + const throat = new Throat( + this, + 25 + ) + + const stomach = new Stomach( + this, + 50, + new StatDamageFormula([ + { fraction: 1, stat: Stat.Toughness, type: DamageType.Acid, target: Vigor.Health } + ]) + ) + + stomach.effects.push(new class extends StatusEffect { + constructor () { + super( + "Pinned", + "Prey sometimes can't move.", + "fas fa-sun" + ) + } + + onApply (creature: Creature): LogEntry { + return new LogLine( + `${stomach.owner.name.capital.possessive} ${stomach.name} is incredibly tight, gripping ${creature.name.objective} like a vice!` + ) + } + + preAction (creature: Creature): { prevented: boolean; log: LogEntry } { + if (Math.random() < 0.5) { + return { + prevented: true, + log: new LogLine(`${creature.name.capital} can't move!`) + } + } else { + return { + prevented: false, + log: nilLog + } + } + } + }()) + + paw.effects.push(new class extends StatusEffect { + constructor () { + super( + "Pinned", + "Prey sometimes can't move.", + "fas fa-sun" + ) + } + + onApply (creature: Creature): LogEntry { + return new LogLine( + `${stomach.owner.name.capital.possessive} ${stomach.name} is incredibly tight, gripping ${creature.name.objective} like a vice!` + ) + } + + preAction (creature: Creature): { prevented: boolean; log: LogEntry } { + if (Math.random() < 0.5) { + return { + prevented: true, + log: new LogLine(`${creature.name.capital} can't move!`) + } + } else { + return { + prevented: false, + log: nilLog + } + } + } + }()) + + this.addContainer(throat) + this.addContainer(stomach) + this.addContainer(paw) + + throat.connect({ + destination: stomach, + direction: ConnectionDirection.Deeper, + description: transferDescription(Words.Swallow, new Preposition("down")) + }) + + stomach.connect({ + destination: throat, + direction: ConnectionDirection.Shallower, + description: transferDescription(new Verb("hork"), new Preposition("up")) + }) + + stomach.voreRelay.subscribe("onDigested", (sender, args) => { + return Onomatopoeia.makeOnomatopoeia(Onomatopoeia.Burp) + }) + + this.side = Side.Monsters + this.ai = new VoreAI(this) + } +} diff --git a/src/game/vore.ts b/src/game/vore.ts index e91f918..54adf30 100644 --- a/src/game/vore.ts +++ b/src/game/vore.ts @@ -8,7 +8,8 @@ import { Creature } from '@/game/creature' import { VoreRelay } from '@/game/events' export enum VoreType { - Oral = "Oral Vore" + Oral = "Oral Vore", + Paw = "Paw Vore" } export const anyVore = new Set([