// Hacx EDFs -- Enemies

// Thug ---------------------------------------------------------------------

thingtype HacxThug
{
	doomednum   3004
	dehackednum 2
	obituary_normal "REPLACE ME"
	spawnhealth 50
	radius      21.0
	height      72.0
	mass        45
	speed       12
	painchance  100
	seesound    thgsi1
	activesound thgact
	painsound   thgpai
	deathsound  thgdt1
	droptype    HacxRounds
	cflags      SOLID|SHOOTABLE|COUNTKILL|FOOTCLIP|SPACMONSTER|PASSMOBJ
	acs_spawndata 
	{ 
		num   4 
		modes hacx
	}
    
	states
	@"
	Spawn:
		THUG A 10 A_Look
		loop
	See:
		THUG AABBCCDD 3 A_Chase
		loop
	Missile:
		THUG E 6 A_FaceTarget
		THUG F 3 bright A_BulletAttack(pistol, ba_monster, 1, 5, 3)
		THUG E 6
		goto See
	Pain:
		THUG G 4
		THUG G 4 A_Pain
		goto See
	Death:
		THUG H 9
		THUG I 5 A_Scream
		THUG J 4 A_Fall
		THUG K 4
		THUG L -1
		stop
	XDeath:
		THUG M 3
		THUG N 3 A_XScream
		THUG O 3 A_Fall
		THUG PQRST 3
		THUG U -1
		stop
	Raise:
		THUG KJIH 5
		goto See
	"@  
}

// Android ---------------------------------------------------------------------
// Needs: Random angles for A_MissileSpread. Variable projectile damage.
//        Damagetype-specific painchance.

thingtype HacxAndroid
{
	doomednum   9
	dehackednum 3
	obituary_normal "REPLACE ME"
	spawnhealth 75
	radius      21.0
	height      70.0
	mass        55
	speed       16
	painchance  20
//	painchance Reznator, 1.5
	damagefactor Reznator, 1.5
	seesound    andsit
	activesound andact
	painsound   andpai
	deathsound  anddt1
	droptype    WeaponShotgun // HacxTazer
	cflags      SOLID|SHOOTABLE|COUNTKILL|FOOTCLIP|SPACMONSTER|PASSMOBJ|NOBLOOD
	acs_spawndata 
	{ 
		num   1
		modes hacx
	}
    
	states
	@"
	Spawn:
		ANDY B 10 A_Look
		loop
	See:
		ANDY AABBCCDD 3 A_Chase
		loop
	Missile:
		ANDY E 10 A_FaceTarget
		ANDY E 0 A_PlaySoundEx(tazer,chan_voice)
		ANDY F 10 bright A_MissileSpread(HacxAndroidShot,3,0,22.5,-1)
		ANDY E 10
		goto See
	Pain:
		ANDY G 3
		ANDY G 3 A_Pain
		goto See
	Death:
		ANDY H 9
		ANDY I 6 A_Scream
		ANDY J 4 A_Fall
		ANDY K 4
		ANDY L -1
		stop
	XDeath:
		ANDY H 10 bright A_Scream 
		ANDY M 2 bright
		ANDY N 4 bright A_PlaySound(explod,CHAN_VOICE)
		ANDY O 0 bright A_Explode
		ANDY O 4 bright A_Fall
		ANDY PQR 4 bright
		ANDY ST 4
		ANDY U -1
		stop
	Raise:
		ANDY LKJIH 5
		goto See
	"@  
}

thingtype HacxAndroidShot
{
	deathsound  tazerh
	speed       40.0
	radius      13.0
	height      8.0
	damage      3 // [XA] Should be 5*random(1,3), same as Doom hitscan.
	cflags      NOBLOCKMAP|NOGRAVITY|DROPOFF|MISSILE|TRANSLUCENT|SPACMISSILE|TLSTYLEADD
    
	states
	@"
	Spawn:
		TPUF AABBBAA 1 bright A_SpawnAbove(TazerTrail2,-1)
		loop
	Death:
		TPUF CDE 2 bright
		stop
	"@
}

// Phage -----------------------------------------------------------------------
// Needs: variable MeleeRange

