//Useful Team Translations
//199/195 = 198 || 202/204 = 192
//actor Blue : Thing{translation "192:192=205:205", "198:198=74:74", "250:250=196:196","249:249=199:199"}
//actor Red : Thing{translation "192:192=171:171", "198:198=41:41", "250:250=170:170","249:249=43:43"}
//actor Orange : Thing{translation "192:192=104:104", "198:198=128:128", "250:250=138:138","249:249=131:131"}
//actor Purple : Thing{translation "192:192=229:229", "198:198=232:232", "250:250=214:214","249:249=223:223"}


const int WEPANGLE_NUM = 0;
const int WEPPITCH_NUM = 1;
const int WEPANGLE2_NUM = 2;

//ACS 803 items
const int TORSOSPEED = 0;
const int GIGAAMMO = 1;

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

actor IsInGame : Inventory
{
inventory.amount 1
inventory.maxamount 1
+INVENTORY.UNDROPPABLE
}

actor IsInvunFlag : OnceC{}
actor GuardUpFlag : OnceC{}
actor GuardDownFlag : OnceC{}

//actor JumpCanclerDisable : OnceC{}

actor LastHealthFlag : Inventory
{
inventory.amount 1
inventory.maxamount 30000
}

actor CanCopyWeapons : OnceC{}
actor CanUseItems : OnceC{}
actor NoAmmoPickup : OnceC{}

actor CanSnatch_F : OnceC{}
actor IsAPirate : OnceC{}
actor IsTheLaw : OnceC{}
actor IsACommie : OnceC{}
actor PirateTreasureStack : Inventory
{
inventory.amount 1
inventory.maxamount 9999
}

actor ProjectilePortDead : OnceC{}
actor ProjectilePorting : Powerup
{
Powerup.Duration 3//2
}

actor PressButton_Main_F : Inventory {}
actor PressButton_Alt_F : Inventory {}
actor PressButton_Jump_F : Inventory {}

actor VivifyFlag1 : OnceC {}
actor VivifyFlag2 : OnceC {}
actor VivifyFlag3 : OnceC {}
//Used mainly for animating Class sprites for online
actor VivifyDelay3 : Powerup
{
Powerup.Duration 3
}
actor VivifyDelay4 : Powerup{Powerup.Duration 4}
actor VivifyDelay5 : Powerup{Powerup.Duration 5}
actor VivifyDelay6 : Powerup{Powerup.Duration 6}
actor VivifyDelay7 : Powerup{Powerup.Duration 7}
actor VivifyDelay8 : Powerup{Powerup.Duration 8}
actor VivifyDelay9 : Powerup{Powerup.Duration 9}
actor VivifyDelay10 : Powerup{Powerup.Duration 10}

actor PowerMomZVerify : Powerup
{
Powerup.Duration 2
}

actor HelperIsActiveFlag1 : OnceC{}//Track if a spawned actor is still active
actor HelperIsActiveFlag2 : OnceC{}
actor HelperIsActiveFlag3 : OnceC{}
actor HelperIsActiveFlag4 : OnceC{}
actor HelperIsActiveFlag5 : OnceC{}
actor HelperIsActiveFlag6 : OnceC{}

actor PowerStaminaFlagDeplete : Powerup
{
Powerup.Duration 4
}

actor ForceStaminaFlag : OnceC{}//Force Stamina to show up always
actor StaminaFlag : Ammo
{
inventory.amount 1
inventory.maxamount 500
+INVENTORY.IGNORESKILL
+INVENTORY.UNDROPPABLE
}

actor DynamicArmorDosage_F : Inventory
{
inventory.amount 1
inventory.maxamount 30000
}
actor SetDynamicArmorDosage_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("DynamicArmorDosage_F",CallACS("cbm_Fetch_GetArmorInfo",1))
stop
}
}

actor InvulnerableOn_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("IsInvunFlag",1)
TNT1 A 0 A_ChangeFlag("INVULNERABLE",1)
stop
}
}
actor InvulnerableOff_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("IsInvunFlag",9)
TNT1 A 0 A_ChangeFlag("INVULNERABLE",0)
stop
}
}

