//SPRITE_TYPE_BOSS6_3, end boss phase 3;
enemyAnimations = true;
damagedMaterialOffset = 128;
damagedMaterialLife = 1500;

anim.m_clamp = false;
anim.m_animationSpeed = 0.5;
anim.m_frameAmount = 4;
anim.m_frameOffset = 0;
animations.Push(anim);
anim.m_frameOffset = 4;
animations.Push(anim);
anim.m_frameOffset = 8;
animations.Push(anim);
anim.m_frameOffset = 12;
animations.Push(anim);

anim.m_animationSpeed = 1.0;
anim.m_frameOffset = 16;
animations.Push(anim);
anim.m_frameOffset = 20;
animations.Push(anim);
anim.m_frameOffset = 24;
animations.Push(anim);
anim.m_frameOffset = 28;
animations.Push(anim);

anim.m_animationSpeed = 2.0;
anim.m_clamp = true;
anim.m_frameOffset = 32;
animations.Push(anim);
anim.m_frameOffset = 38;
animations.Push(anim);
anim.m_frameOffset = 44;
animations.Push(anim);
anim.m_frameOffset = 50;
animations.Push(anim);

anim.m_animationSpeed = 0.3;
anim.m_frameAmount = 19;
anim.m_frameOffset = 96;
animations.Push(anim);

anim.m_frameAmount = 1;
anim.m_frameOffset = 56;
animations.Push(anim);
anim.m_frameOffset = 57;
animations.Push(anim);
anim.m_frameOffset = 58;
animations.Push(anim);
anim.m_frameOffset = 59;
animations.Push(anim);

anim.m_frameOffset = 60;
animations.Push(anim);
anim.m_frameOffset = 61;
animations.Push(anim);
anim.m_frameOffset = 62;
animations.Push(anim);
anim.m_frameOffset = 63;
animations.Push(anim);
// SPRITE_ENEMY_ANIM_ATTACKING2;
anim.m_frameAmount = 4;
anim.m_animationSpeed = 4.0;
anim.m_clamp = true;
anim.m_frameOffset = 34;
animations.Push(anim);
anim.m_frameOffset = 40;
animations.Push(anim);
anim.m_frameOffset = 46;
animations.Push(anim);
anim.m_frameOffset = 52;
animations.Push(anim);
// SPRITE_ENEMY_ANIM_ATTACKING3;
anim.m_frameAmount = 4;
anim.m_animationSpeed = 2.0;
anim.m_clamp = true;
anim.m_frameOffset = 64;
animations.Push(anim);
anim.m_frameOffset = 68;
animations.Push(anim);
anim.m_frameOffset = 72;
animations.Push(anim);
anim.m_frameOffset = 76;
animations.Push(anim);
// SPRITE_ENEMY_ANIM_ATTACKING4;
anim.m_frameAmount = 2;
anim.m_animationSpeed = 16.0;
anim.m_clamp = true;
anim.m_frameOffset = 66;
animations.Push(anim);
anim.m_frameOffset = 70;
animations.Push(anim);
anim.m_frameOffset = 74;
animations.Push(anim);
anim.m_frameOffset = 78;
animations.Push(anim);
// SPRITE_ENEMY_ANIM_ATTACKING5;
animations.Push(anim);
animations.Push(anim);
animations.Push(anim);
animations.Push(anim);
// SPRITE_ENEMY_ANIM_DYING2;
anim.m_animationSpeed = 0.3;
anim.m_frameAmount = 19;
anim.m_frameOffset = 96;
animations.Push(anim);
animations.Push(anim);
animations.Push(anim);
animations.Push(anim);

delayKill = 3.65;
deathAnimDuringDelay = true;
flammable = true;
canBeDamaged = true;
Init(vector(0.95, 1.9, 1.9), 1524, 2, 2, 2, 0);
life = 3000;

ai.AddDeathNode(374, 13, 6.0, 300.0, 1000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0, 2.0, 0.0, 1.0);
ai.AddDeathNode(57, 10, 130.0, 1.0, 0.0, 0.0, -1.0, 2.0, 0.0, 0.0, 0.0, 0.0);
ai.SetLastDeathNodeToNotRunOnClients();
ai.AddNode(17, -1.0, -1.0, 0);
ai.SetLastNodeToRunOnClients();
ai.AddNode(268, -1.0, -1.0, 0);
ai.AddNode(277, 15.0, -1.0, 0);
ai.AddDeathNode(16, 1, 0.0);
ai.AddDeathNode(56, 8, 0.0, 1.0, 921.0, 1.0, 1.0, 1.0, 1.0, -1.0);
ai.AddDeathNode(368, 1, 921.0); // AI_TYPE_DISPLAY_SUBTITLE;
ai.AddDeathNode(332, 0);

