actor Creeper : PlayerPawn
{
	Health 70
	Mass 80
	limitedtoteam 1
	bloodcolor "Green"
	height 18
	radius 13
	player.attackzoffset 8
	player.forwardmove 0.58
	player.sidemove 0.58
	player.viewheight 16
	Player.Maxhealth 70
	Player.DisplayName "Creeper"
	Player.ColorRange 112, 127
	player.soundclass "creeper"
	player.startitem "CreeperWeapon"
	damagefactor "Railgun", 2.0
	player.startitem "GhoulAmmo", 3
	player.crouchsprite "CRE2"
	player.startitem "achievelist", 1
	+NOICEDEATH
	//player.jumpz 9
	+NOSKIN
	+DONTBLAST
	+SHADOW
	+FORCEXYBILLBOARD
	scale 0.4
	States
	{
	Spawn:
	CRE2 A 0 A_StopSoundEx("Body") 
	CRE2 A 45 A_SetShadow
	CRE2 A 0 A_JumpIf (momz!=0, "Spawn")
	CRE2 A 0 A_JumpIfInventory("GhoulAmmo", 3, "Spawn")
	CRE2 A 0 ACS_Execute(987,0)
	Loop
	See:
	CRE2 A 0 A_PlaysoundEx("creeperact", "Body")
	CRE2 ABABABABABABABABABABABABABABABABABABAB 3 A_SetShadow
	Loop
	Missile:
	CRE2 A 2 A_SetShadow
	CRE2 A 2 A_SetShadow
	Goto Spawn
	Pain:
	CRE2 A 0 A_GiveInventory("Creeperpainboost",1)
	CRE2 A 8 A_PlaySoundEx("creeperpain", "Body")
	Goto Spawn
	Death:
	DeathAnim:
	CRE2 Z 0 A_GiveToTarget("KilledMe",1)
	CRE2 Z 0 A_GiveToTarget("KilledCreeper",1)
	CRE2 Z 0 A_SpawnItem("Creeperdeath")
	CRE2 Z 1 A_NoBlocking
	CRE2 Z 1 A_Fall
	CRE2 Z -1
	Stop
	Death.CrapPlasma:
	CRE2 Z 0 A_GiveToTarget("Unlock9",1)
	Goto DeathAnim
	Death.Creeper:
	CRE2 Z 0 A_PlaySoundEx("creeperattack", "Body")
	CRE2 Z 0 ACS_ExecuteAlways(997,0)
	CRE2 Z 0 A_GiveToTarget("Creeperheal",1)
	Goto DeathAnim
	Death.Grenade:
	CRE2 Z 0 A_GiveToTarget("KilledG",1)
	Goto DeathAnim
	Death.ice2:
	CRE2 Z 0 A_GiveToTarget("Killedice2",1)
	Goto DeathAnim
	Death.fire2:
	CRE2 Z 0 A_GiveToTarget("Killedfire2",1)
	Goto DeathAnim
	Death.Railgun:
	CRE2 Z 0 A_GiveToTarget("Killedlightning",1)
	Goto DeathAnim
	}
}

ACTOR Creeperdeath
{
Height 10
Radius 10
- SOLID
Scale 0.5
alpha 1.0
renderstyle translucent
Speed 5
States
{
Spawn:
CREE D 0
CREE D 0 A_Playsound("creeperdie")
CREE D 1 A_FadeOut(0.05)
CREE D 0 A_SpawnItemEx ("Creeperdeathfx", 0, 0, 0, 0, 0, 0, 0, 128, 0) 
CREE D 0 A_Wander
Goto spawn+2
}
}

actor Creeperdeathfx
{
+NOGRAVITY
- SOLID
+CLIENTSIDEONLY 
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
Stop
}
}

Actor CreeperWeapon : Weapon
{
   Weapon.SelectionOrder 350
   Inventory.PickupSound ""
   Inventory.PickupMessage ""
   +WEAPON.MELEEWEAPON 
   Obituary "%k sucked out %o's soul." 
   Weapon.AmmoType "GhoulAmmo"
   Weapon.AmmoType2 "GhoulAmmo"
   Weapon.AmmoGive 0
   Weapon.AmmoUse 0
   Weapon.AmmoUse2 1
   Weapon.Kickback 0
   +WEAPON.NOALERT
   +INVENTORY.UNDROPPABLE
   +WEAPON.ALT_AMMO_OPTIONAL
   +WEAPON.NOAUTOAIM
   Weapon.YAdjust 0
   States
   {
   Spawn:
      TNT1 A 1
      Stop
   Ready:
      CREW A 1 A_WeaponReady
      Loop
   Deselect:
	  CREW A 1 A_Lower
      Loop
   Select:
      CREW A 1 A_Raise
      Goto Select
   Fire:
     CREW A 0 A_FireCustomMissile("CreeperAttack", 0,0,0,0)
	 CREW ABCDEFGH 1
	 CREW IJKLMNO 3
	 goto Ready
   Altfire:
   	 CREW A 0 A_JumpIfNoAmmo(4)
     CREW A 0 A_FireCustomMissile("CreeperBall",0,1,0,0)
     CREW AON 3
	 CREW MNO 4
	 Goto Ready
   }
}

actor CreeperBall
{
speed 42
damage 1
damagetype "Creepstun"
obituary "%k was patient enough to kill %o with %p balls." 
height 8
radius 10
renderstyle add
scale 0.6
alpha 1.0
PROJECTILE
decal "Creeperballdecal"
seesound "CreeperBall"
deathsound "CreeperBallD"
States
{
Spawn:
SRBA ABCD 3 A_FadeOut(0.06)
Loop
Death:
SRBA EFGHIJ 3 bright A_SetTranslucent(1.0, 1)
Stop
}
}

actor CreeperAttack
{
speed 40
Height 5
Obituary "%k sucked out %o's soul." 
damage 210
damagetype "Creeper"
Radius 4
PROJECTILE
+NOEXTREMEDEATH
+THRUGHOST
States
{
Spawn:
TNT1 A 2
Stop
}
}

actor Creeperpainboost : PowerupGiver
{
  inventory.maxamount 0
  powerup.duration 21
  powerup.color "00 00 00", 0.0
  powerup.type "Speed"
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  states
  {
  Spawn:
    TNT1 A 6
    loop
  }
}