actor UnhittableOn_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("IsInvunFlag",1)
TNT1 A 0 A_GiveInventory("UnhittableProtect",1)
TNT1 A 0 A_ChangeFlag("NONSHOOTABLE",1)
TNT1 A 0 A_ChangeFlag("NORADIUSDMG",1)
stop
}
}
actor UnhittableOff_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("IsInvunFlag",9)
TNT1 A 0 A_TakeInventory("UnhittableProtect",9)
TNT1 A 0 A_ChangeFlag("NONSHOOTABLE",0)
TNT1 A 0 A_ChangeFlag("NORADIUSDMG",0)
stop
}
}
actor UnhittableProtect : PowerProtection
{
Powerup.Duration -60
//damagefactor "InsertRailGunHere", 0.0
}

actor ZangiefAngle : Inventory
{
inventory.amount 1
inventory.maxamount 255
}

actor IsPerformingSuplex : OnceC{}

actor SuplexID : Inventory //ID of the player grabbed
{
inventory.amount 1
inventory.maxamount 64
}

//actor ZangiefSuplexProtect : OnceC {}

actor AirjumpDustFXSpawner : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("AirjumpDustFX")
stop
}
}

actor AirjumpDustFX : BasicClientside
{
States
{ 
Spawn:
WJDS KLM 2
stop
}
}

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

actor LoadOutCheckLMS_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(CallACS("CBM_LoadoutLMSCheck")==1,"LMS")
stop
LMS:
TNT1 A 0 A_GiveInventory("LoadOutGiver_P",1)
stop
}
}

actor LoadOutGiver_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 ACS_NamedExecuteAlways("CBM_LoadoutSetup",0)
stop
}
}

actor IsLMSFlag : OnceC{}
actor LMSCheckPickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(975)==2,"Yes")
stop
Yes:
TNT1 A 0 A_GiveInventory("IsLMSFlag",1)
stop
}
}

actor IsBuckshotFlag : OnceC{}
actor BuckshotCheckPickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(975,2)==2,"Yes")
stop
Yes:
TNT1 A 0 A_GiveInventory("IsBuckshotFlag",1)
stop
}
}

