//---------------------------Spell Selection

Actor SkillSlot1 : Inventory
{
	Inventory.MaxAmount 20
	+INVENTORY.UNDROPPABLE
}

Actor SkillSlot2 : SkillSlot1 {}
Actor SkillSlot3 : SkillSlot1 {}
Actor SkillSlot4 : SkillSlot1 {}

Actor RavenCompanion : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Camoflauge upgraded!"
  Inventory.MaxAmount 10
}

Actor RavenCompanionCheck : Inventory
{
	Inventory.MaxAmount 2
	+INVENTORY.UNDROPPABLE
}

Actor RavenCompanionDamage : Inventory
{
	Inventory.MaxAmount 10
}

Actor RavenCompanionBird
{
  Radius 10
  Height 16
  Speed 14
  +NONSHOOTABLE
  +FLOAT
  +NOGRAVITY
  -COUNTKILL
  +FRIENDLY
  +FLOATBOB
  +NOBLOCKMONST
  SeeSound "Weapons/RavenStaff/RavenSight"
  States
  {
  Spawn:
    RVSR ABCD 4 A_Look
	Goto See
  See:
	RVSR A 0 A_JumpIfTargetinLOS(2, 140)
	RVSR A 0 A_Jump(50, "Giveup")
    RVSR A 4 A_Chase
    TNT1 A 0 A_SpawnItemEx("RavenFeather", 0, 0, 0, 0, 0, 0, 0, 128, 192)
    RVSR B 4 A_Chase
    TNT1 A 0 A_SpawnItemEx("RavenFeather", 0, 0, 0, 0, 0, 0, 0, 128, 192)
    RVSR C 4 A_Chase
    TNT1 A 0 A_SpawnItemEx("RavenFeather", 0, 0, 0, 0, 0, 0, 0, 128, 192)
    RVSR D 4 A_Chase
    TNT1 A 0 A_SpawnItemEx("RavenFeather", 0, 0, 0, 0, 0, 0, 0, 128, 192)
    Loop
  Giveup:
	RVSR A 0 A_ClearTarget
	Goto see
  Missile:
	RVSR A 5 A_FaceTarget
	RVSR B 4 A_FaceTarget
	RVSR C 4 A_CustomMissile("RavenShot",8)
	RVSR D 3
	Goto See
  Death:
    TNT1 A 0 A_Stop
    TNT1 A 0 A_PlaySound("Weapons/RavenStaff/RavenDeath")
    TNT1 A 0 A_SpawnItemEx("RavenFeather", 0, 0, 0, Random(1, 2), 0, Random(1, 2), Random(0, 360), 128)
    TNT1 A 0 A_SpawnItemEx("RavenFeather", 0, 0, 0, Random(1, 2), 0, Random(1, 2), Random(0, 360), 128)
    TNT1 A 0 A_SpawnItemEx("RavenFeather", 0, 0, 0, Random(1, 2), 0, Random(1, 2), Random(0, 360), 128)
    TNT1 A 0 A_SpawnItemEx("RavenFeather", 0, 0, 0, Random(1, 2), 0, Random(1, 2), Random(0, 360), 128)
    TNT1 A 0 A_SpawnItemEx("RavenFeather", 0, 0, 0, Random(1, 2), 0, Random(1, 2), Random(0, 360), 128)
    TNT1 A 0 A_SpawnItemEx("RavenSmoke", 0, 0, 0, Random(1, 2), 0, Random(1, 2), Random(0, 360), 128)
    TNT1 A 0 A_SpawnItemEx("RavenSmoke", 0, 0, 0, Random(1, 2), 0, Random(1, 2), Random(0, 360), 128)
    TNT1 A 0 A_SpawnItemEx("RavenSmoke", 0, 0, 0, Random(1, 2), 0, Random(1, 2), Random(0, 360), 128)
    TNT1 A 0 A_SpawnItemEx("RavenSmoke", 0, 0, 0, Random(1, 2), 0, Random(1, 2), Random(0, 360), 128)
    TNT1 A 1 A_SpawnItemEx("RavenSmoke", 0, 0, 0, Random(1, 2), 0, Random(1, 2), Random(0, 360), 128)
    Stop
  }
}

Actor RavenShot
{
  Radius 6
  Height 6
  Scale 0.4
  Speed 30
  Damage (random(20,40)+acs_executewithresult(556)+(acs_executewithresult(599,17))+(acs_executewithresult(599,32)*10))
  Projectile
  SeeSound "Weapons/RavenStaff/Fire11"
  DeathSound "Weapons/RavenStaff/Hit"
  Decal MummyScorch
  Species "Player"
  +THRUSPECIES
  +WINDTHRUST
   +THRUGHOST
   +SEEKERMISSILE
  States
  {
  Spawn:
	RVNP A 0 A_SeekerMissile(90,90)
    RVNP AABBCCDD 1 A_SpawnItemEx("RavenTrail", 0, Random(-2, 2), Random(-2, 2), 0, 0, 0, 0, 128)
    Loop
  Death:
    RVNP E 0 Bright A_SetTranslucent(0.7, 1)
    RVSR EFGHIJKL 2 Bright
    Stop
  }
}

Actor RavenTrail
{
  Radius 1
  Height 1
  +NoClip
  +DropOff
  +NoTeleport
  +CannotPush
  +DontSplash
  +NoGravity
  States
  {
  Spawn:
    TNT1 A 2
    RVNP OPQRST 2 A_FadeOut(0.08)
    Goto Spawn+1
  }
}

Actor RavenSmoke
{
  Radius 0
  Height 0
  Scale 0.4
  RenderStyle Add
  Alpha 0.7
  +NoGravity
  +DontSplash
  States
  {
  Spawn:
    RVSR EFGHIJKL 2
    Stop
  }
}

Actor RavenSmoke2
{
  Radius 0
  Height 0
  Scale 0.3
  RenderStyle Add
  Alpha 0.3
  +NoGravity
  +DontSplash
  States
  {
  Spawn:
    RVSR EFGHIJKL 2
    Stop
  }
}

Actor RavenFeather
{
  Radius 2
  Height 4
  +MISSILE
  +DropOff
  +NoTeleport
  +CannotPush
  +WindThrust
  +DontSplash
  +NOBLOCKMAP
  Gravity 0.125
  States
  {
  Spawn:
    RVSR MNOPQPON 3
    Loop
  Death:
    RVSR O 6
    Stop
  }
}

Actor Camoflauge : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Camoflauge upgraded!"
  Inventory.MaxAmount 10
}

Actor Stealthing : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor CamoflaugeInvisibility : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type CamoflaugeInvisibility
}

Actor PowerCamoflaugeInvisibility : PowerInvisibility
{
	Renderstyle "Translucent"
	Powerup.Duration -500000000
	+CANTSEEK
	Inventory.Icon "CAMOICON"
}


Actor Sprint : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Sprint upgraded!"
  Inventory.MaxAmount 10
}

Actor Sprinting : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor SprintSpeed : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type SprintSpeed
}

Actor PowerSprintSpeed : PowerSpeed
{
	Speed 1.5
	Powerup.Duration -500000000
	Inventory.Icon "SPRTICON"
}

Actor FanOfKnives : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Fan of Knives upgraded!"
  Inventory.MaxAmount 10
}

Actor UseFanOfKnives : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", 0, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", 16, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", 32, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", 48, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", 64, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", 80, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", 96, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", 112, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", 128, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", 144, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", 160, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", 176, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", -16, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", -32, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", -48, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", -64, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", -80, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", -96, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", -112, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", -128, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", -144, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", -160, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("FanOfKnife", -176, 0, 0, 0, 1)
		Stop
	}
}

actor FanOfKnife
{
  Radius 8
  Height 10
  Speed 35
  Damage (random(12,15)+(acs_executewithresult(556)+(acs_executewithresult(599,17))+(acs_executewithresult(599,33)*3)))
  //scale .8
  Projectile
  -NOGRAVITY
  +BLOODSPLATTER
  +WINDTHRUST
   +THRUGHOST
  Species "Player"
	+THRUSPECIES
  Decal "BulletChip"
  Gravity .25
  obituary "%k taught %o what its like to play with knives."
  Deathsound "thro/knife"
  States
  {
  Spawn:
    TKNF A -1
    loop
  Death:
    TKNF A 3
    stop
	}
}

Actor TripBomb : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Trip Bomb upgraded!"
  Inventory.MaxAmount 10
}

Actor UseTripBomb : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_TakeInventory("ChainSnapped")
		TNT1 A 0 A_FireCustomMissile("GlyphMine", 0, 0, 0, 0, 1)
		Stop
	}
}

ACTOR GlyphMine
{
    Height 7
    Radius 4
    Speed 0
    Scale 0.1
    PROJECTILE 
	ReactionTime 20
	+WINDTHRUST
   +THRUGHOST
   Species "Player"
	+THRUSPECIES
    States
	{
    Spawn:
	GLPH B 0 Bright
	GLPH B 0 Bright A_CustomMissile("GlyphmineChain",0,0,0, 6, 0)
	GLPH B 0 Bright A_CountDown
	GLPH BCDEFG 1 Bright A_JumpIfInTargetInventory("ChainSnapped", 1, "Death")
	GLPH BCDEFG 1 Bright A_JumpIfInTargetInventory("ChainSnapped", 1, "Death")
	GLPH BCDEFG 1 Bright A_JumpIfInTargetInventory("ChainSnapped", 1, "Death")
	GLPH BCDEFG 1 Bright A_JumpIfInTargetInventory("ChainSnapped", 1, "Death")
	GLPH BCDEFG 1 Bright A_JumpIfInTargetInventory("ChainSnapped", 1, "Death")
	GLPH BCDEFG 1 Bright A_JumpIfInTargetInventory("ChainSnapped", 1, "Death")
	Goto Spawn+2
    Death:
	TNT1 A 0 Bright A_TakeFromTarget("ChainSnapped",1)
	TNT1 A 0 Bright A_PlaySound("glyph/explode")
	TNT1 A 1 Bright A_SpawnItem("GlyphExplode")
	TNT1 A 0 Bright A_GiveToTarget("ChainSnapped",1)
	Stop
    }
}

Actor ChainSnapped : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor GlyphmineChain
{
  Speed 20
  Height 14
  Radius 10
  Projectile
  +RIPPER
  +BLOODLESSIMPACT
  +PAINLESS
  +WINDTHRUST
   +THRUGHOST
  SeeSound "ability/chain"
  States
  {
  Spawn:
    OCLW A 1 A_SpawnItemEX("GlyphmineChain2",-1)
    Loop
  Death:
    OCLW A 6
    Stop
  }
}

ACTOR GlyphMineChain2
{
  Projectile
  Speed 0
  Height 8
  Radius 6
  ReactionTime 700
  Damage (1)
  Species "Player"
	+THRUSPECIES
  +WINDTHRUST
   +THRUGHOST
  States
  {
  Spawn:
	TEND A 0
	TEND A 1 A_JumpIfInTargetInventory("ChainSnapped", 1, "Death")
    TEND A 0 A_CountDown
    Loop
  Death:
    TEND A 0 A_JumpIfInTargetInventory("ChainSnapped", 1, "Crash")
	TNT1 A 0 A_GiveToTarget("ChainSnapped",1)
	CFCF Q 0 Bright A_AlertMonsters
	CFCF Q 0 Bright A_SetTranslucent(1,1)
	CFCF Q 1 Bright A_NoGravity
	CFCF QQQ 1 Bright A_SpawnItemEx("FlailPuffParticleFXSpawner")
    CFCF R 0 Bright A_Scream
	CFCF RRR 1 Bright A_SpawnItemEx("FlailPuffParticleFXSpawner")
	CFCF SSSS 1 Bright A_SpawnItemEx("FlailPuffParticleFXSpawner")
    CFCF T 3 Bright
    CFCF U 4 Bright
    CFCF W 3 Bright
    CFCF X 4 Bright
    CFCF Z 3 Bright
  Crash:
	TNT1 A 1
    Stop
  }
}

ACTOR GlyphExplode
{   
	PROJECTILE
    +NOGRAVITY
    +EXTREMEDEATH
    +FORCERADIUSDMG
    +NOINTERACTION
    Radius 2
    Height 2
    Damage 10
    DamageType "Fire"
    Scale 1.75
    RenderStyle Add
    States
    {
    Spawn:
	TNT1 A 0
	TNT1 A 0 Radius_Quake(2,30,0,500,0)
	EXP3 A 1 Bright A_Explode(350+(acs_executewithresult(556))+(acs_executewithresult(599,35)*20),256,0)
	EXP3 BCDEFGHIJKLMNOPQRSTUVWXYZ 1 Bright A_FadeOut(0.025)
	EXP3 Z 1 A_FadeOut
	Stop
    }
}

Actor Retribution : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Retribution upgraded!"
  Inventory.MaxAmount 10
}

ACTOR RetributionBall
{
Damage (random(15,40)+(15*ACS_ExecuteWithResult(599,31))+(acs_executewithresult(556)))
Speed 27
Alpha 0.80
+FORCEXYBILLBOARD
Radius 6
  Height 8
  Projectile
  +SEEKERMISSILE
  Species "Player"
	+THRUSPECIES
  RenderStyle Add
  Alpha 1
SeeSound "Monster/hlnatk"
DeathSound "Monster/hlnexp"
 states
  {
  Spawn:
    HLBL A 0 A_SpawnItemEx("RetributionPuff",0,0,0,0,0,0)
	HLBL A 0 A_BishopMissileWeave
	HLBL A 1 A_SeekerMissile(90,90)
	HLBL A 0 A_BishopMissileWeave
	HLBL A 1 A_SeekerMissile(90,90)
	HLBL A 0 A_BishopMissileWeave
	HLBL A 1 A_SeekerMissile(90,90)
	HLBL B 0 bright A_SpawnItemEx("RetributionPuff",0,0,0,0,0,0)
	HLBL B 0 A_BishopMissileWeave
	HLBL B 1 A_SeekerMissile(90,90)
	HLBL B 0 A_BishopMissileWeave
	HLBL B 1 A_SeekerMissile(90,90)
	HLBL B 0 A_BishopMissileWeave
	HLBL B 1 A_SeekerMissile(90,90)
    loop
  Death:
    HLBL JKLMN 3 bright
    stop
  }
}

ACTOR RetributionPuff
{   
   Radius 3
   Height 3
   RENDERSTYLE ADD
   Alpha 0.67
   +NOGRAVITY
   +NOBLOCKMAP
   +DONTSPLASH
   +FORCEXYBILLBOARD
   +CLIENTSIDEONLY
   +NOINTERACTION
   States
   {
   Spawn:
      NULL A 3 Bright
      HLBL CDEFGHI 3 BRIGHT
      Stop 
   }
}

Actor Consecration : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Consecration upgraded!"
  Inventory.MaxAmount 10
}

Actor UseConsecration : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_FireCustomMissile("ConsecrationSpawner", 0, 0, 0, 0, 1)
		Stop
	}
}

Actor ConsecrationTimer : Powerup
{
	Powerup.Duration 280
}

ACTOR ConsecrationSpawner
{
    PROJECTILE
    +NODAMAGETHRUST
	+RIPPER
	+BLOODLESSIMPACT
	+FLOORHUGGER
    Speed 0
    Damage 0
    Radius 10
    Height 14
    RenderStyle Add
	ReactionTime 8
    States
    {
    Spawn:
	TNT1 A 0 A_CountDown
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,0,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,8,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,16,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,24,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,32,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,40,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,48,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,56,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,64,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,72,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,80,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,88,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,96,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,104,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,112,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,120,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,128,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,136,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,144,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,152,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,160,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,168,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,176,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,184,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,192,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,200,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,208,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,216,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,224,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,232,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,240,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,248,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,256,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,264,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,272,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,280,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,288,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,296,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,304,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,312,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,320,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,328,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,336,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,344,6,0)
	TNT1 A 0 A_CustomMissile("ConsecrationExplosion",0,0,352,6,0)
	TNT1 A 0 A_PlaySound("Consecration/Boom")
	TNT1 A 35 A_Explode(100+(acs_executewithresult(556))+(10*ACS_ExecuteWithResult(599,30)),150,0)
	Loop
	Death:
	TNT1 A 1
	Stop
    }
}

ACTOR ConsecrationExplosion
{
    Mass 1
    Radius 1
    Height 1
    Speed 5
    Damage 0
    RenderStyle Add
    PROJECTILE
	+FLOORHUGGER
	+NOINTERACTION
	+CLIENTSIDEONLY
	+NOCLIP
    States
    {
    Spawn:
	TNT1 A 0
        CFIR ABCDEFGHIJKLMOP 2 Bright
        Stop
    }
}

Actor HolyShield : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Holy Shield upgraded!"
  Inventory.MaxAmount 10
}

Actor UseHolyShield : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerUseHolyShield",1)
		TNT1 A 0 A_JumpIfInventory("HolyShield", 10, "Use10")
		TNT1 A 0 A_JumpIfInventory("HolyShield", 9, "Use9")
		TNT1 A 0 A_JumpIfInventory("HolyShield", 8, "Use8")
		TNT1 A 0 A_JumpIfInventory("HolyShield", 7, "Use7")
		TNT1 A 0 A_JumpIfInventory("HolyShield", 6, "Use6")
		TNT1 A 0 A_JumpIfInventory("HolyShield", 5, "Use5")
		TNT1 A 0 A_JumpIfInventory("HolyShield", 4, "Use4")
		TNT1 A 0 A_JumpIfInventory("HolyShield", 3, "Use3")
		TNT1 A 0 A_JumpIfInventory("HolyShield", 2, "Use2")
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -10, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 0, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 10, 0, 0, 0, 1)
		Stop
		Use2:
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -15, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -5, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 5, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 15, 0, 0, 0, 1)
		Stop
		Use3:
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -20, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -10, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 0, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 10, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 20, 0, 0, 0, 1)
		Stop
		Use4:
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -25, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -15, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -5, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 5, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 15, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 25, 0, 0, 0, 1)
		Stop
		Use5:
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -30, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -20, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -10, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 0, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 10, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 20, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 30, 0, 0, 0, 1)
		Stop
		Use6:
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -35, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -25, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -15, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -5, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 5, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 15, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 25, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 35, 0, 0, 0, 1)
		Stop
		Use7:
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -40, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -30, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -20, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -10, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 0, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 10, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 20, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 30, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 40, 0, 0, 0, 1)
		Stop
		Use8:
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -45, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -35, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -25, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -15, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -5, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 5, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 15, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 25, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 35, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 45, 0, 0, 0, 1)
		Stop
		Use9:
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -50, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -40, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -30, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -20, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -10, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 0, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 10, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 20, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 30, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 40, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 50, 0, 0, 0, 1)
		Stop
		Use10:
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -60, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -50, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -40, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -30, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -20, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", -10, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 0, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 10, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 20, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 30, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 40, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 50, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("HolyShieldSpawner", 60, 0, 0, 0, 1)
		Stop
	}
}

Actor PowerUseHolyShield : Powerup
{
	Powerup.Duration 350
}

Actor HolyShieldSpawner
{
  radius 0
  height 0
  damage 0
  speed 15
  +NOCLIP
  +DROPOFF
  +FLOORCLIP
  +NOBLOCKMAP
  States
   {
   Spawn:
     TNT1 A 10
   Death:
     TNT1 A 0 A_PlaySound("Obsidian/Shield")
     TNT1 A 1 A_SpawnItem("HolyShieldShield")
     Stop
   }
}

