|  | import { FavorEscapedPrey, VoreAI } from '@/game/ai'
import { CompositionAction, ConstantDamageFormula, Damage, DamageType, FractionDamageFormula, Side, Stat, StatDamageFormula, Vigor } from '@/game/combat'
import { PairCondition, TogetherCondition } from '@/game/combat/conditions'
import { ConsumeConsequence, DamageConsequence, DrainConsequence, StatusConsequence } from '@/game/combat/consequences'
import { LogGroupConsequence } from '@/game/combat/groupConsequences'
import { PreyTargeter, SideTargeter, SoloTargeter } from '@/game/combat/targeters'
import { CompositionTest, OpposedStatScorer, TestCategory } from '@/game/combat/tests'
import { Creature } from '@/game/creature'
import { LogLine, nilLog } from '@/game/interface'
import { ImproperNoun, MalePronouns, ProperNoun } from '@/game/language'
import { anyVore, Stomach } from '@/game/vore'
export default class Inazuma extends Creature {
  constructor () {
    super(
      new ProperNoun("Inazuma"),
      new ImproperNoun("zorgoia"),
      MalePronouns,
      {
        Power: 30,
        Toughness: 35,
        Agility: 45,
        Reflexes: 40,
        Charm: 60,
        Willpower: 50
      },
      new Set(),
      anyVore,
      200
    )
    this.side = Side.Monsters
    this.ai = (new VoreAI(this))
    this.ai.addDecider(new FavorEscapedPrey())
    const stomach = new Stomach(
      this,
      2,
      new StatDamageFormula([
        { fraction: 1, stat: Stat.Power, target: Vigor.Health, type: DamageType.Acid }
      ])
    )
    this.actions.push(new CompositionAction(
      "Mass Devour",
      "Eat everyone!",
      {
        conditions: [new PairCondition(), new TogetherCondition()],
        targeters: [new SideTargeter()],
        consequences: [new ConsumeConsequence(stomach)],
        tests: [new CompositionTest(
          [
            new OpposedStatScorer(
              {
                Power: 0.5,
                Agility: 0.75
              },
              {
                Power: 0.5,
                Reflexes: 0.75
              }
            )
          ],
          () => nilLog,
          TestCategory.Vore,
          0
        )],
        groupConsequences: [new LogGroupConsequence(
          (user, targets) => new LogLine(`With a mighty GULP!, all ${targets.length} of ${user.name.possessive} prey are swallowed down.`)
        )]
      }
    ))
    this.actions.push(new CompositionAction(
      "Level Drain",
      "Steal stats from prey",
      {
        conditions: [new PairCondition()],
        targeters: [new PreyTargeter(stomach)],
        consequences: [new DrainConsequence(
          new FractionDamageFormula([
            { fraction: 0.25, target: Stat.Power, type: DamageType.Pure },
            { fraction: 0.25, target: Stat.Toughness, type: DamageType.Pure },
            { fraction: 0.25, target: Stat.Agility, type: DamageType.Pure },
            { fraction: 0.25, target: Stat.Reflexes, type: DamageType.Pure },
            { fraction: 0.25, target: Stat.Charm, type: DamageType.Pure },
            { fraction: 0.25, target: Stat.Willpower, type: DamageType.Pure }
          ])
        )]
      }
    ))
    this.addVoreContainer(stomach)
    this.ai = new VoreAI(this)
  }
}
 |