ACTOR HellSmithMorpher : PowerupGiver 
{
Scale 2
radius 48
height 128
powerup.type HellSmith
inventory.pickupmessage ""
powerup.duration 99999999999999
states
{
Spawn:
TNT1 A 6
loop
 }
 }

actor PowerHellSmith : PowerMorph
{
powerup.duration 99999999999999
PowerMorph.PlayerClass "HellSmithPlayer"
}

Actor HellSmithActCount : Inventory
{
	inventory.maxamount 100
	+IGNORESKILL
}

Actor HellSmithAntiTarget : Inventory
{
	inventory.maxamount 1
	+IGNORESKILL
}

ACTOR HellSmithPlayer : PlayerPawn
{
   Health 20000
  Radius 28
  Height 100
  Mass 99999
  Speed 0.92
  Species "Boss"
  DamageFactor "Boss", 0
  Player.ColorRange 0, 0
  //Player.JumpZ 0
  Player.MaxHealth 12500
  Player.ViewHeight 112
  Player.DisplayName "HellSmith"
  Player.SoundClass "HellSmith"
  Player.MorphWeapon "HellSmithWeapon0"
  Player.StartItem "Mana", 100
  Player.StartItem "HellSmithAntiTarget", 1
  limitedtoteam 1
    SEESOUND "HellSmith/Sight"
    PAINSOUND "HellSmith/Pain"
    DEATHSOUND "HellSmith/Death"
	+NOSKIN
	+DONTTRANSLATE
	+THRUSPECIES
	-PICKUP
  states
{
	Spawn:
	    TNT1 A 0
		TNT1 A 0 ACS_NamedExecute("HellSmith Servants", 0)
	SpawnLoop:
		BSMT AAAAAAAAAA 1 A_JumpIf(Health<=0,"Death")
        Loop 
	See:
		BSMT AB 5
		BSMT B 0 A_PlaySound("HellSmith/fihoof") 
	    BSMT B 0 A_SpawnItemEx("UniversalStomp")
	    BSMT CD 5  
		BSMT D 0 A_PlaySound("HellSmith/fihoof") 
	    BSMT D 0 A_SpawnItemEx("UniversalStomp")
	    Goto SpawnLoop 
	Missile:
		BSMT AB 5
		BSMT B 0 A_PlaySound("HellSmith/fihoof") 
	    BSMT B 0 A_SpawnItemEx("UniversalStomp")
	    BSMT CD 5  
		BSMT D 0 A_PlaySound("HellSmith/fihoof") 
	    BSMT D 0 A_SpawnItemEx("UniversalStomp")
	    Goto SpawnLoop 
	HSFireBall:
	    BSMT E 0 A_Jump(128,25)
        BSMT EEEEEEHHHHHHIIIIIIIIIIII 1 A_JumpIf(Health<=0,"Death")
		Goto SpawnLoop
		BSMT JJJJJJMMMMMMNNNNNNNNNNNN 1 A_JumpIf(Health<=0,"Death")
		Goto SpawnLoop
	HSTracer:
	    BSMT E 0 A_Jump(128,23)
	    BSMT EEEEEEFFFFFFGGGGGGGGGG 1 A_JumpIf(Health<=0,"Death")
		Goto SpawnLoop
		BSMT JJJJJJKKKKKKLLLLLLLLLL 1 A_JumpIf(Health<=0,"Death")
		Goto SpawnLoop
	HSCharge:
	    BSMT OOOOOOOOOOOOOOO 1 A_JumpIf(Health<=0,"Death")
		Goto SpawnLoop
	HSHammer:
	    BSMT E 0 A_Jump(128,14)
	    BSMT EEEEFFFFGGGGG 1 A_JumpIf(Health<=0,"Death")
		Goto SpawnLoop
		BSMT JJJJKKKKLLLLL 1 A_JumpIf(Health<=0,"Death")
		Goto SpawnLoop
	Death:
       TNT1 A 0 A_SpawnItem("HellSmithDeath")
	   TNT1 A 1 A_Stop
	   TNT1 A 0 A_Givetotarget("BOSSKILLEDSTAT", 1)
	   TNT1 A 0 a_givetotarget("reward", 1)
       TNT1 A -1 
	   Stop 
    }
}