Actor HolyShieldShield
{
  renderstyle add
  alpha 0.3
  radius 15
  height 70
  species "Player"
  mass 1000000
  //translation ice
  +SHOOTABLE
  +NOGRAVITY
  +NOTELEPORT
  +NODAMAGE
  +NOBLOOD
  states
  {
  Spawn:
    OBSS AAAAAAAAAA 35 bright
  Death:
    OBSS A 3 bright A_FadeOut(0.05)
    Loop
  }
}

Actor IHavePreserverance : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor PreserveranceAura : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Preserverance upgraded!"
  Inventory.MaxAmount 10
}

Actor PreserveranceEffects
{
 +Missile
 +NoGravity
 +NoBlockmap
 +NoInteraction
 -Solid
 +CLIENTSIDEONLY
 VSpeed 6
 Radius 0
 Height 0
 RenderStyle Add
 Alpha 0.03
 Scale 0.37
 //translation "80:111=196:207"
 States
 {
  Spawn:
   SPFX I 0
   SPFX IIIII 1 Bright A_FadeIn(0.2)
   SPFX IIIIIIIIIIIIIIII 1 Bright A_FadeOut(0.06)
   Stop
 }
}

Actor PreserveranceAuraIcon : PowerupGiver
{
	Powerup.Type "PreserveranceAuraIcon"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor PowerPreserveranceAuraIcon : Powerup
{
	Powerup.Duration 10
	Inventory.Icon "REGNICON"
}

Actor DeathBlow : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Death Blow upgraded!"
  Inventory.MaxAmount 10
}

Actor BloodRush : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Blood Rush upgraded!"
  Inventory.MaxAmount 10
}

Actor Adrenaline : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Adrenaline upgraded!"
  Inventory.MaxAmount 10
}

Actor AdrenalineEffects
{
 +Missile
 +NoGravity
 +NoBlockmap
 +NoInteraction
 -Solid
 +CLIENTSIDEONLY
 VSpeed 6
 Radius 0
 Height 0
 RenderStyle Add
 Alpha 0.03
 Scale 0.37
 //translation "80:111=196:207"
 States
 {
  Spawn:
   SPFX H 0
   SPFX HHHHH 1 Bright A_FadeIn(0.2)
   SPFX HHHHHHHHHHHHHHHH 1 Bright A_FadeOut(0.06)
   Stop
 }
}

Actor AdrenalineSpeed : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type AdrenalineSpeed
}

Actor PowerAdrenalineSpeed : PowerSpeed
{
	Speed 1.25
	Powerup.Duration 10
}

Actor IHaveAdrenaline : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor Adrenaline1 : PowerupGiver
{
	Powerup.Type "Adrenaline1"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor Adrenaline2 : PowerupGiver
{
	Powerup.Type "Adrenaline2"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor Adrenaline3 : PowerupGiver
{
	Powerup.Type "Adrenaline3"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor Adrenaline4 : PowerupGiver
{
	Powerup.Type "Adrenaline4"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor Adrenaline5 : PowerupGiver
{
	Powerup.Type "Adrenaline5"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor Adrenaline6 : PowerupGiver
{
	Powerup.Type "Adrenaline6"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor Adrenaline7 : PowerupGiver
{
	Powerup.Type "Adrenaline7"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor Adrenaline8 : PowerupGiver
{
	Powerup.Type "Adrenaline8"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor Adrenaline9 : PowerupGiver
{
	Powerup.Type "Adrenaline9"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor Adrenaline10 : PowerupGiver
{
	Powerup.Type "Adrenaline10"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor PowerAdrenaline1 : PowerProtection
{
	Damagefactor "Normal", 0.85
	Powerup.Duration 10
	Inventory.Icon "ADRNICON"
}

Actor PowerAdrenaline2 : PowerProtection
{
	Damagefactor "Normal", 0.8
	Powerup.Duration 10
	Inventory.Icon "ADRNICON"
}

Actor PowerAdrenaline3 : PowerProtection
{
	Damagefactor "Normal", 0.75
	Powerup.Duration 10
	Inventory.Icon "ADRNICON"
}

Actor PowerAdrenaline4 : PowerProtection
{
	Damagefactor "Normal", 0.7
	Powerup.Duration 10
	Inventory.Icon "ADRNICON"
}

Actor PowerAdrenaline5 : PowerProtection
{
	Damagefactor "Normal", 0.65
	Powerup.Duration 10
	Inventory.Icon "ADRNICON"
}

Actor PowerAdrenaline6 : PowerProtection
{
	Damagefactor "Normal", 0.6
	Powerup.Duration 10
	Inventory.Icon "ADRNICON"
}

Actor PowerAdrenaline7 : PowerProtection
{
	Damagefactor "Normal", 0.55
	Powerup.Duration 10
	Inventory.Icon "ADRNICON"
}

Actor PowerAdrenaline8 : PowerProtection
{
	Damagefactor "Normal", 0.5
	Powerup.Duration 10
	Inventory.Icon "ADRNICON"
}

Actor PowerAdrenaline9 : PowerProtection
{
	Damagefactor "Normal", 0.45
	Powerup.Duration 10
	Inventory.Icon "ADRNICON"
}

Actor PowerAdrenaline10 : PowerProtection
{
	Damagefactor "Normal", 0.4
	Powerup.Duration 10
	Inventory.Icon "ADRNICON"
}

Actor Deflection : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Deflection upgraded!"
  Inventory.MaxAmount 10
}

Actor UseDeflectON : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_ChangeFlag("REFLECTIVE", 1)
		Stop
	}
}

Actor UseDeflectOFF : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_ChangeFlag("REFLECTIVE", 0)
		Stop
	}
}

Actor DeflectionIcon : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type DeflectionIcon
}

Actor PowerDeflectionIcon : PowerDamage
{
	Damagefactor "-.-", 1.0
	Powerup.Duration -500000000
	Inventory.Icon "RFCTICON"
}

Actor HookShot : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Hook Shot upgraded!"
  Inventory.MaxAmount 10
}

Actor UseHookShot : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_FireCustomMissile("FighterHookShot",0,0)
		Stop
	}
}

ACTOR FighterHookShot : LoreShot
{
  Speed 20
  Height 14
  Radius 10
  Projectile
  -STRIFEDAMAGE
  +WINDTHRUST
   +THRUGHOST
   Species "Player"
	+THRUSPECIES
  Damage (random(12,15)+(acs_executewithresult(599,17))+(acs_executewithresult(599,34)*20))
  MaxStepHeight 4
  SeeSound "ability/chain"
}

//---------------------------Hunter Abilities
Actor BladeMastery : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Blade Mastery upgraded!"
  Inventory.MaxAmount 10
}

Actor RangedMastery : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Ranged Mastery upgraded!"
  Inventory.MaxAmount 10
}

Actor Precision : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Precision upgraded!"
  Inventory.MaxAmount 10
}

Actor PrecisionDamageBuff : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type PrecisionDamageBuff
}

Actor PowerPrecisionDamageBuff : PowerDamage
{
	Damagefactor "Normal", 1.5
	Powerup.Duration -500000000
	Inventory.Icon "PRECICON"
}

Actor Precisioning : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor PrecisionEffects
{
 +Missile
 +NoGravity
 +NoBlockmap
 +NoInteraction
 -Solid
 +CLIENTSIDEONLY
 VSpeed 6
 Radius 0
 Height 0
 RenderStyle Add
 Alpha 0.03
 Scale 0.37
 //translation "80:111=196:207"
 States
 {
  Spawn:
   SPFX E 0
   SPFX EEEEE 1 Bright A_FadeIn(0.2)
   SPFX EEEEEEEEEEEEEEEE 1 Bright A_FadeOut(0.06)
   Stop
 }
}

Actor Block : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Block upgraded!"
  Inventory.MaxAmount 10
}

Actor BearTrapSkill : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Bear Trap upgraded!"
  Inventory.MaxAmount 10
}

Actor BearTrapItemLayer : CustomInventory
{
	Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("BearTrapObject", 40)//A_SpawnItemEx("LightningSpawner",0,0,9999,0,0,0,0,SXF_NOCHECKPOSITION)
		Stop
	}
}

Actor BearTrapObject
{
	Damage (85+(32*ACS_ExecuteWithResult(599,22))+(2*acs_executewithresult(556))+(2*ACS_ExecuteWithResult(599,17)))
	PROJECTILE
	+FLOORHUGGER
	Species "Player"
	+THRUSPECIES
	+NOCLIP
	+DONTSPLASH
	+DONTREFLECT
	+WINDTHRUST
   +THRUGHOST
	Renderstyle Translucent
	//SeeSound "beartrap/set"
	//DeathSound "beartrap/snap"
	States
	{
	Spawn:
		BTRP C 0
		BTRP C 0 A_PlaySound("BearTrap/Set")
		BTRP CBA 3
		BTRP A 700 A_ChangeFlag("NOCLIP", 0)
	Death:
		BTRP B 3
		BTRP C 0 A_PlaySound("BearTrap/Snap")
		BTRP CCCCCCCCCC 7 A_Fadeout(0.1) //A_PlaySound("BearTrap/Snap")
		Stop
	}
}

Actor SpikeTrapSkill : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Spike Trap upgraded!"
  Inventory.MaxAmount 10
}

Actor SpikeTrapItemLayer : CustomInventory
{
	Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("SpikeTrapObject", 40)//A_SpawnItemEx("LightningSpawner",0,0,9999,0,0,0,0,SXF_NOCHECKPOSITION)
		Stop
	}
}

Actor SpikeTrapObject
{
	Damage (20+(10*ACS_ExecuteWithResult(599,23))+(acs_executewithresult(556)))
	PROJECTILE
	+FLOORHUGGER
	Species "Player"
	+THRUSPECIES
	+DONTSPLASH
	+DONTREFLECT
	Height 8
	Radius 8
	-NOBLOCKMAP
	+BLOODSPLATTER
	+WINDTHRUST
   +THRUGHOST
	Renderstyle Translucent
	States
	{
	Spawn:
		STRP CC 0 A_PlaySound("KoraxStep")
		STRP C 700
		STRP CCCCCCCCCC 7 A_FadeOut(0.1)
		Stop
	Death:
		STRP D 0 A_SpawnItemEx("SpikeTrapThruster",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)//A_ChangeFlag("Solid", 1)
		/*STRP D 3 A_ChangeFlag("Shootable", 1)
		STRP EFGHIB 3 //A_PlaySound("BearTrap/Snap")
		STRP B 150*/
		Stop
	}
}

Actor SpikeTrapThruster
{
	Height 64
	+NODAMAGETHRUST
	PROJECTILE
	+RIPPER
	-NOBLOCKMAP
	+SOLID
	+DONTSPLASH
	Radius 20
	Damage (1)
	+BLOODLESSIMPACT
	Species "Player"
	+THRUSPECIES
	States
	{
	Spawn:
		STRP D 0
		STRP D 0 A_PlaySound("ThrustSpikeRaise")
		STRP DEFGHI 2
	FROZENINPLAcE:
		STRP I 0 A_JumpIfInventory("SpikeTrapTimer", 175+35*ACS_ExecuteWithResult(599,23), "Bai")
		STRP I 0 A_GiveInventory("SpikeTrapTimer", 1)
		STRP I 1 A_Explode(1,16,0)
		Loop
	BAI:
		STRP D 0 A_PlaySound("ThrustSpikeLower")
		STRP IHGFED 2
		Stop
	}
}

Actor SpikeTrapTimer : Inventory
{
	Inventory.MaxAmount 525
}

Actor NoxiousTrapItemLayer : CustomInventory
{
	Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("NoxiousTrapObject", 40)//A_SpawnItemEx("LightningSpawner",0,0,9999,0,0,0,0,SXF_NOCHECKPOSITION)
		Stop
	}
}

Actor NoxiousTrapObject
{
	Damage (14+(10*ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)))
	PROJECTILE
	+FLOORHUGGER
	Species "Player"
	+THRUSPECIES
	+NOCLIP
	+DONTSPLASH
	+DONTREFLECT
	Renderstyle Translucent
	//SeeSound "world/sludgegloop"
	//DeathSound "PoisonShroomDeath"
	States
	{
	Spawn:
		NTRP AA 0 A_PlaySound("SludgeGloop")
		NTRP A 700 A_ChangeFlag("NOCLIP", 0)
		NTRP AAAAAAAAAA 7 A_FadeOut(0.1)
	Death:
		NTRP A 3 A_PlaySound("PoisonShroomDeath")
		BTRP CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 0 A_SpawnItemEx("NoxiousTrapCloud",0,0,random(1,6), random(-10,10), random(-10,10), random(0,4),0, SXF_NOCHECKPOSITION)
		Stop
	}
}

Actor NoxiousTrapCloud
{
	Radius 16
	Height 24
	Mass 0x7fffffff
	+NOBLOCKMAP
	+NOGRAVITY
	+DROPOFF
	+NODAMAGETHRUST
	+DONTSPLASH
	+CANBLAST
	+DOOMBOUNCE
	+BLOODLESSIMPACT
	//+MISSILE
	+RIPPER
	+NOEXPLODEFLOOR
	+SKYEXPLODE
	BOUNCEFACTOR 0
	WALLBOUNCEFACTOR 0
	+BLOODLESSIMPACT
	PoisonDamage 1000000
	RenderStyle Add
	Alpha 0.6
	Scale 0.8
	DeathSound "PoisonShroomDeath"
	DamageType PoisonCloud
	States
	{
	Spawn:
		PSBG EFGHI 5
		PSBG A 0 A_Stop
		PSBG A 0 A_Jump(256,"State1", "State2", "State3", "State4", "State5")
		Goto Death
	State1:
		PSBG EEEEEEEEEEEEEEEEEEEEEEEEEEEE 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		PSBG EEEEEEEEEEEEEEEEEEEEEEEEEEEE 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		PSBG EEEEEEEEEEEEEEEEEEEEEEEEEEEE 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		Goto Death
	State2:
		PSBG FFFFFFFFFFFFFFFFFFFFFFFFFFFF 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		PSBG FFFFFFFFFFFFFFFFFFFFFFFFFFFF 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		PSBG FFFFFFFFFFFFFFFFFFFFFFFFFFFF 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		Goto Death
	State3:
		PSBG GGGGGGGGGGGGGGGGGGGGGGGGGGGG 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		PSBG GGGGGGGGGGGGGGGGGGGGGGGGGGGG 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		PSBG GGGGGGGGGGGGGGGGGGGGGGGGGGGG 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		Goto Death
	State4:
		PSBG HHHHHHHHHHHHHHHHHHHHHHHHHHHH 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		PSBG HHHHHHHHHHHHHHHHHHHHHHHHHHHH 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		PSBG HHHHHHHHHHHHHHHHHHHHHHHHHHHH 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		Goto Death
	State5:
		PSBG IIIIIIIIIIIIIIIIIIIIIIIIIIII 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		PSBG IIIIIIIIIIIIIIIIIIIIIIIIIIII 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		PSBG IIIIIIIIIIIIIIIIIIIIIIIIIIII 4 A_Explode((ACS_ExecuteWithResult(599,25))+(acs_executewithresult(556)),40,0)
		Goto Death
	Death:
    	PSBG HG 7
    	PSBG FD 6
    	Stop
	}
}

Actor NoxiousTrapSkill : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Noxious Trap upgraded!"
  Inventory.MaxAmount 10
}

Actor FireArrowSkill : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Fire Arrow upgraded!"
  Inventory.MaxAmount 10
}

Actor IceArrowSkill : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Ice Arrow upgraded!"
  Inventory.MaxAmount 10
}

Actor LightningArrow : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Lightning Arrow upgraded!"
  Inventory.MaxAmount 10
}


//---------------------------ABILITIES
Actor MP : Ammo
{
	Inventory.MaxAmount 10000
	+IGNORESKILL
}

Actor MaceMastery : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Mace Mastery upgraded!"
  Inventory.MaxAmount 10
}

Actor SwordMastery : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Sword Mastery upgraded!"
  Inventory.MaxAmount 10
}

Actor IceBolt : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTITHUN"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "IceBolt upgraded!"
  Inventory.MaxAmount 10
}

Actor UseIceBolt : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AutoActivate
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_JumpIfInventory("IceBolt", 7, "Shot1")
		TNT1 A 0 A_JumpIfInventory("IceBolt", 4, "Shot2")
	Shot3:
		TNT1 A 0 A_FireCustomMissile("IceBoltMissile",0,0)
		Stop
	Shot2:
		TNT1 A 0 A_FireCustomMissile("IceBoltMissile2",0,0)
		Stop
	Shot1:
		TNT1 A 0 A_FireCustomMissile("IceBoltMissile3",0,0)
		Stop
	}
}

Actor IceBoltMissile
{
  Speed 50
  Radius 13
  Height 8
  Damage (25+(acs_executewithresult(556))+(20*ACS_ExecuteWithResult(599,15)))
  DamageType "Ice"
  Projectile
  Renderstyle Add
  +SPAWNSOUNDSOURCE
  +WINDTHRUST
   +THRUGHOST
   Species "Player"
	+THRUSPECIES
  SeeSound "weapons/icearrow"
  DeathSound "MageShardsExplode"
  States
  {
  Spawn:
    SHRD AAABBBCCC 1 Bright A_SpawnItemEx("FrostMissileFog", 0, 0, 1, 4, 0, Random(-0.5, 0.5), Random(-10, 10), 128)
    Loop
  Death:
    SHEX ABCDE 5 Bright
    Stop
  }
}

Actor IceBoltMissile2 : IceBoltMissile
{
  Damage (35+(acs_executewithresult(556))+(20*ACS_ExecuteWithResult(599,15)))
  States
  {
  Spawn:
    SHRD A 0 Bright A_CustomMissile("IceyTrail",0,0,0)
    SHRD AAABBBCCC 3 Bright A_CustomMissile("IceyTrail",0,0,0)
    Loop
  Death:
    SHEX ABCDE 5 Bright
    Stop
  }
}

Actor IceBoltMissile3
{
  radius 18
  height 18
  renderstyle Add
  scale 0.5
  obituary "%o frosted over from %k's pointy ice thing!"
  speed 50
  Damage (55+(acs_executewithresult(556))+(20*ACS_ExecuteWithResult(599,15)))
  damagetype "Ice"
  SeeSound "weapons/icearrow"
  DeathSound "MageShardsExplode"
  +SPAWNSOUNDSOURCE
  PROJECTILE
  //+RIPPER
  +WINDTHRUST
   +THRUGHOST
   Species "Player"
	+THRUSPECIES
  states
  {
  Spawn:
    BREA A 1 bright A_CustomMissile("IceyTrail",0,0,0)
    loop
  Death:
    BREA BCD 3 bright
    stop
  }
}

Actor IceyTrail
{
  renderstyle Add
  alpha 0.5
  scale 0.15
  //seesound "borealsparkles"
  PROJECTILE
  states
  {
  Spawn:
    BREA B 1 bright
    BREA B 3 bright
    BREA B 3 bright A_SetTranslucent(0.9,1)
    BREA B 3 bright A_SetTranslucent(0.7,1)
    BREA B 3 bright A_SetTranslucent(0.5,1)
    BREA B 3 bright A_SetTranslucent(0.3,1)
    BREA B 3 bright A_SetTranslucent(0.1,1)
  Death:
    TNT1 A 0 bright
    stop
  }
}


