//Useful Team Translations
//actor Blue : Thing{translation "192:192=205:205", "198:198=74:74"}
//actor Red : Thing{translation "192:192=171:171", "198:198=41:41"}
//actor Orange : Thing{translation "192:192=104:104", "198:198=128:128"}
//actor Purple : Thing{translation "192:192=229:229", "198:198=232:232"}



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

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
}

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

actor JumpCanclerDisable : OnceC{}

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

actor BossBasicArmorAmount : Inventory
{
inventory.amount 1
inventory.maxamount 100
}

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

actor ForceStaminaFlag : OnceC{}
actor StaminaFlag : Ammo
{
inventory.amount 1
inventory.maxamount 500
+INVENTORY.IGNORESKILL
}

actor PinkStaminaBar : OnceC{}

actor BasicExplosion
{//Easy way of managing every explosion such as topspin
-SOLID
+DONTBLAST
+NOGRAVITY
+MISSILE
+RIPPER
+SKYEXPLODE
+NOINTERACTION
+DONTSPLASH
+THRUGHOST
+THRUACTORS
+DONTREFLECT
Damage 0
height 1
radius 1
//Scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(10,10,0)
stop
}
}

actor BasicHelper
{//Used by things like PharaohFX
+NOINTERACTION
-SOLID
+MISSILE
radius 1
height 1
+NOGRAVITY
+DONTBLAST
+DONTREFLECT
renderstyle none
States
{
Spawn:
TNT1 A 1
stop
Death:
TNT1 A 1
stop
}
}

actor BasicCustomInventory : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "NULLICON"
Inventory.PickupSound "item/1up"
+INVBAR
+COUNTITEM
scale 2.0
}

actor BasicClientSide
{
+CLIENTSIDEONLY
+NOINTERACTION
+NOGRAVITY
-SOLID
radius 2
height 2
scale 2.5
}

actor MMFX_BCDE
{
-SOLID
+NOGRAVITY
+NOINTERACTION
Scale 2.5
radius 2
height 2
States
{
Spawn:
MMFX BCDE 2
stop
}
}

actor MMFX_XYZ : BasicClientSide
{
States
{
Spawn:
TMFX XYZ 3
stop
}
}

actor MMFXBooster : BoosterFX
{
States
{
Spawn:
YMFX BCDE 1
stop
}
}

Actor TargetMarkerX : TargetMarker
{
States
{
Use:
TNT1 A 0 A_SpawnItemEx("TargetTracer",0,0,32,Cos(pitch)*4000,0,sin(-pitch)*4000,0)
stop
}
}

Actor TargetMarkerT : TargetMarker
{
States
{
Use:
TNT1 A 0 A_SpawnItemEx("TargetTracerT",0,0,32,Cos(pitch)*4000,0,sin(-pitch)*4000,0)
stop
}
}

actor TargetTracerT : TargetTracer
{
+THRUACTORS
}

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("Clip",1)
TNT1 A 0 ACS_ExecuteAlways(148,0)
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("DustCrusherBoss",1,3)
TNT1 A 0 A_JumpIfInventory("JunkShieldBoss",1,4)
TNT1 A 0 A_JumpIfInventory("IsAPirate",1,"Pirate")
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
Pirate:
TNT1 A 0 A_GiveInventory("PirateTreasureStack",1)
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
Vacuumed:
TNT1 A 0 A_TakeInventory("Clip",1)
stop
}
}

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

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
{
states
{
Pickup:
//TNT1 A 0 A_Stop
TNT1 A 0 A_Jumpif(Momx == 0 && Momy == 0, "Pickup2")
stop
Pickup2:
TNT1 A 0 A_Recoil(-1)
stop
}
}

actor StaminaFlag_inator : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_TakeFromTarget("StaminaFlag_No",1)
Spawn2:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("StaminaFlag",1)
TNT1 A 1
TNT1 A 0 A_JumpIfInTargetInventory("StaminaFlag_No",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("StaminaFlag",500,"Death")
loop
}
}

actor StaminaFlag_No : OnceC {}