Actor HellSmithDeath
{
	+NOINTERACTION
	-NOGRAVITY
	States
	{
	spawn:
       TNT1 A 0 A_CustomMissile("PentaLine3",0,0,-72,2)
       TNT1 A 0 A_CustomMissile("PentaLine3",0,0,-144,2)
       TNT1 A 0 A_CustomMissile("PentaLine3",0,0,-216,2)
       TNT1 A 0 A_CustomMissile("PentaLine3",0,0,-288,2)
       TNT1 A 0 A_CustomMissile("PentaLine3",0,0,0,2)
       TNT1 A 0 Radius_Quake(6,250,2,64,8)
	   BSMT P 100 A_CustomMissile("SmithDFSpawner",0,0,0,0)
       BSMT Q 6 A_CustomMissile("SmithHammer",128,-40,-30,0)
       BSMT Q 0 A_CustomMissile("SmithFire",0,0,0,2)
       BSMT R 6 A_PlaySound("HellSmith/Death")
       BSMT R 0 A_CustomMissile("SmithFire",0,0,0,2)
       BSMT STU 6
       BSMT V 0 A_CustomMissile("SmithFire",0,0,0,2)
       BSMT V 6 A_NoBlocking 
       BSMT W 6 
       BSMT X 6
       BSMT X 0 A_CustomMissile("SmithFire",0,0,0,2)
       BSMT Y -1 
		Stop
	}
}

ACTOR SmithFire
{   
   Radius 2
   Height 2
   Damage 0
   +NOCLIP
   Speed 0
   PROJECTILE
   RENDERSTYLE ADD
   ALPHA 0.75
   SeeSound "HellSmith/hellex"
   States
   {
   Spawn:
      MNSM A 3 Bright
      MNSM B 3 Bright
      MNSM CDEFGHIJKLMNOPQ 3 Bright
      stop
   }
}

ACTOR PentaLine1
{
	Radius 0
	Height 32
	Speed 200
        RenderStyle NONE
   DamageType "Boss"
	Alpha 0.85
	PROJECTILE
        +FLOORHUGGER
        +NOCLIP
        SeeSound "HellSmith/diasht"
	states
	{
	Spawn:
           TNT1 A 1
           TNT1 A 0 A_CustomMissile("PentaLine2",0,0,-198,2)
           TNT1 A 0 A_CustomMissile("PentaLine2",0,0,198,2)
	   stop
	}
}

ACTOR PentaLine2
{
	Radius 0
	Height 32
	Speed 16
        RenderStyle NONE
   DamageType "Boss"
	Alpha 0.85
	PROJECTILE
        +FLOORHUGGER
        +NOCLIP
	states
	{
	Spawn:
           TNT1 AAAAAAAAAAAAAAAA 1 A_SpawnItem("PentaFire",0,0)
	   stop
	}
}

ACTOR PentaFire
{
	Radius 0
	Height 32
	Speed 0
        DamageType "Boss"
        RenderStyle Add
	Alpha 0.85
        ReactionTime 2
	PROJECTILE
        +FLOORHUGGER
        +DONTSPLASH
        -NOGRAVITY
	states
	{
	Spawn:
           CFCF A 1 Bright A_Explode(1,32,1)
           CFCF A 2 Bright A_PlaySound("weapons/onfire")
           CFCF BCDEFGHIJKLM 3 Bright A_Explode(1,32,1)
           CFCF A 0 Bright A_CountDown
	   loop
        Death:
           CFCF NOP 3 Bright A_Explode(2,32,1)
           stop
	}
}

ACTOR SmithDFSpawner
{
	Radius 0
	Height 1
	Speed 0
	Damage 0
	RenderStyle None
   DamageType "Boss"
        ReactionTime 115
	Alpha 0.5
	PROJECTILE
        +NOEXPLODEFLOOR
        States
	{
	Spawn:
              TNT1 A 1 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	      TNT1 A 0 A_CountDown
              Loop
        Death:
              TNT1 A 1
              stop
	}
}

