actor MTankX : MTank //replaces MTank
{
States
{
Use:
EBAL E 0 A_PlaySound("item/energyup")
EBAL E 0 A_PlaySoundEx("item/refill","Voice")
EBAL E 0 HealThing(200)
EBAL E 0 ACS_ExecuteAlways(992, 0, 0, 1)
EBAL E 0 A_TakeInventory("MTankX",1)
fail
}
}

actor UpgradeSelectBase : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("MegaBusterC",1)
TNT1 A 0 A_GiveInventory("MegaBusterFlag",1)
TNT1 A 0 A_SelectWeapon("MegaBusterC")
stop
}
}

actor AdaptorUpgrade2 : AdaptorUpgrade //replaces AdaptorUpgrade
{
states
{
Use:
TNT1 A 0 SetPlayerProperty(0,0,0)
TNT1 A 0 SetPlayerProperty(0,0,3)
//TNT1 A 0 SetPlayerProperty(0,0,4)
TNT1 A 0 ACS_ExecuteAlways(648,0,3)//FixJump/Speed for Mega
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_JumpIfInventory("SuperAdaptorWepC",1,"Back")
TNT1 A 0 A_TakeInventory("BusterGiven", 999)
TNT1 A 0 A_GiveInventory("BusterGiven",3)
TNT1 A 0 A_GiveInventory("UpgradeSelectSuperA",1)
stop
Back:
TNT1 A 0 A_GiveInventory("UpgradeSelectBase",1)
TNT1 A 0 A_TakeInventory("SuperAdaptorWepC",1)
stop
}
}

actor UpgradeSelectSuperA : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("SuperAdaptorWepC",1)
TNT1 A 0 A_SelectWeapon("SuperAdaptorWepC")
TNT1 A 0 A_TakeInventory("MegaBusterFlag",1)
stop
}
}

actor LaserBusterUpgrade2 : LaserBusterUpgrade //replaces LaserBusterUpgrade
{
states
{
Use:
TNT1 A 0 SetPlayerProperty(0,0,0)
TNT1 A 0 SetPlayerProperty(0,0,3)
//TNT1 A 0 SetPlayerProperty(0,0,4)
TNT1 A 0 ACS_ExecuteAlways(648,0,3)
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_JumpIfInventory("LaserBusterC",1,"Back")
TNT1 A 0 A_TakeInventory("BusterGiven", 999)
TNT1 A 0 A_GiveInventory("BusterGiven",4)
TNT1 A 0 A_GiveInventory("UpgradeSelectLaser",1)
stop
Back:
TNT1 A 0 A_GiveInventory("UpgradeSelectBase",1)
TNT1 A 0 A_TakeInventory("LaserBusterC",1)
stop
}
}

actor UpgradeSelectLaser : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("LaserBusterC",1)
TNT1 A 0 A_SelectWeapon("LaserBusterC")
TNT1 A 0 A_GiveInventory("MegaBusterFlag",1)
stop
}
}

actor ArrowBusterUpgrade2 : ArrowBusterUpgrade //replaces ArrowBusterUpgrade
{
states
{
Use:
TNT1 A 0 SetPlayerProperty(0,0,0)
TNT1 A 0 SetPlayerProperty(0,0,3)
//TNT1 A 0 SetPlayerProperty(0,0,4)
TNT1 A 0 ACS_ExecuteAlways(648,0,3)
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_JumpIfInventory("ArrowBusterC",1,"Back")
TNT1 A 0 A_TakeInventory("BusterGiven", 999)
TNT1 A 0 A_GiveInventory("BusterGiven",5)
TNT1 A 0 A_GiveInventory("UpgradeSelectArrow",1)
stop
Back:
TNT1 A 0 A_GiveInventory("UpgradeSelectBase",1)
TNT1 A 0 A_TakeInventory("ArrowBusterC",1)
stop
}
}

actor UpgradeSelectArrow : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("ArrowBusterC",1)
TNT1 A 0 A_SelectWeapon("ArrowBusterC")
TNT1 A 0 A_GiveInventory("MegaBusterFlag",1)
stop
}
}

actor JetUpgrade : BasicCustomInventory //replaces BassUpgrade
{
Inventory.RespawnTics 350
inventory.pickupmessage "$PU_JETADAPTOR"
Tag "$TAG_JETADAPTOR"
inventory.icon "JETUP"
states
{
Spawn:
JETB D 1
loop
Use:
TNT1 A 0 SetPlayerProperty(0,0,0)
TNT1 A 0 SetPlayerProperty(0,0,3)
//TNT1 A 0 SetPlayerProperty(0,0,4)
TNT1 A 0 ACS_ExecuteAlways(648,0,3)
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_JumpIfInventory("JetBusterC",1,"Back")
TNT1 A 0 A_TakeInventory("BusterGiven", 999)
TNT1 A 0 A_GiveInventory("BusterGiven",1)
TNT1 A 0 A_GiveInventory("UpgradeSelectJet",1)
stop
Back:
TNT1 A 0 A_GiveInventory("UpgradeSelectBase",1)
TNT1 A 0 A_TakeInventory("JetBusterC",1)
stop
}
}

