{
  "type" : "ancientpenguinUfo",

  "categories" : [ "penguinUfo" ],
  "parts" : [ "ufo", "pilot" ],

  "animation" : "penguinUfo.animation",
  "colors" : "/monsters/colors.config",
  "reversed" : true,

  "dropPools" : [ "ancienttreasure" ],

  "baseParameters" : {
    "scripts" : [
      "/monsters/boss/bossMonster.lua",
      "/monsters/simpleRangedAttack.lua",
      "/scripts/stateMachine.lua",
      "/scripts/util.lua",
      "/scripts/vec2.lua",

      "/monsters/boss/penguinUfo/idleState.lua",
      "/monsters/boss/penguinUfo/dieState.lua"
    ],

    "skills" : ["ufoMoveFireAttack", "ufoSwoopAttack", "ufoReinforcementsAttack", "ufoSlamAttack", "ufoTeleportAttack", "ufoPulseCannonAttack", "ufoSpawnTanksAttack"],
    "skillCount" : 7,

    "phases" : [
      {
        "skills" : ["ufoMoveFireAttack", "ufoSwoopAttack"]
      },
      {
        "enterPhase" : "ufoSpawnTanksAttack",
        "trigger" : "healthPercentage",
        "healthPercentage" : 0.8,
        "skills" : ["ufoMoveFireAttack", "ufoSwoopAttack", "ufoReinforcementsAttack", "ufoMoveFireAttack", "ufoSlamAttack", "ufoReinforcementsAttack"]
      },
      {
        "enterPhase" : "ufoSpawnTanksAttack",
        "trigger" : "healthPercentage",
        "healthPercentage" : 0.33,
        "skills" : ["ufoMoveFireAttack", "ufoTeleportAttack", "ufoSlamAttack", "ufoReinforcementsAttack", "ufoPulseCannonAttack"]
      }
    ],

    "trackTargetDistance" : 50.0,
    "switchTargetDistance" : 10.0,
    "keepTargetInSight" : false,

    "cruiseDistance" : 25,

    "metaBoundBox" : [-14.0, -4.0, 14.0, 4.0],
    "scale" : 1.0,

    "movementSettings" : {
      "collisionPoly" : [ [-14.0, -4.0], [14.0, -4.0], [14.0, 4.0], [-14.0, 4.0] ],

      "mass" : 0.2,
      "walkSpeed" : 2,
      "runSpeed" : 2,
      "jumpSpeed" : 5,
      "flySpeed" : 20,
      "airForce" : 25.0,

      "gravityEnabled" : false
    },

    "knockoutTime" : 1,
    "knockoutEffect" : "blink",
    "deathParticles" : "deathPoof",

    "touchDamage" : {
      "poly" : [ [-14.0, -4.0], [14.0, -4.0], [14.0, 4.0], [-14.0, 4.0] ],
      "damage" : 25,

      "teamType" : "enemy",
      "damageSourceKind" : "default",
      "statusEffects" : [ ]
    },

    "statusSettings" : {
      "statusProperties" : {
        "targetMaterialKind" : "robotic"
      },

      "appliesEnvironmentStatusEffects" : false,
      "minimumLiquidStatusEffectPercentage" : 0.1,

      "primaryScriptSources" : [
        "/stats/monster_primary.lua"
      ],
      "primaryScriptDelta" : 0,

      "stats" : {
        "maxHealth" : {
          "baseValue" : 350
        },
        "protection" : {
          "baseValue" : 110.0
        },
        "healthRegen" : {
          "baseValue" : 0.0
        },
        "poisonImmunity" : {
          "baseValue" : 1.0
        },
        "fireImmunity" : {
          "baseValue" : 1.0
        }
      },

      "resources" : {
        "health" : {
          "maxStat" : "maxHealth",
          "deltaStat" : "healthRegen",
          "defaultPercentage" : 100
        }
      }
    },

    "mouthOffset" : [0, 0],
    "feetOffset" : [0, -8],

    "beamSourceOffset" : [0, -5.5],
    "targetYOffsetRange" : [18.0, 22.0],

    "attackTime" : 5.0,
    "fireInterval" : 0.6,
    "cooldownTime" : 0.25,

    "projectiles" : {
      "deathexplosion" : {
        "type" : "regularexplosion2universal",
        "config" : {
          "speed" : 0.1,
          "power" : 2,

          "actionOnReap" : [
            {
              "action" : "config",
              "file" : "/projectiles/explosions/regularexplosion2/regularexplosion2universal.config"
            },
            {
              "action" : "projectile",
              "type" : "dreadwreckage",
              "inheritDamageFactor" : 0.2,
              "fuzzAngle" : 30,
              "angleAdjust" : 0
            },
            {
              "action" : "projectile",
              "type" : "dreadwreckage",
              "inheritDamageFactor" : 0.2,
              "fuzzAngle" : 30,
              "angleAdjust" : 45
            },
            {
              "action" : "projectile",
              "type" : "dreadwreckage",
              "inheritDamageFactor" : 0.2,
              "fuzzAngle" : 30,
              "angleAdjust" : -45
            }
          ]
        },

        "fireTime" : 8.0,
        "fireInterval" : 0.2,
        "cooldown" : 0.1
      },

      "blockbreaker" : {
        "type" : "invisibleprojectile",
        "config" : {
          "speed" : 0.1,
          "power" : 0,

          "actionOnReap" : [
            {
              "action" : "explosion",
              "foregroundRadius" : 6,
              "backgroundRadius" : 0,
              "explosiveDamageAmount" : 100,
              "delaySteps" : 1
            }
          ]
        },

        "fireTime" : 0.2,
        "fireInterval" : 0.1,
        "cooldown" : 0.1
      }
    }
  }
}