Actor Thunderstorm : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTITHUN"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Thunderstorm upgraded!"
  Inventory.MaxAmount 10
}

Actor ThunderStorming : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor UseThunderStorm : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AutoActivate
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("ThunderStormSpawner",random(-150,150),random(-150,150),9999,0,0,0,0,SXF_NOCHECKPOSITION)
		Stop
	}
}

actor ThunderstormSpawner
{
+SKYEXPLODE
PROJECTILE
-SOLID
+NOGRAVITY
+CEILINGHUGGER
radius 1
height 8
speed 0
DeathSound "weapons/lightfall"
States
{
Spawn:
Death:
TNT1 AAAAAAAA 3 A_SpawnItemEx("ThunderStormFX",1,0,-1,0,0,-25)
Stop
}
}

actor ThunderstormFX
{
PROJECTILE
damage (4+(acs_executewithresult(556))+(3*ACS_ExecuteWithResult(599,13)))
radius 8
+RANDOMIZE
Species "Player"
	+THRUSPECIES
height 8
renderstyle add
alpha 0.8
States
{
Spawn:
ZAP6 MNO 2 bright
loop
Death:
FX16 A 0 A_PlaySound("weapons/lighthit")
FX16 A 0 A_Explode((3+(acs_executewithresult(556))/2+(ACS_ExecuteWithResult(599,13))),125,0)
FX16 GHIJK 2
stop
}
}

Actor Blizzard : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTITHUN"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Blizzard upgraded!"
  Inventory.MaxAmount 10
}

Actor UseBlizzard : CustomInventory
{
	Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_FireCustommissile("BlizzardMark",0,0)//A_SpawnItemEx("LightningSpawner",0,0,9999,0,0,0,0,SXF_NOCHECKPOSITION)
		TNT1 A 0 A_GiveInventory("Blizzarding")
		Stop
	}
	}

Actor BlizzardMark
{
Radius 12
  Height 6
  Speed 45
  Renderstyle Add
  FastSpeed 20
  Damage (1)
  Renderstyle Add
  SeeSound "MageShardsFire"
  Projectile
  RenderStyle Add
  +WINDTHRUST
   +THRUGHOST
  Species "Player"
	+THRUSPECIES
  Damagetype "Ice"
  States
  {
  Spawn:
    FX05 ABC 6 BRIGHT
    Loop
  Death:
    FX05 D 5 BRIGHT A_SpawnItemEx("BlizzardFXSpawner",0,0,9999,0,0,0,0,SXF_NOCHECKPOSITION)
    FX05 EFG 5 BRIGHT
    Stop
  }
}

actor BlizzardFXSpawner
{
+SKYEXPLODE
PROJECTILE
-SOLID
+NOGRAVITY
+CEILINGHUGGER
radius 1
height 8
speed 0
States
{
Spawn:
Death:
TNT1 A 0
TNT1 A 0 //A_GiveToTarget("Blizzarding")
TNT1 A 0 A_TakeFromTarget("Blizzarding")
TNT1 A 0 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_JumpIfInventory("BlizzardTimer",acs_executewithresult(599,12)*3,"Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 AA 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
TNT1 A 0 A_SpawnItemEx("BlizzardFX",random(-100,100),random(-100,100),-2,random(-1,1),random(-1,1),-20)
TNT1 A 0 A_GiveInventory("BlizzardTimer")
Goto Death+3
Death2:
TNT1 A 0
Stop
}
}

Actor Blizzarding : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor BlizzardTimer : Inventory
{
	Inventory.MaxAmount 50
}

Actor BlizzardFX
{
	PROJECTILE
damage (1)
radius 6
+RANDOMIZE
height 8
renderstyle add
Scale 0.5
Damagetype "Ice"
DeathSound "MageShardsExplode"
+WINDTHRUST
   +THRUGHOST
   Species "Player"
	+THRUSPECIES
  States
  {
  Spawn:
	BRES AB 5
	Loop
  Death:
	BRES C 0 A_Explode((36+(acs_executewithresult(556))+acs_executewithresult(599,12)*2), 36, 0)
    BRES CDE 4
	Stop
  }
 }



Actor CriticalStrike : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Critical Strike upgraded!"
  Inventory.MaxAmount 10
}

Actor CriticalPuff
{
RenderStyle Add
Scale 0.6
VSpeed 0
+NOBLOCKMAP
  +NOGRAVITY
  +PUFFONACTORS
  SeeSound "ability/criticalhit"
States
  {
  Spawn:
    CRIT ABCDEF 4 Bright
    Stop
  }
}

Actor MightyBlowPuff : CriticalPuff
{
SeeSound "FighterHammerHitThing"
AttackSound "FighterHammerHitWall"
ActiveSound "FighterPunchMiss"
}

Actor DeathBlowPuff
{
RenderStyle Add
Scale 0.6
VSpeed 0
+NOBLOCKMAP
  +NOGRAVITY
  +PUFFONACTORS
  Damagetype "Deathblow"
States
  {
  Spawn:
    SRBA EFGHIJ 3 Bright
    Stop
  }
}

Actor MightyBlow : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIMB"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Mighty Blow upgraded!"
  Inventory.MaxAmount 10
}

Actor Telekinesis : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTITK"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Telekinesis upgraded!"
  Inventory.MaxAmount 10
}
ACTOR TeleFX
{
  Speed 7
  Radius 3
  Height 3
  Damage 0
  Projectile
  -ACTIVATEIMPACT
  -ACTIVATEPCROSS
  -NOGRAVITY
  +NOWALLBOUNCESND
  +NOCLIP
  Species "Player"
	+THRUSPECIES
  BounceFactor 0.3
  BounceCount 7
  -HEXENBOUNCE
  -CANBLAST
  SeeSound "SorcererBallBounce"
  DeathSound "SorcererHeadScream"
  Obituary "%o roasted on %k 's fireball"
  States
  {
  Spawn:
    MWND D 2 Bright A_ChangeFlag("NOCLIP",0)
    Loop
  Death:
    MWND D 2 //Bright A_Explode(90, 150)
    Stop
  }
}

Actor NewBlastEffect : BlastEffect replaces BlastEffect
{
	Renderstyle Add
}

Actor Teleblast : ArtiBlastRadius
{
+AUTOACTIVATE
}
Actor Blessing : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIBL"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Blessing upgraded!"
  Inventory.MaxAmount 10
}

Actor SingleBlessingHealthItem : Custominventory//HealthPickup
{
	//Health 1
	Inventory.MAXAmount 0
	+INVENTORY.QUIET
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
  States
  {
  Spawn:
    PTN1 ABC 3
    Loop
	Use:
	TNT1 A 0 ACS_ExecuteAlways(554,0,1,0,0)
	Stop
  }
}

Actor Curse : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICU"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Judgement upgraded!"
  Inventory.MaxAmount 10
}
Actor UseCurse : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_FireCustomMissile("CurseMissile",0,0)
		Stop
	}
}

Actor CurseMissile
{
   Speed 12
   Radius 10
   Height 6
   Damage (1)
   RenderStyle Add
   Alpha 0.67
   Projectile
   +RIPPER
   +SEEKERMISSILE
   +SKYEXPLODE
   +NOEXPLODEFLOOR
   +CANBLAST
   +BLOODLESSIMPACT
   SeeSound "orc/attack"
   States
   {
   Spawn:
	  PCBL A 0 A_JumpIfInventory("CurseTimer",acs_executewithresult(599,7)*2,"Death")
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL A 0 A_SeekerMissile(90,90)
      PCBL A 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_SeekerMissile(90,90)
      PCBL B 1 A_SpawnItemEx("CurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  PCBL B 0 A_GiveInventory("CurseTimer", 1)
      loop
   Death:
      PCBL CDEF 4 Bright
      stop
   }
}

Actor CurseMissileTrail
{
   Radius 0
   Height 1
   PROJECTILE
   +CLIENTSIDEONLY
   RenderStyle Add
   Alpha 0.75
   States
   {
   Spawn:
      TNT1 A 1 Bright
      PCTR ABCDEFG 2 Bright
      Stop
   }
}


Actor CurseTimer : Inventory
{
	Inventory.MaxAmount 52
}

Actor FireTrap : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIFT"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Fire Trap upgraded!"
  Inventory.MaxAmount 10
}

ACTOR FireTrapEffects
{
  health 20
  Radius 8
  Height 5
  speed 0
  Damage (1)
  Mass 1000000
  +NOBLOOD
   -SHOOTABLE
   -NOBLOCKMAP
   +NOGRAVITY
   +MISSILE
   Species "Player"
	+THRUSPECIES
   +DONTREFLECT
   Reactiontime 140
  RenderStyle Add
  Damagetype "Fire"
  Alpha 1
  DeathSound "FlechetteExplode"
  Obituary "%o walked right into a trap"
  States
  {
  Spawn:
  	MSP1 ABCDEF 5 A_Countdown
	Loop
  Death:
	MSP1 I 0 A_SetTranslucent(1,1)
  	MSP1 I 0 A_Explode(200+((acs_executewithresult(556))*4)+acs_executewithresult(599,11)*20,150,0)
	MSP1 I 0 A_Scream
    MSP1 GHIJKLMNOP 3 A_FadeOut(0.05)
    Stop
  }
}

Actor Stomp : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTISTOM"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Stomp upgraded!"
  Inventory.MaxAmount 10
}

Actor StompEffects
{
  Speed 6
  Radius 8
  Height 4
  Damage (random(1,2)+(acs_executewithresult(598)/3)+(acs_executewithresult(599,10)/2))
  scale 0.5
  Gravity 0.5
  RenderStyle Add
  Alpha 0.6
  Obituary "%o got a fatal toe stubbing from %k"
  +NOBLOCKMAP
  +DROPOFF
  +MISSILE
  +NOTELEPORT
  +RIPPER
  +WINDTHRUST
   +THRUGHOST
   Species "Player"
	+THRUSPECIES
  States
  {
  Spawn:
    IDGA AAABBBCCC 1 //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    Stop
  Death:
    TNT1 A 1 //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    Stop
  }
}
ACTOR StompDust
{
  +NOBLOCKMAP
  +NOGRAVITY
  +CLIENTSIDEONLY
  RenderStyle Add
  Alpha 0.6
  States
  {
  Spawn:
    FHFX STUVW 5
    Stop
  }
}

Actor ProtectAura : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIHF"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Protect Aura upgraded!"
  Inventory.MaxAmount 10
}

Actor IHaveProtect : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor ProtectAura1 : PowerupGiver
{
	Powerup.Type "Protect1"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor ProtectAura2 : PowerupGiver
{
	Powerup.Type "Protect2"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor ProtectAura3 : PowerupGiver
{
	Powerup.Type "Protect3"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor ProtectAura4 : PowerupGiver
{
	Powerup.Type "Protect4"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor ProtectAura5 : PowerupGiver
{
	Powerup.Type "Protect5"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor ProtectAura6 : PowerupGiver
{
	Powerup.Type "Protect6"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor ProtectAura7 : PowerupGiver
{
	Powerup.Type "Protect7"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor ProtectAura8 : PowerupGiver
{
	Powerup.Type "Protect8"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor ProtectAura9 : PowerupGiver
{
	Powerup.Type "Protect9"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor ProtectAura10 : PowerupGiver
{
	Powerup.Type "Protect10"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor PowerProtect1 : PowerProtection
{
	Damagefactor "Normal", 0.9
	Powerup.Duration 10
	Inventory.Icon "PROTICON"
}

Actor PowerProtect2 : PowerProtection
{
	Damagefactor "Normal", 0.85
	Powerup.Duration 10
	Inventory.Icon "PROTICON"
}

Actor PowerProtect3 : PowerProtection
{
	Damagefactor "Normal", 0.8
	Powerup.Duration 10
	Inventory.Icon "PROTICON"
}

Actor PowerProtect4 : PowerProtection
{
	Damagefactor "Normal", 0.75
	Powerup.Duration 10
	Inventory.Icon "PROTICON"
}

Actor PowerProtect5 : PowerProtection
{
	Damagefactor "Normal", 0.7
	Powerup.Duration 10
	Inventory.Icon "PROTICON"
}

Actor PowerProtect6 : PowerProtection
{
	Damagefactor "Normal", 0.65
	Powerup.Duration 10
	Inventory.Icon "PROTICON"
}

Actor PowerProtect7 : PowerProtection
{
	Damagefactor "Normal", 0.6
	Powerup.Duration 10
	Inventory.Icon "PROTICON"
}

Actor PowerProtect8 : PowerProtection
{
	Damagefactor "Normal", 0.55
	Powerup.Duration 10
	Inventory.Icon "PROTICON"
}

Actor PowerProtect9 : PowerProtection
{
	Damagefactor "Normal", 0.5
	Powerup.Duration 10
	Inventory.Icon "PROTICON"
}

Actor PowerProtect10 : PowerProtection
{
	Damagefactor "Normal", 0.45
	Powerup.Duration 10
	Inventory.Icon "PROTICON"
}

Actor ProtectAuraEffects
{
 +Missile
 +NoGravity
 +NoBlockmap
 +NoInteraction
 -Solid
 +CLIENTSIDEONLY
 VSpeed 6
 Radius 0
 Height 0
 RenderStyle Add
 Alpha 0.03
 Scale 0.37
 //translation "80:111=196:207"
 States
 {
  Spawn:
   SPFX G 0
   SPFX GGGGG 1 Bright A_FadeIn(0.2)
   SPFX GGGGGGGGGGGGGGGG 1 Bright A_FadeOut(0.06)
   Stop
 }
}

Actor FuryAuraEffects
{
 +Missile
 +NoGravity
 +NoBlockmap
 +NoInteraction
 -Solid
 +CLIENTSIDEONLY
 VSpeed 6
 Radius 0
 Height 0
 RenderStyle Add
 Alpha 0.03
 Scale 0.37
 //translation "80:111=196:207"
 States
 {
  Spawn:
   SPFX F 0
   SPFX FFFFF 1 Bright A_FadeIn(0.2)
   SPFX FFFFFFFFFFFFFFFF 1 Bright A_FadeOut(0.06)
   Stop
 }
}

Actor ManaCharge : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIMCHA"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Mana Charge upgraded!"
  Inventory.MaxAmount 10
}

Actor ManaChargeAuraIcon : PowerupGiver
{
	Powerup.Type "ManaChargeAuraIcon"
	Powerup.Duration 15
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor PowerManaChargeAuraIcon : Powerup
{
	Powerup.Duration 15
	Inventory.Icon "MCHAICON"
}

Actor ManaChargeingAura : PowerupGiver
{
	Powerup.Type "ManaChargeingAura"
	Powerup.Duration 0x7FFFFFFF
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor PowerManaChargeingAura : PowerDamage
{
	DamageFactor "ADZ", 1.0
	Powerup.Duration 0x7FFFFFFF
	Inventory.Icon "MCHAICON"
}

Actor ManaChargeEffects
{
 +Missile
 +NoGravity
 +NoBlockmap
 +NoInteraction
 -Solid
 +CLIENTSIDEONLY
 VSpeed 6
 Radius 0
 Height 0
 RenderStyle Add
 Alpha 0.03
 Scale 0.37
 //translation "80:111=196:207"
 States
 {
  Spawn:
   SPFX B 0
   SPFX B 0 A_Jump(256,"Blue","Green")
  Blue:
   SPFX BBBBB 1 Bright A_FadeIn(0.2)
   SPFX BBBBBBBBBBBBBBBB 1 Bright A_FadeOut(0.06)
   Stop
  Green:
   SPFX CCCCC 1 Bright A_FadeIn(0.2)
   SPFX CCCCCCCCCCCCCCCC 1 Bright A_FadeOut(0.06)
   Stop
 }
}

Actor Beserk : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIBESE"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Beserk upgraded!"
  Inventory.MaxAmount 10
}

Actor PowerBeserk : PowerDamage
{
	DamageFactor "ADZ", 1.0
	Powerup.Duration 0x7FFFFFFF
	Inventory.Icon "BESEICON"
}

Actor BeserkEffects
{
 +Missile
 +NoGravity
 +NoBlockmap
 +NoInteraction
 -Solid
 +CLIENTSIDEONLY
 VSpeed 6
 Radius 0
 Height 0
 RenderStyle Add
 Alpha 0.03
 Scale 0.37
 //translation "80:111=196:207"
 States
 {
  Spawn:
   SPFX D 0
   SPFX DDDDD 1 Bright A_FadeIn(0.2)
   SPFX DDDDDDDDDDDDDDDD 1 Bright A_FadeOut(0.06)
   Stop
 }
}

/*ACTOR BeserkEffects
{
  +NOBLOCKMAP
  +NOGRAVITY
  +CLIENTSIDEONLY
  +NOINTERACTION
  VSpeed 3
  RenderStyle Add
  Alpha 1
  scale 0.75
  States
  {
  Spawn:
    BSRK ABCDE 5
    Stop
  }
}*/

Actor BeserkEffects2
{
RenderStyle Add
Alpha 0.6
VSpeed 0
Scale 1.0
+NOBLOCKMAP
+NOGRAVITY
+CLIENTSIDEONLY
+NOINTERACTION
States
  {
  Spawn:
    CSFX ABCDE 5 Bright
    Stop
  }
}

Actor FireCurse : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIFC"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Punishment upgraded!"
  Inventory.MaxAmount 10
}

Actor UseFireCurse : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_FireCustomMissile("FireCurseMissile",0,0)
		Stop
	}
}

Actor FireCurseMissile
{
   Speed 12
   Radius 10
   Height 6
   Damage (1)
   RenderStyle Add
   Alpha 0.67
   Projectile
   +RIPPER
   +SEEKERMISSILE
   +SKYEXPLODE
   +NOEXPLODEFLOOR
   +CANBLAST
   +BLOODLESSIMPACT
   SeeSound "orc/attack"
   States
   {
   Spawn:
	  BLVB A 0 A_JumpIfInventory("CurseTimer",acs_executewithresult(599,7)*2,"Death")
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB A 0 A_SeekerMissile(90,90)
      BLVB A 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_SeekerMissile(90,90)
      BLVB B 1 A_SpawnItemEx("FireCurseMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB B 0 A_GiveInventory("CurseTimer", 1)
      loop
   Death:
	  TRNG E 0 A_SetTranslucent(1,1)
      TRNG E 0 A_Explode(120+(acs_executewithresult(556))+(acs_executewithresult(599,8))*17+(4*acs_executewithresult(599,1)),100,1)
	  TRNG E 0 A_Stop
	  TRNG CCCCCCCCCCC 0 bright A_SpawnItemEx("PunishmentBoom", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  TRNG CCCCCCCCCCC 0 bright A_SpawnItemEx("PunishmentBoom", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  TRNG CCCCCCCCCCC 0 bright A_SpawnItemEx("PunishmentBoom", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  TRNG CCCCCCCCCCC 0 bright A_SpawnItemEx("PunishmentBoom", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  BLVB CDEF 4 Bright
	  Stop
   }
}

actor PunishmentBoom
{
  radius 0
  height 1
  speed 0
  damage 0
  renderstyle Add
  alpha 0.75
  PROJECTILE
  -RANDOMIZE
  Scale 0.5
  +NOINTERACTION
  +CLIENTSIDEONLY
  +NOCLIP
  +RIPPER
  +BLOODLESSIMPACT
  +PAINLESS
  states
  {
  Spawn:
    TNT1 A 0 
    TNT1 A 0 A_CustomMissile("FireCurseMissileTrail2",0,0,random(-180,180),2,random(-180,180))
    TNT1 A 2 A_CustomMissile("FireCurseMissileTrail2",0,0,random(-180,180),2,random(-180,180))
    stop
  Death:
    TNT1 A 3 
    stop
  }
}

Actor FireCurseMissileTrail2
{
   Radius 0
   Height 1
   Speed 5
   PROJECTILE
   +CLIENTSIDEONLY
   +NOINTERACTION
   +NOCLIP
   +RIPPER
   +BLOODLESSIMPACT
   +PAINLESS
   RenderStyle Add
   Alpha 0.75
   States
   {
   Spawn:
      TNT1 A 1 Bright
      BLTR ABCDEFG 2 Bright
      Stop
   }
}

Actor FireCurseMissileTrail
{
   Radius 0
   Height 1
   PROJECTILE
   +CLIENTSIDEONLY
   RenderStyle Add
   Alpha 0.75
   States
   {
   Spawn:
      TNT1 A 1 Bright
      BLTR ABCDEFG 2 Bright
      Stop
   }
}

Actor DeepFreeze : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIFREE"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Deep Freeze upgraded!"
  Inventory.MaxAmount 10
}

Actor UseDeepFreeze : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		use:
		TNT1 A 0 A_FireCustomMissile("DeepFreezeMissile",0,0)
		Stop
	}
}

ACTOR DeepFreezeMissile
{
  Speed 17
  Radius 8
  Height 4
  Damage (random(15,20)+(acs_executewithresult(556))+(25*acs_executewithresult(599,2)))
  DamageType Ice
  PROJECTILE
  +NOBLOCKMAP
  +NOGRAVITY
  +DROPOFF
  +MISSILE
  +NOTELEPORT
  +WINDTHRUST
   +THRUGHOST
   Species "Player"
	+THRUSPECIES
  SeeSound "FrostFang/Fire2"
  DeathSound "FrostFang/Hit2"
  Obituary "%o was cooled off by %k"
  Renderstyle Add
  States
  {
	Spawn:
    TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
    goto Xplode
  Xplode:
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_RadiusThrust(600,600,0)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_RadiusThrust(600,600,0)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_RadiusThrust(600,600,0)
	TNT1 A 0 A_RadiusThrust(1000,600,0)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_Explode(random(100,200)+(acs_executewithresult(556))+(25*acs_executewithresult(599,2)),200,0)
    //TNT1 ABC 4 A_Explode(random(100,200)+(acs_executewithresult(556))+(10*acs_executewithresult(599,2)),200,1)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_Explode(random(100,200)+(acs_executewithresult(556))+(25*acs_executewithresult(599,2)),200,0)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
	TNT1 A 0 A_Explode(random(100,200)+(acs_executewithresult(556))+(25*acs_executewithresult(599,2)),200,0)
    loop
  Death:
    FFBL CDEFG 4 Bright
    Stop
  }
}

Actor FrostFangBallParticle
{
  Radius 1
  Height 1
  +NoGravity
  +NoClip
  +CLIENTSIDEONLY
  RenderStyle Add
  Alpha 0.8
  Scale 0.6
  States
  {
  Spawn:
    FFFG A 4 A_FadeOut(0.2)
    Loop
  }
}

Actor FrostFangFog2
{
  Radius 1
  Height 1
  +NoGravity
  +NoClip
  +CLIENTSIDEONLY
  RenderStyle Add
  Alpha 0.2
  XScale 0.6
  YScale 0.4
  States
  {
  Spawn:
    FFFG A 4 A_FadeOut(0.03)
    Loop
  }
}


Actor AxeMastery : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIAXEM"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Axe Mastery upgraded!"
  Inventory.MaxAmount 10
}

Actor Imbue : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIIMBU"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Imbue upgraded!"
  Inventory.MaxAmount 10
}

Actor SummonAncestors : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIANCESTOR"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Summon Ancestors upgraded!"
  Inventory.MaxAmount 10
}

Actor UseSummonAncestors : CustomInventory
{
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_JumpIfInventory("SummonAncestors", 7, "Level3")
		TNT1 A 0 A_JumpIfInventory("SummonAncestors", 4, "Level2")
		TNT1 A 0 A_FireCustomMissile("NewHolySpirit2",0,0)
		Stop
	Level2:
		TNT1 AA 0 A_FireCustomMissile("NewHolySpirit2",0,0)
		Stop
	Level3:
		TNT1 AAA 0 A_FireCustomMissile("NewHolySpirit2",0,0)
		Stop
	}
}

Actor NewHolySpirit2 : HolySpirit
{
Damage (Random(1,2)+(ACS_ExecuteWithResult(556))+ACS_ExecuteWithResult(599,6))
Renderstyle Add
Alpha 1
Species "Player"
	+THRUSPECIES
}

Actor WarCry : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIWARC"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "War Cry upgraded!"
  Inventory.MaxAmount 10
}

Actor UseWarCry : CustomInventory
{
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_PlaySound("fighter/warcry", CHAN_VOICE)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 0 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 10 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 20 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 30 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 40 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 50 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 60 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 70 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 80 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 90 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 100 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 110 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 120 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 130 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 140 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 150 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 160 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 170 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 180 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 190 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 200 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 210 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 220 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 230 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 240 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 250 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 260 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 270 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 280 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 290 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 300 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 310 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 320 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 330 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 340 , 0)
		TNT1 A 0 A_FireCustomMissile("WarCryEffects", 350 , 0)
		Stop
	}
}

Actor WarcryEffects
{
projectile
damagetype Morale
RenderStyle Add
Alpha 0.6
VSpeed 0
damage (1)
Scale 1.0
Speed 30
+RIPPER
+BLOODLESSIMPACT
States
  {
  Spawn:
    FX12 DEFGH 4 Bright
    Stop
  }

}

Actor Sacrifice : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTISACR"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Sacrifice upgraded!"
  Inventory.MaxAmount 10
}

Actor PowerSacrifice : PowerDamage
{
	DamageFactor "ADZ", 1.0
	Powerup.Duration 0x7FFFFFFF
	Inventory.Icon "SACRICON"
}

ACTOR SacrificeFX
{
+NOBLOCKMAP
  //+GRAVITY
  -FLOORHUGGER
  -FLOATBOB
  +HEXENBOUNCE
  height 10
  VSpeed 0
  RenderStyle Translucent
  Alpha 0.8
  scale 1.55
  States
  {
  Spawn:
    BDSH ABCD 1
	BDPL A -1
    Stop
	Death:
	GIBS A -1
	Stop
  }
}
/*Actor Alchemy : CustomInventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  +INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIALCH"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Alchemy upgraded!"
  Inventory.MaxAmount 26
  States
  {
  Spawn:
    PORK ABCB 6
    Loop
  Use:
  	TNT1 A 0 A_GiveInventory("Alchemy",1)
    TNT1 A 0 A_JumpIfInventory("LvlUp",1,6)
	TNT1 A 0 A_Print("This is a passive ability, it cannot be cast")//A_JumpIfInventory("MP",10,1)Doesn't use mana
	Stop
	TNT1 A 0 //A_JumpIfInventory("CrystalVial",30,9)
	TNT1 A 0 //A_FireCustomMissile("DeepFreezeMissile")
	TNT1 A 0 //DamageThing(25)
	TNT1 A 0 A_TakeInventory("MP",10)
	Stop
	TNT1 A 0 A_JumpIfInventory("Alchemy",25,4)
	TNT1 A 0 A_Print("Alchemy upgraded!")
	TNT1 A 0 A_GiveInventory("Alchemy",1)
	TNT1 A 0 A_TakeInventory("LvlUp",1)
  	Stop
	TNT1 A 0 A_Print("Alchemy at maximum")
	Stop
	TNT1 A 0 A_Print("Not enough health...")
	Stop
  }
}*/
Actor SummonLegend : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTILEGE"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Summon Legend upgraded!"
  Inventory.MaxAmount 10
}

