actor SkullBarrierWepSH : BaseMM8BDMWep
{ //Coded by MegaVile
//$Category MM8BDM-Weapons
//$Title Skull Barrier
Inventory.Pickupmessage "$PU_SKULLBARRIER"
inventory.pickupsound "weapon/weaponup"
Weapon.AmmoUse 7
Weapon.AmmoGive 28
Weapon.SlotNumber 7
Obituary "$OB_SKULLBARRIER"
Tag "$TAG_SKULLBARRIER"
weapon.ammotype "SkullBarrierAmmo"
inventory.icon "SKLBSI"
+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans
States
{
SpawnLoop:
WEA2 O 1
loop
Ready:
SKLA A 0 ACS_ExecuteAlways(998,0,34)
SKLA A 0 A_JumpIfInventory("SkullShieldCheck", 1, "ShieldActivateSwitch")
SKLA A 1 A_WeaponReady
Goto Ready+1
ShieldActivateSwitch:
SKLA IJ 2 A_WeaponReady(WRF_NOFIRE)
SKLA K 5 A_WeaponReady(WRF_NOFIRE)
goto ShieldActive
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
SKLA A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
SKLA A 1 A_Raise
Loop
Fire:
SKLA A 0 A_JumpIfInventory("SkullSpiralCooldown",1,"NoAmmo")
SKLA A 0 A_JumpifNoAmmo("NoAmmo")
SKLA IJ 2
SKLA G 0 A_TakeInventory("SkullBarrierAmmo",7)
SKLA G 0 A_PlaySoundEx("misc/kingswing","Auto")
SKLA G 0 A_PlaySoundEx("weapon/skullactivate","Weapon")
SKLA K 0 A_JumpIfInventory("SpreadRuneFlag",1,"Spread")
SKLA K 0 A_SpawnItemEx("SkullSpiral",0,0,0,0,0,0,0)
//SKLA K 0 A_SpawnItemEx("SkullSpiral",0,0,0,0,0,0,90)
SKLA K 0 A_SpawnItemEx("SkullSpiral",0,0,0,0,0,0,180)
//SKLA K 0 A_SpawnItemEx("SkullSpiral",0,0,0,0,0,0,270)
//SKLA K 0 A_SpawnItemEx("SkullSpiral2",0,0,0,0,0,0,0)
SKLA K 0 A_SpawnItemEx("SkullSpiral2",0,0,0,0,0,0,90)
//SKLA K 0 A_SpawnItemEx("SkullSpiral2",0,0,0,0,0,0,180)
SKLA K 0 A_SpawnItemEx("SkullSpiral2",0,0,0,0,0,0,270)
SKLA K 20 
SKLA K 65
SKLA K 0 A_StopSoundEx("Weapon")
SKLA K 5
SKLA JJIIAA 1
SKLA A 0 A_GiveInventory("SkullSpiralCooldown",1)
Goto Ready+1
Spread:
//SKLA K 0 A_SpawnItemEx("SkullSpiral",0,0,0,0,0,0,0)
//SKLA K 0 A_SpawnItemEx("SkullSpiral",0,0,0,0,0,0,90)
//SKLA K 0 A_SpawnItemEx("SkullSpiral",0,0,0,0,0,0,180)
//SKLA K 0 A_SpawnItemEx("SkullSpiral",0,0,0,0,0,0,270)
SKLA K 0 A_SpawnItemEx("SkullSpiral",0,0,0,0,0,0,45)
SKLA K 0 A_SpawnItemEx("SkullSpiral",0,0,0,0,0,0,135)
SKLA K 0 A_SpawnItemEx("SkullSpiral",0,0,0,0,0,0,225)
SKLA K 0 A_SpawnItemEx("SkullSpiral",0,0,0,0,0,0,315)
SKLA K 0 A_SpawnItemEx("SkullSpiral2",0,0,0,0,0,0,0)
SKLA K 0 A_SpawnItemEx("SkullSpiral2",0,0,0,0,0,0,90)
SKLA K 0 A_SpawnItemEx("SkullSpiral2",0,0,0,0,0,0,180)
SKLA K 0 A_SpawnItemEx("SkullSpiral2",0,0,0,0,0,0,270)
//SKLA K 0 A_SpawnItemEx("SkullSpiral2",0,0,0,0,0,0,45)
//SKLA K 0 A_SpawnItemEx("SkullSpiral2",0,0,0,0,0,0,135)
//SKLA K 0 A_SpawnItemEx("SkullSpiral2",0,0,0,0,0,0,225)
//SKLA K 0 A_SpawnItemEx("SkullSpiral2",0,0,0,0,0,0,315)
SKLA K 20 
SKLA K 65
SKLA K 5
SKLA JJIIAA 1 
SKLA A 4
SKLA A 0 A_GiveInventory("SkullSpiralCooldown",1)
Goto Ready+1
NoAmmo:
SKLA A 1 ACS_Execute(979,0)
Goto Ready+1
}
}