ACTOR SmithDeathFire
{
   Radius 2
   Height 2
   Speed 16
   Damage 1
   PROJECTILE
   RENDERSTYLE ADD
   DamageType "Boss"
   ALPHA 0.67
   Scale 2.0
   SeeSound "HellSmith/bigbrn"
   +NOCLIP
   +DONTSPLASH
   States
   {
   Spawn:
      JFIR JKLMNOP 2 Bright
      stop
   Death:
      TNT1 A 1
      stop
   }
}

ACTOR PentaLine3
{
	Radius 0
	Height 32
	Speed 200
        RenderStyle NONE
   DamageType "Boss"
	Alpha 0.85
	PROJECTILE
        +FLOORHUGGER
        +NOCLIP
        SeeSound "HellSmoth/diasht"
	states
	{
	Spawn:
           TNT1 A 1
           TNT1 A 0 A_CustomMissile("PentaLine4",0,0,-198,2)
           TNT1 A 0 A_CustomMissile("PentaLine4",0,0,198,2)
	   stop
	}
}

ACTOR PentaLine4
{
	Radius 0
	Height 32
	Speed 16
        RenderStyle NONE
   DamageType "Boss"
	Alpha 0.85
	PROJECTILE
        +FLOORHUGGER
        +NOCLIP
	states
	{
	Spawn:
           TNT1 AAAAAAAAAAAAAAAA 1 A_SpawnItem("PentaFire2",0,0)
	   stop
	}
}

ACTOR PentaFire2
{
	Radius 0
	Height 32
	Speed 0
        RenderStyle Add
	Alpha 0.85
        ReactionTime 4
	DamageType "Boss"
	PROJECTILE
        +FLOORHUGGER
        +DONTSPLASH
        -NOGRAVITY
	states
	{
	Spawn:
           CFCF A 1 Bright A_Explode(1,32,1)
           CFCF A 2 Bright A_PlaySound("weapons/onfire")
           CFCF BCDEFGHIJKLM 3 Bright A_Explode(1,32,1)
           CFCF A 0 Bright A_CountDown
	   loop
        Death:
           CFCF NOP 3 Bright A_Explode(1,32,1)
           stop
	}
}

ACTOR HellSmithWeapon0 : Weapon 
{
 Weapon.SelectionOrder 800
 Obituary "%o was raped by %k"
 Inventory.PickupMessage ""
 Inventory.PickupSound "misc/pk_up"
 Weapon.AmmoUse 0
 Weapon.AmmoGive 0
 Weapon.AmmoType "Mana"
 +WEAPON.NOAUTOAIM
  States
 {
  Spawn:
       TNT1 A -1
       Loop
  Ready:
       TNT1 A 1 A_WeaponReady
       goto AltFire
  Fire:
  TNT1 A 1
  goto AltFire
  Deselect:
       TNT1 A 1 A_Lower
       Loop
  Select:
       TNT1 A 0 A_Raise
       Loop
  AltFire:
       TNT1 A 0 A_GiveInventory("HellSmithWeapon")
       TNT1 A 0 A_SelectWeapon("HellSmithWeapon")
       TNT1 A 0 
       goto deselect
  Flash:
       SNIF F 3 Bright A_Light2
       SNIF F 3 Bright A_Light1
       SNIF F 0 Bright A_Light0
       Goto LightDone     
       }
}

actor HellSmithattackmode1 : Inventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
  States
  {
  Spawn:
    TNT1 A -1
    Stop
  }
}

actor HellSmithattackmode2 : Inventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
  States
  {
  Spawn:
    TNT1 A -1
    Stop
  }
}

actor HellSmithattackmode3 : Inventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
  States
  {
  Spawn:
    TNT1 A -1
    Stop
  }
}