Actor ImAPet: Inventory
{
+INVENTORY.UNDROPPABLE
Inventory.MaxAmount 1
}

ACTOR HolyLegend
{
  renderstyle Translucent
  alpha 0.5
  Health 400
  PainChance 0
  Speed 25
  Height 64
  Radius 16
  Monster
  +FLOORCLIP
  +TELESTOMP
  +DONTMORPH
  +FRIENDLY
  -COUNTKILL
  Species "Player"
  +THRUSPECIES
  -SOLID
  +NOBLOCKMONST
  +GHOST
  SeeSound "SpiritActive"
  DeathSound "SpiritDie"
  Obituary "%o was smote by a holy legend"
  meleerange 125
  States
  {
  Spawn:
	CLER A 0
	CLER A 0 ACS_ExecuteAlways(540)
	CLER A 0 A_SpawnItemEx("NewMinotaurSmoke")
	CLER A 10 A_Look
	Goto See
  Idle:
	CLER A 10 A_Look
	Goto See
  See:
	CLER ABCD 4 A_FastChase
	Loop
  Melee:
    CLER EF 4 A_FaceTarget
    CLER G 13 A_CustomMeleeAttack(random(25,40)+(3*ACS_ExecuteWithResult(510,0,0,0)-30), "FighterHammerHitThing", "FighterHammerMiss", 1)
	Goto See
  Missile:
    CLER E 1 A_FaceTarget
	CLER E 0 A_PlaySound("ClericCStaffFire", CHAN_WEAPON)
	CLER E 0 A_CustomMissile("NewCStaffMissileLegend", 40, 0, -3)
    CLER E 4 A_CustomMissile("NewCStaffMissileLegend", 40, 0, 3)
	CLER F 5 A_CPosRefire
    Goto Missile
  Death:
    SPIR D 4
    SPIR E 4 A_Scream
    SPIR FGHI 4
    Stop
  XDeath:
    SPIR D 4
    SPIR E 4 A_Scream
    SPIR FGHI 4
    Stop
  }
}

Actor NewCStaffMissileLegend : CStaffMissile
{
	Species "Player"
	+THRUSPECIES
	Damage (Random(1,8)*5+(acs_executewithresult(556)-10))
	Damagetype "Poison"
	States
	{
	Spawn:
		CSSF D 0 Bright A_CustomMissile("CStaffTrail",0,0,0,0)
		CSSF D 1 Bright A_CStaffMissileSlither
		CSSF D 0 Bright A_CustomMissile("CStaffTrail",0,0,0,0)
		CSSF D 1 Bright A_CStaffMissileSlither
		CSSF E 0 Bright A_CustomMissile("CStaffTrail",0,0,0,0)
		CSSF E 1 Bright A_CStaffMissileSlither
		CSSF E 0 Bright A_CustomMissile("CStaffTrail",0,0,0,0)
		CSSF E 1 Bright A_CStaffMissileSlither
		Loop
    }
}

ACTOR NewMinotaurSmoke
{
  +NOBLOCKMAP
  +NOGRAVITY
  +NOTELEPORT
  RenderStyle Add
  //Alpha 0.6
  States
  {
  Spawn:
    MNSM ABCDEFGHIJKLMNOPQ 3
    Stop
  }
}

Actor PolyMorph : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIPOLY"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "PolyMorph upgraded!"
  Inventory.MaxAmount 10
}

Actor Concentration : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIADRE"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Concentration upgraded!"
  Inventory.MaxAmount 10
}

Actor DivinePunishment : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIDIVP"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Divine Punishment upgraded!"
  Inventory.MaxAmount 10
}

Actor UseDivinePunishment : CustomInventory
{
	+inventory.AUTOACTIVATE
	states
	{
		use:
		TNT1 A 35 A_PlaySound("Cleric/Punishment")
		TNT1 A 0 A_GiveInventory("Punishmenting",3*(ACS_ExecuteWithResult(516,5,0,0)))
		TNT1 A 0 A_FireCustomMissile("PunishmentMissile",0,0)
		Stop
	}
}

ACTOR PunishmentMissile
{
  Health 105
  Speed 0
  Radius 10
  Height 6
  Damage 0
  scale 0.2
  Projectile
  +RIPPER
  +BLOODLESSIMPACT
  +SEEKERMISSILE
  +SKYEXPLODE
  +NOEXPLODEFLOOR
  +CANBLAST
  RenderStyle Add
  Alpha 0.4
  States
  {
  Spawn:
  	TNT1 A 8
    TNT1 A 0 A_Explode(random(20,25)+(acs_executewithresult(556))+(4*acs_executewithresult(599,5)),1000,0)
	TNT1 A 0 A_SpawnItemEx("PunishmentEffects", random(-1000,1000), random(-1000,1000), 0, 0, 0, 4, random(0,359))
	TNT1 A 0 A_SpawnItemEx("PunishmentEffects", random(-1000,1000), random(-1000,1000), 0, 0, 0, 4, random(0,359))
	TNT1 A 0 A_SpawnItemEx("PunishmentEffects", random(-1000,1000), random(-1000,1000), 0, 0, 0, 4, random(0,359))
	TNT1 A 0 A_SpawnItemEx("PunishmentEffects", random(-1000,1000), random(-1000,1000), 0, 0, 0, 4, random(0,359))
	TNT1 A 0 A_SpawnItemEx("PunishmentEffects", random(-1000,1000), random(-1000,1000), 0, 0, 0, 4, random(0,359))
	TNT1 A 0 A_GiveToTarget("PunishmentEffects2")
	TNT1 A 0 A_TakeFromTarget("Punishmenting",1)
	TNT1 A 8 A_JumpIfInTargetInventory("Punishmenting",1,2)
	TNT1 A 8 A_Jump(256,"End")
	TNT1 A 0
	loop
  End:
    TNT1 A 8 A_Explode(50+(acs_executewithresult(556))+(4*acs_executewithresult(599,5)),1000,0)
	stop
  }
}
Actor PunishmentEffects
{
  Speed 0
  VSpeed 6
  Radius 8
  Height 4
  Damage 0
  scale 1.0
  Gravity 0.5
  RenderStyle Add
  //Alpha 0.6
  +NOBLOCKMAP
  +DROPOFF
  +MISSILE
  +NOTELEPORT
  +RIPPER
  +BLOODLESSIMPACT
  +CLIENTSIDEONLY
  +PAINLESS
  +NOGRAVITY
  States
  {
  Spawn:
    SPFX E -1 //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    stop
  Death:
    TNT1 A 1 //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    Stop
  }
}
Actor PunishmentEffects2 : CustomInventory
{
  inventory.maxamount 0
  inventory.usesound "misc/invuse"
  +AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  states
  {
  Spawn:
	TNT1 A 1
	Stop
  Use:
    TNT1 A 1 A_SetBlend("CC 66 33",0.1,120)
  stop
  }
}

Actor MFireball : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIDFBA"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Fireball upgraded!"
  Inventory.MaxAmount 10
}

Actor UseMFireBall : Custominventory
{
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_FireCustomMissile("FireBallFx",0,0)
		Stop
	}
}

ACTOR FireballFX
{
  Speed 23
  Radius 5
  Height 5
  Damage 0
  Damagetype Fire
  Renderstyle Add
  Projectile
  -ACTIVATEIMPACT
  -ACTIVATEPCROSS
  -NOGRAVITY
  //+FULLVOLDEATH
  +NOWALLBOUNCESND
  Species "Player"
	+THRUSPECIES
  //+NOCLIP
  Gravity 0.1
  BounceFactor 0.8
  BounceCount 7
  +HEXENBOUNCE
  SeeSound "SorcererBallBounce"
  DeathSound "SorcererHeadScream"
  Obituary "%o roasted on %k 's fireball"
  States
  {
  Spawn:
    SBS1 A 2 Bright //A_ChangeFlag("NOCLIP",0)
    SBS1 BCD 3 Bright //A_ChangeFlag("NOCLIP",0)
    Loop
  Death:
    FX13 I 2 Bright A_Explode(80+(acs_executewithresult(556))+(16*acs_executewithresult(599,3)), 150, 0)
    FX13 JKLM 2 Bright
    Stop
  }
}

Actor Meteor : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIMETE"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Meteor upgraded!"
  Inventory.MaxAmount 10
}

ACTOR UseMeteor : CustomInventory
{
	+inventory.AUTOACTIVATE
	states
	{
	use:
		TNT1 A 0 A_FireCustomMissile("MeteorMissile",0,0,0,17)
		stop
	}
}
ACTOR MeteorMissile
{
  Speed 25
  Radius 8
  Height 4
  Damage (100+(acs_executewithresult(556))+(35*acs_executewithresult(599,4)))
  DamageType Fire
  SeeSound "DemonMissileFire"
  +NOBLOCKMAP
  Gravity 0.15
  +DROPOFF
  +MISSILE
  +NOTELEPORT
  Species "Player"
	+THRUSPECIES
  Renderstyle Add
  States
  {
  Spawn:
	WRBL ABC 4 bright
	//WRBL A 0 ACS_ExecuteAlways(544,0,0,0,0)
	loop
  Death:
    WRBL DEFGHI 1 bright
	WRBL A 0 A_Explode((100+(acs_executewithresult(556))+(35*acs_executewithresult(599,4))),100,0)
	WRBL A 0 A_SpawnItemEx("FireballFX",0,0,0,Random(0,20)-10,Random(0,20)-10,Random(0,20)-10)
	WRBL A 0 A_SpawnItemEx("FireballFX",0,0,0,Random(0,20)-10,Random(0,20)-10,Random(0,20)-10)
	WRBL A 0 A_SpawnItemEx("FireballFX",0,0,0,Random(0,20)-10,Random(0,20)-10,Random(0,20)-10)
	WRBL A 0 A_JumpIfInTargetInventory("Meteor",3,1)
    Stop
	WRBL A 0 A_SpawnItemEx("FireballFX",0,0,0,Random(0,20)-10,Random(0,20)-10,Random(0,20)-10)
	WRBL A 0 A_SpawnItemEx("FireballFX",0,0,0,Random(0,20)-10,Random(0,20)-10,Random(0,20)-10)
	WRBL A 0 A_SpawnItemEx("FireballFX",0,0,0,Random(0,20)-10,Random(0,20)-10,Random(0,20)-10)
	WRBL A 0 A_JumpIfInTargetInventory("Meteor",6,1)
	Stop
	WRBL A 0 A_SpawnItemEx("FireballFX",0,0,0,Random(0,20)-10,Random(0,20)-10,Random(0,20)-10)
	WRBL A 0 A_SpawnItemEx("FireballFX",0,0,0,Random(0,20)-10,Random(0,20)-10,Random(0,20)-10)
	WRBL A 0 A_SpawnItemEx("FireballFX",0,0,0,Random(0,20)-10,Random(0,20)-10,Random(0,20)-10)
	WRBL A 0 A_JumpIfInTargetInventory("Meteor",9,1)
	Stop
	WRBL A 0 A_SpawnItemEx("FireballFX",0,0,0,Random(0,20)-10,Random(0,20)-10,Random(0,20)-10)
	WRBL A 0 A_SpawnItemEx("FireballFX",0,0,0,Random(0,20)-10,Random(0,20)-10,Random(0,20)-10)
	WRBL A 0 A_SpawnItemEx("FireballFX",0,0,0,Random(0,20)-10,Random(0,20)-10,Random(0,20)-10)
	Stop
  }
}

Actor HammerMastery : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIHAM"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Hammer Mastery upgraded!"
  Inventory.MaxAmount 10
}

