actor BusterRodG : CustWepClassBase
{
Player.ScoreIcon "C_WTA0X"
player.displayname "BusterRodG"
player.soundclass "busterrodgc"

player.maxhealth 850
health 850
player.jumpz 13
player.forwardmove 1.0, 1.0
player.sidemove 0.98, 0.98

player.startitem "CBM_BaseFlagPack"

player.startitem "BusterRodG_W"
player.startitem "MonkeyMagicAmmo", 35
player.startitem "BRG_SpawnStart_P"
player.startitem "BRG_CloneItem"
player.startitem "WallJumpLimit", 4


player.startitem "HyperBombWeakness"
player.startitem "AirShooterWeakness"
player.startitem "HardKnuckleWeakness"
//player.startitem "DiveMissileWeakness"
player.startitem "ChargeKickWeakness"
player.startitem "WindStormWeakness"
player.startitem "SlashClawWeakness"
player.startitem "TornadoHoldWeakness"
player.startitem "TornadoBlowWeakness"
player.startitem "ReboundStrikerWeakness"
player.startitem "BreakDashWeakness"

States
{
Spawn:
BRGZ A 0
BRGZ B 1 A_GiveInventory("FrameBGive",1)
BRGZ A 1 A_GiveInventory("FrameAGive",1)
BRGZ A 1
wait
See:
BRGZ B 5 A_GiveInventory("FrameBGive",1)
BRGZ C 5 A_GiveInventory("FrameCGive",1)
BRGZ D 5 A_GiveInventory("FrameDGive",1)
BRGZ E 5 A_GiveInventory("FrameEGive",1)
Goto Spawn+1

Missile:
BRGZ J 0 A_JumpIfInventory("VivifyFlag1",1,"Missile2")
BRGZ J 1 A_GiveInventory("FrameJGive",1)
BRGZ J 0 A_JumpIfInventory("VivifyFlag1",1,"Missile2")
BRGZ J 3 A_GiveInventory("FrameJGive",1)
BRGZ K 10 A_GiveInventory("FrameKGive",1)
BRGZ J 8 A_GiveInventory("FrameJGive",1)
goto Spawn+1
Missile2:
BRGZ F 2 A_GiveInventory("FrameFGive",1)
BRGZ G 2 A_GiveInventory("FrameGGive",1)
BRGZ F 2 A_GiveInventory("FrameFGive",1)
BRGZ G 2 A_GiveInventory("FrameGGive",1)
BRGZ F 2 A_GiveInventory("FrameFGive",1)
BRGZ G 2 A_GiveInventory("FrameGGive",1)
goto Spawn+1
ClassPain:
BRGZ H 0 A_GiveInventory("FrameHGive",1)
goto MegamanPain
ClassDeath:
BRGZ H 0 //A_GiveInventory("FrameHGive",1)
goto MegamanDeath
}
}


actor BRG_SpawnStart_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("Frame",1,3)
TNT1 A 0 A_GiveInventory("Frame",1)
TNT1 A 0 A_SpawnItemEx("BRG_CloneSpawner_H")
TNT1 A 0
stop
}
}

actor BRG_CloneSpawner_H : BasicHelper
{
+NOTIMEFREEZE
+SERVERSIDEONLY
States
{
Spawn:
TNT1 A 0
goto Loopin
Loopin:
TNT1 A 0
TNT1 A 1
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
TNT1 A 0 A_JumpIfInventory("BusterRodG_W",1,1,2)
goto Death
TNT1 A 0 A_JumpIfInventory("BRGCloneFlag",1,1,2)
loop
TNT1 A 0 A_JumpIfInventory("FrameA",1,"A",2)
TNT1 A 0 A_JumpIfInventory("FrameB",1,"B",2)
TNT1 A 0 A_JumpIfInventory("FrameC",1,"C",2)
TNT1 A 0 A_JumpIfInventory("FrameD",1,"D",2)
TNT1 A 0 A_JumpIfInventory("FrameE",1,"E",2)
TNT1 A 0 A_JumpIfInventory("FrameF",1,"F",2)
TNT1 A 0 A_JumpIfInventory("FrameG",1,"G",2)
TNT1 A 0 A_JumpIfInventory("FrameH",1,"H",2)
TNT1 A 0 A_JumpIfInventory("FrameJ",1,"J",2)
TNT1 A 0 A_JumpIfInventory("FrameK",1,"K",2)
goto Loopin
A:TNT1 A 0 A_GiveToTarget("DoubleTeamSpawnerA",1)goto Loopin
B:TNT1 A 0 A_GiveToTarget("DoubleTeamSpawnerB",1)goto Loopin
C:TNT1 A 0 A_GiveToTarget("DoubleTeamSpawnerC",1)goto Loopin
D:TNT1 A 0 A_GiveToTarget("DoubleTeamSpawnerD",1)goto Loopin
E:TNT1 A 0 A_GiveToTarget("DoubleTeamSpawnerE",1)goto Loopin
F:TNT1 A 0 A_GiveToTarget("DoubleTeamSpawnerF",1)goto Loopin
G:TNT1 A 0 A_GiveToTarget("DoubleTeamSpawnerG",1)goto Loopin
H:TNT1 A 0 A_GiveToTarget("DoubleTeamSpawnerH",1)goto Loopin
//I:TNT1 A 0 A_GiveToTarget("DoubleTeamSpawnerI",1)goto Loopin
J:TNT1 A 0 A_GiveToTarget("DoubleTeamSpawnerJ",1)goto Loopin
K:TNT1 A 0 A_GiveToTarget("DoubleTeamSpawnerK",1)goto Loopin

}
}


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