ACTOR HellSmithWeapon : Weapon 
{
 Weapon.SelectionOrder 800
 Obituary "%o was raped by %k"
 Inventory.PickupMessage ""
 Inventory.PickupSound "misc/pk_up"
 Weapon.AmmoUse 0
 Weapon.AmmoGive 0
 Weapon.AmmoType "Mana"
 +WEAPON.NOAUTOAIM
 +INVENTORY.UNDROPPABLE
  States
 {
  Spawn:
       TNT1 A -1
       Loop
  Ready:
       CLA3 A 0
	   CLA3 A 0 A_JumpIfInventory("HellSmithActCount", 100, "MakeNoise")
	   CLA3 AAAAAAAA 1 A_WeaponReady(WRF_ALLOWRELOAD)
	   CLA3 A 0 A_GiveInventory("HellSmithActCount", 3)
	   Loop
  MakeNoise:
	   CLA3 A 0 A_TakeInventory("HellSmithActCount", 999)
	   CLA3 A 0 A_PlaySound("HellSmith/Active", 3)
	   CLA3 A 1 
	   Goto Ready
  Deselect:
       CLA3 A 1 A_Lower
       Loop
  Select:
       CLA3 A 0 A_Raise
       Loop
  Fire:
       TNT1 A 0 A_jumpIfinventory("HellSmithattackmode1", 1, "HSFireBall")
       TNT1 A 0 A_jumpIfinventory("HellSmithattackmode2", 1, "HSTrace")
       TNT1 A 0 A_jumpIfinventory("HellSmithattackmode3", 1, "HSCharge")
	   Goto ready
  AltFire:
  	   CLA3 A 1 ACS_execute(812)
       CLA3 A 2
       CLA3 A 15
       goto ready
  FireBalls:
       TNT1 A 0 A_Takeinventory("mana", 40)
	   TNT1 A 0 ACS_NamedExecuteAlways("True Sprite",0,HS_FireBall)
       CLA3 A 6
       CLA3 A 6 A_PlaySound ("HellSmith/hamswg",5)
	   CLA3 B 0 A_FireCustomMissile("HellSmithshot2",8,0,0)
       CLA3 B 0 A_FireCustomMissile("HellSmithshot2",0,0,0)
       CLA3 B 12 Bright A_FireCustomMissile ("HellSmithshot2",-8,0,0)
       goto ready
  Tracers:
       TNT1 A 0 A_Takeinventory("mana", 50)
	   TNT1 A 0 ACS_NamedExecuteAlways("True Sprite",0,HS_Tracer)
	   CLA3 A 6 A_FaceTarget
       CLA3 A 6 A_Playsound ("HellSmith/hamswg")
	   CLA3 A 0 A_Stop
       CLA3 A 0 A_FireCustomMissile("HSSTracer",15,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",30,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",45,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",60,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",75,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",90,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",105,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",120,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",135,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",150,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",165,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",180,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",195,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",210,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",225,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",240,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",255,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",270,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",285,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",300,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",315,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",330,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",345,0,0,0)
       CLA3 A 0 A_FireCustomMissile("HSSTracer",0,0,0,0)
       CLA3 B 10 Bright A_Playsound("HellSmith/hamflr")
	   CLA3 A 10
       goto ready
  Charge:
       TNT1 A 0 A_Takeinventory("mana", 60)
	   TNT1 A 0 ACS_NamedExecuteAlways("True Sprite",0,HS_Charge)
       TNT1 A 0 ACS_EXECUTEALWAYS(617, 0, 10, 64)
	   CLA3 B 1 Bright A_PlaySound("HellSmith/Sight",5) 
	   CLA3 B 0 A_FireCustomMissile("HellSmithDashAttack")
	   CLA3 B 1 Bright A_SpawnItemEx("HellSmithTrail",0,0,0,0,0,0,0,128,0)
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 B 0 A_FireCustomMissile("HellSmithDashAttack")
	   CLA3 B 1 Bright A_SpawnItemEx("HellSmithTrail",0,0,0,0,0,0,0,128,0)
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 B 0 A_FireCustomMissile("HellSmithDashAttack")
	   CLA3 B 1 Bright A_SpawnItemEx("HellSmithTrail",0,0,0,0,0,0,0,128,0)
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 B 0 A_FireCustomMissile("HellSmithDashAttack")
	   CLA3 B 1 Bright A_SpawnItemEx("HellSmithTrail",0,0,0,0,0,0,0,128,0)
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 B 0 A_FireCustomMissile("HellSmithDashAttack")
	   CLA3 B 1 Bright A_SpawnItemEx("HellSmithTrail",0,0,0,0,0,0,0,128,0)
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 B 0 A_FireCustomMissile("HellSmithDashAttack")
	   CLA3 B 1 Bright A_SpawnItemEx("HellSmithTrail",0,0,0,0,0,0,0,128,0)
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 B 0 A_FireCustomMissile("HellSmithDashAttack")
	   CLA3 B 1 Bright A_SpawnItemEx("HellSmithTrail",0,0,0,0,0,0,0,128,0)
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 B 0 A_FireCustomMissile("HellSmithDashAttack")
	   CLA3 B 1 Bright A_SpawnItemEx("HellSmithTrail",0,0,0,0,0,0,0,128,0)
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 B 0 A_FireCustomMissile("HellSmithDashAttack")
	   CLA3 B 1 Bright A_SpawnItemEx("HellSmithTrail",0,0,0,0,0,0,0,128,0)
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
       CLA3 B 0 A_FireCustomMissile("HellSmithDashAttack")
	   CLA3 B 1 Bright A_SpawnItemEx("HellSmithTrail",0,0,0,0,0,0,0,128,0)
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 B 0 A_FireCustomMissile("HellSmithDashAttack")
	   CLA3 B 1 Bright A_SpawnItemEx("HellSmithTrail",0,0,0,0,0,0,0,128,0)
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 B 0 A_FireCustomMissile("HellSmithDashAttack")
	   CLA3 B 1 Bright A_SpawnItemEx("HellSmithTrail",0,0,0,0,0,0,0,128,0)
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 B 0 A_FireCustomMissile("HellSmithDashAttack")
	   CLA3 B 1 Bright A_SpawnItemEx("HellSmithTrail",0,0,0,0,0,0,0,128,0)
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 AA 0 A_SpawnItemEx("HellSmithSmokeFX",0,0,random(0,8),random(-5,0), random(-5,0),random(0,3),random(90,270))
	   CLA3 A 12
       CLA3 A 10
       goto ready
  Reload:
	   TNT1 A 0 ACS_NamedExecuteAlways("True Sprite",0,HS_Hammer)
	   CLA3 B 0 A_PlaySound("HellSmith/hamswg",5)
       CLA3 B 4 A_CustomPunch(50,1,0,"BulletPuff",100)
       CLA3 B 4 A_CustomPunch(50,1,0,"BulletPuff",100)
       CLA3 B 5 A_CustomPunch(50,1,0,"BulletPuff",100)
       Goto Ready
  HSFireBall:
       TNT1 A 0 A_jumpIfinventory("mana", 40, "FireBalls")
       goto ready
  HSTrace:
       TNT1 A 0 A_jumpIfinventory("mana", 50, "Tracers")  
       goto ready
  HSCharge:
       TNT1 A 0 A_jumpIfinventory("mana", 60, "Charge")  
       goto ready 
       }
}

