|
|
|
@@ -1,21 +1,21 @@ |
|
|
|
import { Creature } from "../creature" |
|
|
|
import { Damage, DamageType, ConstantDamageFormula, Vigor, Side, StatDamageFormula, Stat, Action, DamageFormula } from '../combat' |
|
|
|
import { Damage, DamageType, ConstantDamageFormula, Vigor, Side, StatDamageFormula, Stat, Action, DamageFormula, Condition, FractionDamageFormula } from '../combat' |
|
|
|
import { ImproperNoun, ProperNoun, FemalePronouns, MalePronouns, Verb, PairLineArgs, PairLine, TextLike } from '../language' |
|
|
|
import { VoreType, Stomach, Bowels, NormalContainer, InnerContainer, VoreContainer, Container, Vore } from '../vore' |
|
|
|
import { AttackAction, TransferAction, FeedAction, StruggleAction, DamageAction } from '../combat/actions' |
|
|
|
import { LogLine, LogEntry, LogLines } from '../interface' |
|
|
|
import { ContainsCondition, CapableCondition, EnemyCondition } from '../combat/conditions' |
|
|
|
import { ContainsCondition, CapableCondition, EnemyCondition, TargetDrainedVigorCondition } from '../combat/conditions' |
|
|
|
import { StatTest } from '../combat/tests' |
|
|
|
|
|
|
|
export class TrappedAction extends DamageAction { |
|
|
|
protected test: StatTest |
|
|
|
|
|
|
|
constructor (name: TextLike, desc: TextLike, protected verb: Verb, protected damage: DamageFormula, container: Container) { |
|
|
|
constructor (name: TextLike, desc: TextLike, protected verb: Verb, protected damage: DamageFormula, container: Container, conditions: Condition[] = []) { |
|
|
|
super( |
|
|
|
name, |
|
|
|
desc, |
|
|
|
damage, |
|
|
|
[new CapableCondition(), new ContainsCondition(container), new EnemyCondition()] |
|
|
|
[new CapableCondition(), new ContainsCondition(container), new EnemyCondition()].concat(conditions) |
|
|
|
) |
|
|
|
this.test = new StatTest(Stat.Power) |
|
|
|
} |
|
|
|
@@ -77,13 +77,33 @@ class Paw extends NormalContainer { |
|
|
|
), |
|
|
|
new ConstantDamageFormula( |
|
|
|
new Damage( |
|
|
|
{ amount: 10, target: Stat.Toughness, type: DamageType.Crush }, |
|
|
|
{ amount: 10, target: Stat.Power, type: DamageType.Crush }, |
|
|
|
{ amount: 100, target: Vigor.Stamina, type: DamageType.Crush }, |
|
|
|
{ amount: 3, target: Stat.Toughness, type: DamageType.Crush }, |
|
|
|
{ amount: 5, target: Stat.Power, type: DamageType.Crush }, |
|
|
|
{ amount: 10, target: Stat.Speed, type: DamageType.Crush } |
|
|
|
) |
|
|
|
), |
|
|
|
this |
|
|
|
)) |
|
|
|
this.actions.push(new TrappedAction( |
|
|
|
"Crush", |
|
|
|
"Finish them off", |
|
|
|
new Verb( |
|
|
|
'crush', |
|
|
|
'crushes' |
|
|
|
), |
|
|
|
new FractionDamageFormula( |
|
|
|
[ |
|
|
|
{ fraction: 1, target: Stat.Toughness, type: DamageType.Pure }, |
|
|
|
{ fraction: 1, target: Stat.Power, type: DamageType.Pure }, |
|
|
|
{ fraction: 1, target: Stat.Speed, type: DamageType.Pure }, |
|
|
|
{ fraction: 1, target: Stat.Willpower, type: DamageType.Pure }, |
|
|
|
{ fraction: 1, target: Stat.Charm, type: DamageType.Pure } |
|
|
|
] |
|
|
|
), |
|
|
|
this, |
|
|
|
[new TargetDrainedVigorCondition(Vigor.Stamina)] |
|
|
|
)) |
|
|
|
} |
|
|
|
|
|
|
|
consumeLine: PairLineArgs<Vore, { container: Container }> = (user, target, args) => { |
|
|
|
|