actor PissedOffSwing : MegaBuster
{
tag "Pissed Off Swing"
Weapon.AmmoUse 0
Weapon.AmmoGive 0
Weapon.SlotNumber 2
Obituary "$OB_ROLLSWING"
+INVENTORY.UNDROPPABLE
Inventory.Pickupmessage "\cgYOUR TOAST MISTER."
weapon.ammotype "BossJumpCharge"
weapon.ammotype2 "BossRageCharge"
+WEAPON.AMMO_OPTIONAL
Scale 2.0
States
{
Spawn:
WEA2 Y 0
stop
Ready:
PIR2 A 0 ACS_NamedExecuteAlways("GiveExecution",0)
PIR2 A 0 ACS_ExecuteAlways(991,0,514)
PIR2 A 1 A_WeaponReady(WRF_NOSWITCH)
Goto Ready+2
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
PIR2 A 1 A_Lower
loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
PIR2 A 1 A_Raise
Loop
Fire:
PIR2 A 0 A_PlaySoundEx("misc/enkerswing","Weapon")
PIR2 A 0 A_JumpIfInventory("SecondSwingPO",1,"Fire2")
PIR2 A 0 A_JumpIfInventory("ThirdSwingPO",1,"Fire3")

PIR2 A 0
PIR2 A 0 A_Refire(1)

PIR2 B 1 OffSet(-12,20)
PIR2 C 1 OffSet(-39,23)A_FireCustomMissile("PissedOffSwingAttack",0,0,0,0)
//PIR2 C 1 OffSet(-84,32)
PIR2 D 1 OffSet(-133,42)
PIR2 E 1 OffSet(-164,44)
//PIR2 E 1 OffSet(-208,55)
PIR2 E 1 OffSet(-256,69)
PIR2 E 1 OffSet(-304,86)

TNT1 A 2//7
TNT1 A 2 A_GiveInventory("SecondSwingPO",1)
TNT1 A 8 A_WeaponReady
TNT1 A 0 A_TakeInventory("SecondSwingPO")
TNT1 A 0 A_TakeInventory("ThirdSwingPO")

PIR2 A 2 OffSet(-48,217)
PIR2 A 2 OffSet(-32,162)
PIR2 A 2 OffSet(-19,118)
PIR2 A 2 OffSet(-10,83)
PIR2 A 2 OffSet(-3,55)
Goto Ready+1

Fire2:
PIR2 A 0
PIR2 A 0 A_Refire(1)

PIR2 F 1 OffSet(-110,47)
PIR2 G 1 OffSet(-93,42)A_FireCustomMissile("PissedOffSwingAttack2",0,0,0,0)
//PIR2 G 1 OffSet(-46,33)
PIR2 H 1 OffSet(-30,25)//SetPlayerProperty(0,0,0)
PIR2 H 1 OffSet(19,19)
//PIR2 H 1 OffSet(72,21)
PIR2 H 1 OffSet(129,33)

TNT1 A 0 A_TakeInventory("SecondSwingPO")
TNT1 A 0 A_GiveInventory("ThirdSwingPO")
TNT1 A 5
TNT1 A 8 A_WeaponReady
TNT1 A 0 A_TakeInventory("SecondSwingPO")
TNT1 A 0 A_TakeInventory("ThirdSwingPO")

PIR2 A 2 OffSet(78,67)
PIR2 A 2 OffSet(54,54)
PIR2 A 2 OffSet(32,45)
PIR2 A 2 OffSet(16,39)
PIR2 A 2 OffSet(6,35)
PIR2 A 0
Goto Ready+1
Fire3:
PIR2 F 0 A_JumpIfInventory("OilSliderFlag",30,"FireEndX")
PIR2 F 0 A_GiveInventory("OilSliderFlag",3)
PIR2 B 1 OffSet(-12,20) A_PlaySoundEx("misc/enkerswing","Weapon")
PIR2 D 1 OffSet(-39,23)A_FireCustomMissile("PissedOffMiniSwing1",frandom(-8,8),0,0,0,0,random(-4,4))
//PIR2 D 1 OffSet(-208,55)
//PIR2 E 1 OffSet(-304,86)

TNT1 A 2//7
TNT1 A 2 A_Refire("Fire4")
goto FireEnd
Fire4:
PIR2 F 0 A_JumpIfInventory("OilSliderFlag",30,"FireEndX")
PIR2 F 0 A_GiveInventory("OilSliderFlag",3)
PIR2 F 1 OffSet(-110,47) A_PlaySoundEx("misc/enkerswing","Weapon")
PIR2 H 1 OffSet(-93,42)A_FireCustomMissile("PissedOffMiniSwing2",frandom(-8,8),0,0,0,0,random(-4,4))
//PIR2 H 1 OffSet(19,19)
//PIR2 H 1 OffSet(129,33)

TNT1 A 1//7
TNT1 A 2 A_Refire("Fire3")
goto FireEnd
FireEndX:
PIR2 B 1 OffSet(-12,20)
PIR2 A 0 A_TakeInventory("OilSliderFlag",30)
PIR2 A 0 A_PlaySoundEx("weapon/superboost","Weapon")
PIR2 C 1 OffSet(-39,23)A_FireCustomMissile("PissedOffSwingAttack3",0,0,0,0)
PIR2 C 1 OffSet(-84,32)
PIR2 D 1 OffSet(-133,42)
PIR2 E 1 OffSet(-164,44)
PIR2 E 1 OffSet(-208,55)
PIR2 E 1 OffSet(-256,69)
PIR2 E 1 OffSet(-304,86)

TNT1 A 6//7
TNT1 A 2 A_TakeInventory("SecondSwingPO")
TNT1 A 0 A_TakeInventory("ThirdSwingPO")
TNT1 A 10
TNT1 A 0

PIR2 A 3 OffSet(-48,217)
PIR2 A 3 OffSet(-32,162)
PIR2 A 3 OffSet(-19,118)
PIR2 A 3 OffSet(-10,83)
PIR2 A 3 OffSet(-3,55)
Goto Ready+1
FireEnd:
PIR2 A 0 A_TakeInventory("OilSliderFlag",30)
PIR2 A 0 A_PlaySoundEx("weapon/superboost","Weapon")
PIR2 A 0 A_Refire(1)

PIR2 B 1 OffSet(-12,20)
PIR2 C 1 OffSet(-39,23)A_FireCustomMissile("PissedOffMiniSwing3minus",0,0,0,0)
//PIR2 C 1 OffSet(-84,32)
PIR2 D 1 OffSet(-133,42)
PIR2 E 1 OffSet(-164,44)
//PIR2 E 1 OffSet(-208,55)
PIR2 E 1 OffSet(-256,69)
PIR2 E 1 OffSet(-304,86)

TNT1 A 4//7
TNT1 A 8
TNT1 A 0 A_TakeInventory("SecondSwingPO")
TNT1 A 0 A_TakeInventory("ThirdSwingPO")

PIR2 A 2 OffSet(-48,217)
PIR2 A 2 OffSet(-32,162)
PIR2 A 2 OffSet(-19,118)
PIR2 A 2 OffSet(-10,83)
PIR2 A 2 OffSet(-3,55)
Goto Ready+1


AltFire:
PIR2 A 0 A_JumpIfInventory("BossRageCharge",500,"Rage")
AltfireFailed:
PIR2 A 1
Goto Ready+1

Rage:
//PIR2 A 0 ACS_ExecuteAlways(991,0,1666)
PIR2 A 0 A_PlaySoundEx("weapon/skullcounter","Weapon")
PIR2 A 0 A_Changeflag("INVULNERABLE",1)
PIR2 A 0 A_Refire(1)
PIR2 A 1
PIR2 N 0 A_Stop
PIR2 E 0 A_Recoil(35)
PIR2 AAAABBBBCCCCDDEE 1 A_Recoil(-1.25)
PIR3 AABB 1 A_Recoil(-1.25)
PIR2 N 0 A_PlaySoundEx("misc/sharkspinner","Weapon",1)
RageLoop1:
PIR3 C 0 ACS_NamedExecuteAlways("StateChange",0,3) //CustomState 1
PIR3 C 0 A_Recoil(-2.5)
PIR3 C 1 A_SpawnItemEX("PORoll_RageChargeHitbox",0,0,-44,momx,momy,momz,0,8,0)
PIR3 C 0 A_TakeInventory("BossRageCharge",3)
PIR3 C 0 A_JumpIfInventory("BossRageCharge",1,"RageLoop2")
Goto RageConclusion
RageLoop2:
PIR3 D 0 A_Recoil(-2.5)
PIR3 D 1 A_SpawnItemEX("PORoll_RageChargeHitbox",0,0,-44,momx,momy,momz,0,8,0)
PIR3 D 0 A_TakeInventory("BossRageCharge",3)
PIR3 D 0 A_JumpIfInventory("BossRageCharge",1,"RageLoop3")
Goto RageConclusion
RageLoop3:
PIR3 C 0 A_Recoil(-2.5)
PIR3 C 1 A_SpawnItemEX("PORoll_RageChargeHitbox",0,0,-44,momx,momy,momz,0,8,0)
PIR3 C 0 A_TakeInventory("BossRageCharge",3)
PIR3 C 0 A_JumpIfInventory("BossRageCharge",1,"RageLoop4")
Goto RageConclusion
RageLoop4:
PIR3 D 0 A_Recoil(-2.5)
PIR3 D 1 A_SpawnItemEX("PORoll_RageChargeHitbox",0,0,-44,momx,momy,momz,0,8,0)
PIR3 D 0 A_TakeInventory("BossRageCharge",3)
PIR3 D 0 A_JumpIfInventory("BossRageCharge",1,"RageLoop1")
Goto RageConclusion
RageConclusion:
TNT1 A 0 ACS_NamedExecute("StateChange",0,2) //Fire
TNT1 A 0 A_PlaySoundEx("misc/enkerswing","Weapon",0)
TNT1 A 0 A_SpawnItemEx("PORoll_RageChargeExplosion")
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("DrillExplode",frandom(-300,300),frandom(-300,300),frandom(-8,64))
PIR3 EFGH 1
TNT1 A 0 A_Changeflag("INVULNERABLE",0)
//TNT1 A 0 ACS_ExecuteAlways(991,0,1023)
TNT1 A 0 A_TakeInventory("BossRageCharge",500)
TNT1 C 20
PIR2 A 2 OffSet(-48,217)
PIR2 A 2 OffSet(-32,162)
PIR2 A 2 OffSet(-19,118)
PIR2 A 2 OffSet(-10,83)
PIR2 A 2 OffSet(-3,55)
Goto Ready+1

}
}