actor FrameA : Frame {}
actor FrameB : Frame {}
actor FrameC : Frame {}
actor FrameD : Frame {}
actor FrameE : Frame {}
actor FrameF : Frame {}
actor FrameG : Frame {}
actor FrameH : Frame {}

actor FrameJ : Frame {}
actor FrameK : Frame {}

actor FramesTake : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("FrameA",1)
TNT1 A 0 A_TakeInventory("FrameB",1)
TNT1 A 0 A_TakeInventory("FrameC",1)
TNT1 A 0 A_TakeInventory("FrameD",1)
TNT1 A 0 A_TakeInventory("FrameE",1)
TNT1 A 0 A_TakeInventory("FrameF",1)
TNT1 A 0 A_TakeInventory("FrameG",1)
TNT1 A 0 A_TakeInventory("FrameH",1)
TNT1 A 0 A_TakeInventory("FrameJ",1)
TNT1 A 0 A_TakeInventory("FrameK",1)
stop
}
}

actor FrameAGive : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("FramesTake",1)
TNT1 A 0 A_GiveInventory("FrameA",1)
stop
}
}

actor FrameBGive : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("FramesTake",1)
TNT1 A 0 A_GiveInventory("FrameB",1)
stop
}
}

actor FrameCGive : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("FramesTake",1)
TNT1 A 0 A_GiveInventory("FrameC",1)
stop
}
}

actor FrameDGive : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("FramesTake",1)
TNT1 A 0 A_GiveInventory("FrameD",1)
stop
}
}

actor FrameEGive : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("FramesTake",1)
TNT1 A 0 A_GiveInventory("FrameE",1)
stop
}
}

actor FrameFGive : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("FramesTake",1)
TNT1 A 0 A_GiveInventory("FrameF",1)
stop
}
}

actor FrameGGive : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("FramesTake",1)
TNT1 A 0 A_GiveInventory("FrameG",1)
stop
}
}

actor FrameHGive : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("FramesTake",1)
TNT1 A 0 A_GiveInventory("FrameH",1)
stop
}
}

actor FrameJGive : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("FramesTake",1)
TNT1 A 0 A_GiveInventory("FrameJ",1)
stop
}
}

actor FrameKGive : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("FramesTake",1)
TNT1 A 0 A_GiveInventory("FrameK",1)
stop
}
}


actor DoubleTeamSpawner : CustomInventory
{
states
{
pickup:
TNT1 A 0 A_JumpIfInventory("FrameA",1,"A")
TNT1 A 0 A_JumpIfInventory("FrameB",1,"B")
TNT1 A 0 A_JumpIfInventory("FrameC",1,"C")
TNT1 A 0 A_JumpIfInventory("FrameD",1,"D")
TNT1 A 0 A_JumpIfInventory("FrameE",1,"E")
TNT1 A 0 A_JumpIfInventory("FrameF",1,"F")
TNT1 A 0 A_JumpIfInventory("FrameG",1,"G")
TNT1 A 0 A_JumpIfInventory("FrameH",1,"H")
TNT1 A 0 A_JumpIfInventory("FrameJ",1,"J")
TNT1 A 0 A_JumpIfInventory("FrameK",1,"K")
stop
A:
TNT1 A 0 A_SpawnItemEx("BRGDTFrameA",0,0,0,0,0,0,0,1+16384)//SXF_TRANSFERTRANSLATION+SXF_TRANSFERSCALE
stop
B:
TNT1 A 0 A_SpawnItemEx("BRGDTFrameB",0,0,0,0,0,0,0,1+16384)
stop
C:
TNT1 A 0 A_SpawnItemEx("BRGDTFrameC",0,0,0,0,0,0,0,1+16384)
stop
D:
TNT1 A 0 A_SpawnItemEx("BRGDTFrameD",0,0,0,0,0,0,0,1+16384)
stop
E:
TNT1 A 0 A_SpawnItemEx("BRGDTFrameE",0,0,0,0,0,0,0,1+16384)
stop
F:
TNT1 A 0 A_SpawnItemEx("BRGDTFrameF",0,0,0,0,0,0,0,1+16384)
stop
G:
TNT1 A 0 A_SpawnItemEx("BRGDTFrameG",0,0,0,0,0,0,0,1+16384)
stop
H:
TNT1 A 0 A_SpawnItemEx("BRGDTFrameH",0,0,0,0,0,0,0,1+16384)
stop
J:
TNT1 A 0 A_SpawnItemEx("BRGDTFrameJ",0,0,0,0,0,0,0,1+16384)
stop
K:
TNT1 A 0 A_SpawnItemEx("BRGDTFrameK",0,0,0,0,0,0,0,1+16384)
stop
}
}
actor DoubleTeamSpawnerA : DoubleTeamSpawner{States{Pickup:goto A}}
actor DoubleTeamSpawnerB : DoubleTeamSpawner{States{Pickup:goto B}}
actor DoubleTeamSpawnerC : DoubleTeamSpawner{States{Pickup:goto C}}
actor DoubleTeamSpawnerD : DoubleTeamSpawner{States{Pickup:goto D}}
actor DoubleTeamSpawnerE : DoubleTeamSpawner{States{Pickup:goto E}}
actor DoubleTeamSpawnerF : DoubleTeamSpawner{States{Pickup:goto F}}
actor DoubleTeamSpawnerG : DoubleTeamSpawner{States{Pickup:goto G}}
actor DoubleTeamSpawnerH : DoubleTeamSpawner{States{Pickup:goto H}}
actor DoubleTeamSpawnerI : DoubleTeamSpawner{States{Pickup:goto I}}
actor DoubleTeamSpawnerJ : DoubleTeamSpawner{States{Pickup:goto J}}
actor DoubleTeamSpawnerK : DoubleTeamSpawner{States{Pickup:goto K}}