actor UpgradeSelectJet : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("JetBusterC",1)
TNT1 A 0 A_SelectWeapon("JetBusterC")
TNT1 A 0 A_TakeInventory("MegaBusterFlag",1)
stop
}
}

actor PowerUpgrade : BasicCustomInventory //replaces ProtoUpgrade
{
Inventory.RespawnTics 350
inventory.pickupmessage "$PU_POWERADAPTOR"
Tag "$TAG_POWERADAPTOR"
inventory.icon "POWUP"
states
{
Spawn:
POWA H 1
loop
Use:
TNT1 A 0 SetPlayerProperty(0,0,0)
TNT1 A 0 SetPlayerProperty(0,0,3)
//TNT1 A 0 SetPlayerProperty(0,0,4)
TNT1 A 0 ACS_ExecuteAlways(648,0,3)
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_JumpIfInventory("PowerFistC",1,"Back")
TNT1 A 0 A_TakeInventory("BusterGiven", 999)
TNT1 A 0 A_GiveInventory("BusterGiven",2)
TNT1 A 0 A_GiveInventory("UpgradeSelectPower",1)
stop
Back:
TNT1 A 0 A_GiveInventory("UpgradeSelectBase",1)
TNT1 A 0 A_TakeInventory("PowerFistC",1)
stop
}
}

actor UpgradeSelectPower : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("PowerFistC",1)
TNT1 A 0 A_SelectWeapon("PowerFistC")
TNT1 A 0 A_TakeInventory("MegaBusterFlag",1)
stop
}
}


actor TrebleSummon : EddieSummon
{
inventory.pickupmessage "$PU_TREBLECALL"
Tag "$TAG_TREBLECALL"
inventory.icon "TrebEddy"
states
{
Spawn:
TRB2 A 1
loop
Use:
WEAP Q 0 A_PlaySoundEx("item/refill","Voice")
WEAP Q 0 A_SpawnItemEx("TrebleTeleportI", 80, 0, 256, 0, 0, -24, 0, SXF_NOCHECKPOSITION, 0)
stop
}
}

actor TrebleTeleportI : EddieTeleport
{
states
{
Spawn:
TRBL F 0
TRBL F 9 
TRBL FFFFFFFFFF 1 A_CheckFloor("Next")
Goto Next
Next:
TRBL F 0 A_ChangeFlag("NOINTERACTION", 0)
TRBL F 0 A_ChangeFlag("NOGRAVITY", 0)
Goto Death
Death:
TNT1 A 0 A_SpawnItemEx("TrebleI",0,0,0,0,0,momz,0,SXF_NOCHECKPOSITION,0) 
stop
}
}

actor TrebleI : Eddie
{
speed 0
states
{
Spawn:
TRBL F 0 A_Jump(256,"Death")
TRBL F 0 A_ChangeFlag("MISSILE",0)
TRBL F 1 A_JumpIf(z-floorz<=0, "Search")
Goto Spawn+2
Search:
TRBL A 0 A_ChangeFlag("NOCLIP",0)
TRBL GH 2
TREB H 0 A_PlaySound("misc/polarroar",1,1.0)
TRBL BBCCBBCCBBCCBBCCBBCC 1 A_Chase
TRBL A 0 A_CountDown
Goto Search+4
Melee:
TRBL D 7 A_FaceTarget
TRBL E 18 A_SpawnItemEx("RandomWeapon",0,0,32,0,0,0)
TRBL E 0 A_Die
Goto Death
Death:
TRBL F 0 ThrustThingZ(0, 34, 0, 1)
TRBL F 0 A_ChangeFlag("NOGRAVITY", 1)
TRBL F 1 A_JumpIf(z-ceilingz==0-32, "Bye")
Goto Death+2
Bye:
TRBL F 1
stop
}
}

actor RushCoilC : RushCoil
{
}


actor RushJetC : RushJet
{
}

actor ETankC : ETank
{
States
{
Use:
EBAL E 0 A_JumpIf(ACS_ExecuteWithResult(C_HEALTHACS,1),"Success")
fail
Success:
EBAL E 0 A_PlaySound("item/energyup")
EBAL E 0 A_PlaySoundEx("item/refill","Voice")
EBAL E 0 HealThing(200)
EBAL E 0 A_TakeInventory("ETankC",1)
fail
}
}