actor ScrewBoltPickup : CustomInventory
{
inventory.pickupmessage "Picked up a Small Screw!"
scale 2.5
ReactionTime 35
+THRUACTORS
States
{
Spawn:
X_0G A 0
Fallin:
X_0G BCDEFGHI 3 A_CheckFloor("TimeToSpawn")
loop
TimeToSpawn:
X_0G A 0 A_ChangeFlag("THRUACTORS", FALSE)
X_0G A 0 A_Jump(256,"Spawn1","Spawn2")
Spawn1:
X_0G BCDEFGHI 3 A_JumpIf(reactiontime<=5,"Spawn1Blink")
X_0G B 0 A_CountDown
loop
Spawn1Blink:
TNT1 A 3
X_0G B 3
TNT1 A 3
X_0G D 3
TNT1 A 3
X_0G F 3
TNT1 A 3
X_0G H 3
X_0G B 0 A_CountDown
loop
Spawn2:
X_0G IHGFEDCB 3 A_JumpIf(reactiontime<=5,"Spawn2Blink")
X_0G I 0 A_CountDown
loop
Spawn2Blink:
TNT1 A 3
X_0G I 3
TNT1 A 3
X_0G G 3
TNT1 A 3
X_0G E 3
TNT1 A 3
X_0G C 3
X_0G B 0 A_CountDown
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("PileDriverBoss",1,"Impact")
TNT1 A 0 A_JumpIfInventory("PlantBarrierBoss",1,"Plant")
TNT1 A 0 A_JumpIfInventory("SparkShockBoss",1,"Spark")
TNT1 A 0 A_JumpIfInventory("RollFlag",1,"Roll")
TNT1 A 0 A_JumpIfInventory("LightningBoltBoss",1,"Dynamo")
TNT1 A 0 A_JumpIfInventory("IsAuto",1,"Auto")
TNT1 A 0 A_JumpIfInventory("LaserTridentBoss",1,"Splash")
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch")
TNT1 A 0
fail
Pickup2:
TNT1 A 0
TNT1 A 0
stop
Spark:
TNT1 A 0 A_JumpIfInventory("SparkHealAmmo",56,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("SparkHealAmmo",7)
stop
Plant:
TNT1 A 0 A_JumpIfInventory("PlantmanHealAmmo",112,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("PlantmanHealAmmo",14)
stop
Roll:
TNT1 A 0 A_JumpIfInventory("RollHealAmmo",56,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("RollHealAmmo",7)
stop
Dynamo:
TNT1 A 0 A_JumpIfInventory("DynamoHealAmmo",50,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("DynamoHealAmmo",5)
stop
Splash:
TNT1 A 0 A_JumpIfInventory("CrabHealingAmmo",56,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("CrabHealingAmmo",7)
stop
Auto:
TNT1 A 0 A_JumpIfInventory("AutoNutsAmmo",28,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("AutoNutsAmmo",2)
stop
Impact: 
TNT1 A 0 A_JumpIfInventory("ImpactPowerGearAmmo",180,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("ImpactPowerAmmoUp",1)
TNT1 A 0 A_GiveInventory("ImpactPowerGearAmmo",30)
stop 
TheSnatch:
TNT1 A 0 A_GiveInventory("SnatchItems_P1B",1)
stop
No:
TNT1 A 0 
fail
Death:
TNT1 A 1
stop
}
}

actor ScrewBoltBigPickup : ScrewBoltPickup
{
inventory.pickupmessage "Picked up a Big Screw!"
States
{
Spawn:
X_0G A 0
Fallin:
X_0G KLMNOPQR 3 A_CheckFloor("TimeToSpawn")
loop
TimeToSpawn:
X_0G A 0 A_ChangeFlag("THRUACTORS", FALSE)
X_0G S 0 A_Jump(256,"Spawn1","Spawn2")

Spawn1:
X_0G KLMNOPQR 3 A_JumpIf(reactiontime<=5,"Spawn1Blink")
X_0G B 0 A_CountDown
loop
Spawn1Blink:
TNT1 A 3
X_0G K 3
TNT1 A 3
X_0G M 3
TNT1 A 3
X_0G O 3
TNT1 A 3
X_0G Q 3
X_0G Q 0 A_CountDown
loop
Spawn2:
X_0G RQPONMLK 3 A_JumpIf(reactiontime<=5,"Spawn2Blink")
X_0G I 0 A_CountDown
loop
Spawn2Blink:
TNT1 A 3
X_0G R 3
TNT1 A 3
X_0G P 3
TNT1 A 3
X_0G N 3
TNT1 A 3
X_0G L 3
X_0G L 0 A_CountDown
loop
Spark:
TNT1 A 0 A_JumpIfInventory("SparkHealAmmo",56,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("SparkHealAmmo",14)
stop
Plant:
TNT1 A 0 A_JumpIfInventory("PlantmanHealAmmo",112,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("PlantmanHealAmmo",28)
stop
Roll:
TNT1 A 0 A_JumpIfInventory("RollHealAmmo",56,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("RollHealAmmo",14)
stop
Dynamo:
TNT1 A 0 A_JumpIfInventory("DynamoHealAmmo",50,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("DynamoHealAmmo",10)
stop
Splash:
TNT1 A 0 A_JumpIfInventory("CrabHealingAmmo",56,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("CrabHealingAmmo",14)
stop
Auto:
TNT1 A 0 A_JumpIfInventory("AutoNutsAmmo",28,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("AutoNutsAmmo",4)
stop
Impact: 
TNT1 A 0 A_JumpIfInventory("ImpactPowerGearAmmo",180,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("ImpactPowerAmmoUp",1)
TNT1 A 0 A_GiveInventory("ImpactPowerGearAmmo",60)
stop 
TheSnatch:
TNT1 A 0 A_GiveInventory("SnatchItems_P2A",1)
stop
}
}

actor ScrewBoltMiniPickup : ScrewBoltPickup
{
inventory.pickupmessage "Picked up a Mini Screw!"
States
{
Spawn:
MSCR A 0
Fallin:
MSCR KLMNOPQR 1 A_CheckFloor("TimeToSpawn")
loop
TimeToSpawn:
MSCR A 0 A_ChangeFlag("THRUACTORS", FALSE)
MSCR S 0 A_Jump(256,"Spawn1","Spawn2")

Spawn1:
MSCR KLMNOPQR 1 A_JumpIf(reactiontime<=5,"Spawn1Blink")
MSCR B 0 A_CountDown
loop
Spawn1Blink:
TNT1 A 1
MSCR K 1
TNT1 A 1
MSCR M 1
TNT1 A 1
MSCR O 1
TNT1 A 1
MSCR Q 1
MSCR Q 0 A_CountDown
loop
Spawn2:
MSCR RQPONMLK 1 A_JumpIf(reactiontime<=5,"Spawn2Blink")
MSCR I 0 A_CountDown
loop
Spawn2Blink:
TNT1 A 1
MSCR R 1
TNT1 A 1
MSCR P 1
TNT1 A 1
MSCR N 1
TNT1 A 1
MSCR L 1
MSCR L 0 A_CountDown
loop
Spark:
TNT1 A 0 A_JumpIfInventory("SparkHealAmmo",56,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("SparkHealAmmo",2)
stop
Plant:
TNT1 A 0 A_JumpIfInventory("PlantmanHealAmmo",112,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("PlantmanHealAmmo",4)
stop
Roll:
TNT1 A 0 A_JumpIfInventory("RollHealAmmo",56,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("RollHealAmmo",2)
stop
Dynamo:
TNT1 A 0 A_JumpIfInventory("DynamoHealAmmo",50,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("DynamoHealAmmo",2)
stop
Splash:
TNT1 A 0 A_JumpIfInventory("CrabHealingAmmo",56,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("CrabHealingAmmo",2)
stop
Auto:
TNT1 A 0 A_JumpIfInventory("AutoNutsAmmo",28,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("AutoNutsAmmo",1)
stop
Impact: 
TNT1 A 0 A_JumpIfInventory("ImpactPowerGearAmmo",180,"Pickup2")
TNT1 A 0 A_PlaySound("item/JunkPick",3,1.0)
TNT1 A 0 A_GiveInventory("ImpactPowerAmmoUp",1)
TNT1 A 0 A_GiveInventory("ImpactPowerGearAmmo",15)
stop 
TheSnatch:
TNT1 A 0 A_GiveInventory("SnatchItems_P2A",1)
stop
}
}


actor ScrapMetalFlag : OnceC{}

actor ScrapMetalBase : CustomInventory
{
inventory.pickupmessage "Picked up some scrap metal."
inventory.amount 1
inventory.maxamount 1
+INVENTORY.AUTOACTIVATE
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveInventory("ScrapMetalFlag",1)
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_ScrapACS")
TNT1 A 1 A_Jump(256,"Spawn2")
TNT1 A 1
goto Spawn+3
Spawn2:
EBAL ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB 6//480
stop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch")
TNT1 A 0 A_JumpIfInventory("DustCrusherBoss",1,2)
TNT1 A 0 A_JumpIfInventory("JunkShieldBoss",1,3)
fail
TNT1 A 0 A_GiveInventory("CrushEmAmmo",24)
TNT1 A 0 A_Jump(256,2)
TNT1 A 0 A_GiveInventory("TrunkAmmo",35)
TNT1 A 0 A_PlaySoundEx("item/JunkPick","Item")
TNT1 A 0
stop
TheSnatch:
TNT1 A 0 A_GiveInventory("SnatchItems_P1",1)
stop
Vacuumed:
TNT1 A 0 A_TakeInventory("ScrapMetalFlag",1)
stop
}
}

actor SnatchItems_P1 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("PirateTreasureStack",1)
goto PickupC
PickupC:
TNT1 A 0 A_JumpIfInventory("IsACommie",1,"TheMarx")
TNT1 A 0 A_JumpIfInventory("IsTheLaw",1,"TheLaw")
TNT1 A 0 A_JumpIfInventory("IsAPirate",1,"Pirate")
stop
Pirate:
TNT1 A 0 A_Jump(128,2)
TNT1 A 0 A_PlaySound("classes/Stolen3",3,1.0)
stop
TNT1 A 0 A_PlaySound("classes/Stolen4",3,1.0)
stop
TheLaw:
TNT1 A 0 A_PlaySound("classes/CopSeize",3,1.0)
stop
TheMarx:
TNT1 A 0 A_PlaySound("classes/MercPick",3,1.0)
stop
}
}
actor SnatchItems_P1A : SnatchItems_P1
{
States
{
Pirate:
TNT1 A 0 A_Jump(96,2)
TNT1 A 0 A_PlaySound("classes/Stolen4",3,1.0)
stop
TNT1 A 0 A_PlaySound("classes/Stolen5",3,1.0)
stop
}
}
actor SnatchItems_P1B : SnatchItems_P1
{
States
{
Pirate:
TNT1 A 0 A_Jump(128,2)
TNT1 A 0 A_PlaySound("classes/Stolen2",3,1.0)
stop
TNT1 A 0 A_PlaySound("classes/Stolen3",3,1.0)
stop
}
}
actor SnatchItems_P2 : SnatchItems_P1
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("PirateTreasureStack",2)
goto PickupC
Pirate:
TNT1 A 0 A_Jump(128,2)
TNT1 A 0 A_PlaySound("classes/Stolen2",3,1.0)
stop
TNT1 A 0 A_PlaySound("classes/Stolen3",3,1.0)
stop
}
}
actor SnatchItems_P2A : SnatchItems_P2
{
States
{
Pirate:
TNT1 A 0 A_Jump(98,2)
TNT1 A 0 A_PlaySound("classes/Stolen1",3,1.0)
stop
TNT1 A 0 A_PlaySound("classes/Stolen2",3,1.0)
stop
}
}
actor SnatchItems_P3 : SnatchItems_P1
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("PirateTreasureStack",3)
goto PickupC
Pirate:
TNT1 A 0 A_Jump(128,2)
TNT1 A 0 A_PlaySound("classes/Stolen1",3,1.0)
stop
TNT1 A 0 A_PlaySound("classes/Stolen2",3,1.0)
stop
}
}

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


actor StopSnd_P0 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_StopSound(0)
stop
}
}
actor StopSnd_P1 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_StopSound(1)
stop
}
}
actor StopSnd_P2 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_StopSound(2)
stop
}
}
actor StopSnd_P3 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_StopSound(3)
stop
}
}
actor StopSnd_P4 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_StopSound(4)
stop
}
}
actor StopSnd_P5 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_StopSound(5)
stop
}
}
actor StopSnd_P6 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_StopSound(6)
stop
}
}
actor StopSnd_P7 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_StopSound(7)
stop
}
}