actor ReSolidifier : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("UnSolid",1)
Spawn2:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("ReSolidifierCheckPickup",1)
TNT1 A 1
TNT1 A 0 A_JumpIfInTargetInventory("UnSolid",1,"Spawn2a")
TNT1 A 0 A_CheckFlag("SOLID","Spawn3",AAPTR_TARGET)
goto SuperDeath
Spawn2a:
TNT1 A 0 A_JumpIfInTargetInventory("StaminaFlag",1,"Spawn2")
TNT1 A 0 A_GiveInventory("WeaponCharge",1)
TNT1 A 0 A_JumpIfInventory("WeaponCharge",10,"Spawn2H")
goto Spawn2
Spawn2H:
TNT1 A 0 A_GiveToTarget("StopBeingUnSolidNoob",1)
TNT1 A 0 A_TakeInventory("WeaponCharge",100)
goto Spawn2
Spawn3:
TNT1 A 1 A_GiveToTarget("StaminaFlag",5)
TNT1 A 0 A_JumpIfInTargetInventory("StaminaFlag",500,2)
TNT1 A 0 A_CheckFlag("SOLID","Spawn3",AAPTR_TARGET)
TNT1 A 0
stop
SuperDeath:
TNT1 A 1
stop
Death:
TNT1 A 1
stop
}
}

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

actor ReSolidifierCheckPickup : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("ReSolidifierCheck",0,0,0,momx,momy,momz,0,8,0)
stop
}
}

actor StopBeingUnSolidNoob : CustomInventory
{
states
{
Pickup:
TNT1 A 0 DamageThing(1,15)
stop
}
}

//Damagetype SolidifyDamage{Obituary "CRUSH EVERYONE" Noarmor}

actor ReSolidifierCheck
{
PROJECTILE
+DONTSPLASH
+SKYEXPLODE
+DONTBLAST
+DONTREFLECT
//+NOINTERACTION
//+NOCLIP
Damage (0)
//radius 160
//height 160
//radius 16
//height 56
radius 24
height 84
States
{
Spawn:
TNT1 A 0
TNT1 A 1
TNT1 A 0 A_GiveToTarget("ReSolidify",1)
stop
Death:
XDeath:
TNT1 A 0 A_TakeFromTarget("StaminaFlag",2)
stop
}
}

actor ReSolidify : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIfInventory("UnSolid",1,"Pickup2")
stop
Pickup2:
TNT1 A 0 A_ChangeFlag("SOLID",1)
TNT1 A 0 A_TakeInventory("UnSolid",1)
stop
}
}


actor ReSpeciesSolid : ReSolidifier
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("UnSpeciesSolid",1)
Spawn2:
TNT1 A 0 A_GiveToTarget("ReSpeciesSolidCheckPickup",1)
TNT1 A 1
TNT1 A 0 A_JumpIfInTargetInventory("UnSpeciesSolid",1,"Spawn2")
stop
Death:
TNT1 A 0
stop
}
}

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

actor ReSpeciesSolidCheckPickup : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("ReSpeciesSolidCheck", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
stop
}
}

actor ReSpeciesSolidCheck : ReSolidifierCheck
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1
TNT1 A 0 A_GiveToTarget("ReSpeciesSolidify",1)
stop
}
}

actor ReSpeciesSolidify : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIfInventory("UnSpeciesSolid",1,"Pickup2")
stop
Pickup2:
TNT1 A 0 A_ChangeFlag("THRUSPECIES",0)
TNT1 A 0 A_TakeInventory("UnSpeciesSolid",1)
stop
}
}

/*
actor StopinatorFlag : OnceC{}

actor StopinatorHelper : BasicHelper
{
States
{
Spawn:
TNT1 A 1
TNT1 A 0 A_GiveToTarget("StopinatorPickup",1)
TNT1 A 0 A_JumpIfInTargetInventory("StopinatorFlag",1,"Spawn")
stop
}
}

actor StopinatorPickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_Stop
stop
}
}*/

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

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

actor StopTrollingNoob22 : Inventory
{
inventory.amount 1
inventory.maxamount 1
}
//Was for Ringman
actor StopTrollingNoobDC : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("IsInGame",1,"InGame")
TNT1 A 0 //A_GiveInventory("StopTrollingNoob",1)
TNT1 A 0 //A_GiveInventory("StopTrollingNoob2",1)
stop
InGame:
TNT1 A 1
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 WallJump : OnceC{}

actor CanWallJump : OnceC{}