actor SkullSpiral
{
PROJECTILE
Health 999999
Damage (0)
Height 30
Radius 30
+SHOOTABLE
-NOBLOCKMAP
+DEFLECT
+DONTREFLECT
+GHOST
+THRUSPECIES
+RIPPER
+NOINTERACTION
+NOTARGETSWITCH
-ACTIVATEMCROSS
-ACTIVATEPCROSS
-CANUSEWALLS
-ACTIVATEIMPACT
+FORCEXYBILLBOARD
+NOTRIGGER
scale 3.5
damagetype "SkullBarrier"
Obituary "$OB_SKULLBARRIER"
var int user_distance;
States
{
Spawn:
SKLC I 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC I 0 A_GiveInventory("CutterFlag",1)
SKLC I 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC I 0 A_SetUserVar("user_distance",user_distance+3)
SKLC I 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,12,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC I 1 A_JumpIfInventory("CutterFlag",20,"Stay")
SKLC J 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC J 0 A_GiveInventory("CutterFlag",1)
SKLC J 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC J 0 A_SetUserVar("user_distance",user_distance+3)
SKLC J 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,12,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC J 1 A_JumpIfInventory("CutterFlag",20,"Stay")
SKLC K 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC K 0 A_GiveInventory("CutterFlag",1)
SKLC K 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC K 0 A_SetUserVar("user_distance",user_distance+3)
SKLC K 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,12,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC K 1 A_JumpIfInventory("CutterFlag",20,"Stay")
loop
Stay:
SKLC I 0 A_PlaySoundEx("weapon/skullloop","Weapon",1)
SKLC I 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC I 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC I 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,24,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC I 0 A_GiveInventory("CutterFlag",1)
SKLC I 1 A_JumpIfInventory("CutterFlag",65,"Retract")
SKLC J 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC J 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC J 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,24,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC J 0 A_GiveInventory("CutterFlag",1)
SKLC J 1 A_JumpIfInventory("CutterFlag",65,"Retract")
SKLC K 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC K 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC K 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,24,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC K 0 A_GiveInventory("CutterFlag",1)
SKLC K 1 A_JumpIfInventory("CutterFlag",65,"Retract")
loop
Retract:
SKLC I 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC I 0 A_GiveInventory("CutterFlag",1)
SKLC I 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC I 0 A_SetUserVar("user_distance",user_distance-3)
SKLC I 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,12,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC I 1 A_JumpIfInventory("CutterFlag",85,"Death")
SKLC J 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC J 0 A_GiveInventory("CutterFlag",1)
SKLC J 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC J 0 A_SetUserVar("user_distance",user_distance-3)
SKLC J 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,12,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC J 1 A_JumpIfInventory("CutterFlag",85,"Death")
SKLC K 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC K 0 A_GiveInventory("CutterFlag",1)
SKLC K 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC K 0 A_SetUserVar("user_distance",user_distance-3)
SKLC K 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,12,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC K 1 A_JumpIfInventory("CutterFlag",85,"Death")
loop
Death:
TNT1 I 0 A_StopSound("Weapon")
TNT1 I 1 A_SpawnItemEx("HardKnuckleFX",0,0,0,0,0,0)
TNT1 I 1 A_Stop
stop
}
}

