actor WildCoilBoss : BaseMM8BDMWep_CBM
{
tag "$TAGC_7E"
dropitem "WildCoilWepCDropped"
Weapon.AmmoUse 20
Weapon.AmmoGive 140
Obituary "$OB_WILDCOIL"
weapon.ammotype "GumAmmo"
States
{
Spawn:
C_07 E 1
loop
Ready:
SPFI A 0 ACS_ExecuteAlways(998,0,DYE_SPRINGMAN)
goto Ready1
Ready1:
SPFI A 0 A_JumpIfInventory("GumAmmo",20,"Ready2")
SPFI A 2 A_WeaponReady(4)
SPFI A 0 A_GiveInventory("GumAmmo",2)
loop
Ready2:
SPFI A 2 A_WeaponReady
SPFI A 0 A_GiveInventory("GumAmmo",2)
loop
Deselect:
SPFI AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
SPFI A 1 A_Lower
Loop
Select:
SPFI AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
SPFI A 1 A_Raise
Loop
Fire:
SPFI A 0 A_GiveInventory("SpringmanMain_P",1)
SPFI BC 5
SPFI A 4
SPFI A 3
Goto Ready1
AltFire:
SPFI A 0 A_Jump(256,"AltfirePunch")
Goto Ready1
AltfirePunch:
SPFI A 0 A_GiveInventory("VivifyFlag1",1)
//SPFI A 0 A_GiveInventory("SelfStoppedTF",1)
//SPFI A 0 A_GiveInventory("StunArmor",1)
SPFI A 0 A_PlaySound("weapon/springpunch",1)
SPFI A 2 Offset(2,52)
SPFI A 2 Offset(5,72)
SPFI A 1 Offset(9,92)
SPFI A 0 A_ReFire("AltfirePunch1")
goto AltfirePunch2

AltfirePunch1:
SPFI D 0 A_GunFlash
SPFI D 0 A_GiveInventory("SelfStoppedTF",1)
SPFI D 0 A_GiveInventory("StunArmor",1)
SPFI D 0 A_TakeInventory("AdapterWaitCount",999)
SPFI D 0 A_TakeInventory("FistReturning",999)
SPFI D 3 Offset(-16,91)A_TakeInventory("FistFlag",999)
SPFI D 5 Offset(-10,52)
SPFI E 12 Offset(2,33)A_GiveInventory("SpringmanAlt_CI",1)
goto FistWait1
FistWait1:
SPFI E 1 Offset(2,33)A_JumpIfInventory("FistFlag",1,"FistFinish")
SPFI E 0 A_GiveInventory("AdapterWaitCount",1)
SPFI E 0 A_GiveInventory("SpringmanRageCheck",1)
SPFI E 0 A_JumpIfInventory("AdapterWaitCount",15,"FistFinish")
loop

AltfirePunch2:
SPFI D 0 A_TakeInventory("AdapterWaitCount",999)
SPFI D 0 A_TakeInventory("FistReturning",999)
SPFI D 3 Offset(-16,91)A_TakeInventory("FistFlag",999)
SPFI D 5 Offset(-10,52)
SPFI E 12 Offset(2,33)A_GiveInventory("SpringmanAlt2_CI",1)
goto FistWait2
FistWait2:
SPFI E 1 Offset(2,33)A_JumpIfInventory("FistFlag",1,"FistFinish")
SPFI E 0 A_GiveInventory("AdapterWaitCount",1)
SPFI E 0 A_JumpIfInventory("AdapterWaitCount",20,"FistFinish")
loop
FistFinish:
SPFI D 0 A_TakeInventory("VivifyFlag1")
SPFI D 0 A_TakeInventory("StunArmor",99)
SPFI D 0 A_PlaySound("weapon/adapterreturn",1)
SPFI D 0 A_GiveInventory("SelfStoppedUnfreeze",1)

SPFI D 2 Offset(2,33)A_GiveInventory("GumAmmo",2)
SPFI D 2 Offset(-11,61)A_GiveInventory("GumAmmo",2)
SPFI D 2 Offset(-20,89)A_GiveInventory("GumAmmo",2)
TNT1 AA 2 A_GiveInventory("GumAmmo",2)
SPFI A 2 Offset(9,80)A_GiveInventory("GumAmmo",2)
SPFI A 2 Offset(5,58)A_GiveInventory("GumAmmo",2)
SPFI A 2 Offset(2,42)A_GiveInventory("GumAmmo",2)

SPFI A 0 A_TakeInventory("FistFlag",999)
SPFI A 0 A_TakeInventory("AdapterWaitCount",999)
SPFI A 0 A_TakeInventory("FistReturning",999)
SPFI A 0 A_TakeInventory("FistReturningX",999)
Goto Ready1

Flash:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
TNT1 A 0 A_Stop
TNT1 A 1
TNT1 A 0 A_JumpIfInventory("SelfStoppedTFFlag",1,"Flash")
stop

}
}

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

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