actor TeamColor_CI : CustomInventory
{
states
{
Pickup:
//TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==-1,"FireX")
//TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==0,"FireB")
//TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==1,"FireR")
//TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==2,"FireO")
//TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==3,"FireP")
TNT1 A 0 A_JumpIfInventory("LightTeamFlag",1,"FireB")
TNT1 A 0 A_JumpIfInventory("WilyTeamFlag",1,"FireR")
TNT1 A 0 A_JumpIfInventory("CossackTeamFlag",1,"FireO")
TNT1 A 0 A_JumpIfInventory("KingTeamFlag",1,"FireP")
TNT1 A 0 A_JumpIfInventory("IsInGame",1,"FireX")
TNT1 A 0
Done:
TNT1 A 0
stop
}
}

actor Nudge : CustomInventory
{//Fixes the issue where teleporting and having no MomX and MomY
states//causes you to fall off ledges.
{
Pickup:
//TNT1 A 0 A_Stop
TNT1 A 0 A_Jumpif(Momx == 0 && Momy == 0, "Nudge")
stop
Nudge:
TNT1 A 0 A_ChangeVelocity(0.0001,0,0,1)//Amazing! It works!
//TNT1 A 0 A_Recoil(-1)
stop
}
}

actor ReSyncPickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 ThrustThingZ(0,0,0,1)
TNT1 A 0 ThrustThing(angle*256/360,0,1,0)
stop
}
}