ACTOR HellSmithTrail
{
	Radius 28
	Height 70
	Speed 5
	Damage 0
	RenderStyle Translucent
	Alpha 0.5
	PROJECTILE
	states
	{
	Spawn:
        BSMT O 35
		BSMT O 2 A_FadeOut(0.10)
		goto Spawn+1
	}
}

ACTOR HellSmithSmokeFX
{
    Scale 0.5
    RenderStyle Add
    Alpha 1.0
    +NOBLOCKMAP
    +NOGRAVITY
    +NOTELEPORT
    +CANNOTPUSH
    +CLIENTSIDEONLY
    States
    {
    Spawn:
        ZMOK A 0 
	    TNT1 A 1 A_Jump(256,"ZMOKA0","ZMOKB0","ZMOKC0","ZMOKA0")
	    Loop
    ZMOKA0:
        ZMOK A 5
    FadeLoopA:
        ZMOK A 1 A_FadeOut
	    Loop	
    ZMOKB0:
        ZMOK B 3
    FadeLoopB:
        ZMOK B 1 A_FadeOut
	    Loop
    ZMOKC0:
        ZMOK C 7
    FadeLoopC:
        ZMOK C 1 A_FadeOut
	    Loop
    ZMOKA0:
        ZMGR ABCDEFG 1 
    FadeLoopD:
        ZMOK HIJKLMNOPQ 1 A_FadeOut
	    Loop
        }
}

