Actor "HammerOfRetribution" : FighterWeapon
{
	Tag "Hammer of Retribution"
	//Game Hexen
	Weapon.SelectionOrder 4
	+BLOODSPLATTER
	+WEAPON.AMMO_OPTIONAL
	+WEAPON.ALT_AMMO_OPTIONAL
	+WEAPON.MELEEWEAPON
	+UNDROPPABLE
	Weapon.AmmoUse1 3
	Weapon.AmmoUse2 3
	weapon.ammogive1 0
	Weapon.KickBack 100
	Weapon.YAdjust 0
	Weapon.AmmoType1 "Mana2"
	Weapon.AmmoType2 "Mana2"
	Inventory.PickupMessage "$TXT_WEAPON_F3" // "HAMMER OF RETRIBUTION"
	Weapon.BobStyle InverseSmooth
    Weapon.BobSpeed 2.1
    Weapon.BobRangeY 0.4
    Weapon.BobRangeX 0.7
	States
	{
	Spawn:
		WFHM A -1
		Stop
	Select:
		FHMR A 0 A_JumpIfInventory("Mana2", 3, 3)
		FHMR A 1 A_Raise
		TNT1 A 0 A_Raise
		Goto Select+1
		FHMR F 1 A_Raise
		FHMR F 0 A_Raise
		FHMR F 1 A_Raise
		FHMR F 0 A_Raise
		FHMR F 1 A_Raise
		FHMR F 0 A_Raise
		FHMR G 1 A_Raise
		FHMR G 0 A_Raise
		FHMR G 1 A_Raise
		FHMR G 0 A_Raise
		FHMR G 1 A_Raise
		FHMR G 0 A_Raise
		FHMR H 1 A_Raise
		FHMR H 0 A_Raise
		FHMR H 1 A_Raise
		FHMR H 0 A_Raise
		FHMR H 1 A_Raise
		FHMR H 0 A_Raise
		Goto Select+3
	DeSelect:
		FHMR A 0 A_JumpIfInventory("Mana2", 3, 3)
		FHMR A 1 A_Lower
		TNT1 A 0 A_Lower
		Goto DeSelect+1
		FHMR F 1 A_Lower
		FHMR F 0 A_Lower
		FHMR F 1 A_Lower
		FHMR F 0 A_Lower
		FHMR F 1 A_Lower
		FHMR F 0 A_Lower
		FHMR G 1 A_Lower
		FHMR G 0 A_Lower
		FHMR G 1 A_Lower
		FHMR G 0 A_Lower
		FHMR G 1 A_Lower
		FHMR G 0 A_Lower
		FHMR H 1 A_Lower
		FHMR H 0 A_Lower
		FHMR H 1 A_Lower
		FHMR H 0 A_Lower
		FHMR H 1 A_Lower
		FHMR H 0 A_Lower
		Goto DeSelect+3
	Ready:
		FHMR A 0 A_JumpIfInventory("Mana2", 3, "ReadyMana")
		FHMR A 0 A_JumpIfInventory("MightyBlowing",1,"MightyBlow")
		FHMR A 0 A_JumpIfInventory("DeathBlowing",1,"DeathBlow")
		FHMR A 1 A_WeaponReady
		Loop
	ReadyMana:
		FHMR F 0 A_JumpIfInventory("MightyBlowing",1,"MightyBlow")
		FHMR A 0 A_JumpIfInventory("DeathBlowing",1,"DeathBlow")
		FHMR F 1 A_WeaponReady
		FHMR F 0 A_JumpIfInventory("MightyBlowing",1,"MightyBlow")
		FHMR A 0 A_JumpIfInventory("DeathBlowing",1,"DeathBlow")
		FHMR F 1 A_WeaponReady
		FHMR F 0 A_JumpIfInventory("MightyBlowing",1,"MightyBlow")
		FHMR A 0 A_JumpIfInventory("DeathBlowing",1,"DeathBlow")
		FHMR F 1 A_WeaponReady
		FHMR G 0 A_JumpIfInventory("MightyBlowing",1,"MightyBlow")
		FHMR A 0 A_JumpIfInventory("DeathBlowing",1,"DeathBlow")
		FHMR G 1 A_WeaponReady
		FHMR G 0 A_JumpIfInventory("MightyBlowing",1,"MightyBlow")
		FHMR A 0 A_JumpIfInventory("DeathBlowing",1,"DeathBlow")
		FHMR G 1 A_WeaponReady
		FHMR G 0 A_JumpIfInventory("MightyBlowing",1,"MightyBlow")
		FHMR A 0 A_JumpIfInventory("DeathBlowing",1,"DeathBlow")
		FHMR G 1 A_WeaponReady
		FHMR H 0 A_JumpIfInventory("MightyBlowing",1,"MightyBlow")
		FHMR A 0 A_JumpIfInventory("DeathBlowing",1,"DeathBlow")
		FHMR H 1 A_WeaponReady
		FHMR H 0 A_JumpIfInventory("MightyBlowing",1,"MightyBlow")
		FHMR A 0 A_JumpIfInventory("DeathBlowing",1,"DeathBlow")
		FHMR H 1 A_WeaponReady
		FHMR H 0 A_JumpIfInventory("MightyBlowing",1,"MightyBlow")
		FHMR A 0 A_JumpIfInventory("DeathBlowing",1,"DeathBlow")
		FHMR H 1 A_WeaponReady
		Loop
	AltFire:
		FHMR I 0 A_JumpIfInventory("CriticalStrike",Random(1,40),"AltFire2")
		FHMR I 0 A_JumpIfNoAmmo("Meleehammer")
		FHMR I 1 offset(5,60)
		FHMR I 1 offset(5,40)
		FHMR I 1 offset(5,25)
		FHMR I 1 offset(5,22)
		FHMR I 1 offset(5,25) A_PlayWeaponSound("FighterHammerMiss")
		FHMR I 1 offset(5,60)
		FHMR I 1 offset(5,60)
		FHMR L 0 Offset (5, 0) A_FireBullets(0,0,1,0,"FlamingHammerPuff",FBF_NORANDOM,128)
		FHMR J 1 Offset(5, 40)
		FHMR K 1 offset(5,40)
		FHMR L 1 offset(5,40)
		TNT1 A 15 Offset (5, 150)
		FHMR G 1 offset(5,80)
		FHMR G 1 offset(5,60)
		FHMR G 1 offset(5,50)
		FHMR H 1 offset(5,40)
		FHMR H 1 offset(5,30)
		FHMR H 1 offset(5,38)
		Goto Ready
	AltFire2:
		FHMR I 0 A_JumpIfNoAmmo("Meleehammer2")
		FHMR I 1 offset(5,60)
		FHMR I 1 offset(5,40)
		FHMR I 1 offset(5,25)
		FHMR I 1 offset(5,22)
		FHMR I 1 offset(5,25) A_PlayWeaponSound("FighterHammerMiss")
		FHMR I 1 offset(5,60)
		FHMR I 1 offset(5,60)
		FHMR L 0 Offset (5, 0) A_FireBullets(0,0,1,0,"CriticalPuffGhost",FBF_NORANDOM,96)
		FHMR L 0 Offset(5, 40) A_FireBullets(0,0,1,0,"FlamingHammerPuffCrit",FBF_NORANDOM,96)
		FHMR J 1 Offset(5, 40)
		FHMR K 1 offset(5,40)
		FHMR L 1 offset(5,40)
		TNT1 A 15 Offset (5, 150)
		FHMR G 1 offset(5,80)
		FHMR G 1 offset(5,60)
		FHMR G 1 offset(5,50)
		FHMR H 1 offset(5,40)
		FHMR H 1 offset(5,30)
		FHMR H 1 offset(5,38)
		Goto Ready
	Fire:
		FHMR I 0 A_JumpIfNoAmmo("Meleehammer")
		FHMR I 1 offset(5,60)
		FHMR I 1 offset(5,40)
		FHMR I 1 offset(5,25)
		FHMR I 1 offset(5,22)
		FHMR I 1 offset(5,25) A_PlaySoundEx("FighterHammerMiss",Weapon)
		FHMR I 1 offset(5,60)
		FHMR I 1 offset(5,60)
		FHMR J 1 Offset(5, 40)
		FHMR K 1 offset(5,40)
		FHMR L 1 offset(5,40)
		FHMR L 0 
		FHMR L 0 A_FireCustomMissile("HammerMissile")
		TNT1 A 15 Offset (5, 150)
		FHMR G 1 offset(5,80)
		FHMR G 1 offset(5,60)
		FHMR G 1 offset(5,50)
		FHMR H 1 offset(5,40)
		FHMR H 1 offset(5,30)
		FHMR H 1 offset(5,38)
		Goto Ready
	Meleehammer:
		FHMR B 1 offset(5,60)
		FHMR B 1 offset(5,40)
		FHMR B 1 offset(5,25)
		FHMR B 1 offset(5,22)
		FHMR B 1 offset(5,25) A_PlayWeaponSound("FighterHammerMiss")
		FHMR B 1 offset(5,60)
		FHMR B 1 offset(5,60)
		FHMR B 0 Offset (5, 0) A_FireBullets(0,0,1,ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(60,123), STRENGTH, ABIL_HAMMERMASTERY, ACTIVATOR),"NewSuperHammerPuff",FBF_NORANDOM,96)
		FHMR C 1 Offset(5, 40)
		FHMR D 1 offset(5,40)
		FHMR E 1 offset(5,40)
		TNT1 A 15 Offset (5, 150)
		FHMR A 1 offset(5,80)
		FHMR A 1 offset(5,60)
		FHMR A 1 offset(5,50)
		FHMR A 1 offset(5,40)
		FHMR A 1 offset(5,30)
		FHMR A 1 offset(5,38)
		Goto Ready
	Meleehammer2:
		FHMR B 1 offset(5,60)
		FHMR B 1 offset(5,40)
		FHMR B 1 offset(5,25)
		FHMR B 1 offset(5,22)
		FHMR B 1 offset(5,25) A_PlayWeaponSound("FighterHammerMiss")
		FHMR B 1 offset(5,60)
		FHMR B 1 offset(5,60)
		FHMR B 0 Offset (5, 0) A_FireBullets(0,0,1,0,"CriticalPuff",FBF_NORANDOM,96)
		FHMR B 0 Offset(5, 40) A_FireBullets(0,0,1,ACS_NamedExecuteWithResult("WOC Player Scale", 2*FRandom(60,123), STRENGTH, ABIL_HAMMERMASTERY, ACTIVATOR),"NewSuperHammerPuff",FBF_NORANDOM,96)
		FHMR C 1 Offset(5, 40)
		FHMR D 1 offset(5,40)
		FHMR E 1 offset(5,40)
		TNT1 A 15 Offset (5, 150)
		FHMR A 1 offset(5,80)
		FHMR A 1 offset(5,60)
		FHMR A 1 offset(5,50)
		FHMR A 1 offset(5,40)
		FHMR A 1 offset(5,30)
		FHMR A 1 offset(5,38)
		Goto Ready
	MightyBlow:
		FHMR A 1 Offset (0, 40)
		FHMR A 1 Offset (0, 48)
		FHMR A 1 Offset (0, 56)
		FPCH E 1 Offset(220,60)
		FPCH E 1 Offset(225,50)
		FPCH E 1 Offset(220,50)
		FPCH E 1 Offset(210,50)
		FPCH E 1 Offset(190,50)
		FPCH E 1 Offset(180,40) 
		FPCH E 1 Offset(95,40)
		FPCH D 0 Offset (5, 40) A_FireBullets(0,0,1,ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(140,180), STRENGTH, ABIL_MIGHTYBLOW, ACTIVATOR),"MightyBlowPuff",FBF_NORANDOM,128)
		FPCH E 1 Offset(10,50)
		FPCH E 1 Offset(5,60) 
		FPCH E 1 Offset(2,70)
		FPCH E 1 Offset(0,80)
		FPCH E 1 Offset(2,90) 
		FPCH E 1 Offset(5,115)
		FPCH E 5 Offset(0,150) A_TakeInventory("MightyBlowing",2)
		FHMR A 1 Offset (1, 56)
		FHMR A 1 Offset (1, 48)
		FHMR A 1 Offset (1, 40)
		Goto Ready
	DeathBlow:
		FHMR A 1 Offset (0, 40)
		FHMR A 1 Offset (0, 48)
		FHMR A 1 Offset (0, 56)
		FPCH E 1 Offset(220,60)
		FPCH E 1 Offset(225,50)
		FPCH E 1 Offset(220,50)
		FPCH E 1 Offset(210,50)
		FPCH E 1 Offset(190,50)
		FPCH E 1 Offset(180,40) 
		FPCH E 1 Offset(95,40)
		FPCH E 0 Offset(10,50) A_JumpIfInventory("DeathBlow", random(0,25), 2)
		FPCH E 0 Offset(10,50) A_Jump(256,2)
		FPCH E 0 Offset(10,50) A_FireBullets(0,0,1,1000000,"DeathBlowPuff",FBF_NORANDOM,128)
		FPCH E 0 Offset(10,50) A_FireBullets(0,0,1,0,"HammerPuff",FBF_NORANDOM,128)
		FPCH E 1 Offset(10,50)
		FPCH E 1 Offset(5,60) 
		FPCH E 1 Offset(2,70)
		FPCH E 1 Offset(0,80)
		FPCH E 1 Offset(2,90) 
		FPCH E 1 Offset(5,115)
		FPCH E 5 Offset(0,150) A_TakeInventory("DeathBlowing",2)
		FHMR A 1 Offset (1, 56)
		FHMR A 1 Offset (1, 48)
		FHMR A 1 Offset (1, 40)
		Goto Ready
	}
}

