actor WildCoilBoss : MegaBuster
{
Weapon.AmmoUse 2
Weapon.AmmoGive 28
Weapon.SlotNumber 1
Obituary "%o was bounced away by %k's Wild Coil."
weapon.ammotype "GumAmmo"
inventory.pickupsound "weapon/weaponup"
+WEAPON.AMMO_OPTIONAL
Scale 2.0
States
{
Spawn:
WEA3 K 1
loop
Ready:
SPRR A 0 ACS_ExecuteAlways(998,0,253)
SPRR A 0 A_JumpIfInventory("GumAmmo",2,"Ready2")
SPRR A 10 A_WeaponReady(WRF_NOPRIMARY|WRF_NOSWITCH)
SPRR A 0 A_GiveInventory("GumAmmo",1)
Goto Ready+1
Ready2:
SPRR A 10 A_WeaponReady(WRF_NOSWITCH)
SPRR A 0 A_GiveInventory("GumAmmo",1)
loop
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
SPRR A 1
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
SPRR A 1
Loop
Fire:
SPRR A 0 A_JumpIfNoAmmo("NoAmmo")
SPRR A 0 A_TakeInventory("GumAmmo",2)
SPRR A 0 A_FireCustomMissile("WilderCoil",0,1,8,0)
SPRR BC 5
//TNT1 A 8
SPRR AA 2
SPRR A 3
Goto Ready+1
AltFire:
SPRR A 0 A_GiveInventory("StayLocked",1)
SPRR A 0 SetPlayerProperty(0,1,4)
SPRR I 0 A_PlayWeaponSound("weapon/adapterfire")
SPRR IIIJJJ 1 A_Stop
SPRR D 1 A_Stop
SPRR A 0 A_GiveInventory("GumAmmo",1)
SPRR DDDD 1 A_Stop
SPRR I 0 A_FireCustomMissile("SpringFist",1,0,0,0)
SPRR I 0 A_GiveInventory("AdapterWaitCount",1)
SPRR E 1 A_Stop
SPRR I 0 A_FireCustomMissile("CoilFX",1,0,0,0)
SPRR E 1 A_Stop
SPRR I 0 A_FireCustomMissile("CoilFX",1,0,0,0)
SPRR E 1 A_Stop
SPRR I 0 A_FireCustomMissile("CoilFX",1,0,0,0)
SPRR A 0 A_GiveInventory("GumAmmo",1)
SPRR E 1 A_Stop
SPRR I 0 A_FireCustomMissile("CoilFX",1,0,0,0)
SPRR E 1 A_Stop
SPRR I 0 A_FireCustomMissile("CoilFX",1,0,0,0)
Goto FistWait
FistWait:
SPRR E 1 A_Stop
SPRR I 0 A_JumpIfInventory("FistFlag",1,"FistFinish")
SPRR I 0 A_FireCustomMissile("CoilFX",1,0,0,0)
SPRR E 1 A_Stop
SPRR I 0 A_JumpIfInventory("FistFlag",1,"FistFinish")
SPRR I 0 A_FireCustomMissile("CoilFX",1,0,0,0)
SPRR E 1 A_Stop
SPRR I 0 A_JumpIfInventory("FistFlag",1,"FistFinish")
SPRR I 0 A_FireCustomMissile("CoilFX",1,0,0,0)
SPRR E 1 A_Stop
SPRR I 0 A_JumpIfInventory("FistFlag",1,"FistFinish")
SPRR I 0 A_FireCustomMissile("CoilFX",1,0,0,0)
SPRR E 1 A_Stop
SPRR I 0 A_JumpIfInventory("FistFlag",1,"FistFinish")
SPRR I 0 A_FireCustomMissile("CoilFX",1,0,0,0)
SPRR E 1 A_Stop
SPRR I 0 A_JumpIfInventory("FistFlag",1,"FistFinish")
SPRR I 0 A_FireCustomMissile("CoilFX",1,0,0,0)
SPRR E 1 A_Stop
SPRR I 0 A_JumpIfInventory("FistFlag",1,"FistFinish")
SPRR I 0 A_FireCustomMissile("CoilFX",1,0,0,0)
SPRR A 0 A_GiveInventory("GumAmmo",1)
SPRR I 0 A_GiveInventory("AdapterWaitCount",1)
SPRR I 0 A_JumpIfInventory("AdapterWaitCount",7,"FistFinish")
loop
FistFinish:
SPRR I 0 A_TakeInventory("AdapterWaitCount",999)
SPRR I 0 A_TakeInventory("FistReturning",999)
SPRR I 0 A_TakeInventory("FistFlag",999)
SPRR I 0 A_PlayWeaponSound("weapon/adapterreturn")
SPRR A 0 SetPlayerProperty(0,0,4)
SPRR A 0 A_TakeInventory("StayLocked",999)
SPRR JJJIIII 1
SPRR A 0 A_GiveInventory("GumAmmo",1)
SPRR A 10
SPRR A 0 A_GiveInventory("GumAmmo",1)
SPRR A 10
SPRR A 0 A_GiveInventory("GumAmmo",1)
SPRR A 10
SPRR A 0 A_GiveInventory("GumAmmo",1)
Goto Ready+1
NoAmmo:
SPRR A 0
//SPRR A 1 ACS_Execute(979,0)
Goto Ready+1
}
}