actor HammerReflect : PowerupGiver
{
  +FLOATBOB
  +INVENTORY.PICKUPFLASH
  +AUTOACTIVATE
  //+INVENTORY.ADDITIVETIME This will be useful once introduced into mainstream ZDoom
  Inventory.MaxAmount 0
  Inventory.Icon ARTIDEFN
  powerup.duration 4
  powerup.type "Invulnerable"
  powerup.mode "Reflective"
  //Inventory.PickupMessage "$TXT_ARTIINVULNERABILITY2" // "ICON OF THE DEFENDER"
  Powerup.Type Invulnerable
  States
  {
  Spawn:
    DEFN ABCD 3
    Loop
  }
}
actor HammerReflect2 : PowerupGiver
{
  +FLOATBOB
  +INVENTORY.PICKUPFLASH
  +AUTOACTIVATE
  //+INVENTORY.ADDITIVETIME This will be useful once introduced into mainstream ZDoom
  Inventory.MaxAmount 0
  Inventory.Icon ARTIDEFN
  powerup.duration 8
  powerup.type "Invulnerable"
  powerup.mode "Reflective"
  //Inventory.PickupMessage "$TXT_ARTIINVULNERABILITY2" // "ICON OF THE DEFENDER"
  Powerup.Type Invulnerable
  States
  {
  Spawn:
    DEFN ABCD 3
    Loop
  }
}
actor HammerReflect3 : PowerupGiver
{
  +FLOATBOB
  +INVENTORY.PICKUPFLASH
  +AUTOACTIVATE
  //+INVENTORY.ADDITIVETIME This will be useful once introduced into mainstream ZDoom
  Inventory.MaxAmount 0
  Inventory.Icon ARTIDEFN
  Powerup.Duration 10
  powerup.type "Invulnerable"
  powerup.mode "Reflective"
  //Inventory.PickupMessage "$TXT_ARTIINVULNERABILITY2" // "ICON OF THE DEFENDER"
  Powerup.Type Invulnerable
  States
  {
  Spawn:
    DEFN ABCD 3
    Loop
  }
}

Actor FuryAura : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIMART"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Fury Aura upgraded!"
  Inventory.MaxAmount 10
}

Actor IHaveFury : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor FuryAura1 : PowerupGiver
{
	Powerup.Type "Fury1"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor FuryAura2 : PowerupGiver
{
	Powerup.Type "Fury2"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor FuryAura3 : PowerupGiver
{
	Powerup.Type "Fury3"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor FuryAura4 : PowerupGiver
{
	Powerup.Type "Fury4"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor FuryAura5 : PowerupGiver
{
	Powerup.Type "Fury5"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor FuryAura6 : PowerupGiver
{
	Powerup.Type "Fury6"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor FuryAura7 : PowerupGiver
{
	Powerup.Type "Fury7"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor FuryAura8 : PowerupGiver
{
	Powerup.Type "Fury8"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor FuryAura9 : PowerupGiver
{
	Powerup.Type "Fury9"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor FuryAura10 : PowerupGiver
{
	Powerup.Type "Fury10"
	Powerup.Duration 10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor PowerFury1 : PowerDamage
{
	Damagefactor "Normal", 1.1
	Powerup.Duration 10
	Inventory.Icon "HFICON"
}

Actor PowerFury2 : PowerDamage
{
	Damagefactor "Normal", 1.15
	Powerup.Duration 10
	Inventory.Icon "HFICON"
}

Actor PowerFury3 : PowerDamage
{
	Damagefactor "Normal", 1.2
	Powerup.Duration 10
	Inventory.Icon "HFICON"
}

Actor PowerFury4 : PowerDamage
{
	Damagefactor "Normal", 1.25
	Powerup.Duration 10
	Inventory.Icon "HFICON"
}

Actor PowerFury5 : PowerDamage
{
	Damagefactor "Normal", 1.3
	Powerup.Duration 10
	Inventory.Icon "HFICON"
}

Actor PowerFury6 : PowerDamage
{
	Damagefactor "Normal", 1.35
	Powerup.Duration 10
	Inventory.Icon "HFICON"
}

Actor PowerFury7 : PowerDamage
{
	Damagefactor "Normal", 1.4
	Powerup.Duration 10
	Inventory.Icon "HFICON"
}

Actor PowerFury8 : PowerDamage
{
	Damagefactor "Normal", 1.45
	Powerup.Duration 10
	Inventory.Icon "HFICON"
}

Actor PowerFury9 : PowerDamage
{
	Damagefactor "Normal", 1.50
	Powerup.Duration 10
	Inventory.Icon "HFICON"
}

Actor PowerFury10 : PowerDamage
{
	Damagefactor "Normal", 1.55
	Powerup.Duration 10
	Inventory.Icon "HFICON"
}

Actor Charge : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICHAR"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Charge upgraded!"
  Inventory.MaxAmount 10
}

Actor UseCharge : CustomInventory
{
	+inventory.AUTOACTIVATE
	Inventory.MaxAmount 0
	states
	{
		use:
		TNT1 A 0 A_FireCustomMissile("ChargeEffects",0,0)
		Stop
	}
}

Actor ChargeEffects
{
  Speed 0
  VSpeed 6
  Radius 8
  Height 4
  Damage 0
  scale 0.25
  Gravity 0.5
  RenderStyle NONE
  Alpha 0.6
  +NOBLOCKMAP
  +DROPOFF
  +MISSILE
  +NOTELEPORT
  +RIPPER
  +NOGRAVITY
  ReactionTime 25
  States
  {
  Spawn:
	FHFX A 0 A_Countdown
    FHFX A 0 A_Explode(4,128,0) //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
	FHFX A 1 A_RadiusThrust(200,128,0)
    Loop
  Death:
    FHFX S 1 //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    Stop
  }
}

Actor Visions : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIVISI"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Visions upgraded!"
  Inventory.MaxAmount 10
}

Actor UseVisions : CustomInventory
{
	+inventory.AUTOACTIVATE
	Inventory.MaxAmount 0
	states
	{
		use:
		TNT1 A 0 A_FireCustomMissile("VisionMissile",0,0)
		Stop
	}
}

ACTOR VisionMissile
{
  Health 105
  Speed 10
  Radius 10
  Height 6
  Damage (1)
  scale 0.2
  Projectile
  +SKYEXPLODE
  +NOEXPLODEFLOOR
  +CANBLAST
  Species "Player"
	+THRUSPECIES
  RenderStyle Add
  Alpha 1.0
  DamageType Convert
  SeeSound "ability/visions"
  States
  {
  Spawn:
    SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	SPIR P 2 A_SpawnItemEx ("VisionEffects",0,0,0,random(0,10)-5, random(0,10)-5,random(0,10)-5, 0)
	goto Death
  Death:
    TRNG P 4
    TRNG Q 4 //A_Scream
    TRNG RSTU 4
    Stop
  }
}
ACTOR VisionEffects
{
	Damage 0
  Speed 1
  +NOBLOCKMAP
  +NOGRAVITY
  +NOCLIP
  +FLOAT
  +CLIENTSIDEONLY
  +NOTELEPORT
  PROJECTILE
  RenderStyle Translucent
  Alpha 0.6

  States
  {
  Spawn:
    VAM6 KLMNO 1
	VAM6 KLMNO 1
	VAM6 KLMNO 1
	VAM6 KLMNO 1
    stop
  Death:
    FOGS E 5
    Stop
  }
}
Actor EnergyAbsorb : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIABSO"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Energy Absorb upgraded!"
  Inventory.MaxAmount 10
}

Actor MSpark : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTISPAR"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Spark upgraded!"
  Inventory.MaxAmount 10
}

Actor Sparking : CustomInventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  +INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  +INVENTORY.AUTOACTIVATE
  Inventory.Icon "ARTIABSO"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.MaxAmount 1
  States
  {
  Use:
  	TNT1 A 0 A_FireBullets(359,359,30,(acs_executewithresult(603))+acs_executewithresult(534),"SparkingPuff",0, 128)//
	stop
  }
}

ACTOR SparkingPuff
{
  +NOBLOCKMAP
  +NOGRAVITY
  +CLIENTSIDEONLY
  +PUFFONACTORS
  +ALWAYSPUFF
  RenderStyle Add
  scale 0.4
  SeeSound "MageLightningContinuous"
  AttackSound "MageLightningContinuous"
  ActiveSound "MageLightningContinuous"
  States
  {
  Spawn:
  FAXE RSTUVWX 4 Bright
    Stop
  }
}

ACTOR MagnetBomb
{//ACS_ExecuteAlways(562,0,0,0,0)//fires a magnet-bomb
  Speed 7
  Radius 5
  Height 5
  Damage 0
  Projectile
  -ACTIVATEIMPACT
  -ACTIVATEPCROSS
  -NOGRAVITY
  //+FULLVOLDEATH
  -NOWALLBOUNCESND
  Species "Player"
	+THRUSPECIES
  BounceFactor 0.5
  BounceCount 3
  +HEXENBOUNCE
  SeeSound "SorcererBallBounce"
  DeathSound "SorcererHeadScream"
  //Obituary "%o roasted on %k 's fireball"
  States
  {
  Spawn:
    MBMB A 2 Bright
    MBMB A 3 Bright A_JumpIfInTargetInventory("MSpark",Random(0,10),"Zap")
    Loop
  Death:
    CTFX B 2 Bright A_CustomBulletAttack (359,359,100,0, "SparkingPuff", 200)//, bool aimfacing]*])
    MBMB A 0 A_Explode(100+(acs_executewithresult(603)),200,0)
	CTFX CEDF 2 Bright
    Stop
  Zap:
  	MBMB A 0 A_Explode(10+(acs_executewithresult(603)),200,0)
  	MBMB A 2 A_CustomBulletAttack (359,359,10,0, "SPARKingPUFF", 200)
  }
}

Actor ArcaneBomb : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Arcane Bomb upgraded!"
  Inventory.MaxAmount 10
}

Actor UseArcaneBomb : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_FireCustomMissile("ArcaneBombMissile",0,0)
		Stop
	}
}

actor ArcaneBombMissile : Whirlwind
{
	PROJECTILE
	scale 0.4
	+RIPPER
	Species "Player"
	+THRUSPECIES
	+BLOODLESSIMPACT
	Speed 25
	Height	7
	Radius	6
	renderstyle add
	SeeSound "DemonMissileFire"
  DeathSound "DemonMissileExplode"
	Damage 0//(random(29,44)+(acs_executewithresult(556))+(acs_executewithresult(599,17)*2)+(acs_executewithresult(599,18)*11))
	states
	{
	Spawn:
		ABMB A 0 Bright A_CustomMissile("ArcaneBombTrail",0+random(10,-10),0+random(10,-10),random(15,-15),0)
		ABMB A 1 Bright A_CustomMissile("ArcaneBombTrail",0+random(10,-10),0+random(10,-10),random(15,-15),0)
		Loop
		Death:
		TRNG CCCCCCCCCCC 0 bright A_SpawnItemEx("ArcaneBombBoom", 0, 0, 0, 0, 0, 0, 0, 128, 0)
		TRNG CCCCCCCCCCC 0 bright A_SpawnItemEx("ArcaneBombBoom", 0, 0, 0, 0, 0, 0, 0, 128, 0)
		TRNG CCCCCCCCCCC 0 bright A_SpawnItemEx("ArcaneBombBoom", 0, 0, 0, 0, 0, 0, 0, 128, 0)
		TRNG CCCCCCCCCCC 0 bright A_SpawnItemEx("ArcaneBombBoom", 0, 0, 0, 0, 0, 0, 0, 128, 0)
		TNT1 A 0 Bright A_Explode(80+(acs_executewithresult(556))+(acs_executewithresult(599,27)*20),162,0)
		TNT1 AAA 5 Bright A_RadiusThrust(2500+(acs_executewithresult(556)*10)+(acs_executewithresult(599,27)*500),162,0)
		stop
	}
}

actor ArcaneBombBoom
{
  radius 0
  height 1
  speed 0
  damage 0
  renderstyle Add
  alpha 0.75
  PROJECTILE
  -RANDOMIZE
  Scale 0.5
  +NOINTERACTION
  +CLIENTSIDEONLY
  states
  {
  Spawn:
    TNT1 A 0 
    TNT1 A 0 A_CustomMissile("ArcaneBombTrail2",0,0,random(-180,180),2,random(-180,180))
    TNT1 A 2 A_CustomMissile("ArcaneBombTrail2",0,0,random(-180,180),2,random(-180,180))
    stop
  Death:
    TNT1 A 3 
    stop
  }
}

ACTOR ArcaneBombTrail
{
    Mass 1
    Radius 8
    Height 6
    Speed 3
    Scale 0.6
    Alpha 0.3
    Damage 0
    RenderStyle Add
    PROJECTILE
    States
    {
    Spawn:
	TNT1 A 0
        ABMB BCDEFGHIJKLMOPQ 2 Bright
        Stop
    }
}

ACTOR ArcaneBombTrail2
{
    Mass 1
    Radius 8
    Height 6
    Speed 5
    Scale 0.6
    Alpha 0.3
    Damage 0
    RenderStyle Add
    PROJECTILE
    States
    {
    Spawn:
	TNT1 A 0
        ABMB BCDEFGHIJKLMOPQ 1 Bright
        Stop
    }
}

Actor PillarOfFlame : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Pillar Of Flame upgraded!"
  Inventory.MaxAmount 10
}

Actor UsePillarOfFlame : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_FireBullets(0,0,1,0,"PillarOfFlamePuff",0)
		Stop
	}
}

ACTOR PillarOfFlamePuff : HornRodFX2
{
    Radius 1
    PROJECTILE
    Speed 0
    Damage 0
	+PUFFGETSOWNER
    +BLOODLESSIMPACT
    +CEILINGHUGGER
    +SPAWNCEILING
    +PAINLESS
    +THRUACTORS
    +NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	+PUFFONACTORS
	+ALWAYSPUFF
    RenderStyle None
    States
    {
    Spawn:
	TNT1 A 1
	TNT1 A 0 A_hideInCeiling
	TNT1 A 0 A_PlaySound("pillarflame/drop",CHAN_AUTO,0.6,0,ATTN_NONE)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameMeteor",0,0,-16,0,0,-20,0,SXF_NOCHECKPOSITION)
	TNT1 A 30
	Stop
    }
}

ACTOR PillarOfFlameMeteor
{
    PROJECTILE
    Radius 1
    Height 12
    Speed 40
    //Damage 50
    +RIPPER
    +BLOODLESSIMPACT
    +EXTREMEDEATH
    +NODAMAGETHRUST
    +NOEXTREMEDEATH
    +FORCERADIUSDMG
    +DONTREFLECT
    +PAINLESS
    RenderStyle Add
    DamageType "Fire"
    States
    {
    Spawn:
	TNT1 A 0
	X029 A 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 A 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 A 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 A 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 B 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 B 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 B 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 B 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 C 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 C 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 C 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 C 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 D 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 D 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 D 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 D 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 E 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 E 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 E 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 E 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 F 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 F 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 F 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 F 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 G 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 G 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 G 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 G 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 H 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 H 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 H 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 H 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 I 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 I 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 I 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 I 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 J 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 J 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 J 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 J 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 K 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 K 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	X029 K 0 Bright A_Explode(30+(acs_executewithresult(556))+(acs_executewithresult(599,28)*2),50,0)
	X029 K 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
	Goto Spawn+1
    Death:
	TNT1 A 0 A_Explode(random(200,260)+(acs_executewithresult(556))+(acs_executewithresult(599,28)*5),180,0)
	TNT1 A 0 A_PlaySound("pillarflame/explosion",CHAN_AUTO,0.6,0,ATTN_NONE)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameVolcano",0,0,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,0,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,10,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,20,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,30,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,40,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,50,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,60,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,70,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,80,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,90,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,100,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,110,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,120,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,130,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,140,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,150,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,160,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,170,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,180,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-10,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-20,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-30,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-40,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-50,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-60,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-70,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-80,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-90,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-100,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-110,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-120,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-130,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-140,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-150,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-160,32,0)
	TNT1 A 0 A_SpawnItemEx("PillarOfFlameSmallVolcano",0,0,0,5,0,0,-170,32,0)
	TNT1 A 10
	Stop
    }
}

ACTOR MeteorTrail
{
    +NOINTERACTION
	+CLIENTSIDEONLY
    RenderStyle Add
    States
    {
    Spawn:
	X029 AABBCCDDEEFFGGHHIIJJKK 1 Bright A_FadeOut(0.03)
	Loop
    }
}

ACTOR PillarOfFlameVolcano
{
   Speed 1
   Damage 0
   PROJECTILE
   Radius 3
   Height 12
   +DONTSPLASH
   +FORCERADIUSDMG
   +Ripper
   +FIREDAMAGE
   RENDERSTYLE ADD
   States
   {
   Spawn:
      NFPI A 3 Bright
      NFPI B 3 Bright
      NFPI CD 3 Bright A_Explode(128+(acs_executewithresult(556))+(acs_executewithresult(599,28)*5),150,0)
      NFPI BA 3 Bright
      Stop
   Death:
      TNT1 A 0
      Stop 
   } 
}


ACTOR PillarOfFlameSmallVolcano
{
    Speed 5
    Damage 0
    Radius 12
    Height 16
    RenderStyle Translucent
    Alpha 0.2
    Scale 0.5
    PROJECTILE
    +DROPOFF
    +BLOODLESSIMPACT
    +FLOORHUGGER
    +RIPPER
    +PAINLESS
    DamageType "Fire"
    States
    {
    Spawn:
	F2SX AAAABBBBCCCCDDDDEEEEFFFF 1 Bright
	Stop
    }
}

Actor FrostStorm : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Frost Storm upgraded!"
  Inventory.MaxAmount 10
}

Actor UseFrostStorm : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_FireCustomMissile("FrostStormShot",0,0)
		Stop
	}
}

