// -------- //
// CHICKENS //
// -------- //

ACTOR AttackChicken : HPchicken 12346
{
  //$Category SecretMonsters
  //$Title Attack Chicken
  Health 60
  Radius 12
  Height 32
  Scale 1.5
  Speed 10
  States
  {
    Melee:
    CHKN A 8 A_FaceTarget
    CHKN C 10 A_CustomMeleeAttack(random[ChicAttack](3,6))
    Goto See

  }
}

ACTOR MadChicken : AttackChicken 12347
{
  //$Category SecretMonsters
  //$Title Mad Chicken
  Health 125
  Radius 10
  Height 24
  Mass 250
  Painchance 45
  MONSTER
  +DONTHURTSPECIES
  +WINDTHRUST
  +DONTMORPH
  +FLOORCLIP
  +MISSILEMORE
  HitObituary "%o felt the power of a pecker."
  Obituary "%o felt the power of a mad chickens deathfeather."
  DamageFactor "Ice",0
  SeeSound "madchicken/sight"
  ActiveSound "madchicken/active"
  PainSound "madchicken/pain"
  DeathSound "madchicken/death"
  States
  {
  Spawn:
    NUGG A 0 A_ChangeFlag("NOGRAVITY",0)
    NUGG AB 8 A_Look
    Goto Spawn+1
  See:
    NUGG A 0 A_TakeInventory("NuggetFliegt",1)
    NUGG A 0 A_ChangeFlag("NOGRAVITY",0)
    NUGG A 0 A_Jump(16,"Fly")
    NUGG AB 3 A_Chase
    Goto See
  Fly:
    NUGG M 0 BRIGHT A_JumpIfInventory("NuggetFliegt",1,3)
    NUGG M 0 BRIGHT A_GiveInventory("NuggetFliegt")
    NUGG M 5 BRIGHT ThrustThingZ(0,30,0,0)
    NUGG M 1 BRIGHT A_CheckFloor("See")
    NUGG M 0 BRIGHT A_ChangeFlag("NOGRAVITY",1)
    NUGG MMMMM 3 BRIGHT A_Chase
    NUGG M 0 BRIGHT A_ChangeFlag("NOGRAVITY",0)	
    Goto Fly+3
  Pain:
    NUGG D 5 
    NUGG C 5 A_Pain
    Goto See
  Melee:
    NUGG A 6 A_FaceTarget
    NUGG C 4 A_CustomMeleeAttack(random[ChicAttack](3,5))
	NUGG C 4 A_ChangeFlag("NOGRAVITY",0)
	NUGG C 0 A_JumpIfInventory("NuggetFliegt",1,"Fly")
    Goto See
  Missile:
    NUGG C 6 A_FaceTarget
    NUGG M 0 BRIGHT A_PlaySound("madchicken/attack")
    NUGG M 0 BRIGHT A_CustomMissile("DeathFeather",0,-3,random(random(-12,-6),random(6,12)))
    NUGG M 6 BRIGHT A_CustomMissile("DeathFeather",0,-3,random(random(-12,-6),random(6,12)))
    NUGG M 0 BRIGHT A_JumpIfInventory("NuggetFliegt",1,"Fly")
    Goto See
  Death:
    NUGG E 6 A_Scream
    NUGG F 6
    NUGG G 6
    NUGG H 6 A_NoBlocking
    NUGG IJK 6
    NUGG L -1
    Stop
  }
}

ACTOR DeathFeather : Feather
{
  Radius 2
  Height 4
  Speed 20
  Damage 2
  SeeSound "madchicken/feather"
  PROJECTILE
  States
  {
  Spawn:
    FEDR F 3 BRIGHT
    Loop
  Death:
    FEDR A 0 A_ChangeFlag("NOGRAVITY",0)
	FEDR ABCDE 5 A_CheckFloor("Lay")
	loop
  Lay:
	FEDR E 0 A_NoBlocking
	FEDR E -1
    Stop
  }
}

ACTOR NuggetFliegt : Inventory
{
  Inventory.Amount 1
  Inventory.MaxAmount 1
  States
  {
  Spawn:
    TNT1 A -1
	stop
  }
}

// --- //
// PIG //
// --- //