Actor FlamingHammerPuff
{
	+NOBLOCKMAP
	+NOGRAVITY
	+PUFFONACTORS
	+PUFFGETSOWNER
	+MTHRUSPECIES
	+FORCERADIUSDMG
	Radius 8
	Height 12
	Renderstyle Add
	Damagetype "Fire"
	SeeSound "FighterHammerHitThing"
	AttackSound "FighterHammerHitWall"
    ActiveSound ""

	States
	{
	Spawn:
	Melee:
		FHFX I 0
		FHFX I 0 A_JumpIfInTargetInventory("IsDestroyer",1,"Fury")
		Goto Animation
	Fury:
		FHFX I 0 A_GiveToTarget("FuryItem",1)
	Animation:
		FHFX I 0 A_PlaySound("FighterHammerExplode", 5)
		FHFX I 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(163,183), STRENGTH, ABIL_HAMMERMASTERY, WOCTARGET), 128, 0, 1, 9)
		FHFX I 0 A_TakefromTarget("Mana2", 3, TIF_NOTAKEINFINITE)
		FHFX I 0 A_SpawnItemEx("RadiusQuakeHammer",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)//Radius_Quake(2,10,0,2,0)
		FHFX I 1 Bright
		FHFX I 1 //A_GiveToTarget("ScreenPitch4")
		FHFX I 0 //A_GiveToTarget("ScreenPitch4Back")
		FHFX I 2 Bright A_SetTranslucent(1,1)
		FHFX J 3 Bright
		FHFX K 3 Bright
		FHFX LM 3 Bright
		FHFX N 3
		FHFX OPQR 3 Bright
		Stop
	Crash:
		FHFX I 0
		FHFX I 0 A_SpawnItemEx("RadiusQuakeHammer",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)//Radius_Quake(2,10,0,2,0)
		FHFX S 0 A_SetTranslucent(0.6, 0)
		FHFX S 1 Bright
		FHFX S 1 //A_GiveToTarget("ScreenPitch4")
		FHFX S 2 //A_GiveToTarget("ScreenPitch4Back")
		FHFX STUVW 4
		Stop
	}
}

