From 110b69c3264141ac5c039ec52a9010b8dfb908d6 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Fri, 7 Aug 2020 23:57:51 -0400 Subject: [PATCH] Add a mass-ratio condition; add a crush move to Geta --- src/game/combat/conditions.ts | 10 ++++++++++ src/game/creatures/geta.ts | 29 +++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/game/combat/conditions.ts b/src/game/combat/conditions.ts index ac2427e..a9f9e5a 100644 --- a/src/game/combat/conditions.ts +++ b/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 + } +} diff --git a/src/game/creatures/geta.ts b/src/game/creatures/geta.ts index 80a0beb..0b4a20f 100644 --- a/src/game/creatures/geta.ts +++ b/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() + ) + ] + } + ) + ) } }