actor SpringmanRageCheck : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("PowerRage_ST",1,"PickupR")
TNT1 A 0 A_GiveInventory("GumAmmo",2)
stop
PickupR:
TNT1 A 0 A_GiveInventory("GumAmmo",4)
stop
}
}

actor SpringmanMain_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_CheckFloor("Pickup2")
TNT1 A 0 A_GiveInventory("SpringmanMain_CI",1)
stop
Pickup2:
TNT1 A 0 A_GiveInventory("SpringmanMain1_CI",1)
stop
}
}

actor WilderCoil
{
Translation "202:202=56:56","204:204=215:215"
PROJECTILE
damagetype "SpringM_Coil"
Obituary "$OB_WILDCOIL"
-NOGRAVITY
+USEBOUNCESTATE
+BOUNCEONWALLS
+BOUNCEONFLOORS
+BOUNCEONCEILINGS
+CANBOUNCEWATER
bouncecount 5
bouncefactor 0.65
wallbouncefactor 0.65
ReactionTime 1
Damage (150)
height 16
radius 12
speed 34
scale 2.5
States
{
Spawn:
SPFI K 0
SPFI K 0 ThrustThingZ(0,6,1,1)
Goto Bouncing
Bouncing:
SPFI KLMKLM 5
loop
Bounce:
TNT1 A 0 A_ChangeFlag("USEBOUNCESTATE",0)
TNT1 A 0 A_PlaySoundEx("weapon/SpringBounce2","Weapon")
TNT1 A 0 A_SpawnItemEx("WilderCoil2",0,0,0,sqrt(momx*momx+momy*momy),0,momz,15,1)
TNT1 A 0 A_SpawnItemEx("WilderCoil2",0,0,0,sqrt(momx*momx+momy*momy),0,momz,-15,1)
TNT1 A 1 A_CountDown
wait
Death:
Crash:
XDeath:
TNT1 A 0 A_PlaySoundEx("weapon/SpringDed","Weapon")
TNT1 A 1 A_SpawnItemEx("WilderCoilDeathFX",0,0,25,0,0,0,0,1)
stop
}
}
actor WilderCoilB : WilderCoil{translation "202:202=205:205", "204:204=205:205"}
actor WilderCoilR : WilderCoil{translation "202:202=171:171", "204:204=171:171"}
actor WilderCoilO : WilderCoil{translation "202:202=104:104", "204:204=104:104"}
actor WilderCoilP : WilderCoil{translation "202:202=229:229", "204:204=229:229"}

actor WilderCoilDeathFX : BasicClientSide
{
States
{
Spawn:
VMFX I 0
VMFX IJK 2
XMFX D 2
stop
}
}

actor WilderCoil1 : WilderCoil
{
States
{
Spawn:
SPFI K 0
SPFI K 0 ThrustThingZ(0,6,1,1)
SPFI K 5 A_GiveInventory("Once",1)
Goto Bouncing+1
Bounce.Floor:
TNT1 A 0 A_JumpIfInventory("Once",1,"Bounce")
TNT1 A 0 A_ChangeFlag("USEBOUNCESTATE",0)
TNT1 A 0 A_PlaySoundEx("weapon/SpringBounce2","Weapon")
TNT1 A 0 A_SpawnItemEx("WilderCoil3",0,0,8,18,0,7,90,1)
TNT1 A 0 A_SpawnItemEx("WilderCoil3",0,0,8,18,0,7,-90,1)
TNT1 A 1 A_CountDown
wait
}
}
actor WilderCoil1B : WilderCoil1{translation "202:202=205:205", "204:204=205:205"}
actor WilderCoil1R : WilderCoil1{translation "202:202=171:171", "204:204=171:171"}
actor WilderCoil1O : WilderCoil1{translation "202:202=104:104", "204:204=104:104"}
actor WilderCoil1P : WilderCoil1{translation "202:202=229:229", "204:204=229:229"}


actor WilderCoil2 : WilderCoil
{
-USEBOUNCESTATE
bouncecount 5
bouncefactor 1.0
wallbouncefactor 1.0
BounceSound "weapon/SpringBounce2"
Damage (100)
States
{
Spawn:
SPFI K 0
SPFI K 0
Goto Bouncing
}
}

