Actor ChasmPiggy
{
    Health 170
    Radius 26
    Height 46
    Speed 10
    PainChance 56
	PainChance "Laser", 112
	Scale 1
	Mass 400
    Monster
    +FLOORCLIP
	+DONTHARMSPECIES
	Species "Creature"
    SeeSound "Piggy/See"
    PainSound "Piggy/Pain"
    DeathSound "Piggy/Death"
	ActiveSound "Piggy/Active"
    Obituary "%o was killed by a Horned Beast."
	BloodColor "Red"
	BloodType "RedBlood", "RedBlood"
	Tag "Boar"
    States
    {
    Spawn:
	    TNT1 A 0 NoDelay
		TNT1 A 0 A_Jump(10, "Idle1")
        PII1 ABCDEFGHIJKLMNOPQRST 2 A_Look
        Loop
	Idle1:
	    TNT1 A 0 A_PlaySound("Piggy/Idle",3)
		PII1 T 1 A_Look
		Goto Spawn
    See:
	    TNT1 A 0 A_PlaySound("Piggy/Walk", 4)
        PIW1 ABC 2 A_Chase
		TNT1 A 0 A_PlaySound("Piggy/Walk", 4)
		PIW1 DEF 2 A_Chase
        Loop
	Melee:
	    TNT1 A 0 A_Jump(100, "Melee1")
		TNT1 A 0 A_Jump(100, "Melee2")
	    TNT1 A 0 A_PlaySound("Piggy/Attack", 1)
		PIA1 ABCD 2 A_FaceTarget
		PIA1 E 0 A_CustomBulletAttack(1, 1, 1, 6, "PiggyMeleePuff", 50, CBAF_AIMFACING)
		PIA1 E 4
		PIA1 FGHIJKL 2 A_FaceTarget
		Goto See
	Melee1:
		TNT1 A 0 A_PlaySound("Piggy/Attack", 1)
		PIA2 ABCD 2 A_FaceTarget
		PIA2 E 0 A_CustomBulletAttack(1, 1, 1, 6, "PiggyMeleePuff", 50, CBAF_AIMFACING)
		PIA2 E 4
		PIA2 FGHIJKL 2 A_FaceTarget
		Goto See
	Melee2:
		TNT1 A 0 A_PlaySound("Piggy/Attack", 1)
		PIA3 ABCD 2 A_FaceTarget
		PIA3 E 0 A_CustomBulletAttack(1, 1, 1, 6, "PiggyMeleePuff", 50, CBAF_AIMFACING)
		PIA3 E 4
		PIA3 FGHIJKL 2 A_FaceTarget
		Goto See
  Pain:
    PIP1 A 2 A_Pain
    PIP1 BCDEFGHIJK 3 
    Goto See
  Death:
    TNT1 A 0 A_Jump(70, "Death2")
    PID1 A 2
    PID1 B 2 A_Scream
    PID1 C 2 A_NoBlocking
	PID1 DEFGHIJ 2
    PID1 K 2 A_PlaySound("Piggy/Fall", 4)
	PID1 LMNOP 2
    PID1 P -1
    Stop
  Death2:
    TNT1 A 0 A_Jump(70, "Death2")
    PID2 A 2
    PID2 B 2 A_Scream
    PID2 C 2 A_NoBlocking
	PID2 DEFGHIJKLM 2
    PID2 M 2 A_PlaySound("Piggy/Fall", 4)
	PID2 NOPQRSTUV 2
    PID2 V -1
    Stop
  Death.Explosive:
    TNT1 A 0
	Goto XDeath
  XDeath:
    TNT1 A 0
    TNT1 A 0 A_PlaySound("Flesh/Gib", 4)
    TNT1 A 0 A_CustomMissile("GoreBloodSpawner", random(10,25), random(0,-20), random (0, 360), 2, random (0, 160))
	TNT1 A 0 A_CustomMissile("GoreBloodSpawner", random(10,25), random(0,20), random (0, 360), 2, random (0, 160))
	TNT1 AAAAA 0 A_CustomMissile("GoreSpawner", random(10,25), random(0,-20), random (0, 360), 2, random (0, 160))
	TNT1 AAAAA 0 A_CustomMissile("GoreSpawner", random(10,25), random(0,20), random (0, 360), 2, random (0, 160))
	TNT1 AAA 0 A_CustomMissile("BloodGiblet", random(10,20), random(0, -20), random (0, 360), 2, random (0, 160))
	TNT1 AAA 0 A_CustomMissile("BloodGiblet", random(10,20), random(0, 20), random (0, 360), 2, random (0, 160))
    Stop
  Raise:
    TNT1 A 0 A_CustomMissile("PhantomRezFX", 1, 5, random (0, 180), 2, random (0, 90))
	PII1 A 1 A_SetTranslucent(0.10, 0)
	PII1 ABCDEFGHJIKL 2 A_FadeIn(0.1)
  Goto See
    }
}
actor PiggyMeleePuff
{
  +NOBLOCKMAP
  +NOGRAVITY
  +PUFFONACTORS
  Scale 0.3
  RenderStyle Add
  Alpha 0.95
  seesound "Piggy/Bite"
  states
  {
  Spawn:
    TNT1 A 0
    stop
  Crash:
    TNT1 A 0
    stop
  Melee:
	TNT1 A 0
    stop
  }
}

Actor HereticChasmPiggy : ChasmPiggy
{
    Health 200
	Game Heretic
}