thingtype HacxPhage
{
	doomednum   67
	dehackednum 9
	obituary_normal "REPLACE ME"
	spawnhealth 150
	radius      25.0
	height      96.0
	mass        150
	speed       22
	painchance  75
	damage      5
	seesound    phgsit
	activesound phgact
	painsound   phgpai
	deathsound  phgdth
	cflags      SOLID|SHOOTABLE|COUNTKILL|FOOTCLIP|SPACMONSTER|PASSMOBJ
	acs_spawndata 
	{ 
		num   112
		modes hacx
	}
    
	states
	@"
	Spawn:
		PHAG A 10 A_Look
		loop
	See:
		PHAG AABB 4 A_Chase
		loop
	Melee:
		PHAG D 10 A_FaceTarget
		PHAG E 5 bright A_PlaySoundEx (phgmel,chan_voice)
		PHAG F 10 bright A_SkullAttack
		PHAG D 10 A_Stop
		goto See
	Missile:
		PHAG G 0 A_PlaySoundEx (phgatk,chan_voice)
		PHAG H 10 A_FaceTarget
		PHAG I 10 bright A_MissileAttack (HacxPhageBall, normal, 0, 0, -1)
		PHAG G 5 bright A_FaceTarget
		PHAG H 5 A_FaceTarget
		PHAG I 10 bright A_MissileAttack (HacxPhageBall, normal, 0, 0, -1)
		PHAG G 5 bright A_FaceTarget
		PHAG H 5 A_FaceTarget
		PHAG I 10 bright A_MissileAttack (HacxPhageBall, normal, 0, 0, -1)
		PHAG G 5 bright A_FaceTarget
		goto See
	Pain:
		PHAG J 3
		PHAG J 3 A_Pain
		goto See
	Death:
		PHAG K 6
		PHAG L 6 A_Scream
		PHAG M 6 A_Fall
		PHAG NOPQR 6
	DeathLoop:
		PHAG S 18
		PHAG T 6 
		goto DeathLoop
	"@  
}

thingtype HacxPhageBall 
{
	dehackednum 37
	seesound    prjfir
	deathsound  prjhit
	speed       16.0
	radius      13.0
	height      4.0
	damage      3
	cflags      NOBLOCKMAP|NOGRAVITY|DROPOFF|MISSILE|TRANSLUCENT|SPACMISSILE|TLSTYLEADD
	acs_spawndata
	{
		num   129
		modes doom
	}
    
	states
	@"
	Spawn:
		PHGB AB 4 bright
		loop
	Death:
		PHGB ABCDE 5 bright
		stop
	"@
}

// Buzzer ----------------------------------------------------------------------
// Needs: Variable A_Explode. Damagetype-specific painchance.

thingtype HacxBuzzer
{
	doomednum   3002
	dehackednum 13
	obituary_normal "REPLACE ME"
	spawnhealth 150
	radius      25.0
	height      68.0
	mass        500
	speed       12
	painchance  100
//	painchance Reznator, 1.5
	damagefactor Reznator, 1.5
	seesound    buzsit
	attacksound buzatk
	activesound buzact
	painsound   buzpai
	deathsound  explod
	cflags      SOLID|SHOOTABLE|COUNTKILL|FOOTCLIP|SPACMONSTER|PASSMOBJ|FLOAT|NOGRAVITY|NOBLOOD
	acs_spawndata 
	{ 
		num   8
		modes hacx
	}
    
	states
	@"
	Spawn:
		BUZZ A 1 A_Look
		loop
	See:
		BUZZ AABBCCDD 2 A_Chase
		loop
	Melee:
		BUZZ E 4 A_FaceTarget
		BUZZ F 4 A_FaceTarget
		BUZZ G 10 A_SargAttack
		goto See
	Pain:
		BUZZ H 2 bright
		BUZZ H 8 bright A_Pain
		goto See
	Death:
		BUZZ I 5 bright A_SetTranslucent(1.0,0)
		BUZZ J 5 bright A_Scream
		BUZZ K 5 bright A_MissileAttack(HacxBuzzerDamage, normal, 0, 0, -1)
		BUZZ L 5 bright
		BUZZ M 5 bright
		BUZZ N -1 A_Fall
		stop
	Death.Reznator:
		BUZZ I 0 bright A_SetTranslucent(1.0,0)
		BUZZ I 5 bright A_PlaySoundEx(anthit,chan_voice)
		BUZZ N -1 A_Fall
		stop
	Raise:
		BUZZ NMLKJI 5
		goto See
	"@  
}

thingtype HacxBuzzerDamage
{
	speed       0
	damage      0
	radius      13.0
	height      8.0
	cflags      NOBLOCKMAP|NOGRAVITY|DROPOFF|MISSILE|SPACMISSILE
    
	states
	@"
	Spawn:
		TNT1 A 0 bright
	Death:
		TNT1 A 1 bright A_Explode
		stop
	"@
}