partStruct.m_managed = false;
partStruct.m_removeIfTargetBleeds = false;
partStruct.m_normalOffset = 0.0;
partStruct.m_rotate = true;
partStruct.m_type = 1;
partStruct.m_useActorCoordinates = false;
partStruct.m_offset = vector(0.0,0.0,0.0);
bleedParticles.Push(partStruct);
partStruct.m_rotate = false;
partStruct.m_type = 0;
partStruct.m_useActorCoordinates = true;
killParticles.Push(partStruct);

[enemy]

addGib(1334);
addGib(1335);
addGib(1336);
addGib(1337);

attackStruct.m_attackAmount = 30;
attackStruct.m_originalAttackAmount = 30;
attackStruct.m_distancePriority = false;
attackStruct.m_pauseTimerAfter = 0.0;
attackStruct.m_reuseTimer = 3.0;
attackStruct.m_reuseTimerOriginal = 1.0;
attackStruct.m_attackRange = 12.0 * cubeSize;
attackStruct.m_attackDelay = 0.5;
attackStruct.m_attackDelayAfterInitial = 0.05;
attackStruct.m_attackSound.m_sound = 292;
attackStruct.m_attackSound.m_pitchMin = 0.95;
attackStruct.m_attackSound.m_pitchMax = 1.05;
attackStruct.m_attackSound.m_volumeMin = 1.0;
attackStruct.m_attackSound.m_volumeMax = 1.0;
attackStruct.m_enemyAttack = 51;
attackStruct.m_attackAnim = 7;
attackStruct.m_extraAttackAnim = 8;
attackStruct.m_canBeCancelled = true;
attackStruct.m_lineOfSight = false;
attackStruct.m_attacksLeftCancel = 1;
attackStruct.m_attackBeamTime = 0.0;
attackStruct.m_attackBeamTimer = 0.0;
attackStruct.m_genProjDamage = 10;
attackStruct.m_genProjRecoil = 0.5;
attackStruct.m_genProjAmount = 1;
attackStruct.m_genProjType = 423;
attackStruct.m_genProjZOffset = 0.25 * cubeSize;
attacks.Push(attackStruct);
attackStruct.m_attackAmount = 6;
attackStruct.m_originalAttackAmount = 6;
attackStruct.m_distancePriority = false;
attackStruct.m_pauseTimerAfter = 0.0;
attackStruct.m_reuseTimer = 0.5;
attackStruct.m_reuseTimerOriginal = 0.5;
attackStruct.m_attackRange = 8.0 * cubeSize;
attackStruct.m_attackDelay = 0.5;
attackStruct.m_attackDelayAfterInitial = 0.25;
attackStruct.m_attackSound.m_sound = 295;
attackStruct.m_attackSound.m_pitchMin = 0.95;
attackStruct.m_attackSound.m_pitchMax = 1.05;
attackStruct.m_attackSound.m_volumeMin = 1.0;
attackStruct.m_attackSound.m_volumeMax = 1.0;
attackStruct.m_enemyAttack = 50;
attackStruct.m_attackAnim = 2;
attackStruct.m_extraAttackAnim = 6;
attackStruct.m_canBeCancelled = true;
attackStruct.m_lineOfSight = false;
attackStruct.m_attacksLeftCancel = 1;
attackStruct.m_attackBeamTime = 0.0;
attackStruct.m_attackBeamTimer = 0.0;
attackStruct.m_genProjDamage = 15;
attackStruct.m_genProjRecoil = 1.5;
attackStruct.m_genProjAmount = 1;
attackStruct.m_genProjType = 422;
attackStruct.m_genProjZOffset = 0.0;
attackStruct.m_genProjVel = 7500.0;
attackStruct.m_genProjPitch = 5.0;
attackStruct.m_genProjSpoken = false;
attacks.Push(attackStruct);

yellTime = 0.3;
runSpeed = 850.0;
stepDelay = 0.48125;
painTreshold = 20;
jumps = true;
flies = false;
headshotMinZPercent = 0.75;
headshotMaxZPercent = 1.0;
headshotHeadInFront = false;
turnSpeed = 270.0;
stepSound.m_sound = 6;
stepSound.m_volumeMin = 1.0;
stepSound.m_volumeMax = 1.0;
idleSound.m_sound = 825;
yellSound.m_sound = 826;
painSound.m_sound = 827;
dieSound.m_sound = 828;
//dieSound.m_volumeMin = 1.75;
//dieSound.m_volumeMax = 1.75;
infighting = false;
showBossHealthBar = true;
enableForceStun = false;
canBeCaptured = false;
canBeNailed = false;