actor EnvironmentGravity : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("IsUnderWater",1,"UnderWater")
TNT1 A 0 A_SetGravity(0.8)
stop
UnderWater:
TNT1 A 0 A_SetGravity(0.25)
stop
}
}

actor LadderDisable : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_ChangeFlag("CANPUSHWALLS",0)
stop
}
}

actor LadderEnable : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_ChangeFlag("CANPUSHWALLS",1)
stop
}
}

actor YesGravityPickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_ChangeFlag("NOGRAVITY",0)
stop
}
}

actor NoGravityPickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_ChangeFlag("NOGRAVITY",1)
stop
}
}

actor TeleDisable : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_ChangeFlag("NOTELEPORT",1)
TNT1 A 0 A_ChangeFlag("NOTELEOTHER",1)
stop
}
}

actor TeleEnable : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_ChangeFlag("NOTELEPORT",0)
TNT1 A 0 A_ChangeFlag("NOTELEOTHER",0)
stop
}
}

actor FlightDisable : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("FlightDisableFlag",1)
TNT1 A 0 SetPlayerProperty(0,0,3)
TNT1 A 0 A_ChangeFlag("NOGRAVITY",0)
stop
}
}

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

actor FlightEnable : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("FlightDisableFlag",999)
TNT1 A 0 A_JumpIfInventory("RushJetCounter",1,"Fly")
TNT1 A 0 A_JumpIfInventory("ProtoJetCounter",1,"Fly")
TNT1 A 0 A_JumpIfInventory("BassJetCounter",1,"Fly")
TNT1 A 0 A_JumpIfInventory("BeatCounter",1,"Fly")
TNT1 A 0 A_JumpIfInventory("IBeFlyin",1,"Fly")
TNT1 A 0 A_JumpIfInventory("CapsuleFireWep",1,"Fly")
TNT1 A 0 A_JumpIfInventory("CapsuleIceWep",1,"Fly")
TNT1 A 0 A_JumpIfInventory("TrebleFlightFlag",1,"Fly")
TNT1 A 0 A_JumpIfInventory("TrebleBoostcFlag",1,"Fly")
//TNT1 A 0 A_JumpIfInventory("NoiseCrushBoss",1,"Shade")
//TNT1 A 0 A_JumpIfInventory("FlyCounter",1,"NoGrav")
stop
Shade:
TNT1 A 0 A_JumpIfInventory("CutterFlag",1,"LowGrav")
stop
Fly:
TNT1 A 0 SetPlayerProperty(0,1,3)
stop
NoGrav:
TNT1 A 0 A_ChangeFlag("NOGRAVITY",1)
stop
LowGrav:
TNT1 A 0 A_SetGravity(0.125)
stop
}
}

actor BeatGiverC : BeatGiver replaces BeatGiver
{
States
{
Spawn:
TNT1 AAA 1 A_GiveToTarget("BeatFX1C",1)
TNT1 AAA 1 A_GiveToTarget("BeatFX3C",1)
TNT1 AAA 1 A_GiveToTarget("BeatFX2C",1)
TNT1 A 0 A_TakeFromTarget("BeatCounter",1)
TNT1 A 0 A_JumpIfInTargetInventory("SpinTime",1,"Death2")
TNT1 A 0 A_JumpIfInTargetInventory("BeatCounter",5,"Spawn")
TNT1 A 0 A_TakeFromTarget("BeatCallCheck",1)
TNT1 A 0 A_JumpIfInTargetInventory("BeatCounter",1,"Spawn")
TNT1 A 0 A_GiveToTarget("FlyDeactivate",1)
TNT1 A 0 A_TakeFromTarget("BeatCallCheck",1)
TNT1 A 0 A_TakeFromTarget("BeatCounter",100)
stop
Death2:
TNT1 A 0 A_GiveToTarget("FlyDeactivate",1)
TNT1 A 0 A_TakeFromTarget("BeatCallCheck",1)
TNT1 A 0 A_TakeFromTarget("BeatCounter",100)
stop
}
}


actor BeatFX1C : BeatFX1
{
States
{
Use:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
TNT1 A 1 SetPlayerProperty(0,1,3)
TNT1 A 1 A_SpawnItemEx("BeatFeet1",0,0,52,0,0,0,0,SXF_NOCHECKPOSITION)
stop
}
}

actor BeatFX2C : BeatFX2
{
States
{
Use:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
TNT1 A 1 SetPlayerProperty(0,1,3)
TNT1 A 1 A_SpawnItemEx("BeatFeet2",0,0,52,0,0,0,0,SXF_NOCHECKPOSITION)
stop
}
}

actor BeatFX3C : BeatFX3
{
States
{
Use:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
TNT1 A 1 SetPlayerProperty(0,1,3)
TNT1 A 1 A_SpawnItemEx("BeatFeet3",0,0,52,0,0,0,0,SXF_NOCHECKPOSITION)
stop
}
}

actor Rush2C : Rush2 replaces Rush2
{
states
{
FlyCheck1:
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX1C",1)
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX2",1)
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX1C",1)
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX2",1)
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX1C",1)
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX2",1)
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX1C",1)
TNT1 A 0 A_TakeFromTarget("RushJetCounter",1)
TNT1 A 0 A_JumpIfInTargetInventory("SpinTime",1,"Death2")
TNT1 A 0 A_JumpIfInTargetInventory("InBoat",1,"Death2")
TNT1 A 0 A_JumpIfInTargetInventory("RushJetCounter",1,"FlyCheck2")
TNT1 A 0 A_GiveToTarget("FlyDeactivate",1)
stop
FlyCheck2:
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX2",1)
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX1C",1)
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX2",1)
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX1C",1)
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX2",1)
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX1C",1)
TNT1 AAAAA 1 A_GiveToTarget("RushJetFX2",1)
TNT1 A 0 A_TakeFromTarget("RushJetCounter",1)
TNT1 A 0 A_JumpIfInTargetInventory("SpinTime",1,"Death2")
TNT1 A 0 A_JumpIfInTargetInventory("InBoat",1,"Death2")
TNT1 A 0 A_JumpIfInTargetInventory("RushJetCounter",1,"FlyCheck1")
TNT1 A 0 A_GiveToTarget("FlyDeactivate",1)
stop
}
}

actor RushJetFX1C : RushJetFX1
{
States
{
Use:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
TNT1 A 1 SetPlayerProperty(0,1,3)
TNT1 A 1 A_SpawnItemEx("RushJetFeet1",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
stop
}
}

actor HoldingTornadoC : HoldingTornado replaces HoldingTornado
{
States
{
Lift1:
TORH F 1 A_GiveToTarget("TornadoThrusterC",1)
TORH FF 1
goto Loop2
Lift2:
TORH G 1 A_GiveToTarget("TornadoThrusterC",1)
TORH GG 1
goto Loop3
Lift3:
TORH H 1 A_GiveToTarget("TornadoThrusterC",1)
TORH HH 1
goto Loop1
}
}

actor TornadoLifterC : TornadoLifter replaces TornadoLifter
{
States
{
Lift1:
TORH F 1 A_GiveToTarget("TornadoThrusterC",1)
TORH FF 1
goto Loop2
Lift2:
TORH G 1 A_GiveToTarget("TornadoThrusterC",1)
TORH GG 1
goto Loop3
Lift3:
TORH H 1 A_GiveToTarget("TornadoThrusterC",1)
TORH HH 1
goto Loop1
}
}

actor TornadoThrusterC : TornadoThruster
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
TNT1 A 1 ThrustThingZ(0,20,0,0)
TNT1 A 0
stop
}
}