actor FutureScytheWep_NormalBar : NormalBar {args 136, 70}

actor FutureScytheWep : BaseMM8BDMWep
{
Weapon.AmmoUse 1
Weapon.AmmoGive 28
Weapon.SlotNumber 2
Inventory.Pickupmessage "$PU_FUTURESCYTHE"
Obituary "$OB_FUTURESCYTHE"
Tag "$TAG_FUTURESCYTHE"
weapon.ammotype "FutureScytheAmmo"
inventory.icon "FSCYICON"
States
{
SpawnLoop:
FSCY Z -1
loop
Ready:
FSCY A 0 ACS_NamedExecuteWithResult("core_weaponcolor",COLOR_FUTURESCYTHE)
FSCY A 0 A_JumpIfNoAmmo("ReadyNoAmmo")
FSCY A 1 A_WeaponReady
Goto Ready+1
ReadyC: Goto Ready+1
ReadyNoAmmo:
FSCY M 1 A_WeaponReady
FSCY M 0 A_JumpIfNoAmmo("ReadyNoAmmo")
Goto Ready+1
Deselect:
FSCY A 0
goto DeselectSwap
Select:
FSCY A 0
goto SelectSwap
Fire:
FSCY A 0 A_JumpIfNoAmmo("NoAmmo")
FSCY A 0 A_PlaySoundEx("weapon/futurescythe","Weapon")
FSCY A 0 A_FireCustomMissile("FutureScythe",0,1,8,0)
FSCY BCDEFGH 1
FSCY M 1 Offset(0,42)
FSCY M 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
FSCY M 1 A_Refire("Fire2")
FSCY A 0 A_JumpIfNoAmmo("NoneWait")
FSCY A 10
Goto Ready+1
Fire2:
FSCY A 0 A_JumpIfNoAmmo("NoAmmo")
FSCY A 0 A_PlaySoundEx("weapon/futurescythe","Weapon")
FSCY A 0 A_FireCustomMissile("FutureScythe",0,1,8,0)
FSCY CDEFGH 1
FSCY A 1 Offset(0,42)
FSCY A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
FSCY A 1 A_Refire("Fire3")
FSCY A 0 A_JumpIfNoAmmo("NoneWait")
FSCY A 10
Goto Ready+1
NoneWait:
FSCY M 10
goto Ready+1
Fire3:
FSCY A 0 A_JumpIfNoAmmo("NoAmmo")
FSCY A 0 A_PlaySoundEx("weapon/futurescythe","Weapon")
FSCY A 0 A_FireCustomMissile("FutureScythe",0,1,8,0)
FSCY CDEFGH 1
BurstWait:
TNT1 A 36
FSCY M 1 Offset(0,42)
FSCY M 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
goto Ready+1
NoAmmo:
FSCY M 1 ACS_NamedExecuteAlways("core_noammo",0)
Goto Ready+1
}
}

actor FutureScytheAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
+INVENTORY.IGNORESKILL
}

Actor FutureScythe : BasicProjectile
{
+RIPPER
var int user_PierceRipper;
Damage (CallACS("vile_cbm_damage",8))
obituary "$OB_FUTURESCYTHE"
damagetype "FutureScythe" 
radius 24
height 24
scale 2.5
Speed 42
Args 42 //return speed
States
{
Spawn:
FSCY I 0
FSCY A 0 A_GiveInventory("PierceRipperLimit", 3)
SpawnLoop:
FSCY IJKL 3
loop
Death: 
TNT1 A 4 A_CustomMissile("FutureScytheReturn",0,0,0,0)
stop
}
}


Actor FutureScytheReturn : FutureScythe
{
+NOCLIP
+NOINTERACTION
States
{
Spawn:
FSCY A 0
FSCY I 0 A_FaceTarget
FSCY A 0 A_GiveInventory("PierceRipperLimit", 3)
SpawnLoop:
FSCY IIIJJJKKKLLL 1 A_GiveInventory("FutureScytheFunc",1)
FSCY L 1 A_CustomMissile("FutureScytheReturn",0,0,0,0)
Stop
Death: 
TNT1 A 0
stop
}
}

actor FutureScytheFunc : CustomInventory
{
    States
    {
    Pickup:
	TNT1 A 0 A_GiveToTarget("AliveCheck",1)
	TNT1 A 0 A_JumpIfInTargetInventory("AliveCheckFlag",1,"Pickup2")
	RemoveThis:
	TNT1 A 0 A_RemoveMaster
	TNT1 A 0 Thing_Remove(0)
	stop
	Pickup2:
	TNT1 A 0 A_JumpIfCloser(60,"RemoveThis")
    TNT1 A 0 A_Explode(CallACS("vile_cbm_damage",7), 24, 0, 0, 24)
	TNT1 A 0 A_GiveInventory("HeadTowardsTarget_Arg0",1)
	TNT1 A 0 A_GiveInventory("WarpMasterHere",1)
	stop		
    }
}