Actor HellSmithDashAttack
{
	PROJECTILE
	+FORCERADIUSDMG
	+DONTREFLECT
	Speed 30
	Radius 2
	Height 2
	Obituary "%o was stomped by %k" 
	damagetype "Boss"
	damage 10
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Explode(56, 200, 0)
		TNT1 A 1
		Stop
	}
}

ACTOR HSSTracer
{
   Radius 5
   Height 5
   Speed 22
   Damage 15
   RenderStyle ADD
   DamageType "Boss"
   Alpha 0.67
   PROJECTILE
   +FLOORHUGGER
   +THRUGHOST
   +RANDOMIZE
   -NOGRAVITY
   +DONTSPLASH
   Seesound "HellSmith/diasht"
   DeathSound "HellSmith/firex3"   
   Decal "Scorch"
   States
   {
   Spawn:
      TNT1 A 1 Bright A_CStaffMissileSlither
      TNT1 A 0 A_CustomMissile("HSSTracerPuff",0,0,0,0)
      loop
   Death:
      FTRA K 4 Bright
      FTRA L 4 Bright A_Explode
      FTRA MNO 3 Bright
      stop
   }
}

ACTOR HSSTracerPuff
{
   Radius 1
   Height 1
   Speed 0
   RENDERSTYLE ADD
   DamageType "Boss"
   ALPHA 0.67
   PROJECTILE
   +FLOORHUGGER
   +RANDOMIZE
   -NOGRAVITY
   +DONTSPLASH
   States
   {
   Spawn:
      FTRA ABCDEFGHIJ 3 Bright A_Explode(14,36)
      stop
   }
}

ACTOR HellSmithshot2
{
   Radius 8
   Height 12
   Speed 40
   Damage 25
   PROJECTILE
   RENDERSTYLE ADD
   DamageType "Boss"
   ALPHA 0.95
   SeeSound "HellSmith/hellfi"
   DeathSound "HellSmith/hellex"
   ExplosionDamage 96
   ExplosionRadius 192
   DONTHURTSHOOTER
   Decal "BigScorch"
   +RANDOMIZE
   +EXTREMEDEATH
   States
   {
   Spawn: 
      HEPA ABCDEF 3 Bright A_SpawnItemEx("SmithRedPuff",0,0,0,0,0,0,0,8)
      loop
   Death:
      HELX A 3 Bright
      HELX B 0 Bright A_CustomMissile("HellSmithBoom",0,0,0,6)
      HELX B 0 Bright A_CustomMissile("HellSmithBoom",0,0,45,6)
      HELX B 0 Bright A_CustomMissile("HellSmithBoom",0,0,90,6)
      HELX B 0 Bright A_CustomMissile("HellSmithBoom",0,0,135,6)
      HELX B 0 Bright A_CustomMissile("HellSmithBoom",0,0,180,6)
      HELX B 0 Bright A_CustomMissile("HellSmithBoom",0,0,225,6)
      HELX B 0 Bright A_CustomMissile("HellSmithBoom",0,0,270,6)
      HELX B 0 Bright A_CustomMissile("HellSmithBoom",0,0,315,6)
      HELX B 3 Bright A_Explode
      HELX CDEFGHIJ 3 Bright
      stop
   }
}

