Actor VioTest : GenericHumanScum  
{
Monster
Health 46
Radius 20
Height 56
Speed 11
PainChance 200
Monster
Species "IMP"
+DONTHARMSPECIES
seesound "Band/Alert"
painsound "Band/Pain"
deathsound "Band/Death"
activesound "Band/Active"
Translation "112:127=64:79"
Tag "Pistol Bandit"
scale 1.0
Obituary "%o MASLEENY POIMAL."
//+DROPOFF
DropItem "Clip"
  States
	{
 Spawn:
    TNT1 A 0
	TNT1 A 0 A_SetScale (scaleX+frandom(-0.08, 0.08), scaleY+frandom(-0.08,0.08)) 
	TNT1 A 0 A_SpawnItemEx ("HumanTrails", 0, 0, 0)
	TNT1 A 0 A_SpawnItemEx ("BydloWRITER", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 69)
  Spawn2:	
	TUG1 T 10 A_Look
	loop
	See:
	 TNT1 A 0 A_Jump (70, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	 TNT1 A 0 A_Jump (180, "MissileCheck")
	SeeLoop:
	 TNT1 A 0 A_CheckSight ("CheckReload")
	 TNT1 A 0 A_Jump (170, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	 TUG1 AABB 4 A_Chase
	 TUG1 CCDD 4 A_Chase  
	Loop
   MissileCheck:
    TNT1 A 0 A_JumpIfInTargetLos ("DodgeChoice", 50, 0, 0, 0)
	TNT1 A 0 A_JumpIfTargetInLos ("Accuracy", 50, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 0, 1150)
	Goto SeeLoop
  DodgeChoice:
    TNT1 A 0 A_Jump (190, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeRightF", "DodgeRightB")
	Goto MissileCheck+1	
  CheckReload:
    TNT1 A 0 A_Jump (150, "CheckReload2")
 	Goto SeeLoop+1
  CheckReload2:
    TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	Goto SeeLoop+1
  DodgeLeft:
        TNT1 A 0 A_FaceTarget
	    TUG1 AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (120, "MissileCheck2")
		TNT1 A 0 A_Jump (50, "DodgeRight")
		Goto SeeLoop+2
	DodgeLeftF:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil (random (-8,-3))
	    TUG1 AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (120, "MissileCheck2")
		Goto SeeLoop+2
    DodgeLeftB:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil (random (3,8))
	    TUG1 AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (120, "MissileCheck2")
		Goto SeeLoop+2
	DodgeRight:
	    TNT1 A 0 A_FaceTarget
	    TUG1 AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck2")
		Goto SeeLoop+2
	DodgeRightF:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil ( random (-8,-3)) 
	    TUG1 AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck2")
		Goto SeeLoop+2
	DodgeRightB:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil ( random (3,8)) 
	    TUG1 AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck2")
		Goto SeeLoop+2		
 Retreat:
    TNT1 A 0 A_Changeflag ("FRIGHTENED", 1)
	TNT1 A 0 A_Changeflag ("MissileMore", 1)
	TNT1 A 0 A_Changeflag ("MissileEvenMore", 1)
	Goto SeeLoop+1	
 Missile:
    TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TUG1 EF 4 A_FaceTarget
	TNT1 A 0 A_JumpIfCloser (420, "RapidFire")
	TNT1 A 0 A_JumpIfTargetInLOS ("Accuracy", 0, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 0, 1400)
	TNT1 A 0 A_PlaySound ("BPFIR")
	TUG1 G 8 BRIGHT A_CustomMissile ("CMBTracer",45,0,random (-2,1))
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	TUG1 F 8 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TNT1 A 0 A_PlaySound ("BPFIR")
	TUG1 G 8 BRIGHT A_CustomMissile ("CMBTracer",45,0,random (-2,1))
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	TUG1 F 8 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TNT1 A 0 A_PlaySound ("BPFIR")
	TUG1 G 8 BRIGHT A_CustomMissile ("CMBTracer",45,0,random (-2,1))
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	goto SeeLoop
 RapidFire:
    TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TNT1 A 0 A_PlaySound ("BPFIR")
    TUG1 G 5 Bright A_CustomMissile ("CMBTracer",45,0,random (-2,1))
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	TUG1 F 5 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TNT1 A 0 A_PlaySound ("BPFIR")
	TUG1 G 5 Bright A_CustomMissile ("CMBTracer",45,0,random (-1,3))
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	TUG1 F 5 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TNT1 A 0 A_PlaySound ("BPFIR")
	TUG1 G 5 Bright A_CustomMissile ("CMBTracer",45,0,random (-2,4))
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	TUG1 F 5 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TNT1 A 0 A_PlaySound ("BPFIR")
	TUG1 G 5 Bright A_CustomMissile ("CMBTracer",45,0,random (-6,9))
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	Goto SeeLoop
 Accuracy:
    TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
    TUG1 EF 12
	TNT1 A 0 A_PlaySound ("BPFIR")
	TUG1 G 8 Bright A_CustomMissile ("CMBTracer",45)
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	Goto SeeLoop
 Reload:
    TNT1 A 0 A_JumpIfInTargetLos ("Retreating", 0, JLOSF_CLOSENOJUMP, 0, 1200)
    TUG1 F 10
	TNT1 A 0 A_TakeInventory ("PistolShotCounter", 11)
	TUG1 E 20
	TUG1 F 4
	TNT1 A 0 A_JumpIfCloser (350, "RapidFireCheck")
	Goto SeeLoop
 RapidFireCheck:
    TNT1 A 0 A_JumpIfTargetInLos ("RapidFire")
	Goto SeeLoop
 Retreating:
    TNT1 A 0 A_ChangeFlag ("FRIGHTENED", true) 
    TUG1 AABBCCDD 2 A_Chase
	TNT1 A 0 A_CheckSight ("ReloadReady")
	Loop
 ReloadReady:
    TNT1 A 0 A_ChangeFlag ("FRIGHTENED", false)
	Goto Reload
 Techka:
    TUG1 H 1 DamageThing (1)
	Goto SeeLoop+2
 MissileCheck2:
    TNT1 A 0 A_JumpIfTargetInLos ("Missile")
	Goto SeeLoop
 Pain:
	TUG1 H 3
	TUG1 H 3 A_Pain
	Goto SeeLoop
 Death:
	TNT1 A 0 A_NoBlocking
	TUG1 I 3 A_Jump (225, "DeathTechka", "Death2", "DeathLong") 
	TUG1 I 5 A_Scream
	TUG1 J 5 
	TUG1 K 5
	TUG1 L 5
	TUG1 M -1
	Stop
  DeathTechka:
	TNT1 A 0 A_Scream
	TUG1 I 2 A_CustomMissile ("TestBlood", 36, 9, random (-5,5), CMF_AIMDIRECTION | CMF_OFFSETPITCH, random (-6,2))
	TNT1 A 0 A_Jump (5, "DeathFinal") 
	Loop
  DeathFinal:
	TUG1 J 5 
	TUG1 K 5
	TUG1 L 5
	TUG1 M -1
   Stop
  DeathLong:
	TUG1 L 5 A_PlaySound ("Band/Death", CHAN_VOICE)
	TUG1 M 5 A_CustomMissile ("TestBlood", 5, random (-1,1), random (-5,5), CMF_AIMDIRECTION | CMF_OFFSETPITCH, random (-6,2))
	TNT1 A 0 A_Jump (15, "DeathLongFinal")
	Loop
  DeathLongFinal:
	TUG1 M 1 A_Scream
	TUG1 M -1
   Stop
  Death2:
	TUG2 I 8
  Death2Loop:	
	TUG2 J 8
	TNT1 A 0 A_PlaySound ("CutThroat", CHAN_VOICE)
	TUG2 K 1 A_CustomMissile ("TestBlood", 29, 0, random (-5,5), CMF_AIMDIRECTION | CMF_OFFSETPITCH, random (-10,-8))
	TUG2 K 1 A_CustomMissile ("TestBlood", 29, 0, random (-5,5), CMF_AIMDIRECTION | CMF_OFFSETPITCH, random (-10,-8))
	TUG2 K 1 A_CustomMissile ("TestBlood", 29, 0, random (-5,5), CMF_AIMDIRECTION | CMF_OFFSETPITCH, random (-10,-8))
	TUG2 K 1 A_CustomMissile ("TestBlood", 29, 0, random (-5,5), CMF_AIMDIRECTION | CMF_OFFSETPITCH, random (-10,-8))
	TUG2 K 4 
	TNT1 A 0 A_Jump (235, "Death2Loop") 
	TUG2 L 8
	TUG2 M -1
   Stop	
  Death.Lightning:
	Death.Electricity:
	 Death.Tesla:
	TNT1 A 0 A_playsound ("ELECTR01", 6)
   Electroloop:	
	TUG1 H 2 
	TNT1 A 0 A_SpawnItemEx ("AssSmoke2", random (-10,10), random (-10,10), random (10,32), random (0,2), random(0,2), random(0,2))
	TUG1 D 2 A_Jump (10, "DeathFinal2")
   Loop
  DeathFinal2:
	TNT1 A 0 A_StopSound (6)
	TNT1 A 0 A_Jump (69, "Death.Fire")
	TUG1 J 5 A_Scream 
	TUG1 K 5 
	TUG1 L 5
	TUG1 M -1
   Stop 
  XDeath:
    TNT1 A 0
    TNT1 A 0 A_SpawnItemEx ("VgavnonahCore", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    TUG1 U 5
    TUG1 V 5 A_XScream
    PGIB A 5 A_NoBlocking
    PGIB BCD 5
    PGIB E -1
    Stop	
    }
}	



		Actor BleedCounter : Inventory
			{
			 Inventory.Maxamount 8
			}
	
	
		