actor RepulsionC255 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 //A_Blast(int flags, int strength, int distance, float speed, string blasteffect, string blastsound)
TNT1 A 0 A_Blast(0, 255, 255, 20, "BasicHelper", "weapon/GameBoyFire")
stop
}
}

actor CanTreadWater : OnceC{}
actor IsTreadingWater : OnceC{}
actor CanWallJump : OnceC{}
actor CanAirJump : OnceC{}

actor CanAirJumpLimit : Inventory
{
inventory.amount 1
inventory.maxamount 99
}
actor CanAirJumpStack : CanAirJumpLimit{}
actor CanWallJumpLimit : CanAirJumpLimit{}
actor CanWallJumpStack : CanAirJumpLimit{}

actor AirJumpBoost_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,"No")
TNT1 A 0 A_JumpIfInventory("CanAirJumpLimit",1,"Jump")
stop
No:
TNT1 A 0
stop
Jump:
TNT1 A 0 A_TakeInventory("CanAirJumpLimit",1)
TNT1 A 0 //A_ChangeVelocity(momx,momy,10.0,2)
TNT1 A 0 ACS_NamedExecuteWithResult("CBM_AirJumpZ_Thrust")
TNT1 A 0 A_GiveInventory("JumpCancler",1)
stop
}
}

actor GiveIsTreadingWater_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("IsTreadingWater",1)
TNT1 A 0 A_JumpIfInventory("IsUnderWater",1,"Swim")
TNT1 A 0 A_JumpIfInventory("IsUnderBubbleWater",1,"Swim")
stop
Swim:
TNT1 A 0 ThrustThingZ(0,0,4,0)
stop
}
}