actor SecondSwingPO : Once {}
actor ThirdSwingPO : Once {}

actor PissedOffSwingAttack
{
Obituary "$OB_ROLLSWING"
PROJECTILE
//+NOINTERACTION
damage (4) //+RIPPER//damage (20)
Height 26 // 12
Radius 22 // 11
+DONTBLAST
Scale 3.0
speed 40 // Balanced : 40
damagetype "RollRapidSwings"
Translation "210:211=185:185"
States
{
Spawn:
SCLA I 0
SCLA IJ 2 
Death:
XDeath:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("PissedOffExplosion_1",0,0,0)
TNT1 A 4 
stop
}
}

actor PissedOffSwingAttack2 : PissedOffSwingAttack
{xscale -2.5}

actor PissedOffMiniSwing1 : PissedOffSwingAttack
{
damagetype "BossInstagib"
damage (1)
Height 13
Radius 11
Scale 2.5
speed 40
States
{
Spawn:
SCLA I 0
SCLA IIIJJ 1
Death:
XDeath:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("PissedOffExplosion_2",0,0,0)
TNT1 A 4 
stop
}
}
actor PissedOffMiniSwing2 : PissedOffMiniSwing1
{xscale -2.5}

actor PissedOffExplosion_1 : BasicExplosion
{
scale 2.5
Obituary "$OB_ROLLSWING"
damagetype "BossInstagib"
States
{
Spawn:
TNT1 A 0
HARD B 0 A_Explode(5,48,0,0,48)
HARD EDCB 2
stop
}
}