actor BRGDTFrame
{
scale 2.5
-SOLID
+NOGRAVITY
+CLIENTSIDEONLY
//+NONETID
+NOTIMEFREEZE
+DONTBLAST
Radius 16
Height 56
States
{
End:
TNT1 A 0
stop
}
}

actor BRGDTFramePre : BasicGraphicEffect//BRGDTFrame
{
+NOTIMEFREEZE
RenderStyle "Translucent"
Alpha 0.75
Radius 16
Height 56
states
{
Spawn:
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteWithResult("core_copytranslation")
BRGZ A 35
TNT1 A 1
BRGZ A 35
TNT1 A 1
stop
}
}

actor BRGDTFrameA : BasicGraphicEffect//BRGDTFrame
{
states
{
Spawn:
TNT1 A 0//Redundant but safer than A_Jump syncing
TNT1 A 35 ACS_NamedExecuteWithResult("core_copytranslation")
BRGZ A 1
TNT1 A 35
BRGZ A 1
stop
}
}

actor BRGDTFrameB : BRGDTFrameA
{
states
{
Spawn:
TNT1 A 0
TNT1 A 35 ACS_NamedExecuteWithResult("core_copytranslation")
BRGZ B 1
TNT1 A 35
BRGZ B 1
stop
}
}

actor BRGDTFrameC : BRGDTFrameA
{
states
{
Spawn:
TNT1 A 0
TNT1 A 35 ACS_NamedExecuteWithResult("core_copytranslation")
BRGZ C 1
TNT1 A 35
BRGZ C 1
stop
}
}

actor BRGDTFrameD : BRGDTFrameA
{
states
{
Spawn:
TNT1 A 0
TNT1 A 35 ACS_NamedExecuteWithResult("core_copytranslation")
BRGZ D 1
TNT1 A 35
BRGZ D 1
stop
}
}

actor BRGDTFrameE : BRGDTFrameA
{
states
{
Spawn:
TNT1 A 0
TNT1 A 35 ACS_NamedExecuteWithResult("core_copytranslation")
BRGZ E 1
TNT1 A 35
BRGZ E 1
stop
}
}

actor BRGDTFrameF : BRGDTFrameA
{
states
{
Spawn:
TNT1 A 0
TNT1 A 35 ACS_NamedExecuteWithResult("core_copytranslation")
BRGZ F 1
TNT1 A 35
BRGZ F 1
stop
}
}

actor BRGDTFrameG : BRGDTFrameA
{
states
{
Spawn:
TNT1 A 0
TNT1 A 35 ACS_NamedExecuteWithResult("core_copytranslation")
BRGZ G 1
TNT1 A 35
BRGZ G 1
stop
}
}

actor BRGDTFrameH : BRGDTFrameA
{
states
{
Spawn:
TNT1 A 0
TNT1 A 35 ACS_NamedExecuteWithResult("core_copytranslation")
BRGZ H 1
TNT1 A 35
BRGZ H 1
stop
}
}

actor BRGDTFrameJ : BRGDTFrameA
{
states
{
Spawn:
TNT1 A 0
TNT1 A 35 ACS_NamedExecuteWithResult("core_copytranslation")
BRGZ J 1
TNT1 A 35
BRGZ J 1
stop
}
}

actor BRGDTFrameK : BRGDTFrameA
{
states
{
Spawn:
TNT1 A 0
TNT1 A 35 ACS_NamedExecuteWithResult("core_copytranslation")
BRGZ K 1
TNT1 A 35
BRGZ K 1
stop
}
}