Actor FlamingHammerPuffCrit : FlamingHammerPuff
{
	+FORCERADIUSDMG
	States
	{
	Spawn:
	Melee:
		FHFX I 0
		FHFX I 0 A_JumpIfInTargetInventory("IsDestroyer",1,"Fury")
		Goto Animation
	Fury:
		FHFX I 0 A_GiveToTarget("FuryItem",1)
	Animation:
		FHFX I 0 A_PlaySound("FighterHammerExplode", 5)
		FHFX I 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 2*FRandom(163,183), STRENGTH, ABIL_HAMMERMASTERY, WOCTARGET), 128, 0, 1, 9)
		FHFX I 0 A_TakefromTarget("Mana2", 3, TIF_NOTAKEINFINITE)
		FHFX I 0 A_SpawnItemEx("RadiusQuakeHammer",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)//Radius_Quake(2,10,0,2,0)
		FHFX I 1 Bright
		FHFX I 1 //A_GiveToTarget("ScreenPitch4")
		FHFX I 0 //A_GiveToTarget("ScreenPitch4Back")
		FHFX I 2 Bright A_SetTranslucent(1,1)
		FHFX J 3 Bright
		FHFX K 3 Bright
		FHFX LM 3 Bright
		FHFX N 3
		FHFX OPQR 3 Bright
		Stop
	}
}