actor PissedOffExplosion_2 : BasicExplosion
{
scale 3.0
Obituary "$OB_ROLLSWING"
damagetype "BossInstagib"
States
{
Spawn:
TNT1 A 0
HARD B 0 A_Explode(3,48,0,0,48)
HARD EDCB 1
stop
}
}

actor PissedOffSwingAttack3
{
Obituary "$OB_ROLLSWING"
PROJECTILE
//+NOINTERACTION
damage (0) +RIPPER//damage (20)
Height 26 // 12
Radius 22 // 11
+DONTBLAST
Scale 3.0
speed 32 // Balanced : 40
damagetype "BossInstagib"
Translation "210:211=185:185"
States
{
Spawn:
PIR2 Q 0
PIR2 QR 2 ACS_NamedExecuteAlways("sh_missileyank",0,80)
PIR2 I 0 A_Explode(3,80,0,0,80)
PIR2 I 0 A_SetScale(-2.75,2.0)
PIR2 SQ 2 ACS_NamedExecuteAlways("sh_missileyank",0,80)
PIR2 I 0 A_Explode(2,80,0,0,80)
PIR2 I 0 A_SetScale(2.75,2.0)
PIR2 RS 2 ACS_NamedExecuteAlways("sh_missileyank",0,80)
PIR2 I 0 A_Explode(3,80,0,0,80)
PIR2 I 0 A_SetScale(-2.75,2.0)
PIR2 QR 2 ACS_NamedExecuteAlways("sh_missileyank",0,80)
PIR2 I 0 A_Explode(2,80,0,0,80)
PIR2 I 0 A_SetScale(2.75,2.0)
PIR2 SQ 2 ACS_NamedExecuteAlways("sh_missileyank",0,80)
PIR2 I 0 A_Explode(3,80,0,0,80)
PIR2 I 0 A_SetScale(-2.75,2.0)
PIR2 RS 2 ACS_NamedExecuteAlways("sh_missileyank",0,80)
PIR2 I 0 A_Explode(2,80,0,0,80)
PIR2 I 0 A_SetScale(2.75,2.0)
PIR2 I 0 A_GiveInventory("WeaponCharge",1)
PIR2 I 0 A_JumpIfInventory("WeaponCharge",2,"Death")
loop
Death:
XDeath:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("PissedOffExplosion_3",0,0,0)
TNT1 A 4 
stop
}
}