actor WilderCoil3 : WilderCoil2
{
States
{
Spawn:
SPFI K 0
SPFI K 0 ThrustThingZ(0,6,1,1)
Goto Bouncing
}
}


actor SpringFist
{
Translation "202:202=56:56","192:192=4:4","198:198=40:40"
PROJECTILE
damagetype "SpringM_Fist"
Obituary "$OB_SPRINGFIST"
//+SKYEXPLODE//Causes Desync sadly
+DONTBLAST
+NOGRAVITY
+NOTARGETSWITCH
+DONTREFLECT
+SEEKERMISSILE
reactiontime 20
damage (0)
Radius 10
Height 10
speed 54
scale 2.5
States
{
Spawn:
SPFI P 1
SPFI P 0 A_SpawnItemEx("SpringmanFistCoilFX",-1,-8,-8,0,0,0,0,1)
SPFI P 0 A_CountDown
loop
Death:
SPFI R 0
SPFI R 0 A_PlaySoundEX("weapon/hardquakeland","Weapon")
SPFI R 0 A_Explode(350,96,0,0,32)
SPFI R 0 A_SpawnItemEx("SpringFistHitFX",0,0,8,0,0,0,0,1)
SPFI R 0 A_TakeFromTarget("AdapterWaitCount",20)
SPFI R 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_TARGET)
SPFI R 4 A_FaceTarget
SPFI R 0 A_ChangeFlag("NOINTERACTION",1)
SPFI R 1 A_GiveToTarget("FistReturning",1)
goto Death2
Death2:
SPFI R 0 A_TakeFromTarget("AdapterWaitCount",20)
SPFI R 0 A_JumpIfCloser(60,"Return")
SPFI RR 0 A_SeekerMissile(90,90,SMF_PRECISE)
SPFI R 1 A_GiveInventory("CutterFlag",1)
SPFI R 0 A_JumpIfInventory("CutterFlag",105,"DeathEnd")
SPFI R 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
{
+FORCEXYBILLBOARD
Scale 3.0
States
{
Spawn:
X_8B ABCDEF 2
stop
}
}

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

actor SpringFistWeak : SpringFist
{
reactiontime 15
speed 48
States
{
Death:
SPFI R 0
SPFI R 0 A_PlaySoundEX("weapon/hardquakeland","Weapon")
SPFI R 0 A_Explode(250,80,0,0,24)
SPFI R 0 A_SpawnItemEx("SpringFistWeakHitFX",0,0,8,0,0,0,0,1)
goto Super::Death+4
}
}

actor SpringFistWeakHitFX : SpringFistHitFX
{
Scale 2.25
}

actor SpringFistWeakB : SpringFistWeak{Translation"202:202=205:205","192:192=205:205","198:198=74:74"}
actor SpringFistWeakR : SpringFistWeak{Translation"202:202=171:171","192:192=171:171","198:198=41:41"}
actor SpringFistWeakO : SpringFistWeak{Translation"202:202=104:104","192:192=104:104","198:198=128:128"}
actor SpringFistWeakP : SpringFistWeak{Translation"202:202=229:229","192:192=229:229","198:198=232:232"}

actor SpringmanFistCoilFX
{
Translation "202:202=56:56"
+MISSILE
+THRUACTORS
+SKYEXPLODE
+DONTBLAST
+NOGRAVITY
+NOINTERACTION
+NOTARGETSWITCH
+SEEKERMISSILE
+FORCEXYBILLBOARD
reactiontime 70
damage (0)
Radius 2
Height 2
speed 50
scale 2.5
States
{
Spawn:
TNT1 A 1
SPFI Q 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_TARGET)
SPFI Q 0 A_FaceTarget
goto Spawn3
Spawn3:
SPFI Q 1
SPFI Q 0 A_CountDown
SPFI Q 0 A_JumpIfInTargetInventory("FistReturning",1,"Return")
SPFI Q 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
loop
Return:
SPFI Q 0 A_JumpIfCloser(60,"Death")
SPFI Q 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 SpringmanMain1_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("WilderCoil1",0,1,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("WilderCoil1B",0,1,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("WilderCoil1R",0,1,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("WilderCoil1O",0,1,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("WilderCoil1P",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
}
}

actor SpringmanAlt2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("SpringFistWeak",0,0,-8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("SpringFistWeakB",0,0,-8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("SpringFistWeakR",0,0,-8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("SpringFistWeakO",0,0,-8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("SpringFistWeakP",0,0,-8,0)
goto Done
}
}