actor SkullSpiral2
{
PROJECTILE
Health 999999
Damage (0)
Height 30
Radius 30
+SHOOTABLE
-NOBLOCKMAP
+DEFLECT
+DONTREFLECT
+GHOST
+THRUSPECIES
+RIPPER
+NOINTERACTION
+NOTARGETSWITCH
-ACTIVATEMCROSS
-ACTIVATEPCROSS
-CANUSEWALLS
+FORCEXYBILLBOARD
-ACTIVATEIMPACT
+NOTRIGGER
scale 3.5
damagetype "SkullBarrier"
Obituary "$OB_SKULLBARRIER"
var int user_distance;
States
{
Spawn:
SKLC I 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC I 0 A_GiveInventory("CutterFlag",1)
SKLC I 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC I 0 A_SetUserVar("user_distance",user_distance+6)
SKLC I 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,12+16,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC I 1 A_JumpIfInventory("CutterFlag",20,"Stay")
SKLC J 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC J 0 A_GiveInventory("CutterFlag",1)
SKLC J 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC J 0 A_SetUserVar("user_distance",user_distance+6)
SKLC J 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,12+16,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC J 1 A_JumpIfInventory("CutterFlag",20,"Stay")
SKLC K 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC K 0 A_GiveInventory("CutterFlag",1)
SKLC K 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC K 0 A_SetUserVar("user_distance",user_distance+6)
SKLC K 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,12+16,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC K 1 A_JumpIfInventory("CutterFlag",20,"Stay")
loop
Stay:
SKLC I 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC I 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC I 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,24+16,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC I 0 A_GiveInventory("CutterFlag",1)
SKLC I 1 A_JumpIfInventory("CutterFlag",65,"Retract")
SKLC J 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC J 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC J 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,24+16,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC J 0 A_GiveInventory("CutterFlag",1)
SKLC J 1 A_JumpIfInventory("CutterFlag",65,"Retract")
SKLC K 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC K 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC K 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,24+16,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC K 0 A_GiveInventory("CutterFlag",1)
SKLC K 1 A_JumpIfInventory("CutterFlag",65,"Retract")
loop
Retract:
SKLC I 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC I 0 A_GiveInventory("CutterFlag",1)
SKLC I 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC I 0 A_SetUserVar("user_distance",user_distance-6)
SKLC I 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,12+16,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC I 1 A_JumpIfInventory("CutterFlag",85,"Death")
SKLC J 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC J 0 A_GiveInventory("CutterFlag",1)
SKLC J 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC J 0 A_SetUserVar("user_distance",user_distance-6)
SKLC J 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,12+16,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC J 1 A_JumpIfInventory("CutterFlag",85,"Death")
SKLC K 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists")==0,"Death")
SKLC K 0 A_GiveInventory("CutterFlag",1)
SKLC K 0 A_SpawnItemEx("SkullSpiralHurtBox",0,0,0)
SKLC K 0 A_SetUserVar("user_distance",user_distance-6)
SKLC K 0 A_Warp(AAPTR_TARGET,0+1*user_distance,0,32,12+16,WARPF_USECALLERANGLE|WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
SKLC K 1 A_JumpIfInventory("CutterFlag",85,"Death")
loop
Death:
TNT1 I 1 A_SpawnItemEx("HardKnuckleFX",0,0,0,0,0,0)
TNT1 I 1 A_Stop
stop
}
}
Actor SkullSpiralWepSH : SkullBarrierWepSH {} 


actor SkullSpiralHurtBox
{
PROJECTILE
Height 36
health 1
+NOBLOOD
Radius 36
Damage (0)
+SHOOTABLE
-NOBLOCKMAP
+DONTREFLECT
+GHOST
+THRUSPECIES
+RIPPER
-ACTIVATEMCROSS
-ACTIVATEPCROSS
-CANUSEWALLS
-ACTIVATEIMPACT
+NOTRIGGER
damagetype "SkullBarrier"
Obituary "$OB_SKULLBARRIER"
Speed 5
scale 2.5
States
{
Spawn:
TNT1 A 1
TNT1 A 0 A_Explode(4,32,0)
TNT1 A 4 A_Stop
stop
}
}

actor SkullSpiralCooldown : Powerup {Powerup.Duration 30}