actor WildCoilBoss : BaseMM8BDMWep_CBM
{
dropitem "WildCoilWepCDropped"
Weapon.AmmoUse 10
Weapon.AmmoGive 140
Weapon.SlotNumber 1
Obituary "$OB_WILDCOIL"
weapon.ammotype "GumAmmo"
States
{
Spawn:
C_07 E 1
loop
Ready:
SPRR A 0 ACS_ExecuteAlways(998,0,844)
SPRR A 0 A_JumpIfInventory("GumAmmo",10,"Ready2")
SPRR A 1 A_WeaponReady(WRF_NOPRIMARY)
SPRR A 0 A_GiveInventory("GumAmmo",1)
Goto Ready+1
Ready2:
SPRR A 1 A_WeaponReady
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",10)
SPRR A 0 A_GiveInventory("SpringmanMain_CI",1)
SPRR BC 5
SPRR AA 2
SPRR A 3
Goto Ready+1
AltFire:
SPRR A 0 A_Jump(256,"AltfirePunch")
Goto Ready+1
AltfirePunch:
SPRR I 0 A_GiveInventory("SpringPunchFlag",1)
SPRR I 0 A_GiveInventory("SelfStoppedTF",1)
SPRR I 0 A_GiveInventory("StunArmor",1)
SPRR I 0 A_PlayWeaponSound("weapon/springpunch")
SPRR III 1 A_Stop
SPRR I 0 A_TakeInventory("AdapterWaitCount",999)
SPRR I 0 A_TakeInventory("FistReturning",999)
SPRR I 0 A_TakeInventory("FistFlag",999)
SPRR JJJD 1 A_Stop
SPRR DDDD 1 A_Stop
SPRR E 0 A_GiveInventory("SpringmanAlt_CI",1)
SPRR EEEEEEEEEEEE 1 A_Stop
FistWait:
SPRR E 1 A_JumpIfInventory("FistFlag",1,"FistFinish")
SPRR E 0 A_Stop
SPRR E 0 A_GiveInventory("AdapterWaitCount",1)
SPRR E 0 A_GiveInventory("GumAmmo",2)
SPRR E 0 A_JumpIfInventory("AdapterWaitCount",15,"FistFinish")
loop
FistFinish:
SPRR J 0 A_TakeInventory("SpringPunchFlag",99)
SPRR J 0 A_TakeInventory("StunArmor",99)
SPRR J 0 A_PlayWeaponSound("weapon/adapterreturn")
SPRR J 0 A_GiveInventory("SelfStoppedUnfreeze",1)
SPRR JJIIAAAA 2 A_GiveInventory("GumAmmo",2)
SPRR I 0 A_TakeInventory("FistFlag",999)
SPRR I 0 A_TakeInventory("AdapterWaitCount",999)
SPRR I 0 A_TakeInventory("FistReturning",999)
SPRR I 0 A_TakeInventory("FistReturningX",999)
Goto Ready+1
NoAmmo:
SPRR A 0
Goto Ready+1
}
}

actor GumAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 140
+INVENTORY.IGNORESKILL
}

actor SpringPunchFlag : OnceC{}
actor FistReturning : OnceC{}
actor FistReturningX : OnceC{}

actor WilderCoil
{
Translation "202:202=56:56"
PROJECTILE
Damage (35)
height 16
radius 12
speed 21
Obituary "$OB_WILDCOIL"
damagetype "WildCoil"
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:
TNT1 A 0 A_Stop
TNT1 A 0 A_ChangeFlag("NOGRAVITY",1)
TNT1 A 0 A_PlaySoundEx("weapon/SpringBounce2","Weapon")
TNT1 A 0 A_SpawnItemEx("WilderCoil2",0,0,8,18,0,5,15,1)
TNT1 A 0 A_SpawnItemEx("WilderCoil2",0,0,8,18,0,5,-15,1)
TNT1 A 2 A_SpawnItemEx("MMFX_BCDE",0,0,24)
stop
Crash:
XDeath:
TNT1 A 0 A_Stop
TNT1 A 0 A_ChangeFlag("NOGRAVITY",1)
TNT1 A 0 A_PlaySoundEx("weapon/SpringDed","Weapon")// A_SpawnItemEx("WilderCoil2SoundFix",0,0,16)
TNT1 A 2 A_SpawnItemEx("MMFX_BCDE",0,0,24)
stop
}
}