ACTOR FrostStormShot
{
  Radius 12
   Height 6
   Speed 30
   Damage (random(100,180)+(acs_executewithresult(556))+(acs_executewithresult(599,29)*20))
   +NODAMAGETHRUST
   Species "Player"
	+THRUSPECIES
   PROJECTILE
   RENDERSTYLE ADD
   Alpha 0.80
   +FORCEXYBILLBOARD
   SeeSound "weapons/shock"
   DeathSound "weapons/devexp"
   Obituary "%o was smitten by the Overlord and %k."
  states
  {
  Spawn:
    LFX1 STUVW 1 BRIGHT
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,0,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 S 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,0,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,20,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 T 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,20,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,40,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 U 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,40,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,60,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 V 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,60,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,80,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 W 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,80,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,100,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 S 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,100,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,120,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 T 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,120,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,140,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 U 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,140,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,160,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 V 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,160,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,180,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 W 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,180,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,200,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 S 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,200,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,220,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 T 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,220,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,240,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 U 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,240,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,260,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 V 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,260,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,280,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 W 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,280,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,300,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 S 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,300,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,320,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 T 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,320,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,340,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 U 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,340,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
	LFX1 S 0 BRIGHT A_CustomMissile("FrostStormIceMissile",0,0,360,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    LFX1 V 1 BRIGHT A_CustomMissile("FrostStormLightning",0,0,360,CMF_TRACKOWNER|CMF_AIMDIRECTION,0)
    Loop
    Death:
	LFX1 STUVWSTUVWSTUVWSTUVWSTUVWSTUVWSTUVWSTUVWSTUVWSTUVWSTUVWSTUVW 1 Bright A_Explode(3+(acs_executewithresult(556))/4+(acs_executewithresult(599,29)*5),32,0)
      stop
  }
}

Actor FrostStormIceMissile
{
  Speed 50
  Radius 13
  Height 8
  Damage (25+(acs_executewithresult(556))+(4*ACS_ExecuteWithResult(599,29)))
  DamageType "Ice"
  Projectile
  +WINDTHRUST
   +THRUGHOST
  Species "Player"
	+THRUSPECIES
  Renderstyle Add
  SeeSound "weapons/icearrow"
  DeathSound "MageShardsExplode"
  States
  {
  Spawn:
    SHRD AAABBBCCC 1 Bright A_SpawnItemEx("FrostMissileFog", 0, 0, 1, 4, 0, Random(-0.5, 0.5), Random(-10, 10), 128)
    Loop
  Death:
    SHEX ABCDE 5 Bright
    Stop
  }
}

ACTOR FrostStormLightning
{
  Speed 40
  Radius 12
  Height 10
  Damage (30+ACS_ExecuteWithResult(556)+(4*ACS_ExecuteWithResult(599,29)))
  DamageType "Lightning"
  DeathSound "weapons/devzap"
  RenderStyle Add
  Projectile
  Species "Player"
	+THRUSPECIES
  //DeathSound "MageLightningFire"//MageLightningFire       lite2
  States
  {
  Spawn:
      DLIT ABC 1 Bright
      Loop
   Death:
      DLIT DEFGHIJKLMNO 1 Bright
      Stop
  }
}

Actor NOCOUNTKILL : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_ChangeFlag("CountKill", 0)
		Stop
	}
}

//Necromaner Skills

Actor Enfeeble : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Enfeeble upgraded!"
  Inventory.MaxAmount 10
}

Actor UseEnfeeble : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 ACS_ExecuteAlways(970)
		Stop
	}
}

Actor EnfeeblePuffItem : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_SpawnItemEx("EnfeeblePuff", random(-16,16), random(-16,16), random(16,34), 0, 0, 0, 0, 128, 32)
		Stop
	}
}

ACTOR EnfeeblePuff
{
    Projectile
	+NOCLIP
	+CLIENTSIDEONLY
    RenderStyle Add
    Alpha 0.5
	Scale 0.67
    States
    {
    Spawn:
	SKP2 ABCDEF 3 Bright
	Stop
    }
}

Actor EnfeebleDebuff1 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense1", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage1", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense1 : PowerProtection
{
	Damagefactor "Normal", 1.15
	Powerup.Duration -15
}

Actor PowerEnfeebleDamage1 : PowerDamage
{
	Damagefactor "Normal", 0.85
	Powerup.Duration -15
}
////
Actor EnfeebleDebuff2 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense2", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage2", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense2 : PowerProtection
{
	Damagefactor "Normal", 1.2
	Powerup.Duration -15
}

Actor PowerEnfeebleDamage2 : PowerDamage
{
	Damagefactor "Normal", 0.8
	Powerup.Duration -15
}
////
Actor EnfeebleDebuff3 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense3", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage3", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense3 : PowerProtection
{
	Damagefactor "Normal", 1.25
	Powerup.Duration -15
}

Actor PowerEnfeebleDamage3 : PowerDamage
{
	Damagefactor "Normal", 0.75
	Powerup.Duration -15
}
////
Actor EnfeebleDebuff4 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense4", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage4", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense4 : PowerProtection
{
	Damagefactor "Normal", 1.3
	Powerup.Duration -15
}

Actor PowerEnfeebleDamage4 : PowerDamage
{
	Damagefactor "Normal", 0.7
	Powerup.Duration -15
}
////
Actor EnfeebleDebuff5 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense5", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage5", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense5 : PowerProtection
{
	Damagefactor "Normal", 1.35
	Powerup.Duration -15
}

Actor PowerEnfeebleDamage5 : PowerDamage
{
	Damagefactor "Normal", 0.65
	Powerup.Duration -15
}
////
Actor EnfeebleDebuff6 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense6", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage6", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense6 : PowerProtection
{
	Damagefactor "Normal", 1.4
	Powerup.Duration -15
}

Actor PowerEnfeebleDamage6 : PowerDamage
{
	Damagefactor "Normal", 0.6
	Powerup.Duration -15
}
////
Actor EnfeebleDebuff7 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense7", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage7", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense7 : PowerProtection
{
	Damagefactor "Normal", 1.45
	Powerup.Duration -15
}

Actor PowerEnfeebleDamage7 : PowerDamage
{
	Damagefactor "Normal", 0.65
	Powerup.Duration -15
}
////
Actor EnfeebleDebuff8 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense8", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage8", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense8 : PowerProtection
{
	Damagefactor "Normal", 1.5
	Powerup.Duration -15
}

Actor PowerEnfeebleDamage8 : PowerDamage
{
	Damagefactor "Normal", 0.5
	Powerup.Duration -15
}
////
Actor EnfeebleDebuff9 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense9", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage9", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense9 : PowerProtection
{
	Damagefactor "Normal", 1.55
	Powerup.Duration -15
}

Actor PowerEnfeebleDamage9 : PowerDamage
{
	Damagefactor "Normal", 0.45
	Powerup.Duration -15
}
////
Actor EnfeebleDebuff10 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense10", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage9", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense10 : PowerProtection
{
	Damagefactor "Normal", 1.6
	Powerup.Duration -15
}

Actor PowerEnfeebleDamage10 : PowerDamage
{
	Damagefactor "Normal", 0.4
	Powerup.Duration -15
}
//Summon Shadow

Actor NecromancerPetCheck : Inventory
{
	Inventory.MaxAmount 2
}

Actor SummonShadow : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Summon Shadow upgraded!"
  Inventory.MaxAmount 10
}

//Shadow
ACTOR NecromancerShadow
{
	Health 100
	Radius 20
	Height 56
	Mass 100
	RenderStyle "Translucent"
	Alpha 0.7
	Speed 8
	PainChance 200
	Monster
	+FLOORCLIP
	Species "Player"
	+THRUSPECIES
	+FRIENDLY
	+QUICKTORETALIATE
	-COUNTKILL
	+NOBLOCKMONST
	RadiusDamageFactor 0.1
	PainSound "Shadow/pain"
	DeathSound "Shadow/death"
	ActiveSound "Shadow/active"
	Obituary "%o was assassinated by a shadow."
	States
	{
	Spawn:
		SHDW AA 0 ACS_ExecuteAlways(969)
	Idle:
		SHDW AB 10 A_Look
		Goto See
	See:
		SHDW A 0 A_JumpIfTargetinLOS(2, 140)
		SHDW A 0 A_Jump(50, "Giveup")
		SHDW AAA 1 A_Chase
		SHDW A 0 A_SpawnItemEx("ShadowGhostA", 0, 0, 0, 0, 0, 0, 0, 128)
		SHDW BBB 1 A_Chase
		SHDW B 0 A_SpawnItemEx("ShadowGhostB", 0, 0, 0, 0, 0, 0, 0, 128)
		SHDW CCC 1 A_Chase
		SHDW C 0 A_SpawnItemEx("ShadowGhostC", 0, 0, 0, 0, 0, 0, 0, 128)
		SHDW DDD 1 A_Chase
		SHDW D 0 A_SpawnItemEx("ShadowGhostD", 0, 0, 0, 0, 0, 0, 0, 128)
		Goto See
	Giveup:
		SHDW A 0 A_ClearTarget
		Goto See
	Missile:
	    SHDW E 0 A_JumpIfInventory("SummonShadow", 4, 2)
	    SHDW E 0 A_Jump(256,2)
	    SHDW E 0 A_Jump(128,"ShadowDarknessMissile")
		SHDW EEEE 5 A_FaceTarget
		SHDW F 5 A_FaceTarget
		SHDW G 5 BRIGHT A_CustomMissile("NecroShadowBall")
		SHDW E 1 A_CPosRefire
		Goto Missile
	ShadowDarknessMissile:
		SHDW EEEE 5 A_FaceTarget
		SHDW F 5 A_FaceTarget
		SHDW G 5 BRIGHT A_CustomMissile("NecroDarknessSmokeProjectile")
		SHDW E 1 A_CPosRefire
		Goto Missile	
	Pain:
		SHDW H 0 A_JumpIfInventory("SummonShadow", 7, "FadePain")
		SHDW H 4
		SHDW H 4 A_Pain
		Goto See
	FadePain:
		SHDW H 0 A_SetTranslucent(0.2, 0)
		SHDW H 4 A_UnSetShootable
		SHDW H 4 A_Pain
		SHDW H 0 A_SetTranslucent(0.7, 0)
		SHDW H 0 A_SetShootable
		Goto See
	Death:
		SHDW I 6 A_Scream
		SHDW J 5
		SHDW K 5 A_SpawnItemEx("Shadowtorso", 0, 0, 0, 1, 0, 0, 0, 128)
		SHDW L 5 A_Fall
		SHDW MNO 6 
		SHDW P 300
        SHDW PPPPPPPPPPPP 2 A_FadeOut(0.1)
		Stop
	XDeath:
		SHDX A 8
		SHDX B 6 A_XScream
		SHDX C 6 
		SHDX D 6 A_Fall
 		SHDX E 6
 		SHDX F 6
		SHDX G 300
        SHDX GGGGGGGGGGGG 2 A_FadeOut(0.1)
		Stop
	}
}

ACTOR NecroShadowBall
{
	Radius 6
	Height 8
	Speed 25
	Damage ((random(1,8)*4)+(acs_executewithresult(556))-10+(25*acs_executewithresult(599,36)))
	Projectile
	+RANDOMIZE
	Species "Player"
	+THRUSPECIES
	+SEEKERMISSILE
	+NODAMAGETHRUST
	RenderStyle "ADD"
	Alpha 0.75
	SeeSound "Shadow/attack"
	DeathSound "imp/shotx"
	Decal DoomImpScorch
	States
	{
	Spawn: 
		SBAL ABC 4 BRIGHT A_SpawnItemEx("ShadowTrail", 0, 0, 0, 0, 0, 0, 0, 128)
		SBAL A 0 A_SeekerMissile(10,12)
		Loop
	Death:
		SBAL C 5 Bright
		SBAL DEFGH 4 BRIGHT
		Stop
	}
}

ACTOR NecroDarknessSmokeProjectile
{
   Radius 6
   Height 8
   Speed 15
   Damage (0)
   RENDERSTYLE ADD
   PROJECTILE
   +RIPPER
   +FORCEXYBILLBOARD
   +DOOMBOUNCE
   +BLOODLESSIMPACT
   Species "Player"
	+THRUSPECIES
   +NODAMAGETHRUST
   SeeSound "ability/darkness"
   Damagetype "Acolytehealing"
   BounceFactor 1.0
   BounceCount 7
   States
   {
   Spawn:
	  TNT1 A 0 Bright A_Explode(3+(acs_executewithresult(556))/2-5+(5*acs_executewithresult(599,36)),64,0)
	  TNT1 A 1 Bright A_SpawnItemEx("DarkNessSmoke", 0, random (-4, 4), random (-4, 4), 0, random (-2, 2), random (-2, 2), 0, 160)
      loop
   Death:
      TNT1 A 1 Bright
      stop
   }
}

ACTOR ShadowGhostA
{
	Radius 4
	Height 8
	Speed 0
	Damage 0
	Mass 75
	RenderStyle "Translucent"
	Alpha 0.3
	PROJECTILE
	States
	{
	Spawn:
		SHDW A 10
		Stop
	}
}

ACTOR ShadowGhostB : ShadowGhostA
{
	States
	{
	Spawn:
		SHDW B 10
		Stop
	}
}

ACTOR ShadowGhostC : ShadowGhostA
{
	States
	{
	Spawn:
		SHDW C 10
		Stop
	}
}

ACTOR ShadowGhostD : ShadowGhostA
{
	States
	{
	Spawn:
		SHDW D 10
		Stop
	}
}

ACTOR Shadowtorso
{
	Radius 12
	Height 15
	Speed 1
	Mass 5000
	RenderStyle "Translucent"
	alpha 0.7
	+Doombounce
      States
	{
	Spawn:
         SHDW QRS 5
         SHDW T 5 A_Fall
         SHDW U 5
         SHDW V 300
         SHDW VVVVVVVVVVVV 2 A_FadeOut(0.1)
         Stop
	}
}

actor ShadowTrail
{
    Radius 1
    Height 1
    Speed 0
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.6
    +NOCLIP
    States
    {
    Spawn:
     SHTR ABCDEF 4 Bright
        Stop       
    }
}



//Blight
Actor Blight : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Blight upgraded!"
  Inventory.MaxAmount 10
}

Actor UseBlight : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 ACS_ExecuteAlways(972)
		Stop
	}
}

Actor BlightInEffect : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor BlightTimer : Inventory
{
	Inventory.MaxAmount 10
	+INVENTORY.UNDROPPABLE
}

Actor BlightFXItem : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_SpawnItemEx("BlightFX", random(-16,16), random(-16,16), random(16,34), 0, 0, 0.5*random(2,5), 0, 128, 32)
		Stop
	}
}

ACTOR BlightFX
{
    Projectile
	+NOCLIP
	+CLIENTSIDEONLY
    Scale 0.2
    RenderStyle Add
    Alpha 0.75
    States
    {
    Spawn:
	TNT1 A 0
	TNT1 A 0 A_Jump(256,1,2,3,4)
	BCFX BCDEFGHIJKLMN 3 A_FadeOut(0.06)
	Stop
    }
}

Actor Terrify : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Terrify upgraded!"
  Inventory.MaxAmount 10
}

Actor TerrifyEffectItem : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_SpawnItemEx("TerrifyEffectPuff", random(-16,16), random(-16,16), random(16,34), 0, 0, 0.5*random(2,5), 0, 128, 32)
		Stop
	}
}

Actor TerrifyEffectPuff
{
	Projectile
	+NOCLIP
	+CLIENTSIDEONLY
	Damage 0
	RenderStyle Add
	//Alpha 0.45
	Scale 0.3
	States
	{
	Spawn:
		TNT1 A 2
		PUF2 BDFHJLNPRTVXZ 1
		PUF3 B 1 A_FadeOut(0.2)
		Wait
	}
}

Actor UseTerrify : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 ACS_ExecuteAlways(973)
		Stop
	}
}

Actor SummonGhoul : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Summon Ghoul upgraded!"
  Inventory.MaxAmount 10
}

ACTOR NecromancerGhoul
{ 
Health 250 
PainChance 24
Speed 9 
Radius 24 
Height 56 
Mass 320
Meleerange 52
MONSTER
BloodColor "20 60 20"
+FLOORCLIP
+DONTHURTSPECIES
Species "Player"
+THRUSPECIES
+FRIENDLY
+QUICKTORETALIATE
-COUNTKILL
+NOBLOCKMONST
+NODAMAGETHRUST
RadiusDamageFactor 0.1
Obituary "A Ghoul poisoned %o with it's toxic projectiles."
HitObituary "%o was beaten to death by a ghoul."
SeeSound "monster/ghlsit" 
PainSound "monster/ghlpai" 
DeathSound "monster/ghldth" 
ActiveSound "monster/ghlact"
States 
   { 
   Spawn:
		GHUL AA 0 ACS_ExecuteAlways(969)
	Idle:
       GHUL AB 10 A_Look 
       Goto See 
   See: 
	   GHUL A 0 A_JumpIfTargetinLOS(2, 140)
	   GHUL A 0 A_Jump(50, "Giveup")
       GHUL AABBCCDD 2 A_Chase 
       Loop 
   Giveup:
	   GHUL A 0 A_ClearTarget
	   Goto See
   Melee:
       GHUL E 0 A_Jump(128,5)
       GHUL E 6 A_FaceTarget
       GHUL F 0 A_PlaySound("monster/ghlswg")
       GHUL F 6 A_FaceTarget
       GHUL G 5 A_CustomMeleeAttack(random(1,8)*4+(25*acs_executewithresult(516,12))+(4*ACS_ExecuteWithResult(510,0,0,0))-40,"monster/ghlhit")
       Goto See
       GHUL R 6 A_FaceTarget
       GHUL S 0 A_PlaySound("monster/ghlswg")
       GHUL S 6 A_FaceTarget
       GHUL T 5 A_CustomMeleeAttack(random(1,8)*4+(25*acs_executewithresult(516,12))+(4*ACS_ExecuteWithResult(510,0,0,0))-40,"monster/ghlhit")
       Goto See
   Missile:
	   GHUL Q 0 A_JumpIfCloser(178, "PoisonNovaMissile")
	   GHUL Q 0 A_CheckFloor(2)
	   GHUL Q 0 A_Jump(256, "See")
	   GHUL Q 0 A_JumpIfCloser(450, "GhoulCharge")
	   GHUL Q 0 A_JumpIfInventory("SummonGhoul", 4, 2)
	   GHUL Q 0 A_Jump(256, "See")
       GHUL Q 10 A_FaceTarget 
       GHUL Q 0 A_CustomMissile ("NecroGhoulShot",44,-16,0,0,0)
       GHUL Q 8 A_CustomMissile ("NecroGhoulShot",44,16,0,0,0)
       Goto See
   PoisonNovaMissile:
	   GHUL Q 0 A_JumpIfInventory("SummonGhoul", 7, 1)
	   Goto GhoulCharge
       GHUL Q 10 A_FaceTarget 
       GHUL Q 8 A_CustomMissile ("NecroGhoulPoisonNovaSpawner",44,16,0,0,0)
       Goto See
   GhoulCharge:
		GHUL A 3 A_FaceTarget
		GHUL A 0 A_SkullAttack(22)
		GHUL A 20
		GHUL A 0 A_Gravity
		GHUL A 0 A_Stop
		Goto See
   Pain: 
       GHUL H 2 
       GHUL H 2 A_Pain 
       Goto See 
   Death: 
       GHUL I 5
       GHUL J 5 A_Scream 
       GHUL K 5 
       GHUL L 5 A_NoBlocking 
       GHUL M 5 
       GHUL N 5
       GHUL O 5
       GHUL P 300
	   GHUL PPPPPPPPPP 2 A_FadeOut(0.1)
       Stop 
   } 
}

ACTOR NecroGhoulPoisonNovaSpawner
{
    PROJECTILE
    +NODAMAGETHRUST
	+RIPPER
	+BLOODLESSIMPACT
	+FLOORHUGGER
    Speed 0
    Damage 0
    Radius 10
    Height 14
    RenderStyle Add
	Damagetype "Acolytehealing"
    States
    {
    Spawn:
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,0,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,8,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,16,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,24,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,32,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,40,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,48,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,56,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,64,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,72,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,80,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,88,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,96,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,104,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,112,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,120,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,128,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,136,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,144,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,152,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,160,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,168,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,176,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,184,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,192,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,200,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,208,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,216,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,224,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,232,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,240,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,248,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,256,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,264,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,272,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,280,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,288,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,296,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,304,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,312,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,320,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,328,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,336,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,344,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,352,6,0)
	TNT1 A 0 A_PlaySound("PoisonNova/Boom")
	TNT1 A 1 A_Explode(128+(acs_executewithresult(556))+(30*ACS_ExecuteWithResult(599,37)),175,0)
	Stop
	Death:
	TNT1 A 1
	Stop
    }
}