actor PissedOffExplosion_3 : BasicExplosion
{
scale 3.0
Obituary "$OB_ROLLSWING"
damagetype "PORollFling"
States
{
Spawn:
TNT1 A 0
HARD B 0 A_Explode(12,108,0,0,108)
HARD EDCB 1
stop
}
}

actor PissedOffMiniSwing3minus : PissedOffSwingAttack
{
damage (5) //+RIPPER//damage (20)
Height 26 // 12
Radius 22 // 11
+DONTBLAST
Scale 3.0
speed 40
States
{
Spawn:
SCLA I 0
SCLA IIIJJJ 1
Death:
XDeath:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("PissedOffExplosion_3minus",0,0,0)
TNT1 A 4 
stop
}
}

actor PissedOffExplosion_3minus : BasicExplosion
{
scale 3.0
Obituary "$OB_ROLLSWING"
damagetype "PORollFling"
States
{
Spawn:
TNT1 A 0
HARD B 0 A_Explode(5,98,0,0,98)
HARD EDCB 1
stop
}
}

//Rage wait a minute this isnt pissed off roll this is... DIXIEANDOFF!!!! [Fire Emblem - Strike begins playing]

actor PORoll_RageChargeHitbox
{
PROJECTILE
damagetype "FuryCharge"
Obituary "$OB_FURYCHARGE"
+THRUGHOST
+DONTBLAST
+HITTRACER
+DONTREFLECT
damage (150)
radius 72//72
Height 72
States
{
Spawn:
TNT1 AA 1
stop
Death:
TNT1 A 0
Stop
Crash:
TNT1 A 0 A_JumpIfInventory("Survivor",1,1,AAPTR_TRACER)
goto Death
TNT1 A 0 A_GiveToTarget("PORollRageCharge_P",1)
goto Death
}
}

actor PORoll_RageChargeExplosion : BasicExplosion
{
scale 3.0
damagetype "FuryChargeX"
Obituary "$OB_FURYCHARGE"
States
{
Spawn:
TNT1 A 0
TNT1 A 5 A_Explode(60,320,0,0,160)
stop
}
}



actor PORollRageCharge_P : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_Stop
TNT1 A 0 ThrustThingZ(0,45,0,0)
TNT1 A 0 A_Recoil(10)
TNT1 A 0 A_TakeInventory("BossRageCharge",9999)
stop
}
}


actor PORollChargeFX1
{
+CLIENTSIDEONLY
+NOINTERACTION
-SOLID
scale 2.5
translation "0:255=174:174"
alpha 0.9
states
{
	Spawn:
	TNT1 AA 1
	Spawn2:
	PORO B 2 A_FadeOut(0.05)
	loop
}
}

actor PORollChargeFX2 : PORollChargeFX1 {states{Spawn2: PORO C 2 A_FadeOut(0.05) loop}}
actor PORollChargeFX3 : PORollChargeFX1 {states{Spawn2: PORO D 2 A_FadeOut(0.05) loop}}
actor PORollChargeFX4 : PORollChargeFX1 {states{Spawn2: PORO E 2 A_FadeOut(0.05) loop}}

actor PORollChargeHeal : CustomInventory
{
	States
	{
	Pickup:
		TNT1 A 0 A_PlaySoundEx("item/energyup", "voice")
		TNT1 A 0 A_GiveInventory("Health", 100)
		TNT1 A 0 A_SpawnItemEx("HealFX2",random(25,35),random(-5,5),random(-5,5),momx/4,momy/4,random(2,4),random(0,90),SXF_ABSOLUTEMOMENTUM|SXF_TRANSFERTRANSLATION)
		TNT1 A 0 A_SpawnItemEx("HealFX2",random(25,35),random(-5,5),random(-5,5),momx/4,momy/4,random(2,4),random(90,180),SXF_ABSOLUTEMOMENTUM|SXF_TRANSFERTRANSLATION)
		TNT1 A 0 A_SpawnItemEx("HealFX2",random(25,35),random(-5,5),random(-5,5),momx/4,momy/4,random(2,4),random(180,270),SXF_ABSOLUTEMOMENTUM|SXF_TRANSFERTRANSLATION)
		TNT1 A 0 A_SpawnItemEx("HealFX2",random(25,35),random(-5,5),random(-5,5),momx/4,momy/4,random(2,4),random(270,359),SXF_ABSOLUTEMOMENTUM|SXF_TRANSFERTRANSLATION)
		stop
	}
}