actor ClassETank : ETank
{
inventory.icon "CTANK"
States
{
Spawn:
EBAL FE 6
loop
Use:
EBAL E 0 A_JumpIf(ACS_ExecuteWithResult(C_HEALTHACS,1),"Success")
fail
Success:
EBAL E 0 A_PlaySound("item/energyup")
EBAL E 0 A_PlaySoundEx("item/refill","Voice")
EBAL E 0 ACS_ExecuteAlways(C_HEALTHACS,0,3,40)
EBAL E 0 A_TakeInventory("ClassETank",1)
fail
}
}

actor WTankC : WTank
{
States
{
Success:
EBAL E 0 A_PlaySound("item/energyup")
EBAL E 0 A_PlaySoundEx("item/refill","Voice")
EBAL E 0 ACS_Execute(992, 0, 100)
EBAL E 0 A_TakeInventory("WTankC",1)
fail
}
}

actor TangoSummonC : TangoSummon
{
}

actor TrebleSentryC : TrebleSentry
{
}

actor Item1C : Item1
{
}

actor Item2C : Item2
{
}

actor WireAdaptorC : WireAdaptor
{
}

actor WireAdaptorGrappleC : WireAdaptorGrapple replaces WireAdaptorGrapple
{
States
{
Ceiling:
TCLA C 0 A_GiveToTarget("WireFlag",1)
TCLA C 0 A_TakeFromTarget("WireAdaptorC",1)
TCLA C 0 A_SpawnItemEx("WireAdaptorPeg")
stop
}
}

actor Carry : BasicCustomInventory
{
Inventory.RespawnTics 350
inventory.pickupmessage "$PU_CARRY"
Tag "$TAG_CARRY"
inventory.icon "CARRI"
states
{
Spawn:
CARY D 1
loop
Use:
HFIS A 0 A_JumpIf(momz==0, "land")
WEA2 A 0 A_SpawnItemEx("CarryPlatform",0,0,14,0,0,-1)
stop
Land:
WEA2 A 0 A_SpawnItemEx("CarryPlatform",56,0,38,1)
stop
}
}

actor DocCarry : Carry
{
inventory.maxamount 20
states
{
Use:
TNT1 A 0 A_JumpIf(momz==0, "land")
TNT1 A 0 A_SpawnItemEx("DocCarryPlatform",0,0,14,0,0,-1)
stop
Land:
TNT1 A 0 A_SpawnItemEx("DocCarryPlatform",56,0,38,1)
stop
}
}

actor CarryPlatform
{
height 4
radius 24
scale 2.5
+FORCEYBILLBOARD
+NOGRAVITY
-SHOOTABLE
+SOLID
+THRUSPECIES
+THRUGHOST
+MISSILE
States
{
Spawn:
CARY A 1
CARY A 0 A_Stop
CARY A 0 A_ChangeFlag(MISSILE,0)
CARY A 2 A_ChangeFlag(THRUGHOST,0)
CARY BABCABCABCABCABCABCABCABCABCABCABCABCABC 3
//CARY ABCABCABCABCABCABCABCABC 3
Goto Death
Death:
MMFX B 0 A_ChangeFlag("SOLID",0)
MMFX B 0 A_ChangeFlag("NoInteraction",1)
MMFX B 0 A_ChangeFlag("NoClip",1)
MMFX BCDE 2
stop
}
}

actor DocCarryPlatform : CarryPlatform
{
States
{
Spawn:
CARY A 1
CARY A 0 A_Stop
CARY A 0 A_ChangeFlag(MISSILE,0)
CARY A 2 A_ChangeFlag(THRUGHOST,0)
CARY BCABCABCABCABCABCABCABC 3
Goto Death
}
}

actor EddieSummonC : EddieSummon
{
}

actor BeatSupportC : BeatSupport
{
}

actor RushMarineC : RushMarine
{
}