ACTOR NecroGhoulShot
{
   Radius 6
   Height 8
   Speed 21
   Damage ((random(1,8)*2)+(acs_executewithresult(556))/2-5+(10*acs_executewithresult(599,37)))
   DamageType poison
   PoisonDamage 32
   RENDERSTYLE ADD
   PROJECTILE
   +THRUGHOST
   +FORCEXYBILLBOARD
   Species "Player"
	+THRUSPECIES
   +NODAMAGETHRUST
   Seesound "implord/poisonballfire"
   DeathSound "impwar/poison"
   States
   {
   Spawn:
      FVUL AAABBB 1 Bright A_SpawnItemEx("CStaffTrail",0,0,0,0,0,0,0,128,0)
      loop
   Death:
      FVUL CDEF 4 Bright
      stop
   }
}

Actor Darkness : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Darkness upgraded!"
  Inventory.MaxAmount 10
}

Actor UseDarkness : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_JumpIfInventory("Darkness", 7, 3)
		TNT1 A 0 A_JumpIfInventory("Darkness", 4, 3)
		TNT1 A 0 A_Jump(256, 3)
		TNT1 A 0 Bright A_FireCustomMissile ("DarknessSmokeProjectile",random(-4,4),0)
		TNT1 A 0 Bright A_FireCustomMissile ("DarknessSmokeProjectile",random(-4,4),0)
		TNT1 A 0 Bright A_FireCustomMissile ("DarknessSmokeProjectile",0,0)
		Stop
	}
}

ACTOR DarknessSmokeProjectile
{
   Radius 6
   Height 8
   Speed 15
   Damage (0)
   RENDERSTYLE ADD
   PROJECTILE
   +RIPPER
   +FORCEXYBILLBOARD
   +DOOMBOUNCE
   +BLOODLESSIMPACT
   SeeSound "ability/darkness"
   BounceFactor 1.0
   BounceCount 7
   States
   {
   Spawn:
	  TNT1 A 0 Bright A_Explode(3+(acs_executewithresult(556))/2-5+(5*acs_executewithresult(599,38)),64,0)
	  TNT1 A 1 Bright A_SpawnItemEx("DarkNessSmoke", 0, random (-4, 4), random (-4, 4), 0, random (-2, 2), random (-2, 2), 0, 160)
      loop
   Death:
      TNT1 A 1 Bright
      stop
   }
}

Actor DarkNessSmoke
{
  Radius 2
  Height 2
  +NOINTERACTION
  -SOLID
  +NOCLIP
  +CLIENTSIDEONLY
  PROJECTILE
  RenderStyle Translucent
  Scale 1.5
  Alpha 0.5
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump (256, "Blot1", "Blot2", "Blot3", "Blot4")
  Blot1:
    BLOT A 2 
    BLOT B 2 A_SetTranslucent (0.4, 0)
    BLOT C 2 A_SetTranslucent (0.3, 0)
    BLOT D 2 A_SetTranslucent (0.2, 0)
    BLOT E 2 A_SetTranslucent (0.1, 0)
    stop
  Blot2:
    BLOT F 2 
    BLOT G 2 A_SetTranslucent (0.4, 0)
    BLOT H 2 A_SetTranslucent (0.3, 0)
    BLOT I 2 A_SetTranslucent (0.2, 0)
    BLOT J 2 A_SetTranslucent (0.1, 0)
    stop
  Blot3:
    BLOT K 2 
    BLOT L 2 A_SetTranslucent (0.4, 0)
    BLOT M 2 A_SetTranslucent (0.3, 0)
    BLOT N 2 A_SetTranslucent (0.2, 0)
    BLOT O 2 A_SetTranslucent (0.1, 0)
    stop
  Blot4:
    BLOT P 2 
    BLOT Q 2 A_SetTranslucent (0.4, 0)
    BLOT R 2 A_SetTranslucent (0.3, 0)
    BLOT S 2 A_SetTranslucent (0.2, 0)
    BLOT T 2 A_SetTranslucent (0.1, 0)
    stop
  }
}

Actor PoisonBlast : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Poison Blast upgraded!"
  Inventory.MaxAmount 10
}

Actor UsePoisonBlast : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_JumpIfInventory("PoisonBlast", 7, 3)
		TNT1 A 0 A_JumpIfInventory("PoisonBlast", 4, 4)
		TNT1 A 0 A_Jump(256, 5)
		TNT1 AAAA 0 Bright A_FireCustomMissile ("ChaosBlast",0,0,0,8,0)
		TNT1 A 0 Bright A_FireCustomMissile ("ChaosBlast2",0,0,0,8,0)
		Stop
	}
}

Actor ChaosBlast
{
	Speed 25
	Radius 6
  Height 8
	Damage (random(1,8)*7+(acs_executewithresult(556))-10+(4*acs_executewithresult(599,39)))
	Projectile 
  +RANDOMIZE
  Species "Player"
	+THRUSPECIES
  Seesound "implord/poisonballfire"
   DeathSound "implord/shieldshothit"
  RenderStyle Add
  Alpha 1
	States
  {
  Spawn:
    PBOL AAAABBBB 1 Bright A_CStaffMissileSlither
    Loop
  Death:
    PBOL C 8 Bright A_Explode(128+(acs_executewithresult(556))-10+(4*acs_executewithresult(599,38)),128,0)
    PBOL D 6 Bright
    PBOL E 4 Bright
    Stop
  }
}

Actor ChaosBlast2 : ChaosBlast
{
	States
  {
  Spawn:
    PBOL AAAABBBB 1 Bright //A_CStaffMissileSlither
    Loop
  }
}

Actor Chaos : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Chaos upgraded!"
  Inventory.MaxAmount 10
}

Actor UseChaos : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 ACS_ExecuteAlways(975)
		Stop
	}
}

Actor ChaosEffectItem : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_SpawnItemEx("ChaosEffectPuff", random(-16,16), random(-16,16), random(16,34), 0, 0, 0, 0, 128, 32)
		TNT1 A 0 A_SpawnItemEx("ChaosRadius")
		Stop
	}
}

ACTOR ChaosEffectPuff
{
    Projectile
	+NOCLIP
	+CLIENTSIDEONLY
    RenderStyle Add
    Alpha 0.5
	Scale 0.67
    States
    {
    Spawn:
	SKP1 ABCDEF 3 Bright
	Stop
    }
}

Actor ChaosChecker : Inventory
{
	Inventory.MaxAmount 10
}

Actor ChaosRadius
{
	Speed 0
	Radius 6
	Height 8
	Damage 10
	Projectile
	+RIPPER
	+BLOODLESSIMPACT
	+NODAMAGETHRUST
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Explode(3,256+10*acs_executewithresult(599,40),0)
		Goto Death
	Death:
		TNT1 A 1
		Stop
	}
}

Actor SummonRevenant : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Summon Revenant upgraded!"
  Inventory.MaxAmount 10
}

ACTOR NecromancerIncarnate
{ 
Obituary "%o couldn't escape a Death Incarnate's Blast."
HitObituary "%o was beaten to death by a Death Incarnate."
SeeSound "monster/incsit" 
PainSound "skeleton/pain" 
DeathSound "monster/incdth" 
ActiveSound "monster/incact"
Health 300
  Radius 20
  Height 56
  Mass 500
  Speed 10
  PainChance 100
  Monster
  MeleeRange 78
  +MISSILEMORE 
  +FLOORCLIP
  +FRIENDLY
  +DONTHURTSPECIES
	Species "Player"
	+THRUSPECIES
	+QUICKTORETALIATE
-COUNTKILL
+NOBLOCKMONST
+NODAMAGETHRUST
RadiusDamageFactor 0.1
States 
   { 
   Spawn:
		INCA AA 0 ACS_ExecuteAlways(969)
	Idle:
       INCA AB 10 A_Look 
       Goto See
   Giveup:
	   INCA A 0 A_ClearTarget
	   Goto See
   See: 
	   INCA A 0 A_JumpIfTargetinLOS(2, 140)
	   INCA A 0 A_Jump(50, "Giveup")
       INCA AABBCCDDEEFF 2 A_Chase 
       Loop 
   Melee:
       INCA G 0 A_Jump(128,5)
       INCA G 0 A_FaceTarget 
       INCA G 6
       INCA H 6 A_FaceTarget 
       INCA I 6 A_CustomMeleeAttack(random(1,10)*6 + (20*acs_executewithresult(516,13))+(2*ACS_ExecuteWithResult(510,0,0,0))-20,"monster/inchit","none")
       Goto See
       INCA R 0 A_FaceTarget 
       INCA R 6
       INCA S 6 A_FaceTarget 
       INCA T 6 A_CustomMeleeAttack(random(1,10)*6 + (20*acs_executewithresult(516,13))+(2*ACS_ExecuteWithResult(510,0,0,0))-20,"monster/inchit","none")
       Goto See 
   Missile:
	   INCA J 0 A_Jump(178,"IncarnateStun","Enfeeble","Chaos","Terrify")
       INCA J 10 A_FaceTarget
       INCA J 10 A_FaceTarget
	   INCA J 0 A_PlaySound("monster/incatk")
       INCA U 10 Bright A_CustomMissile("NecroIncarnateBlast")
       INCA K 10 A_FaceTarget
       Goto See
   Enfeeble:
	   INCA J 0 A_JumpIfInventory("Enfeeble", 1, 1)
	   Goto Missile+1
       INCA J 10 A_FaceTarget
       INCA J 10 A_FaceTarget
	   INCA J 0 A_PlaySound("ability/enfeeble")
       INCA U 10 Bright ACS_ExecuteAlways(970)
       INCA K 10 A_FaceTarget
       Goto See
   Chaos:
       INCA J 0 A_JumpIfInventory("Chaos", 1, 1)
	   Goto Missile+1
       INCA J 10 A_FaceTarget
       INCA J 10 A_FaceTarget
	   INCA J 0 A_PlaySound("ability/chaos")
       INCA U 10 Bright ACS_ExecuteAlways(975)
       INCA K 10 A_FaceTarget
       Goto See 
   Terrify:
	   INCA J 0 A_JumpIfInventory("Terrify", 1, 1)
	   Goto Missile+1
       INCA J 10 A_FaceTarget
       INCA J 10 A_FaceTarget
	   INCA J 0 A_PlaySound("whiteballbsee")
       INCA U 10 Bright ACS_ExecuteAlways(973)
       INCA K 10 A_FaceTarget
       Goto See 
   IncarnateStun:
	   INCA J 0 A_JumpIfInventory("SummonRevenant", 4, 1)
	   Goto Missile+1
       INCA J 10 A_FaceTarget
       INCA U 0 A_FaceTarget
	   INCA U 0 A_PlaySound("monster/incatk")
	   INCA U 2 Bright A_CustomMissile("NecroIncarnateBlastStun")
       INCA U 1 Bright A_CPOSRefire
	   INCA U 0 A_Jump(16,"See")
       Goto IncarnateStun+2
   Pain: 
       INCA L 5 
       INCA L 5 A_Pain 
       Goto See 
   Death:
       INCA LM 7 
       INCA N 7 A_Scream 
       INCA O 7 A_NoBlocking 
       INCA P 7 
       INCA QQQQQQQQQQQQ 2 A_FadeOut(0.1)
      Stop
   XDeath: 
       INCX A 10 Bright A_Playsound("monster/incexp")
       INCX BC 5 Bright
       INCX D 5 Bright A_NoBlocking
       INCX EFGHIJ 5 Bright
       INCX KKKKKKKKKKKK 2 A_FadeOut(0.1)
	   Stop
   } 
}

ACTOR NecroIncarnateBlast : FastProjectile
{
   Damage ((random(1,8)*10)+(acs_executewithresult(556))+(25*acs_executewithresult(599,41)))
   Radius 1
   Height 1
   Speed 250
   PROJECTILE
   +BLOODSPLATTER
   Species "Player"
	+THRUSPECIES
   Renderstyle Normal
   Alpha 1.0
   States
   {
   Spawn:
      TNT1 A 3
      loop
   Death:
	  TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("PunishmentBoom", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("PunishmentBoom", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("PunishmentBoom", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("PunishmentBoom", 0, 0, 0, 0, 0, 0, 0, 128, 0)
	  TNT1 C 0 A_RadiusThrust(1000+(acs_executewithresult(556))*100+(450*acs_executewithresult(599,41)),48,0)
	  TNT1 CDEF 4 Bright
	  Stop
   Crash:
      TNT1 A 1
      stop
   }
}

ACTOR NecroIncarnateBlastStun : FastProjectile
{
   Damage (1)
   Radius 1
   Height 1
   Speed 250
   PROJECTILE
   +BLOODSPLATTER
   Species "Player"
	+THRUSPECIES
   Renderstyle Add
   Alpha 1.0
   States
   {
   Spawn:
      TNT1 A 3
      loop
   Death:
	  BLVB CDEF 4 Bright
	  Stop
   Crash:
      TNT1 A 1
      stop
   }
}

Actor PoisonNova : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Poison Nova upgraded!"
  Inventory.MaxAmount 10
}

Actor UsePoisonNova : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_FireCustomMissile("PoisonNovaSpawner", 0, 0, 0, 0, 1)
		Stop
	}
}

ACTOR PoisonNovaSpawner
{
    PROJECTILE
    +NODAMAGETHRUST
	+RIPPER
	+BLOODLESSIMPACT
	+FLOORHUGGER
    Speed 0
    Damage 0
    Radius 10
    Height 14
    RenderStyle Add
    States
    {
    Spawn:
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,0,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,8,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,16,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,24,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,32,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,40,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,48,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,56,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,64,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,72,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,80,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,88,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,96,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,104,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,112,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,120,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,128,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,136,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,144,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,152,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,160,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,168,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,176,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,184,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,192,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,200,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,208,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,216,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,224,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,232,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,240,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,248,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,256,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,264,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,272,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,280,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,288,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,296,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,304,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,312,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,320,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,328,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,336,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,344,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,352,6,0)
	TNT1 A 0 A_PlaySound("PoisonNova/Boom")
	TNT1 A 1 A_Explode(128+(acs_executewithresult(556))+(30*ACS_ExecuteWithResult(599,42)),175,0)
	Stop
	Death:
	TNT1 A 1
	Stop
    }
}

ACTOR PoisonNovaExplosion
{
    Mass 1
    Radius 1
    Height 1
    Speed 5
    Damage 0
    RenderStyle Add
    PROJECTILE
	+FLOORHUGGER
	+NOINTERACTION
	+CLIENTSIDEONLY
	+NOCLIP
    States
    {
    Spawn:
	TNT1 A 0
        PNOV ABCDEFGHIJKLMOP 2 Bright
        Stop
    }
}

Actor Miasma : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Miasma upgraded!"
  Inventory.MaxAmount 10
}

Actor UseMiasma : CustomInventory
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	States
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("MiasmaEffects", random(-200,200), random(-200,200), 0, 0, 0, 4, random(0,359))
		TNT1 A 0 A_SpawnItemEx("MiasmaEffects", random(-200,200), random(-200,200), 0, 0, 0, 4, random(0,359))
		TNT1 A 0 A_SpawnItemEx("MiasmaEffects2", random(-200,200), random(-200,200), 0, 0, 0, 2, random(0,359))
		TNT1 A 0 A_SpawnItemEx("MiasmaEffects3", random(-200,200), random(-200,200), 0, 0, 0, 0, random(0,359))
		TNT1 A 0 A_SpawnItemEx("MiasmaEffects3", random(-200,200), random(-200,200), 0, 0, 0, 0, random(0,359))
		Stop
	}
}

Actor MiasmaEffects
{
  Speed 0
  VSpeed 13
  Radius 8
  Height 4
  Damage (1)
  scale 0.5
  Gravity 0.5
  RenderStyle Add
  //Alpha 0.6
  +NOBLOCKMAP
  +DROPOFF
  +MISSILE
  +NOTELEPORT
  //+RIPPER
  +NOGRAVITY
  +FRIENDLY
  Obituary "%k was too hot for %o"
  States
  {
  Spawn:
	D2FX GG 0 A_Explode(4+(acs_executewithresult(556))+(4*acs_executewithresult(599,43)),48,0)
    D2FX GHIJKL 3 //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    stop
  Death:
    TNT1 A 1 //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    Stop
  }
}
Actor MiasmaEffects2
{
  Speed 0
  VSpeed 6
  Radius 8
  Height 4
  Damage 0
  scale 0.25
  Gravity 0.5
  RenderStyle Add
  //Alpha 0.6
  +NOBLOCKMAP
  +DROPOFF
  +MISSILE
  +NOTELEPORT
  +PAINLESS
  +RIPPER
  +NOGRAVITY
  +CLIENTSIDEONLY
  States
  {
  Spawn:
    D2FX GHIJKL 2 //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    stop
  Death:
    TNT1 A 1 //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    Stop
  }
}
Actor MiasmaEffects3
{
  Speed 0
  VSpeed 0
  Radius 8
  Height 4
  Damage 0
  scale 0.25
  Gravity 0.5
  RenderStyle Add
  //Alpha 0.6
  +NOBLOCKMAP
  +DROPOFF
  +MISSILE
  +NOTELEPORT
  +RIPPER
  +PAINLESS
  +NOGRAVITY
  +CLIENTSIDEONLY
  States
  {
  Spawn:
    FSFX NOPQRSTUVW 3 //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    stop
  Death:
    TNT1 A 1 //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    Stop
  }
}

Actor Miasmaing : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor Drain : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Drain upgraded!"
  Inventory.MaxAmount 10
}

actor UseDrain : PowerupGiver
{
 inventory.maxamount 0
 powerup.type "Sap"
 +AUTOACTIVATE
}

Actor Sapping : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor PowerSap : PowerDrain
{
	Powerup.Duration -500000000
	Inventory.Icon "DRANICON"
}

Actor SapEffects
{
 +Missile
 +NoGravity
 +NoBlockmap
 +NoInteraction
 -Solid
 +CLIENTSIDEONLY
 VSpeed 6
 Radius 0
 Height 0
 RenderStyle Add
 Alpha 0.03
 Scale 0.37
 //translation "80:111=196:207"
 States
 {
  Spawn:
   SPFX J 0
   SPFX JJJJJ 1 Bright A_FadeIn(0.2)
   SPFX JJJJJJJJJJJJJJJJ 1 Bright A_FadeOut(0.06)
   Stop
 }
}

Actor SummonDeathKnight : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Summon Death Knight upgraded!"
  Inventory.MaxAmount 10
}