actor WallJumperX
{
-SOLID
+NOGRAVITY
+NOBLOCKMAP
+NOTARGETSWITCH
Height 0
Radius 0
scale 2.5
+NOINTERACTION
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_JumpIfInTargetInventory("IsDead",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("WallJump",1,"Boost")
TNT1 A 1 A_JumpIfInTargetInventory("AdapterFlag",1,"Spawn")
stop
Boost:
TNT1 A 0 A_TakeFromTarget("WallJump",1)
//TNT1 AAAAAAAAA 2 A_GiveToTarget("BoostGive",1)
Goto BoostLoop1
BoostLoop1:
TNT1 A 1 A_GiveToTarget("WallJumpGive")
TNT1 A 1 A_GiveToTarget("NoWallJump",1)
TNT1 A 0 A_JumpIfInTargetInventory("AdapterFlag",1,"BoostLoop2")
stop
BoostLoop2:
TNT1 A 0 A_GiveInventory("WallJumpCount",1)
TNT1 A 0 A_JumpIfInventory("WallJumpCount",34,"BoostEnd")
TNT1 A 1 A_TakeFromTarget("NoWallJump",999)
TNT1 A 0 A_JumpIfInventory("WallJumpCount",9,"BoostLoop2")
TNT1 A 0 A_JumpIfInTargetInventory("AdapterFlag",1,"BoostLoop2")
stop
BoostEnd:
TNT1 A 0// A_Print("BoostEnd")
TNT1 A 7 A_TakeInventory("WallJumpCount",999)
TNT1 A 1 A_TakeFromTarget("NoWallJump",999)
TNT1 A 0 A_TakeFromTarget("WallJump",1)
Goto Spawn
Death:
TNT1 A 0
stop
}
}

actor NoWallJump : OnceC{}


actor WallJumpCount : Inventory
{
inventory.amount 1
inventory.maxamount 30
}


actor WallJumpGive : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("WallN",1,"Jump")
TNT1 A 0 A_JumpIfInventory("WallE",1,"Jump")
TNT1 A 0 A_JumpIfInventory("WallS",1,"Jump")
TNT1 A 0 A_JumpIfInventory("WallW",1,"Jump")
stop
Jump:
TNT1 A 0 A_JumpIfInventory("StaminaFlag",1,"Jump2")
stop
Jump2:
TNT1 A 0 A_TakeInventory("StaminaFlag",10)
TNT1 A 0 A_JumpIfInventory("SuperSaiyanBootFlag",1,"Saiyan")
TNT1 A 0 A_JumpIfInventory("IsQuickmanFlag",1,"JumpQ")
TNT1 A 0 ACS_ExecuteAlways(160,0,10)
TNT1 A 0 A_JumpIfInventory("IsCutmanFlag",1,"JumpC")
TNT1 A 0 ThrustThingZ(0,40,0,0)
stop
JumpQ:
TNT1 A 0 ACS_ExecuteAlways(160,0,11)
TNT1 A 0 ThrustThingZ(0,40,0,0)
stop
JumpC:
TNT1 A 0 //A_GiveInventory("JumpCancler",1)
TNT1 A 0 ThrustThingZ(0,50,0,0)
stop
Saiyan:
TNT1 A 0 ACS_ExecuteAlways(160,0,100)
TNT1 A 0 ThrustThingZ(0,45,0,0)
stop
}
}

actor WallJumping : 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 1
TNT1 A 0 A_SpawnItemEx("WallJumpMan")
TNT1 A 1
stop
}
}


actor WallJumpMan : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("WallJump",1,"Boost")
Goto Boost
Boost:
TNT1 A 0 A_TakeFromTarget("WallJump",1)
//TNT1 AAAAAAAAA 2 A_GiveToTarget("BoostGive",1)
Goto BoostLoop1
BoostLoop1:
TNT1 A 1 A_GiveToTarget("WallJumpGive")
TNT1 A 1 A_GiveToTarget("NoWallJump",1)
TNT1 A 0 A_JumpIfInTargetInventory("AdapterFlag",1,"BoostLoop2")
stop
BoostLoop2:
TNT1 A 0 A_GiveInventory("WallJumpCount",1)
TNT1 A 0 A_JumpIfInventory("WallJumpCount",34,"BoostEnd")
TNT1 A 1 A_TakeFromTarget("NoWallJump",999)
TNT1 A 0 A_JumpIfInventory("WallJumpCount",9,"BoostLoop2")
TNT1 A 0 A_JumpIfInTargetInventory("AdapterFlag",1,"BoostLoop2")
stop
BoostEnd:
TNT1 A 0// A_Print("BoostEnd")
TNT1 A 7 A_TakeInventory("WallJumpCount",999)
TNT1 A 1 A_TakeFromTarget("NoWallJump",999)
TNT1 A 1 A_TakeFromTarget("WallJumping",1)
TNT1 A 0 A_TakeFromTarget("WallJump",1)
stop
Death:
TNT1 A 0
stop
}
}

actor WallCheckN 
{
PROJECTILE
//+RIPPER
//+THRUACTORS
+THRUGHOST
+PAINLESS
+NOTARGETSWITCH
+DONTBLAST
+DONTREFLECT
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
}
}

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