actor WildCoilWep : MegaBuster 10084
{
Weapon.AmmoUse 2
Weapon.AmmoGive 28
Weapon.SlotNumber 4
Obituary "%o was bounced away by %k's Wild Coil."
Inventory.Pickupmessage "Power up! Wild Coil!"
weapon.ammotype "WildCoilAmmo"
inventory.pickupsound "weapon/weaponup"
inventory.icon "WCOISI"
+WEAPON.AMMO_OPTIONAL
Scale 2.0
States
{
Spawn:
WEA3 K 1
loop
Ready:
WCOI A 0 ACS_ExecuteAlways(998,0,58)
WCOI A 1 ACS_ExecuteAlways(991,0,58)
WCOI A 1 A_WeaponReady
Goto Ready+2
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
WCOI A 1
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
WCOI A 1
Loop
Fire:
WCOI A 0 A_JumpIfNoAmmo("NoAmmo")
WCOI A 1
goto Hold
Hold:
WCOI A 0 A_JumpIfNoAmmo("NoAmmo")
WCOI A 0 A_JumpIfInventory("WeaponCharge",4,"Hold2")
WCOI A 0 A_JumpIfInventory("WeaponCharge",3,"HoldStart")
WCOI A 2 A_GiveInventory("WeaponCharge",1)
WCOI A 0 ACS_ExecuteAlways(994,0)
WCOI A 0 A_Refire
Goto Fire1
HoldStart:
WCOI A 0 A_PlaySoundEx("weapon/coilstart", "Weapon")
Goto Hold2
Hold2:
//WCOI A 0 A_StopSoundEx ("Weapon") 
WCOI A 0 A_JumpIfInventory("WeaponCharge",23,"Hold3")
WCOI A 0 A_JumpIfInventory("WeaponCharge",22,"HoldStart2")
WCOI G 1 ACS_ExecuteAlways(991,0,74)
WCOI G 0 ACS_ExecuteAlways(991,0,58)
WCOI H 1 A_GiveInventory("WeaponCharge",1)
WCOI G 0 A_Refire
Goto Fire1
HoldStart2:
SAPT A 0 ACS_ExecuteAlways(974,0)
WCOI H 0 A_GunFlash
WCOI A 0 A_GiveInventory("WeaponCharge",1)
Goto Hold3
Hold3: 
//WCOI H 0 A_PlaySoundEx("weapon/coilcharge", "Weapon")
WCOI H 1 ACS_ExecuteAlways(991,0,75)
WCOI I 1 ACS_ExecuteAlways(991,0,76)
WCOI H 0 A_Refire
Goto Fire2
Flash:
TNT1 H 5 A_PlaySoundEx("weapon/coilcharge", "Weapon")
TNT1 H 0 A_JumpIfInventory("WeaponCharge",1,"Flash")
stop
Fire1:
WCOI A 0 A_StopSoundEx ("Weapon") 
WCOI A 0 A_TakeInventory("WeaponCharge",500)
WCOI A 0 A_ClearRefire
WCOI A 0 //A_PlaySoundEx("weapon/atomicfire","Weapon")
WCOI A 0 A_TakeInventory("WildCoilAmmo",2)
WCOI A 0 A_FireCustomMissile("WildCoil",35,0,0,0)
WCOI A 0 A_FireCustomMissile("WildCoil",-35,0,0,0)
WCOI BCDEF 2
//TNT1 A 8
WCOI SR 2
Goto Ready+1
Fire2:
HEAT G 0 A_StopSoundEx ("Weapon") 
HEAT G 0 A_TakeInventory("WeaponCharge",500)
HEAT G 0 A_ClearRefire
HEAT G 0 //A_PlaySoundEx("weapon/wild","Weapon")
HEAT G 0 A_JumpIfInventory("WildCoilAmmo", 5, "Fire2r")
HEAT G 0 A_TakeInventory("WildCoilAmmo",4)
WCOI A 0 A_FireCustomMissile("WildCoil",35,0,0,6)
WCOI A 0 A_FireCustomMissile("WildCoil",-35,0,0,6)
WCOI BCDEF 2
TNT1 A 8
WCOI SR 2
Goto Ready+1
Fire2r:
WCOI A 0 A_TakeInventory("WildCoilAmmo",5)
WCOI A 0 A_FireCustomMissile("WildCoil2",35,0,0,6)
WCOI A 0 A_FireCustomMissile("WildCoil2",-35,0,0,6)
WCOI A 0 ACS_ExecuteAlways(991,0,58)
WCOI BCDEF 2
TNT1 A 8
WCOI SR 2
Goto Ready+1
NoAmmo:
WCOI A 1 ACS_Execute(979,0)
WCOI A 0 A_Refire
Goto Ready+1
}
}

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

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


actor WildCoil2
{
PROJECTILE
+DOOMBOUNCE
SeeSound "weapon/coilbounce2"
Damage (60)
height 16
radius 12
speed 25
bouncefactor 1.0
damagetype "Coil2"
wallbouncefactor 1.0
bouncecount 5
scale 2.5
-NOGRAVITY
States
{
Spawn:
WCOI J 0 
WCOI J 0 ThrustThingZ(0,15,1,1)
Goto Bouncing
Bouncing:
WCOI NOPQPO 5
loop
Death:
WCOI J 0 A_Stop
WCOI J 0 A_ChangeFlag("NOGRAVITY",0)
WCOI J 0 A_PlaySoundEx("weapon/coilexplode","Voice")
MMFX BCDE 2
stop
}
}