ACTOR NecromancerDeathknight
{ 
Health 250
Radius 24
Height 72
Mass 700 
Speed 8
PainChance 20 
MeleeRange 78
MONSTER
+FLOORCLIP 
+FRIENDLY
Species "Player"
+THRUSPECIES
+QUICKTORETALIATE
-COUNTKILL
+NOBLOCKMONST
RadiusDamageFactor 0.1
Obituary "%o got thought he could kill a deathknight."
HitObituary "A Deathknight hacked %o into pieces." 
SeeSound "monster/dknsit" 
PainSound "monster/dknpai" 
DeathSound "monster/dkndth" 
ActiveSound "monster/dknact" 
States 
   { 
   Spawn:
		DKNT AA 0 ACS_ExecuteAlways(969)
	Idle: 
       DKNT AB 10 A_Look 
       Loop 
   Giveup:
	   DKNT A 0 A_ClearTarget
	   Goto See
   See: 
	   DKNT A 0 A_JumpIfTargetinLOS(2, 140)
	   DKNT A 0 A_Jump(50, "Giveup")
       DKNT A 0 A_Jump(32,"See2")
       DKNT A 0 A_UnSetInvulnerable
       DKNT AABBCCDD 3 A_Chase
       Goto See
   See2:
       DKNT P 0 A_SetInvulnerable
       DKNT PPQQRRSS 3 A_Chase
       DKNT S 0 A_Jump(64,"See")
       goto see2
   Melee:
       DKNT E 0 A_UnSetInvulnerable
       DKNT E 6 A_FaceTarget
       DKNT F 1 A_Playsound ("monster/dknswg")
       DKNT F 6 A_FaceTarget
       DKNT G 6 A_CustomMeleeAttack(random(1,10)*6 + (15*acs_executewithresult(516,14))+(3*ACS_ExecuteWithResult(510,0,0,0))-30,"monster/dknhit","none")
       Goto See
   Missile:
       DKNT A 0 A_FaceTarget
       DKNT A 0 A_Jump(256,"Missile1","Missile2","Missile3")
   Missile1:
       DKNT E 0 Bright A_UnSetInvulnerable
       DKNT E 6 Bright A_FaceTarget
       DKNT F 6 Bright A_Playsound ("monster/kntswg")
       DKNT G 0 Bright A_CustomMissile ("NDKDart",32,0,-3,0)
       DKNT G 0 Bright A_CustomMissile ("NDKDart",32,0,-1,0)
       DKNT G 0 Bright A_CustomMissile ("NDKDart",32,0,1,0)
       DKNT G 5 Bright A_CustomMissile ("NDKDart",32,0,3,0)
       DKNT A 0 A_Jump(64,"Missile2")
       Goto See
   Missile2:
       DKNT T 0 Bright A_SetInvulnerable
       DKNT T 6 Bright A_FaceTarget
       DKNT U 1 Bright A_FaceTarget
       DKNT U 0 Bright A_CustomMissile("NFHeadShot",44,-4,-12,0)      
       DKNT U 5 Bright A_CustomMissile("NFHeadShot",44,-4,12,0)
       DKNT U 0 Bright A_UnSetInvulnerable
       DKNT U 0 A_Jump(64,"Missile3")
       Goto See
   Missile3:
       DKNT T 0 Bright A_SetInvulnerable
       DKNT T 3 Bright A_FaceTarget      
       DKNT U 3 Bright A_CustomMissile("NDKbolt",44,-4,random(-7,7),0)
       DKNT T 3 Bright A_FaceTarget      
       DKNT U 3 Bright A_CustomMissile("NDKbolt",44,-4,random(-7,7),0)
       DKNT T 3 Bright A_FaceTarget      
       DKNT U 3 Bright A_CustomMissile("NDKbolt",44,-4,random(-7,7),0)
       DKNT T 3 Bright A_FaceTarget      
       DKNT U 3 Bright A_CustomMissile("NDKbolt",44,-4,random(-7,7),0)
       DKNT T 3 Bright A_FaceTarget      
       DKNT U 3 Bright A_CustomMissile("NDKbolt",44,-4,random(-7,7),0)
       DKNT T 3 Bright A_FaceTarget      
       DKNT U 2 Bright A_CustomMissile("NDKbolt",44,-4,random(-7,7),0)
       DKNT U 0 Bright A_UnSetInvulnerable
       Goto See
   Pain:
       DKNT H 2
       DKNT H 2 A_Pain
       DKNT H 0 A_Jump(64,"Defend")
       Goto See
   Defend:
       DKNT T 105 A_SetInvulnerable
       DKNT T 0 A_UnSetInvulnerable
       DKNT P 0 A_Jump(16,1)
       Goto See+12
       DKNT A 0
       Goto See
   Death:
       DKNT I 0 Bright A_CustomMissile("NDKSword",44,32,-90,0)
       DKNT I 8 Bright A_CustomMissile("NDKShield",44,-32,90,0)
       DKNT J 8 Bright A_Scream 
       DKNT K 8 Bright
       DKNT L 8 Bright A_NoBlocking 
       DKNT MN 8 Bright 
       DKNT O -1 
       Stop 
   Raise: 
       DKNT ONMLKJI 8 Bright
       Goto See 
   } 
}

ACTOR NFHeadShot
{
   Radius 12
   Height 12
   Speed 15
   Damage ((random(1,8)*3)+(acs_executewithresult(556))+(10*acs_executewithresult(599,44)))
   RENDERSTYLE ADD
   ALPHA 1.00
   PROJECTILE
   DamageType Fire
   +SEEKERMISSILE
   +THRUGHOST
   +FORCEXYBILLBOARD
	Species "Player"
	+THRUSPECIES
   Seesound "monster/dknmsl"
   DeathSound "weapons/boom1"
   States
   {
   Spawn:
      SBS1 ABCD 3 Bright A_SeekerMissile (5,15)
      loop
   Death:
      RIP1 DEFGH 5 Bright
      stop
   }
}

ACTOR NDKDart
{
   Radius 3
   Height 12
   Speed 25
   Damage ((random(1,8)*2)+(acs_executewithresult(556))+(3*acs_executewithresult(599,44)))
   DamageType "Acolytehealing"
   RENDERSTYLE ADD
   ALPHA 1.00
   PROJECTILE
   +FORCEXYBILLBOARD
	Species "Player"
	+THRUSPECIES
   Seesound "monster/dkndrt"
   DeathSound "weapons/firex2"
   States
   {
   Spawn:
      DKAT ABC 3 Bright
      loop
   Death:
      DKAT D 0 Bright A_SetTranslucent (0.85,1)
      DKAT D 3 Bright
      DKAT E 3 Bright A_Explode(20+(acs_executewithresult(556))+(2*acs_executewithresult(599,44)),64,0)
      DKAT FG 3 Bright
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,45,2)
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,90,2)
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,135,2)
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,180,2)
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,225,2)
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,270,2)
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,315,2)
      DKAT H 3 Bright A_CustomMissile("NDKFire",0,0,0,2)
      DKAT IJKLM 3 Bright
      stop
   }
}

ACTOR NDKbolt
{
   Radius 8
   Height 8
   Speed 15
   Damage ((random(1,8))+(acs_executewithresult(556))+(2*acs_executewithresult(599,44)))
   PROJECTILE
   RENDERSTYLE ADD
   ALPHA 0.80
   DamageType Fire
   +FORCEXYBILLBOARD
Species "Player"
	+THRUSPECIES
   SeeSound "Weapons/boltfi"
   DeathSound "weapons/firex4"
   States
   {
   Spawn:
      BOLT A 1 Bright A_BishopMissileWeave
      BOLT A 0 A_SpawnItemEx("RedPuff",0,0,0,0,0,0,0,128,0)
      loop
   Death:
      MSP2 EFGHI 2 Bright
      stop
   }
}

ACTOR NDKFire
{
   Radius 2
   Height 6
   Speed 4
   Damage 0
   RENDERSTYLE ADD
   ALPHA 0.95
   PROJECTILE
   +DONTSPLASH
   Damagetype "Acolytehealing"
Species "Player"
	+THRUSPECIES
   DeathSound "weapons/scorch"
   States
   {
   Spawn:
      DKAT NOPQRSTNOPQRSTNOPQRST 1 Bright A_Explode(2+(acs_executewithresult(556)/3)+(acs_executewithresult(599,41)),8,0)
      goto death
   Death:
      DKAT UVW 3 Bright
      stop
   }
}

ACTOR NDKShield
{   
   Radius 8
   Height 8
   Speed 1
   PROJECTILE
   RENDERSTYLE Normal
   -NOGRAVITY
   +LOWGRAVITY
   +FORCEXYBILLBOARD
   States
   {
   Spawn:
      SHLD ABCDEFGHI 3
      goto death 
   Death:
      SHLD HHHHHHHHHH 2 A_FadeOut(0.1)
	  Stop
   }
}

ACTOR NDKSword
{   
   Radius 8
   Height 8
   Speed 1
   PROJECTILE
   RENDERSTYLE Normal
   -NOGRAVITY
   +LOWGRAVITY
   +FORCEXYBILLBOARD
   States
   {
   Spawn:
      SWRD KLMNOPQ 3 BRIGHT
      goto Death 
   Death:
      SWRD RS 4 BRIGHT
      SWRD T 4 BRIGHT
      SWRD U 4
      SWRD T 4 BRIGHT
      SWRD U 8
      SWRD T 4 BRIGHT
      SWRD U 16
      SWRD T 4 BRIGHT
      SWRD U 2 A_FadeOut(0.1)
	  Wait
   }
}

Actor BoneShower : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTITHUN"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Bone Shower upgraded!"
  Inventory.MaxAmount 10
}

Actor UseBoneShower : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AutoActivate
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_FireCustomMissile("BoneShowerSpawner")
		Stop
	}
}

actor BoneShowerSpawner
{
+SKYEXPLODE
PROJECTILE
-SOLID
+NOGRAVITY
+CEILINGHUGGER
SeeSound "ability/boneshower"
radius 4
height 8
speed 13
Reactiontime 35
States
{
Spawn:
TNT1 A 0 A_SpawnItemEx("BoneStormFX",random(-70,70),random(-70,70),-1,0,0,-25)
TNT1 A 0 A_CountDown
TNT1 A 2
Loop
Death:
TNT1 A 1
Stop
}
}

actor BoneStormFX
{
PROJECTILE
damage (4+(acs_executewithresult(556))+(3*ACS_ExecuteWithResult(599,45)))
radius 3
+RANDOMIZE
Species "Player"
	+THRUSPECIES
height 6
Scale 0.67
DeathSound "ability/boneshardhit"
States
{
Spawn:
SPIK G 2 bright
loop
Death:
TNT1 AAAAAAAAA 0 A_SpawnItemEx("BoneShardParticle",0,0,0,random(1,-1),random(1,-1),random(1,-1),random(0,360),0)
TNT1 A 1 A_Explode(10+(acs_executewithresult(556))+(4*ACS_ExecuteWithResult(599,45)),27,0)
stop
}
}

ACTOR BoneShardParticle
{
    Radius 1
    Height 1
    +NOINTERACTION
    RenderStyle Add
    Alpha 0.7
    Scale 0.065
    States
    {
    Spawn:
	TNT1 A 0
	BNPT A 4 Bright A_FadeOut(0.09)
	Loop
    }
}

Actor Metamorph : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTITHUN"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Metamorphasis upgraded!"
  Inventory.MaxAmount 10
}

Actor Metamorphing : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

ACTOR NewMetamorphesisPlayer : PlayerPawn
{
  Speed 0.4
  Health 1500
  Radius 16
  Height 64
  Mass 2000
  RadiusDamageFactor 0.25
	Player.JumpZ 9.75
	Player.Viewheight 48
  Player.ColorRange 112, 127
  Player.DisplayName "Bruiser"
  player.damagescreencolor "33 FF 00"
  player.morphweapon "BruiserWeapon"
  DamageFactor "BruiserAttack",0
  Player.SoundClass "Mage"
  +NOSKIN
  -TELESTOMP
  Species "Player"
  DamageFactor AcolyteHealing, 0
	//Damagefactor "Falling", 1000
	Damagefactor "Suicide", 1000
	Damagefactor "Telefrag", 1000
	DamageFactor "Normal", 0.45
  States
  {
  Spawn:
   BOS4 A 1
   Loop
  See:
    BOS4 ABCD 4
    Goto Spawn
  Missile:
  Melee:
    BOS4 EFG 6
    Goto Spawn
  Pain:
    BOS4 Q 4
    BOS4 Q 4 A_Pain 
    Goto Spawn
  Death:
       BOS4 R 6 Bright
       BOS4 S 6 Bright A_Scream 
       BOS4 T 6 Bright 
       BOS4 U 6 Bright
       BOS4 VW 6 Bright 
       BOS4 X 6 Bright A_SpawnItemEx("ArchonSoul",0,0,86,0,0,3,0,128)
       BOS4 YZ 6 Bright 
       BOZ4 Z -1 Bright
       Stop
  }
}

ACTOR BruiserWeapon : Weapon
{
   +WEAPON.AMMO_OPTIONAL
   +CHEATNOTWEAPON
   +NOAUTOFIRE
   Weapon.KickBack 0
   States
   {
   Spawn:
      TNT1 A -1
      Loop
   Ready:
      BHND A 1 Bright A_WeaponReady
      loop
   Deselect:
      BHND A 0 A_Lower
      BHND A 1 Bright A_Lower
      Loop
   Select:
      BHND A 0 A_Raise
      BHND A 1 Bright A_Raise
      Loop
   Fire:
      TNT1 A 0 A_JumpIfInventory("BruiserAttackType",2,"Huggers")
      TNT1 A 0 A_JumpIfInventory("BruiserAttackType",1,"FireShower")
   Meteor:
	  BHND BCD 3 Bright
      BHND E 1 Bright A_FireCustomMissile("MetamorphBall",10,0,0,0)
      BHND E 1 Bright A_FireCustomMissile("MetamorphBall",5,0,0,0)
      BHND F 1 Bright A_FireCustomMissile("MetamorphBall",0,0,0,0)
      BHND F 1 Bright A_FireCustomMissile("MetamorphBall",-5,0,0,0)
      BHND F 1 Bright A_FireCustomMissile("MetamorphBall",-10,0,0,0)
	  BHND F 1 Bright
	  BHND GHZ 3 Bright
      TNT1 A 0 A_Refire
      Goto Ready
   FireShower:
	  BHND BCD 4 Bright
      BHND E 1 Bright A_FireCustomMissile("MetamorphBall",20,0,0,0)
      BHND E 1 Bright A_FireCustomMissile("MetamorphBall",15,0,0,0)
      BHND E 1 Bright A_FireCustomMissile("MetamorphBall",10,0,0,0)
      BHND E 1 Bright A_FireCustomMissile("MetamorphBall",5,0,0,0)
      BHND F 1 Bright A_FireCustomMissile("MetamorphBall",0,0,0,0)
      BHND F 1 Bright A_FireCustomMissile("MetamorphBall",-5,0,0,0)
      BHND F 1 Bright A_FireCustomMissile("MetamorphBall",-10,0,0,0)
	  BHND F 1 Bright
	  BHND GHZ 4 Bright
      TNT1 A 0 A_Refire
      Goto Ready
   Huggers:
	  BHND IJK 4 Bright
      BHND L 4 Bright A_FireCustomMissile("MetamorphComet",0,0,0,0)
	  BHND Z 15 Bright
      TNT1 A 0 A_Refire
      Goto Ready
   AltFire:
      TNT1 A 0 A_JumpIfInventory("BruiserAttackType",2,2)
	  TNT1 A 0 A_GiveInventory("BruiserAttackType",1)
	  Goto Ready
	  TNT1 A 0 A_TakeInventory("BruiserAttackType",2)
	  Goto Ready
   }
}

ACTOR MetamorphComet
{
   Radius 8
   Height 12
   Speed 25
   damage (20*(random(1,8))+(acs_executewithresult(556))+(25*ACS_ExecuteWithResult(599,46)))
   Scale 1.0
   SpawnID 251
   PROJECTILE
   RENDERSTYLE Normal
   +THRUGHOST
   Species "Player"
	+THRUSPECIES
   SeeSound "ArchonOfHell/Comet"
   DeathSound "ArchonOfHell/CometHit"
   Decal "Scorch"
   DONTHURTSHOOTER
   States
   {
   Spawn:
      ARCB AAAABBBBCCCC 1 Bright A_SpawnItemEx("ArchonCometTrail",0,0,0,0,0,0,0,128)
      loop
   Death:
      ARCB JJJJJJ 0 Bright A_SpawnItemEx("ArchonCometParticle", 0, 0, 0, (0.1)*Random(10, 35), 0, (0.1)*Random(-20, 20), Random(0, 360), 128)
      ARCB JJJJJJ 0 Bright A_SpawnItemEx("ArchonCometParticle", 0, 0, 0, (0.1)*Random(10, 35), 0, (0.1)*Random(-20, 20), Random(0, 360), 128)
      ARCB JJJJJJ 0 Bright A_SpawnItemEx("ArchonCometParticle", 0, 0, 0, (0.1)*Random(10, 35), 0, (0.1)*Random(-20, 20), Random(0, 360), 128)
      ARCB J 0 Bright A_SetTranslucent (0.67,1)
      ARCB J 3 Bright
      ARCB K 3 Bright A_Explode(96+(acs_executewithresult(556))+(25*ACS_ExecuteWithResult(599,46)),128,0)
      ARCB LMN 3 Bright
      stop
   }
}

Actor ArchonCometParticle
{
  Height 0
  Radius 0
  Mass 0
  +Missile
  +NoBlockMap
  +NoGravity
  +DontSplash
  +CLIENTSIDEONLY
  +NOINTERACTION
  +NOCLIP
  RenderStyle Add
  Scale 0.05
  States
  {
  Spawn:
    TNT1 A 1 Bright A_FadeOut(0.02)
    Loop
  }
}

ACTOR ArchonSoul
{   
   Radius 1
   Height 1
   Speed 3
   PROJECTILE
   +CLIENTSIDEONLY
	+NOINTERACTION
	+NOCLIP
   RENDERSTYLE ADD
   ALPHA 0.80
   States
   {
   Spawn:
      BFX1 ABCD 6 BRIGHT
      Stop 
   }
}

ACTOR ArchonCometTrail
{   
   Radius 3
   Height 3
   Scale 0.75
   Speed 0
   PROJECTILE
   +CLIENTSIDEONLY
  +NOINTERACTION
  +NOCLIP
   RENDERSTYLE ADD
   ALPHA 0.67
   States
   {
   Spawn:
      NULL A 3 Bright
      ARCB DEFGHI 3 BRIGHT
      Stop 
   }
}

Actor MetamorphBall
{
  Radius 6
  Height 16
  Speed 20
  damage (8*(random(1,8))+(acs_executewithresult(556))+(4*ACS_ExecuteWithResult(599,46)))
  SeeSound "baron/attack"
  DeathSound "baron/shotx"
  Decal "BaronScorch"
  Renderstyle Add
  Projectile
  +RANDOMIZE
  Species "Player"
	+THRUSPECIES
  states
  {
  Spawn:
    TNT1 A 1
    TNT1 AAA 0 A_SpawnItemEx ("BaronBallFire", 0, random (1,-1), random (1,-1), 0, 0, 0, 0, 160)
    loop
  Death:
    BAL7 CDE 4 bright
    stop
  }
}

Actor BaronBallFire
{
  radius 2
  height 2
  speed 0
  damage 0
  renderstyle Add
  alpha 0.4
  +NOBLOCKMAP
  +NOGRAVITY
  +MISSILE
  +NOTELEPORT
  +DONTSPLASH
  +CLIENTSIDEONLY
  +NOINTERACTION
  +NOCLIP
  states
  {
  Spawn:
    BARF A 0 A_Jump (255, "Animate1", "Animate2")
    loop
  Animate1:
    BARF ACEG 1 bright
    stop
  Animate2:
    BARF BDFH 1 bright
    stop
  }
}

actor BruiserAttackType : Inventory { Inventory.MaxAmount 3 }

Actor UnShootablePet : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_UnSetShootable
		Stop
	}
}