Parcourir la source

Added Sheen, my gryph :3 Will be used to learn how to make characters with the new system.

master
Samuel Dweller il y a 3 ans
Parent
révision
b7b8ecbefb
2 fichiers modifiés avec 150 ajouts et 1 suppressions
  1. +148
    -0
      src/game/creatures/characters/SheenTheGryph.ts
  2. +2
    -1
      src/game/vore.ts

+ 148
- 0
src/game/creatures/characters/SheenTheGryph.ts Voir le fichier

@@ -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>([VoreType.Paw]),
capacityFactor,
new Set<ContainerCapability>([
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)
}
}

+ 2
- 1
src/game/vore.ts Voir le fichier

@@ -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([


Chargement…
Annuler
Enregistrer