actor TakeBusterC : CustomInventory replaces TakeBuster
{
inventory.amount 1
inventory.maxamount 1
+AUTOACTIVATE
States
{
Spawn:
TNT1 A 1
Stop
Use:
TNT1 A 0 A_JumpIfInventory("BusterGiven", 7, "KeepTreble")
TNT1 A 0 A_JumpIfInventory("BusterGiven", 6, "KeepDuo")
TNT1 A 0 A_JumpIfInventory("BusterGiven", 5, "KeepArrow")
TNT1 A 0 A_JumpIfInventory("BusterGiven", 4, "KeepLaser")
TNT1 A 0 A_JumpIfInventory("BusterGiven", 3, "KeepAdaptor")
TNT1 A 0 A_JumpIfInventory("BusterGiven", 2, "KeepPower")
TNT1 A 0 A_JumpIfInventory("BusterGiven", 1, "KeepJet")
Goto Death
KeepTreble:
//TNT1 A 0 A_TakeInventory("TrebleBoost",1)

TNT1 A 0 A_TakeInventory("MegaBusterC",1)
TNT1 A 0 A_TakeInventory("LaserBusterC",1)
TNT1 A 0 A_TakeInventory("ArrowBusterC",1)
TNT1 A 0 A_TakeInventory("DuoFist",1)
TNT1 A 0 A_TakeInventory("SuperAdaptorWepC",1)
TNT1 A 0 A_TakeInventory("PowerFistC",1)
TNT1 A 0 A_TakeInventory("JetBusterC",1)
Goto Death
KeepDuo:
TNT1 A 0 A_TakeInventory("TrebleBoost",1)

TNT1 A 0 A_TakeInventory("MegaBusterC",1)
TNT1 A 0 A_TakeInventory("LaserBusterC",1)
TNT1 A 0 A_TakeInventory("ArrowBusterC",1)
//TNT1 A 0 A_TakeInventory("DuoFist",1)
TNT1 A 0 A_TakeInventory("SuperAdaptorWepC",1)
TNT1 A 0 A_TakeInventory("PowerFistC",1)
TNT1 A 0 A_TakeInventory("JetBusterC",1)
Goto Death
KeepArrow:
TNT1 A 0 A_TakeInventory("TrebleBoost",1)

TNT1 A 0 A_TakeInventory("MegaBusterC",1)
TNT1 A 0 A_TakeInventory("LaserBusterC",1)
//TNT1 A 0 A_TakeInventory("ArrowBusterC",1)
TNT1 A 0 A_TakeInventory("DuoFist",1)
TNT1 A 0 A_TakeInventory("SuperAdaptorWepC",1)
TNT1 A 0 A_TakeInventory("PowerFistC",1)
TNT1 A 0 A_TakeInventory("JetBusterC",1)
Goto Death
KeepLaser:
TNT1 A 0 A_TakeInventory("TrebleBoost",1)

TNT1 A 0 A_TakeInventory("MegaBusterC",1)
//TNT1 A 0 A_TakeInventory("LaserBusterC",1)
TNT1 A 0 A_TakeInventory("ArrowBusterC",1)
TNT1 A 0 A_TakeInventory("DuoFist",1)
TNT1 A 0 A_TakeInventory("SuperAdaptorWepC",1)
TNT1 A 0 A_TakeInventory("PowerFistC",1)
TNT1 A 0 A_TakeInventory("JetBusterC",1)
Goto Death
KeepAdaptor:
TNT1 A 0 A_TakeInventory("TrebleBoost",1)

TNT1 A 0 A_TakeInventory("MegaBusterC",1)
TNT1 A 0 A_TakeInventory("LaserBusterC",1)
TNT1 A 0 A_TakeInventory("ArrowBusterC",1)
TNT1 A 0 A_TakeInventory("DuoFist",1)
//TNT1 A 0 A_TakeInventory("SuperAdaptorWepC",1)
TNT1 A 0 A_TakeInventory("PowerFistC",1)
TNT1 A 0 A_TakeInventory("JetBusterC",1)
Goto Death
KeepPower:
TNT1 A 0 A_TakeInventory("TrebleBoost",1)

TNT1 A 0 A_TakeInventory("MegaBusterC",1)
TNT1 A 0 A_TakeInventory("LaserBusterC",1)
TNT1 A 0 A_TakeInventory("ArrowBusterC",1)
TNT1 A 0 A_TakeInventory("DuoFist",1)
TNT1 A 0 A_TakeInventory("SuperAdaptorWepC",1)
//TNT1 A 0 A_TakeInventory("PowerFistC",1)
TNT1 A 0 A_TakeInventory("JetBusterC",1)
Goto Death
KeepJet:
TNT1 A 0 A_TakeInventory("TrebleBoost",1)

TNT1 A 0 A_TakeInventory("MegaBusterC",1)
TNT1 A 0 A_TakeInventory("LaserBusterC",1)
TNT1 A 0 A_TakeInventory("ArrowBusterC",1)
TNT1 A 0 A_TakeInventory("DuoFist",1)
TNT1 A 0 A_TakeInventory("SuperAdaptorWepC",1)
TNT1 A 0 A_TakeInventory("PowerFistC",1)
//TNT1 A 0 A_TakeInventory("JetBusterC",1)
Goto Death
Death:
TNT1 A 0 A_TakeInventory("BusterGiven",999)
stop
}
}