ACTOR HellSmithBoom
{
   Radius 8
   Height 8
   Speed 6
   Damage 0
   PROJECTILE
   DamageType "Boss"
   RENDERSTYLE ADD
   DONTHURTSHOOTER
   +RIPPER
   +THRUGHOST
   +BLOODLESSIMPACT
   SeeSound "HellSmith/firex3"
   ALPHA 0.80
   States
   {
   Spawn:
      TNT1 AAAAA 6 A_SpawnItem("HellSmithFX",0,0)
      Stop
   }
}

ACTOR HellSmithFX
{   
   Radius 5
   Height 5
   Speed 0
   Damage 0
   PROJECTILE
   RENDERSTYLE ADD
   DamageType "Boss"
   ALPHA 0.80
   SeeSound "HellSmith/firex3"
   States
   {
   Spawn:
      HELX A 3 Bright
      HELX B 3 Bright A_Explode (96,164,0)
      HELX CDEFGHIJ 3 Bright
      stop
   }
}

ACTOR SmithRedPuff
{   
   Radius 0
   Height 1
   Speed 0
   PROJECTILE
   DamageType "Boss"
   RENDERSTYLE ADD
   ALPHA 0.85
   States
   {
   Spawn:
      TNT1 A 3 Bright
      RPUF ABCDE 3 Bright
      Stop 
   }
}

ACTOR SmithHammer
{
   Radius 5
   Height 5
   Speed 2
   Damage 0
   RenderStyle NORMAL
   PROJECTILE
   -NOGRAVITY
   +LOWGRAVITY
   DeathSound "HellSmith/hamflr"   
   States
   {
   Spawn:
      MAUL A 3  
      MAUL B 4
      MAUL C 5
      goto Spawn+2
   Death:
      MAUL D -1 
      stop
   }
}

Actor SpawnLottorCount : Inventory
{
	inventory.maxamount 1
	+IGNORESKILL
}