// Stealth ----------------------------------------------------------------------
// Needs: "Stencil" renderstyle (0.2 alpha). Damagetype-specific painchance.

thingtype HacxStealth
{
	doomednum   58
	dehackednum 14
	obituary_normal "REPLACE ME"
	spawnhealth 30
	radius      25.0
	height      68.0
	mass        500
	speed       8
	painchance  100
//	painchance Reznator, 1.5
	damagefactor Reznator, 1.5
	attacksound buzatk
	deathsound  explod
	cflags      SOLID|SHOOTABLE|COUNTKILL|FOOTCLIP|SPACMONSTER|PASSMOBJ|FLOAT|NOGRAVITY|NOBLOOD|SHADOW
	acs_spawndata 
	{ 
		num   9
		modes hacx
	}
    
	states
	@"
	Spawn:
		BUZZ A 1 A_Look
		loop
	See:
		BUZZ AABBCCDD 2 A_Chase
		loop
	Melee:
		BUZZ E 4 A_FaceTarget
		BUZZ F 4 A_FaceTarget
		BUZZ G 10 A_SargAttack
		goto See
	Pain:
		BUZZ H 2 bright
		BUZZ H 8 bright A_Pain
		goto See
	Death:
		BUZZ I 5 bright A_SetTranslucent(1.0,0)
		BUZZ J 5 bright A_Scream
		BUZZ K 5 bright A_MissileAttack(HacxBuzzerDamage, normal, 0, 0, -1)
		BUZZ L 5 bright
		BUZZ M 5 bright
		BUZZ N -1 A_Fall
		stop
	Death.Reznator:
		BUZZ I 0 bright A_SetTranslucent(1.0,0)
		BUZZ I 5 bright A_PlaySoundEx(anthit,chan_voice)
		BUZZ N -1 A_Fall
		stop
	Raise:
		BUZZ NMLKJI 5
		goto See
	"@  
}

// Monstruct -------------------------------------------------------------------
// Needs: variable A_Explode, A_JumpIfCloser, horizontal offset for MissileAttack

thingtype HacxMonstruct
{
	doomednum   65
	dehackednum 11
	obituary_normal "REPLACE ME"
	spawnhealth 400
	radius      35.0
	height      87.0
	mass        4000
	speed       7
	painchance  50
	seesound    monsit
	activesound monact
	painsound   monpai
	deathsound  mondth
	cflags      SOLID|SHOOTABLE|COUNTKILL|FOOTCLIP|SPACMONSTER|PASSMOBJ
	acs_spawndata 
	{ 
		num   2
		modes hacx
	}
    
	states
	@"
	Spawn:
		MONS A 10 A_Look
		loop
	See:
		MONS AABBCCDD 4 A_Chase
		loop
	Missile:
		MONS G 10 bright A_FaceTarget
		MONS E 6 bright A_MissileAttack(HacxMonstructShot, normal, 0, 0, -1)
		MONS F 6 bright A_MissileAttack(HacxMonstructShot, normal, 0, 22.5, -1)
		MONS G 6 bright A_FaceTarget
		MONS E 6 bright A_MissileAttack(HacxMonstructShot, normal, 0,-22.5, -1)
		MONS F 6 bright A_MissileAttack(HacxMonstructShot, normal, 0, 0, -1)
		MONS G 6
		Goto See
	Melee:
		MONS G 6 A_FaceTarget
	   MeleeLoop:
		MONS O 2 bright A_BulletAttack(pistol, ba_monster, 1, 5, 3)
		MONS N 3
		MONS O 0 A_CPosRefire
		goto MeleeLoop
	Pain:
		MONS D 5 A_Chase
		goto See
	Death:
		MONS H 15
		MONS I 13 A_Scream
		MONS J 10 A_Fall
		MONS K 8
		MONS L 6
		MONS M -1
		stop
	Raise:
		MONS MLKJIH 5
		goto See
	"@  
}

thingtype HacxMonstructShot
{
	dehackednum 10
	seesound    prjfir
	deathsound  explod
	speed       20.0
	radius      6.0
	height      8.0
	damage      8
	cflags      NOBLOCKMAP|NOGRAVITY|DROPOFF|MISSILE|TRANSLUCENT|SPACMISSILE|TLSTYLEADD
	acs_spawndata
	{
		num   153
		modes doom
	}
    
	states
	@"
	Spawn:
		MONF AB 4 bright
		loop
	Death:
		TORE ABC 3 bright
		TORE D 5 bright
		TORE E 5 bright
		TNT1 A 35
		stop
	"@
}

// Terminatrix -----------------------------------------------------------------

