瀏覽代碼

Add a mass-ratio condition; add a crush move to Geta

master
Fen Dweller 5 年之前
父節點
當前提交
110b69c326
共有 2 個文件被更改,包括 37 次插入2 次删除
  1. +10
    -0
      src/game/combat/conditions.ts
  2. +27
    -2
      src/game/creatures/geta.ts

+ 10
- 0
src/game/combat/conditions.ts 查看文件

@@ -107,3 +107,13 @@ export class ContainerFullCondition implements Condition {
return this.container.contents.length > 0
}
}

export class MassRatioCondition implements Condition {
constructor (private ratio: number) {

}

allowed (user: Creature, target: Creature): boolean {
return user.voreStats.Mass / target.voreStats.Mass > this.ratio
}
}

+ 27
- 2
src/game/creatures/geta.ts 查看文件

@@ -4,8 +4,9 @@ import { MalePronouns, ImproperNoun, ProperNoun, ObjectPronouns, FemalePronouns,
import { VoreType, Stomach, Bowels, Cock, Balls, anyVore, Slit, Womb, biconnectContainers } from '../vore'
import { AttackAction, TransferAction, FeedAction } from '../combat/actions'
import { StatusConsequence, LogConsequence, DamageConsequence } from '../combat/consequences'
import { SizeEffect, DamageTypeResistanceEffect } from '../combat/effects'
import { SizeEffect, DamageTypeResistanceEffect, InstantKillEffect } from '../combat/effects'
import { LogLine } from '../interface'
import { TogetherCondition, MassRatioCondition } from '../combat/conditions'

export class Geta extends Creature {
constructor () {
@@ -40,7 +41,7 @@ export class Geta extends Creature {

this.otherActions.push(new FeedAction(stomach))

const cock = new Cock(this, 5, new Damage(
const cock = new Cock(this, 10, new Damage(
{ amount: 10, type: DamageType.Crush, target: Vigor.Health },
{ amount: 30, type: DamageType.Crush, target: Vigor.Stamina },
{ amount: 30, type: DamageType.Dominance, target: Vigor.Resolve }
@@ -62,6 +63,9 @@ export class Geta extends Creature {
"Shrink",
"Zap!",
{
conditions: [
new TogetherCondition()
],
consequences: [
new LogConsequence(
(user, target) => new LogLine(`ZAP!`)
@@ -73,5 +77,26 @@ export class Geta extends Creature {
}
)
)

this.actions.push(
new CompositionAction(
"Crush",
"Crush them like a bug underfoot",
{
conditions: [
new TogetherCondition(),
new MassRatioCondition(10)
],
consequences: [
new LogConsequence(
(user, target) => new LogLine(`CRUNCH`)
),
new StatusConsequence(
() => new InstantKillEffect()
)
]
}
)
)
}
}

Loading…
取消
儲存