actor GumAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
}

actor FistReturning : Inventory
{
inventory.amount 1
inventory.maxamount 1
}

actor WilderCoil
{
PROJECTILE
Damage (20)
height 16
radius 12
speed 18
damagetype "Coil"
scale 2.5
-NOGRAVITY
States
{
Spawn:
SPRR F 0 
SPRR F 0 ThrustThingZ(0,5,1,1)
Goto Bouncing
Bouncing:
SPRR FGHFGH 5
loop
Death:
SPRR F 0 A_Stop
SPRR F 0 A_ChangeFlag("NOGRAVITY",0)
SPRR F 0 A_PlaySoundEx("weapon/coilbounce1","Voice")
SPRR F 0 A_SpawnItemEx("WilderCoil2",0,0,8,18,0,5,15)
SPRR F 0 A_SpawnItemEx("WilderCoil2",0,0,8,18,0,5,-15)
stop
}
}

actor WilderCoil2
{
PROJECTILE
+DOOMBOUNCE
SeeSound "weapon/coilbounce1"
Damage (15)
height 16
radius 12
speed 18
damagetype "Coil"
bouncefactor 1.0
wallbouncefactor 1.0
bouncecount 5
scale 2.5
-NOGRAVITY
States
{
Spawn:
SPRR F 0 
SPRR F 0 ThrustThingZ(0,5,1,1)
Goto Bouncing
Bouncing:
SPRR FGHFGH 5
loop
Death:
SPRR F 0 A_Stop
SPRR F 0 A_ChangeFlag("NOGRAVITY",0)
SPRR F 0 A_PlaySoundEx("weapon/coilexplode","Voice")
MMFX BCDE 2
stop
}
}

actor SpringFist
{
PROJECTILE
-EXTREMEDEATH
+SKYEXPLODE
+DONTBLAST
+NOGRAVITY
Radius 10
Height 10
scale 2.5
damage (0)
//damage (45)
damagetype "Coil"
speed 50
reactiontime 20
Obituary "%o was knocked out by %k's Spring Punch."
States
{
Spawn:
SPFI J 0
SPFI A 1 
//SPFI J 0 A_SpawnItemEx("CoilFX")
SPFI J 0 A_CountDown
SPFI A 1
SPFI J 0 A_CountDown
loop
Death:
HFIS A 0 A_PlaySoundEX("weapon/hardquakeland","Weapon")
TNT1 A 0 A_Explode(45, 128, 0)
TNT1 A 0 A_GiveToTarget("FistReturning", 1)
TNT1 A 1 A_CustomMissile("SpringFistReturn",0,0,0,0)
stop
}
}

actor CoilFX : SpringFist
{
//+CLIENTSIDEONLY
+NOINTERACTION
States
{
Spawn:
SPFI B 1
SPFI B 0 A_JumpIfInTargetInventory("CutterFlag",998,"Death")
SPFI B 0 A_JumpIfInTargetInventory("FistReturning",1,"Return")
SPFI B 0 A_JumpIfInTargetInventory("AdapterWaitCount",1,"Spawn")
stop
Return:
TNT1 A 1 A_CustomMissile("CoilFXReturn",0,0,0,0)
stop
Death:
TNT1 A 1
stop
}
}

actor CoilFXReturn : CoilFX
{
States
{
Spawn:
SPFI B 1
SPFI B 0 A_JumpIfInTargetInventory("CutterFlag",998,"Death")
SPFI J 0 A_JumpIfCloser(60,"Death")
SPFI B 0 A_JumpIfInTargetInventory("AdapterWaitCount",1,"Spawn")
stop
}
}

actor SpringFistReturn
{
radius 0
height 0
speed 40
damage 0
scale 2.5
+DONTBLAST
+NOTARGETSWITCH
+DOOMBOUNCE
+RIPPER
PROJECTILE
+SKYEXPLODE
bouncefactor 1.0
wallbouncefactor 1.0
+DONTSPLASH
+NOINTERACTION
states
{
Spawn:
SPFI A 1 A_FaceTarget
SPFI J 0 A_JumpIfCloser(60,"Return")
SPFI A 1 A_FaceTarget
SPFI J 0 A_JumpIfCloser(60,"Return")
SPFI A 1 A_FaceTarget
SPFI J 0 A_JumpIfCloser(60,"Return")
SPFI A 1 A_FaceTarget
SPFI J 0 A_JumpIfCloser(60,"Return")
TNT1 A 0 A_CustomMissile("FistReturn",0,0,0,0)
stop
Return:
SPFI J 0 A_GiveToTarget("FistFlag",1)
stop
}
}