// Mechamaniac -----------------------------------------------------------------

// Thorn Thing -----------------------------------------------------------------

// ICE -------------------------------------------------------------------------

thingtype HacxICE
{
	doomednum   3001
	dehackednum 12
	obituary_normal "REPLACE ME"
	spawnhealth 200
	radius      32.0
	height      55.0
	mass        100
	speed       15
	painchance  10
	damage      6
	seesound    thgsi3
	activesound iceact
	attacksound thgdt2
	painsound   icepai
	deathsound  gibbed
	cflags      SOLID|SHOOTABLE|COUNTKILL|FOOTCLIP|SPACMONSTER|PASSMOBJ
	acs_spawndata 
	{ 
		num   5
		modes hacx
	}
    
	states
	@"
	Spawn:
		ICES A 10 A_Look
		loop
	See:
		ICES AABBCCDD 4 A_Chase
		loop
	Missile:
		ICES E 6 A_FaceTarget
		ICES F 20 A_SkullAttack
		ICES G 6 
		ICES A 6 A_Stop 
		loop
	Pain:
		ICES H 10 A_Pain
		ICES H 10
		goto See
	Death:
	XDeath:
		ICES N 10
		ICES O 5 A_Scream
		ICES P 5
		ICES Q 5 A_Fall
		ICES RS 5
		ICES T -1
		stop
	Raise:
		ICES SRQPON 5
		goto See
	"@  
}

// D-Man -----------------------------------------------------------------------

thingtype HacxDMan
{
	doomednum   3006
	dehackednum 19
	obituary_normal "REPLACE ME"
	spawnhealth 250
	radius      48.0
	height      77.0
	mass        600
	speed       25
	painchance  31
	damage      9
	activesound iceact
	attacksound dmnatk
	painsound   buzpai
	deathsound  gibbed
	cflags      SOLID|SHOOTABLE|COUNTKILL|FOOTCLIP|SPACMONSTER|PASSMOBJ|NOGRAVITY|FLOAT|NOBLOOD
	acs_spawndata 
	{ 
		num   110
		modes hacx
	}
    
	states
	@"
	Spawn:
		DMAN AB 10 A_Look
		loop
	See:
		DMAN AB 5 A_Chase
		loop
	Missile:
		DMAN C 5 bright A_FaceTarget
		DMAN D 10 bright A_SkullAttack
		DMAN C 5 bright
		DMAN D 10 bright
		goto Missile
	Pain:
		DMAN E 6
		DMAN E 5 A_Pain
		goto See
	Death:
		DMAN F 6
		DMAN G 6 A_Scream
		DMAN H 6
		DMAN I 6 A_Fall
		DMAN J 6
		DMAN K 6
		stop
	"@  
}

// Majong 7 --------------------------------------------------------------------
// Needs: to not suck. D:

thingtype HacxMajong7
{
	doomednum   71
	dehackednum 23
	obituary_normal "REPLACE ME"
	spawnhealth 400
	radius      31.0
	height      56.0
	mass        100
	speed       12
	painchance  0
	seesound    mj7sit
	activesound mj7act
	attacksound mj7atk
	painsound   mj7pai
	deathsound  mj7dth
	cflags      SOLID|SHOOTABLE|COUNTKILL|FOOTCLIP|SPACMONSTER|PASSMOBJ|NOBLOOD|NORADIUSDMG
	acs_spawndata 
	{ 
		num   115
		modes hacx
	}
    
	states
	@"
	Spawn:
		MAJ7 A 10 A_Look
		loop
	See:
		MAJ7 A 0 A_PlaySound(mj7wlk,chan_voice)
		MAJ7 AABB 4 A_Chase
		MAJ7 A 0 A_PlaySound(mj7wlk,chan_voice)
		MAJ7 DDCC 4 A_Chase
		loop
	Missile:
		VILE LL 5 bright A_FaceTarget
		MAJ7 E 5 bright A_FaceTarget
		MAJ7 F 0 bright A_PlaySound("weapons/zookafire")
		MAJ7 F 5 bright A_MissileAttack(HacxPhoton,normal,0,0,-1)
		goto See
	Pain:
		MAJ7 A 1
		goto See
	Death:
		MAJ7 G 7
		MAJ7 H 7 A_Scream
		MAJ7 I 7 A_Fall
		MAJ7 JK 7
		MAJ7 L -1
		stop
	Raise:
		MAJ7 LKJIHG 8
		goto See
	"@  
}

// GENIE -----------------------------------------------------------------------

// Roaming Mine ----------------------------------------------------------------