actor PowerWallJumpSpeed : PowerSpeed
{
powerup.duration 7
Speed 2.05
+POWERSPEED.NOTRAIL
}

actor WallJumpingCheck_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,"No")
TNT1 A 0 A_JumpIfInventory("WallN",1,"JumpC")
TNT1 A 0 A_JumpIfInventory("WallE",1,"JumpC")
TNT1 A 0 A_JumpIfInventory("WallS",1,"JumpC")
TNT1 A 0 A_JumpIfInventory("WallW",1,"JumpC")
stop
No:
TNT1 A 0 
stop
JumpC:
TNT1 A 0 A_JumpIfInventory("CanWallJumpLimit",1,"Jump")
stop
Jump:
TNT1 A 0 A_GiveInventory("PowerWallJumpSpeed",1)
TNT1 A 0 //A_GiveInventory("JumpCancler",1)
TNT1 A 0 A_TakeInventory("CanWallJumpLimit",1)
TNT1 A 0 A_JumpIfInventory("QuickManTrail",1,"JumpQuick")
TNT1 A 0 A_JumpIfInventory("ChillSpikeBoss",1,"JumpChillCheck")
TNT1 A 0 A_JumpIfInventory("SilverTomahawkBoss",1,"JumpTomahawk")
TNT1 A 0 ACS_NamedExecuteAlways("CBM_WallJumpThruster",0,10)
stop
JumpQuick:
TNT1 A 0 ACS_NamedExecuteAlways("CBM_WallJumpThruster",0,20)
stop
JumpTomahawk:
TNT1 A 0 ACS_NamedExecuteAlways("CBM_WallJumpThruster",0,15)
stop
JumpBlast:
TNT1 A 0 A_GiveInventory("BlastWallJump",1)
TNT1 A 0 A_PlaySoundEx("weapon/blastwalljump","SoundSlot6")
TNT1 A 0 ACS_NamedExecuteAlways("CBM_WallJumpThruster",0,25,3)//12
stop
JumpChillCheck:
TNT1 A 0 A_JumpIfInventory("ChillParkour",1,"JumpChill")
stop
JumpChill:
TNT1 A 0 A_GiveInventory("ChillParkourJump_P",1)
TNT1 A 0 ACS_NamedExecuteAlways("CBM_WallJumpThruster",0,25,3)//12
stop
}
}
//"so when it does come out and i continue to perform with blastman 
//it'll be more of the same "this class shouldn't have been buffed" from idiots 
//who won't stop complaining until something else about blastman gets nerfed and 
//not his bombjumping"
//-venus, on blastman blastjumping 
//(i fully agree and acknowledge that if this gets added this is EXACTLY how it will play out)

actor WallJumping_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("WallCheckN",23,0,8,momx,momy,0,0,8,0)//momz
TNT1 A 0 A_SpawnItemEx("WallCheckS",-23,0,8,momx,momy,0,0,8,0)
TNT1 A 0 A_SpawnItemEx("WallCheckE",0,23,8,momx,momy,0,0,8,0)
TNT1 A 0 A_SpawnItemEx("WallCheckW",0,-23,8,momx,momy,0,0,8,0)
TNT1 A 0 A_SpawnItemEx("WallJumping_H")
stop
}
}

actor WallJumping_H : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_GiveToTarget("WallJumpingCheck_P")
TNT1 A 1
stop
}
}

actor WallN : OnceC{}
actor WallS : WallN{}
actor WallE : WallN{}
actor WallW : WallN{}

actor WallCheckN 
{
PROJECTILE
//+RIPPER
//+THRUACTORS
+THRUGHOST
+PAINLESS
+NOTARGETSWITCH
+DONTBLAST
+DONTREFLECT
+DONTSPLASH
damage (0)
Height 10
Radius 10
Speed 0
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_TakeFromTarget("WallN",1)
TNT1 A 1
stop
Death:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("WallN",1)
TNT1 A 1
stop
}
}

actor WallCheckS : WallCheckN
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_TakeFromTarget("WallS",1)
TNT1 A 1
stop
Death:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("WallS",1)
TNT1 A 1
stop
}
}

actor WallCheckE : WallCheckN
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_TakeFromTarget("WallE",1)
TNT1 A 1
stop
Death:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("WallE",1)
TNT1 A 1
stop
}
}

actor WallCheckW : WallCheckN
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_TakeFromTarget("WallW",1)
TNT1 A 1
stop
Death:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("WallW",1)
TNT1 A 1
stop
}
}