//===========================================================================
//
// Mancubus
//
//===========================================================================
ACTOR 84MAN : Fatso//3002
{
	Game Doom
	
		var int user_delay84MANatk;	

	SpawnID 8
	Health 150
	PainChance 180
	Speed 10
	Radius 30
	Height 56
	Mass 400
	Monster
		+BOSSDEATH
//Translation "112:127=32:47"
	+FLOORCLIP +FASTER +FASTMELEE
        SeeSound "Gensight"
        PainSound "Genpain"
        DeathSound "Gendeath"
        ActiveSound "Genactive"

	//AttackSound "43BF"
	Obituary "$OB_DEMONHIT"
	Species "FatsoMan"
	States
	{
	Spawn:
		SENA AB 10 A_Look
		Loop
		
	See:
		TNT1 A 0 A_JumpIf(user_delay84MANatk<1,"See_atk")

	See_noatk:
		SENA AABBCCDD 4 A_Chase("","")
TNT1 A 0 A_SetUserVar(user_delay84MANatk,user_delay84MANatk-1)
		Loop

	See_atk:
		SENA AABBCCDD 4 A_Chase
TNT1 A 0 A_SetUserVar(user_delay84MANatk,user_delay84MANatk-1)
		Loop

		
		
	Missile:
	        B84D B 0 A_PlaySound ("HEGRENADE/pinpull")
		SENA D 20 A_FaceTarget
//TNT1 A 0 A_ChangeFlag("NOPAIN", true)
        TNT1 A 0 A_PlayWeaponSound ("W84LAUNC")
		SENA E 3 A_CustomMissile("HEGrenadeProjectile_Monster",45,0,0)
		TNT1 A 0 A_SetUserVar(user_delay84MANatk,4)
		SENA D 35 
//TNT1 A 0 A_ChangeFlag("NOPAIN", false)
		Goto See
	Pain:
		SENA G 3
		SENA G 3 A_Pain
		Goto See

	Pain.FLASHBANGFREEZE:
TNT1 A 0 A_ChangeFlag("NOPAIN", true)
		SENA G 2
		SENA A 175 A_Pain
TNT1 A 0 A_ChangeFlag("NOPAIN", false)
		Goto See

	Death:
//TNT1 A 0 A_GiveToTarget("MoneySystem", 150)

		SENA H 5
		SENA I 5 A_Scream
		SENA J 5 A_NoBlocking
		SENA K 4
		SENA L 4 A_NoBlocking
		SENA M 4
		SENA N -1 A_BossDeath
		Stop





XDeath:
//TNT1 A 0 A_GiveToTarget("MoneySystem", 300)
SENA O 0 A_SpawnItemEx("NashGore_GibPieceGenerator11",0,0,0,0,0,0,0,128)
SENA O 0 A_SpawnItemEx("NashGore_GibPieceGenerator11",0,0,0,0,0,0,0,128)
SENA O 0 A_SpawnItemEx("NashGore_GibPieceGeneratorSARG",0,0,0,0,0,0,0,128)
SENA O 0 A_SpawnItemEx("NashGore_GibGenerator",0,0,0,0,0,0,0,128)
SENA O 0 A_SpawnItemEx("NashGore_GibGenerator",0,0,0,0,0,0,0,128)
SENA O 5
SENA O 0 A_SpawnItemEx("NashGore_GibGenerator",0,0,0,0,0,0,0,128)
SENA P 5 A_playsound("demon/xdeath")
SENA P 0 A_SpawnItemEx("NashGore_GibGenerator",0,0,0,0,0,0,0,128)
SENA Q 5
SENA Q 0 A_SpawnItemEx("NashGore_GibGenerator",0,0,0,0,0,0,0,128)
SENA R 5 A_NoBlocking
SENA STUV 5
SENA W -1 A_BossDeath
stop
	Raise:
		SENA N 5
		SENA MLKJI 5
		Goto See
	}
}





ACTOR HEGrenadeProjectile_Monster
{
	Game Doom
	SpawnID 216
	Radius 8
	Height 8

	Damage 5
	Projectile
    BounceType "Hexen"
	-NOGRAVITY
	+RANDOMIZE
	+DEHEXPLOSION
+USEBOUNCESTATE
	//+GRENADETRAIL
//	+doombounce
	//BounceType "Doom"
//	Gravity 0.25
	SeeSound "HEGRENADE/BOUNCE"
	DeathSound "HEGRENADE/EXPLODE"
	//BounceSound "weapons/grbnce"
	Obituary "%k killed %o with HE Grenade."
	DamageType Grenade

scale 0.2

   ExplosionRadius 192
   ExplosionDamage 25
  Speed 35

	BounceFactor 0.4
WallBounceFactor 0.35
//BounceCount 2

//  BounceFactor 0.7
  ReactionTime 70


	States
	{
	Spawn:
		W16X AAABBBCCCDDDEEEFFFGGGHHH 1 Bright A_Countdown
		Loop

IdleSound:
tnt1 a 0 A_PlaySound("HEGRENADE/BOUNCE")
Goto Spawn


bounce.ceiling:
bounce.wall:
tnt1 a 0 A_PlaySound("HEGRENADE/BOUNCE")
Goto Spawn
bounce.floor:
TNT1 A 0 A_JumpIf(velz > 1, "IdleSound")
Goto BounceDed

BounceDed:
W16X C 1 BRIGHT A_CountDown
Loop


	Death:
	TNT1 A 1 A_NoGravity
MISL B 1 A_AlertMonsters
    TNT1 B 0 A_SpawnItemEx("NewExplosionMedium",0,0,0,0,0,0,0,32)//A_SpawnItemEx("NewExplosionMediumBig",0,0,0,0,0,0,0,32)
		TNT1 B 7 Bright A_Explode
		TNT1 C 6 Bright
		TNT1 D 4 Bright
		Stop
	Grenade:
		MISL A 1000 A_Die
		Wait
	Detonate:
	TNT1 A 1 A_NoGravity
MISL B 1 A_AlertMonsters
    TNT1 B 0 A_SpawnItemEx("NewExplosionMedium",0,0,0,0,0,0,0,32)//A_SpawnItemEx("NewExplosionMediumBig",0,0,0,0,0,0,0,32)
		TNT1 A 0 A_PlaySound("explode/Distant", 7)
		TNT1 B 3 A_Scream
PLAY A 0 //ACS_ExecuteAlways(807,0,0,0,0)
		TNT1 C 6 A_Detonate
		TNT1 D 10
		Stop
	Mushroom:
		MISL B 8 A_Mushroom
		Goto Death+1
	}
}