Actor EvilPig 25011
{
  //$Category SecretMonsters
  //$Title Evil Pig
  Health 600
  Speed 10
  Radius 13
  Height 26
  Mass 2500
  Obituary "%o was turned into a happy meal by a deathpig."
  Monster
  +BOSS
  +PAINLESS
  +NOFEAR
  +WINDTHRUST
  +DONTMORPH
  +NEVERRESPAWN
  +NEVERFAST
  SeeSound "epig/see"
  DeathSound "epig/tod"
  ActiveSound "epig/grunz"
  Damagefactor "Ice",0
  Damagefactor "Fire",0
  States
  {
  Spawn:
    SPIG AB 10 A_Look
    Loop
  See:
    SPIG A 0 A_Jump(16,"Porter")
    SPIG A 3 A_Chase
	SPIG A 0 A_SpawnItemEx("EPLeft",0,0,0,0,0,0,0,SXF_TRANSFERTRANSLATION,0)
    SPIG BC 3 A_Chase
	SPIG C 0 A_SpawnItemEx("EPLeft",0,0,0,0,0,0,0,SXF_TRANSFERTRANSLATION,0)
    SPIG D 3 A_Chase
    Loop
  Porter:
    SPIG A 0 A_PlaySound("epig/port")
    SPIG A 0 A_SpawnItemEx("EPMiddle",0,0,0,0,0,0,0,SXF_TRANSFERTRANSLATION,0)
    SPIG A 1 A_SetTranslucent(0.8)
	SPIG A 1 A_SetTranslucent(0.6)
	SPIG A 0 A_UnSetShootable
	SPIG A 1 A_SetTranslucent(0.4)
	SPIG A 1 A_SetTranslucent(0.2)
	SPIG A 1 A_SetTranslucent(0.0)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 A 0 A_SpawnItemEx("EPMiddle",0,0,0,0,0,0,0,SXF_TRANSFERTRANSLATION,0)
	SPIG A 0 A_PlaySound("epig/port")
	SPIG A 1 A_SetTranslucent(0.2)
    SPIG A 0 A_SetShootable
	SPIG A 1 A_SetTranslucent(0.4)
	SPIG A 1 A_SetTranslucent(0.6)
	SPIG A 1 A_SetTranslucent(0.8)
	SPIG A 1 A_SetTranslucent(1.0)
	Goto See
  Missile:
    SPIG E 0 BRIGHT A_PlaySound("epig/angriff")
    SPIG E 4 BRIGHT A_FaceTarget
	SPIG F 0 BRIGHT A_CustomMissile("HeatBall",4,-5)
	SPIG F 4 BRIGHT A_CustomMissile("HeatBall",4,5)
	Goto See
  Death:
    SPIG G 0 A_NoBlocking
    SPIG G 0 A_FaceTarget
	SPIG G 0 A_Quake(7,12,0,1024)
	SPIG G 0 A_SpawnItemEx("EPRight",0,0,0,0,0,0,0,SXF_TRANSFERTRANSLATION,0)
    SPIG G 12 BRIGHT A_Scream
	SPIG H 0 A_Quake(6,6,0,1024)
    SPIG H 6 BRIGHT A_Explode(32,256)
	SPIG I 0 A_Quake(5,6,0,1024)
    SPIG I 6 BRIGHT
	SPIG J 0 A_Quake(4,6,0,1024)
    SPIG J 6 BRIGHT
	SPIG K 0 A_Quake(3,6,0,1024)
    SPIG K 6
	SPIG L 0 A_Quake(2,6,0,1024)
	SPIG L 6
	SPIG M 0 A_Quake(1,6,0,1024)
    SPIG M -1
    Stop
  }
}

Actor EPLeft
{
  RenderStyle Translucent
  Alpha 0.6
  States
  {
  Spawn:
    MILF ABCDEFGHIJKLMNOP 2 BRIGHT
	Stop
  }
}

Actor EPRight
{
  RenderStyle Translucent
  Alpha 0.6
  States
  {
  Spawn:
    GILF A 3 BRIGHT A_PlaySound("weapons/rocklx")
	GILF BCDE 3 BRIGHT 
	Goto Death
  Death:
    GILF FGHIJ 3 BRIGHT
	Stop
  }
}

Actor EPMiddle
{
  RenderStyle Translucent
  Alpha 0.5
  States
  {
  Spawn:
    FILF ABCDEFGH 3 BRIGHT
	Stop
  }
}

Actor EPTop
{
  RenderStyle Translucent
  Alpha 0.4
  States
  {
  Spawn:
    OILF A 2 BRIGHT A_SetTranslucent(0.3)
	OILF A 2 BRIGHT A_SetTranslucent(0.2)
	OILF A 2 BRIGHT A_SetTranslucent(0.1)
	Stop
  }
}

Actor HeatBall
{
  Radius 3
  Height 3
  Speed 20
  FastSpeed 30
  Damage 4
  Projectile
  RenderStyle Translucent
  Alpha 0.6
  Damagetype "Fire"
  DeathSound "epig/explo"
  States
  {
  Spawn:
    SILF A 1 BRIGHT A_SpawnItemEx("EPTop",0,0,0,0,0,0,0,SXF_TRANSFERTRANSLATION,0)
	loop
  Death:
    SILF BCDE 5 BRIGHT
    stop
  }
}