actor WilderCoilB : WilderCoil{translation "202:202=205:205", "198:198=74:74"}
actor WilderCoilR : WilderCoil{translation "202:202=171:171", "198:198=41:41"}
actor WilderCoilO : WilderCoil{translation "202:202=104:104", "198:198=128:128"}
actor WilderCoilP : WilderCoil{translation "202:202=229:229", "198:198=232:232"}

actor WilderCoil2 : WilderCoil
{
Bouncetype Classic
+BOUNCEONWALLS
+CANBOUNCEWATER
BounceSound "weapon/SpringBounce2"
Damage (15)
bouncefactor 1.0
wallbouncefactor 1.0
bouncecount 5
States
{
Death:
TNT1 A 0
goto XDeath
}
}


actor SpringFist
{
Translation "202:202=56:56", "198:198=40:40"
PROJECTILE
//+SKYEXPLODE//Causes Desync sadly
+DONTBLAST
+NOGRAVITY
+NOTARGETSWITCH
+DONTREFLECT
+SEEKERMISSILE
Radius 10
Height 10
scale 2.5
damage (0)
//damage (45)
damagetype "WildCoil2"
speed 50
reactiontime 20
Obituary "$OB_SPRINGFIST"
States
{
Spawn:
SPFI A 1
SPFI A 0 A_SpawnItemEx("CoilFX",-1,-8,-8,0,0,0,0,1)
SPFI A 0 A_CountDown
loop
Death:
SPFI C 0
SPFI C 0 A_PlaySoundEX("weapon/hardquakeland","Weapon")
SPFI C 0 A_Explode(40,128,0,0,16)
SPFI C 0 A_SpawnItemEx("SpringFistHitFX",0,0,8,0,0,0,0,1)
SPFI C 0 A_TakeFromTarget("AdapterWaitCount",20)
SPFI C 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_TARGET)
SPFI C 4 A_FaceTarget
SPFI C 0 A_ChangeFlag("NOINTERACTION",1)
SPFI C 1 A_GiveToTarget("FistReturning",1)
goto Death2
Death2:
SPFI C 0 A_TakeFromTarget("AdapterWaitCount",20)
SPFI C 0 A_JumpIfCloser(60,"Return")
SPFI CC 0 A_SeekerMissile(90,90,SMF_PRECISE)
SPFI C 1 A_GiveInventory("CutterFlag",1)
SPFI C 0 A_JumpIfInventory("CutterFlag",105,"DeathEnd")
SPFI C 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"DeathEnd")
loop
Return:
TNT1 A 1 A_GiveToTarget("FistFlag",1)
stop
DeathEnd:
TNT1 A 1 A_GiveToTarget("FistFlag",1)
stop
}
}

actor SpringFistHitFX : BasicClientSide
{
Scale 3.0
States
{
Spawn:
TA_C ABCDEF 2
stop
}
}

actor SpringFistB : SpringFist{translation "202:202=205:205", "198:198=74:74"}
actor SpringFistR : SpringFist{translation "202:202=171:171", "198:198=41:41"}
actor SpringFistO : SpringFist{translation "202:202=104:104", "198:198=128:128"}
actor SpringFistP : SpringFist{translation "202:202=229:229", "198:198=232:232"}

actor CoilFX
{
Translation "202:202=56:56"
PROJECTILE
+THRUACTORS
+SKYEXPLODE
+DONTBLAST
+NOGRAVITY
+NOINTERACTION
+NOTARGETSWITCH
+SEEKERMISSILE
reactiontime 70
damage (0)
Radius 2
Height 2
speed 50
scale 2.5
States
{
Spawn:
TNT1 A 1
SPFI B 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_TARGET)
SPFI B 0 A_FaceTarget
goto Spawn3
Spawn3:
SPFI B 1
SPFI B 0 A_CountDown
SPFI B 0 A_JumpIfInTargetInventory("FistReturning",1,"Return")
SPFI B 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
loop
Return:
SPFI B 0 A_JumpIfCloser(60,"Death")
SPFI BB 0 A_SeekerMissile(90,90,SMF_PRECISE)
goto Spawn3+3
Death:
TNT1 A 1
stop
}
}


actor SpringmanMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("WilderCoil",0,1,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("WilderCoilB",0,1,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("WilderCoilR",0,1,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("WilderCoilO",0,1,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("WilderCoilP",0,1,8,0)
goto Done
}
}

actor SpringmanAlt_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("SpringFist",0,0,-8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("SpringFistB",0,0,-8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("SpringFistR",0,0,-8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("SpringFistO",0,0,-8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("SpringFistP",0,0,-8,0)
goto Done
}
}