Actor NewSuperHammerPuff : HammerPuff
{
	+PUFFGETSOWNER
	+THRUGHOST
	+MTHRUSPECIES
	Damagetype "Physical"
	SeeSound "FighterHammerHitThing"
	AttackSound "FighterHammerHitWall"
    ActiveSound ""
	States
	{
	Spawn:
	Melee:
		FHFX S 0
		FHFX S 0 A_JumpIfInTargetInventory("IsDestroyer",1,"Fury")
		Goto Crash
	Fury:
		FHFX S 0 A_GiveToTarget("FuryItem",1)
		Goto Crash
	Crash:
		FHFX I 0 A_SpawnItemEx("RadiusQuakeHammer",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)//Radius_Quake(2,10,0,2,0)
		FHFX S 1
		FHFX S 1 //A_GiveToTarget("ScreenPitch4")
		FHFX S 2 //A_GiveToTarget("ScreenPitch4Back")
		FHFX TUVW 4
		Stop
	}
}

Actor RadiusQuakeHammer
{
	Radius 0
	Height 0
	+NOINTERACTION
	+NOCLIP
	states
	{
		Spawn:
		TNT1 AA 0 Radius_Quake(3,35,0,2,0)
		TNT1 A 12
		Stop
	}
}

ACTOR NewHammerMissile : HammerMissile Replaces HammerMissile
{
	Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(35,55), INTELLECT, ABIL_HAMMERMASTERY, WOCTARGET))
	+MTHRUSPECIES /*+NODAMAGETHRUST*/
	+DONTBLAST
	+FORCERADIUSDMG
	States
	{
	Spawn:
		FHFX A 2 Bright
		FHFX B 2 Bright A_PlaySound("FighterHammerContinuous")
		FHFX CDEFGH 2 Bright
		Loop
	Death:
		FHFX I 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 128, INTELLECT, ABIL_HAMMERMASTERY, WOCTARGET), 128, 0)
		FHFX I 0 Bright Radius_Quake(2,12,0,3,0)
		FHFX I 3 Bright A_SetTranslucent(1,1)
		FHFX J 3 Bright
		FHFX K 3 Bright
		FHFX LM 3 Bright
		FHFX N 3
		FHFX OPQR 3 Bright
		Stop
	}
}

Actor NewHammerPuff : HammerPuff replaces HammerPuff
{
	+PUFFGETSOWNER
	+THRUGHOST
	+MTHRUSPECIES
	Damagetype "Physical"
	SeeSound "FighterHammerHitThing"
	AttackSound "FighterHammerHitWall"
    ActiveSound ""
	States
	{
	Spawn:
	Melee:
		FHFX S 0
		FHFX S 0 A_JumpIfInTargetInventory("IsDestroyer",1,"Fury")
		Goto Crash
	Fury:
		FHFX S 0 A_GiveToTarget("FuryItem",1)
		Goto Crash
	Crash:
		FHFX S 1
		FHFX S 1 A_GiveToTarget("ScreenPitch2")
		FHFX SS 1 A_GiveToTarget("ScreenPitch1Back")
		FHFX TUVW 4
		Stop
	}
}