ACTOR Lottor
{
	Health 875
	Painchance 16
	Speed 13
	Radius 32
	Height 76
	Mass 0x7FFFFFFF
	Monster
	MeleeRange 80
	RenderStyle Translucent
	DamageFactor "Boss", 0
	Species "Boss"
	ActiveSound "Lottor/Active"
	PainSound "Lottor/Pain"
	DeathSound "Lottor/Death"
	HitObituary "%o was eaten by a dragon Lottor."
    Obituary "%o was toasted by a dragon Lottor."
	BloodColor "DarkGreen"		
	+FLOORCLIP
	+FIRERESIST
    +THRUSPECIES
    +MISSILEMORE
	+MISSILEEVENMORE
    +NOTARGET
    +SHOOTABLE
    +DONTHURTSPECIES
    +QUICKTORETALIATE
    +NOINFIGHTING
	States
	{
	Spawn:
	    TNT1 A 0
	    TNT1 A 0 A_UnSetShootable
	    TNT1 A 0 A_jumpIfinventory("SpawnLottorCount", 1, "Spawn2")
	    TNT1 A 1 A_SetTranslucent(0.0,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    TNT1 A 1 A_SetTranslucent(0.01,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    TNT1 A 1 A_SetTranslucent(0.02,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    TNT1 A 1 A_SetTranslucent(0.03,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    TNT1 A 1 A_SetTranslucent(0.04,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.05,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    TNT1 A 1 A_SetTranslucent(0.06,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    TNT1 A 1 A_SetTranslucent(0.07,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    TNT1 A 1 A_SetTranslucent(0.08,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    TNT1 A 1 A_SetTranslucent(0.09,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.1,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.11,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.12,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.13,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.14,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.15,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.16,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.17,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.18,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.19,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.20,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.21,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.22,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.23,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.24,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.25,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.26,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.27,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.28,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.29,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.3,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.31,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.32,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.33,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.34,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.35,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.36,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.37,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.38,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.39,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.4,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.41,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.42,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.43,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.44,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.45,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.46,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.47,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.48,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.49,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.5,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.51,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.52,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.53,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.54,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.55,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.56,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.57,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.58,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.59,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.6,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.61,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.62,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.63,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.64,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.65,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.66,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.67,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.68,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.69,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.7,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.71,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.72,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.73,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.74,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.75,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.76,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.77,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.78,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.79,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.8,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.81,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.82,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.83,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.84,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.85,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.86,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.87,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.88,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.89,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.9,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.91,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.92,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.93,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.94,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.95,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.96,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.97,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.98,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(0.99,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
	    LOTT A 1 A_SetTranslucent(1.0,0)
		LOTT A 0 A_CustomMissile("SmithDeathFire",0,0,0,2,90)
		LOTT A 1 A_GiveInventory("SpawnLottorCount",1)
		LOTT A 1 A_PlaySound("Lottor/Sight")
		Goto Spawn2
	Spawn2:
	    TNT1 A 0 A_SetShootable
	    LOTT A 1 A_Look
		Loop
	See:
        LOTT A 0 A_Jump(20, "Giveup")
	    TNT1 A 0 A_JumpIfInTargetInventory("HellSmithAntiTarget",1,"Giveup")
		TNT1 A 0 A_SetTranslucent(1.0)
	    TNT1 A 0 A_SetShootable
		LOTT ABCD 4 A_Chase
		Loop
	Idle:
	    LOTT A 0 A_LookEx(0, 0, 0, 0, 360, "See")
		TNT1 A 0 A_SetTranslucent(1.0)
	    TNT1 A 0 A_SetShootable
	    LOTT ABCD 4 A_Wander
	    LOTT A 0 A_LookEx(0, 0, 0, 0, 360, "See")
	    Loop
	Giveup:
        LOTT A 0 A_ClearTarget
		LOTT ABCD 4 A_Wander
        Goto See+2
	Pain:
		TNT1 A 0 A_SetTranslucent(1.0)
		LOTT E 4 A_SetShootable
		LOTT E 4 A_Pain
		Goto See
	Melee:
	    TNT1 A 0 A_JumpIfInTargetInventory("HellSmithAntiTarget",1,"Giveup")
		TNT1 A 0 A_SetTranslucent(1.0)
	    TNT1 A 0 A_SetShootable
		LOTT E 5 A_FaceTarget
        LOTT F 6 A_FaceTarget
        LOTT G 5 A_CustomMeleeAttack(Random(22,25),"Lottor/Melee", "Lottor/Melee")
		Goto See
	Missile:
	    TNT1 A 0 A_JumpIfInTargetInventory("HellSmithAntiTarget",1,"Giveup")
		TNT1 A 0 A_SetTranslucent(1.0)
	    TNT1 A 0 A_SetShootable
		LOTT E 5 A_FaceTarget
		LOTT F 6 A_FaceTarget
		LOTT G 1 A_PlaySound("Lottor/Attack",5)
		LOTT G 5 A_CustomMissile("LottorFX",58,0)
		Goto See
	Death:
		LOTT H 6 A_Scream
		LOTT I 6 
		LOTT J 6 A_SpawnItemEx("LottorBody")
		LOTT K 6 A_NoBlocking
		LOTT L 6 A_QueueCorpse
		LOTT MNO 6
		LOTT P -1
		Stop
	}
}

ACTOR LottorBody
{
    Speed 1
    Radius 1
    Height 1
    Damage 0
    +RIPPER
    +NOGRAVITY
    +THRUGHOST
    +FORCERADIUSDMG
	+BLOODLESSIMPACT
    States
    {
    Spawn:
        TNT1 A 0
        TNT1 A 1 A_PlaySound("Lottor/Body")
        Goto Death
    Death:
        TNT1 A 1 
        Stop
    }
}

ACTOR LottorFX
{
	Speed 30
	Radius 10
	Height 6
	Damage 8
	DamageType "Boss"
	Projectile
	+SPAWNSOUNDSOURCE
	RenderStyle Add
	Decal "Scorch"
	SeeSound "Lottor/Fire_Spawn"
	DeathSound "Lottor/Fire_Explode"
	States
	{
	Spawn:
        AFX5 ABC 4 Bright
        loop
    Death:
        AFX5 DE 4 Bright 
        AFX5 FGH 3 Bright
        stop
	}
}