/*

==HAND BEAM==
The default state of the Tech Monk's gauntlets, the user
can channel their willpower through them to fire blasts
of concussive energy. Because the gauntlets are powered
by the user's willpower, they're capable of firing as
long as the user is willing to fight. 

As the user chains alternating left and right attacks, 
the gauntlets can be fired rapidly, these chain attacks 
also increase the velocity of the beam, giving the user 
increased range. The Hand Beam's finisher is a double 
palm shot at max output, granting the greatest range 
and damage possible.

The Hand Beam shot is actually available as an alternate
attack for the other weapon types, but Hand Beam combos
are only available if the user switches back to the 
default mode.

Alongside the fired beams, the swift jab needed
to trigger the attack also serves as a good melee
attack.

Known as the "Squid Beam" in other regions, thanks to
the distinct shape of the projectiles, looking similar
to the head fins on Squid.

==HAND BEAM AUG==
As a temporary upgrade, the hand beam can be enhanced,
boosting velocity and damage for the duration of a stage.
This also augments offhand Hand Beam attacks with other 
weapons too.
*/

actor HandBeam : weapon
{
	Weapon.SelectionOrder 200
	Inventory.RestrictedTo "TechMonk"
	+undroppable
	+cheatnotweapon
	+noautofire	
	+NOAUTOAIM
	weapon.bobstyle smooth
	weapon.bobrangex 0.1
	weapon.bobrangey 0.3
	weapon.bobspeed 2
	Tag "Hand Beam"
	states
	{
	select:
		TNT1 A 0
	draw:
		TNT1 A 0
		HBID AAAAAAAA 0 a_raise
		TNT1 A 1 a_raise
		loop
	Ready:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_giveinventory ("HandBeamSelect",1)
		TNT1 A 0 a_takeinventory ("ArtiPainTimer",9999)
		TNT1 A 0 a_giveinventory ("ArtiPainTimer",40)
		TNT1 A 0 a_takeinventory ("StrikerBeam",99)
		TNT1 A 0 a_takeinventory ("StrikerReset",99999)
		TSWI IJKL 2 a_weaponready (WRF_ALLOWRELOAD)
		TNT1 A 0 a_playsound ("TechMonk/WeaponChange",CHAN_WEAPON)
		TSWI MNOPQRS 1 bright a_weaponready (WRF_ALLOWRELOAD)
		TSWI TUV 2 bright a_weaponready (WRF_ALLOWRELOAD)
		TNT1 A 0 a_playsound ("TechMonk/HandBeamUp",CHAN_WEAPON)
		TSW1 ABCD 2 bright a_weaponready (WRF_ALLOWRELOAD)
		TSW1 EFG 2 a_weaponready (WRF_ALLOWRELOAD)
		goto realready
	deselect:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("HandBeamSelect",99)
		TNT1 A 0 a_takeinventory ("WaveBallSelect",99)
		TNT1 A 0 a_takeinventory ("MoonBeamSelect",99)
		TNT1 A 0 a_takeinventory ("ClashBallSelect",99)
		TNT1 A 0 a_takeinventory ("PearlLaserSelect",99)
		TNT1 A 0 a_jumpifhealthlower (1, "deadlower")
		TSWI ABCD 1
		TNT1 A 0 a_playsound ("TechMonk/WeaponDown",0)		
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		TNT1 A 0 a_takeinventory ("ArtiPainTimer",9999)
		TNT1 A 0 a_giveinventory ("ArtiPainTimer",40)
		TSWI EFGH 2
	holster:
		TNT1 A 0
		TWSI H 1 a_lower
		TNT1 A 0 a_takeinventory ("secretaction", 99)
		HBID AA 0 a_lower
		loop
	DeadLower:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_stopsound (CHAN_WEAPON)
		TNT1 AAAAAAAAAAAAA 0 a_lower
		TNT1 A 1 a_lower
		wait
	RealReady:
		HBID A 1 a_weaponready (WRF_ALLOWRELOAD)
		TNT1 A 0 a_jumpifinventory ("secretaction", 1, "AYABABADEE")
		loop
	Fire:
		HBPF A 1
		TNT1 A 0 a_takeinventory ("HandBeamSelect",99)
		TNT1 A 0 a_jumpifinventory ("HandBeamAug",1,"AugShot1")
		TNT1 A 0 a_jumpifinventory ("TechCombo2", 1, "TripleShot")
		HBPF BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/HandBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBPF D 1 bright A_FireCustomMissile("HandBeamShot",0,0,0,-3)
		TNT1 A 0 a_giveinventory ("TechCombo1",1)
		HBPF EFG 1
		TNT1 A 0 a_playsound ("TechMonk/ComboAlert",0)
		HBPF HIJJ 2 Bright a_weaponready (WRF_ALLOWRELOAD)
		HBPF KK 2 a_weaponready (WRF_ALLOWRELOAD)
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_refire ("AutoBeamStart")
		HBPF LM 2 a_weaponready (WRF_ALLOWRELOAD)
		goto realready
	AutoBeamStart:
		HBAF E 2
		HBAF D 2
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
	AutoBeam:	
		HBAF AAB 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/HandBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		HBAF C 1 bright A_FireCustomMissile("HandBeamShot",0,0,0,-3)
		HBAF D 8
		TNT1 A 0 a_refire ("AutoBeam")
		HBAF EFGHIJKL 2 a_weaponready (WRF_ALLOWRELOAD)
		goto realready

	
	ComboMiss:
		HBID A 1 a_weaponready (WRF_NOFIRE)
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		TNT1 A 0 a_jumpifinventory ("StrikerModule",1,"StrikerCharge")
		TNT1 A 0 a_refire ("ComboMiss")
		goto realready
		
	Altfire:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("HandBeamSelect",99)
		TNT1 A 0 a_jumpifinventory ("HandBeamAug",1,"AugShot2")
		TNT1 A 0 a_jumpifinventory ("TechCombo3", 1, "Finisher")
		TNT1 A 0 a_jumpifinventory ("TechCombo1", 1, "DoubleShot")
		HBSF BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/HandBeam",CHAN_WEAPON)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBSF D 1 bright A_FireCustomMissile("HandBeamShot",0,0,0,-3)
		HBSF EF 1
		HBSF GG 1 a_weaponready (WRF_ALLOWRELOAD)
		HBS1 AABBB 1 a_weaponready (WRF_ALLOWRELOAD)
		HBID A 1 a_weaponready (WRF_ALLOWRELOAD)
		TNT1 A 0 a_refire ("ComboMiss")
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		goto realready
	DoubleShot:
		HBSF BBC 1 Bright
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_giveinventory ("TechCombo2",1)
		TNT1 A 0 a_playsound ("TechMonk/HandBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBSF D 1 bright A_FireCustomMissile("LongHandBeamShot",0,0,0,-3)
		HBSF BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/HandBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		HBSF D 1 bright A_FireCustomMissile("LongHandBeamShot",0,0,0,-3)

		HBSF EFG 1
		TNT1 A 0 a_playsound ("TechMonk/ComboAlert",0)
		HBSF HIJJ 2 Bright a_weaponready (WRF_NOSECONDARY|WRF_ALLOWRELOAD)
		HBSF KK 2 a_weaponready (WRF_NOSECONDARY|WRF_ALLOWRELOAD)
		HBSF L 1 a_weaponready (WRF_NOSECONDARY|WRF_ALLOWRELOAD)
		TNT1 A 0 a_refire ("ComboMiss")
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		goto realready
	TripleShot:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_giveinventory ("TechCombo3",1)
		HBPF BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/HandBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBPF D 1 bright A_FireCustomMissile("LongHandBeamShot",0,0,0,-3)
		HBPF BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/HandBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		HBPF D 1 bright A_FireCustomMissile("LongHandBeamShot",0,0,0,-3)
		HBPF BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/HandBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		HBPF D 1 bright A_FireCustomMissile("LongHandBeamShot",0,0,0,-3)

		HBPF EFG 1
		TNT1 A 0 a_playsound ("TechMonk/ComboAlert",0)
		HBPF HIJJ 2 Bright a_weaponready (WRF_NOPRIMARY|WRF_ALLOWRELOAD)
		HBPF KK 2 a_weaponready (WRF_NOPRIMARY|WRF_ALLOWRELOAD)
		HBPF LM 2 a_weaponready (WRF_NOPRIMARY|WRF_ALLOWRELOAD)
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		TNT1 A 0 a_refire ("AutoBeam")
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		goto realready
	Finisher:

		HBSF A 1
		HBSF BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/HandBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBSF D 1 bright A_FireCustomMissile("LongHandBeamShot",0,0,0,-3)
		HBSF EF 1
		HBS1 D 1

		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		HBPF BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/HandBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBPF D 1 bright A_FireCustomMissile("LongHandBeamShot",0,0,0,-3)
		HBPF EF 1
		HBS1 C 1

		HBSF BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/HandBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBSF D 1 bright A_FireCustomMissile("LongHandBeamShot",0,0,0,-3)
		HBSF EF 1
		HBS1 D 1


		HBCF ABCD 2
		HBCF E 3
		HBCF G 1
		HBCF HI 1 bright
		TNT1 A 0 a_playsound ("TechMonk/DoubleHandBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab",0,0,-3)
		TNT1 A 0 a_firecustommissile ("PalmJab",0,0,3)
		TNT1 A 0 A_FireCustomMissile("LongHandBeamShot",0,0,6,-3)
		HBCF J 2 A_FireCustomMissile("LongHandBeamShot",0,0,-6,-3)
		HBCF LMN 2
		TNT1 A 3 a_weaponready (WRF_ALLOWRELOAD)
		HBCF EDC 2 a_weaponready (WRF_ALLOWRELOAD)
		HBID A 1 a_weaponready (WRF_ALLOWRELOAD)
		goto realready
		
	//Beam Aug Stuff
	//I'm sorry I had it to do it this way aaaagghh
	AugShot1:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("TechCombo2", 1, "TripleAugShot")
		HBP1 BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/AugBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBP1 D 1 bright A_FireCustomMissile("AugBeamShot",0,0,0,-3)
		TNT1 A 0 a_giveinventory ("TechCombo1",1)
		HBPF EFG 1
		TNT1 A 0 a_playsound ("TechMonk/ComboAlert",0)
		HBPF HIJJ 2 Bright a_weaponready (WRF_ALLOWRELOAD)
		HBPF KK 2 a_weaponready (WRF_ALLOWRELOAD)
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_refire ("AutoAugBeamStart")
		HBPF LM 2 a_weaponready (WRF_ALLOWRELOAD)
		goto realready
	AutoAugBeamStart:
		HBAF E 2
		HBAF D 2
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
	AutoAugBeam:	
		HBA1 AAB 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/AugBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		HBA1 C 1 bright A_FireCustomMissile("AugBeamShot",0,0,0,-3)
		HBAF D 8
		TNT1 A 0 a_refire ("AutoAugBeam")
		HBAF EFGHIJKL 2 a_weaponready (WRF_ALLOWRELOAD)
		goto realready

	
	AugShot2:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("TechCombo3", 1, "AugFinisher")
		TNT1 A 0 a_jumpifinventory ("TechCombo1", 1, "DoubleAugShot")
		HBS2 BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/AugBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBS2 D 1 bright A_FireCustomMissile("AugBeamShot",0,0,0,-3)
		HBSF EF 1
		HBSF GG 1 a_weaponready (WRF_ALLOWRELOAD)
		HBS1 AABBB 1 a_weaponready (WRF_ALLOWRELOAD)
		HBID A 1 a_weaponready (WRF_ALLOWRELOAD)
		TNT1 A 0 a_refire ("ComboMiss")
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		goto realready
	DoubleAugShot:
		HBS2 BBC 1 Bright
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_giveinventory ("TechCombo2",1)
		TNT1 A 0 a_playsound ("TechMonk/AugBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBS2 D 1 bright A_FireCustomMissile("LongAugBeamShot",0,0,0,-3)
		HBS2 BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/AugBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		HBS2 D 1 bright A_FireCustomMissile("LongAugBeamShot",0,0,0,-3)

		HBSF EFG 1
		TNT1 A 0 a_playsound ("TechMonk/ComboAlert",0)
		HBSF HIJJ 2 Bright a_weaponready (WRF_NOSECONDARY|WRF_ALLOWRELOAD)
		HBSF KK 2 a_weaponready (WRF_NOSECONDARY|WRF_ALLOWRELOAD)
		HBSF L 1 a_weaponready (WRF_NOSECONDARY|WRF_ALLOWRELOAD)
		TNT1 A 0 a_refire ("ComboMiss")
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		goto realready
	TripleAugShot:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_giveinventory ("TechCombo3",1)
		HBP1 BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/AugBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBP1 D 1 bright A_FireCustomMissile("LongAugBeamShot",0,0,0,-3)
		HBP1 BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/AugBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		HBP1 D 1 bright A_FireCustomMissile("LongAugBeamShot",0,0,0,-3)
		HBP1 BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/AugBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		HBP1 D 1 bright A_FireCustomMissile("LongAugBeamShot",0,0,0,-3)

		HBPF EFG 1
		TNT1 A 0 a_playsound ("TechMonk/ComboAlert",0)
		HBPF HIJJ 2 Bright a_weaponready (WRF_NOPRIMARY|WRF_ALLOWRELOAD)
		HBPF KK 2 a_weaponready (WRF_NOPRIMARY|WRF_ALLOWRELOAD)
		HBPF LM 2 a_weaponready (WRF_NOPRIMARY|WRF_ALLOWRELOAD)
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		TNT1 A 0 a_refire ("AutoAugBeam")
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		goto realready
	AugFinisher:

		HBSF A 1
		HBS2 BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/AugBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBS2 D 1 bright A_FireCustomMissile("LongAugBeamShot",0,0,0,-3)
		HBSF EF 1
		HBS1 D 1

		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		HBP1 BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/AugBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBP1 D 1 bright A_FireCustomMissile("LongAugBeamShot",0,0,0,-3)
		HBPF EF 1
		HBS1 C 1

		HBS2 BBC 1 Bright
		TNT1 A 0 a_playsound ("TechMonk/AugBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab")
		HBS2 D 1 bright A_FireCustomMissile("LongAugBeamShot",0,0,0,-3)
		HBSF EF 1
		HBS1 D 1


		HBCF ABCD 2
		HBCF E 3
		HBCF G 1
		HBC1 HI 1 bright
		TNT1 A 0 a_playsound ("TechMonk/DoubleAugBeam",0)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff",FBF_NOFLASH)
		TNT1 A 0 a_firecustommissile ("PalmJab",0,0,-3)
		TNT1 A 0 a_firecustommissile ("PalmJab",0,0,3)
		TNT1 A 0 A_FireCustomMissile("LongAugBeamShot",0,0,6,-3)
		HBC1 J 2 A_FireCustomMissile("LongAugBeamShot",0,0,-6,-3)
		HBCF LMN 2
		TNT1 A 3 a_weaponready (WRF_ALLOWRELOAD)
		HBCF EDC 2 a_weaponready (WRF_ALLOWRELOAD)
		HBID A 1 a_weaponready (WRF_ALLOWRELOAD)
		goto realready


	
	
	//Kame Bomb Stuff
	Reload:
		TNT1 A 0 
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		TNT1 A 0 a_jumpifinventory ("KameBombModule",1,"KameBombShot")
		HBID A 30 a_weaponready 
		goto realready
	KameBombFail:
		TNT1 A 0 
		TNT1 A 0 a_playsound ("TechMonk/Error",0)
		HBID A 8 
		HBID A 30 a_weaponready 
		goto realready
	KameBombShot:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("KameFired",1, "Detonate")
		TNT1 A 0 a_jumpifinventory ("KameCoolDown",1,"KameBombFail")
		HBSF A 1 
		KEB1 AAB 1 bright
		TNT1 A 0 a_playsound ("TechMonk/KameBomb",0)
		TNT1 A 0 ACS_NamedExecuteAlways("KameBombCharge", 0, 0, 0, 0)
		TNT1 A 0 A_FireCustomMissile("KameBomb",0,0)
		HBSF CC 1 bright 
		TNT1 A 0 a_giveinventory ("KameFired",1)
		KEB1 DD 1
		HBSF E 3 
		HBSF F 2 a_weaponready (WRF_NOFIRE|WRF_ALLOWRELOAD)
		HBSF GG 1 a_weaponready (WRF_ALLOWRELOAD)
		HBS1 AABBB 1 a_weaponready (WRF_ALLOWRELOAD)
		HBID A 1 a_weaponready (WRF_ALLOWRELOAD)
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		goto realready
	Detonate:
		KEB1 EFG 1
		KEB1 HI 2 
		TNT1 A 0 a_takeinventory ("TechCombo1",99)
		TNT1 A 0 a_takeinventory ("TechCombo2",99)
		TNT1 A 0 a_takeinventory ("TechCombo3",99)
		TNT1 A 0 a_playsound ("TechMonk/KameTrigger",0)
		KEB1 J 2 a_giveinventory ("KameDet",1)
		TNT1 A 0 a_takeinventory ("KameFired",99)
		KEB1 KLMNO 2 a_weaponready
		HBID A 1 a_weaponready
		goto realready

	//Striker Beam stuff
	StrikerCharge:
		HBID A 1 
		TNT1 A 0 a_giveinventory ("StrikerPrep",1)
		TNT1 A 0 a_jumpifinventory ("StrikerPrep", 8, "StrikerChargeStart")
		TNT1 A 0 a_refire ("StrikerCharge")
		TNT1 A 0 a_takeinventory ("StrikerPrep",99)
		goto realready
	StrikerChargeStart:	
		SPOW A 2
		TNT1 A 0 a_takeinventory ("StrikerPrep",99)
		TNT1 A 0 a_playsound ("TechMonk/StrikerCharge",0)
		SPOW B 2
		SPOW CDE 2
		SPOW E 3 
		TNT1 A 0 a_playsound ("TechMonk/StrikerChargeLoop",CHAN_WEAPON,1,1)
	ChargeLoop:
		SPOW F 2 bright a_giveinventory ("StrikerCharge",8)
		SPOW G 2 bright a_giveinventory ("StrikerCharge",8)
		SPOW H 2 bright a_giveinventory ("StrikerCharge",8)
		SPOW I 2 bright a_giveinventory ("StrikerCharge",8)
		TNT1 A 0 a_jumpifinventory ("StrikerCharge",300,"ChargeFinish")
		TNT1 A 0 a_refire ("chargeloop")
	ChargeCancel:
		TNT1 A 0
		TNT1 A 0 a_stopsound (CHAN_WEAPON)
		TNT1 A 0 a_takeinventory ("ArtiPainTimer",9999)
		TNT1 A 0 a_takeinventory ("StrikerCharge",9999)
		TNT1 A 0 a_giveinventory ("ArtiPainTimer",40)
		TSWI IJKL 2 a_weaponready (WRF_ALLOWRELOAD)
		TSWI MNOPQRS 1 bright a_weaponready (WRF_ALLOWRELOAD)
		TSWI TUV 2 bright a_weaponready (WRF_ALLOWRELOAD)
		TNT1 A 0 a_playsound ("TechMonk/HandBeamUp",CHAN_WEAPON)
		TSW1 ABCD 2 bright a_weaponready (WRF_ALLOWRELOAD)
		TSW1 EFG 2 a_weaponready (WRF_ALLOWRELOAD)
		goto realready
	ChargeFinish:	
		TNT1 A 0
		TNT1 A 0 a_stopsound (CHAN_WEAPON)
		TNT1 A 0 a_playsound ("TechMonk/StrikerChargeFinish",0)
		SPOW JKLM 2 bright
		TNT1 A 0 a_playsound ("TechMonk/StrikerPowerUp",CHAN_WEAPON)
		SPOW NOPQRST 2 bright
		SPOW UVWX 2 bright
		TNT1 A 0 a_takeinventory ("ArtiPainTimer",9999)
		TNT1 A 0 a_takeinventory ("StrikerCharge",9999)
		TNT1 A 0 a_giveinventory ("ArtiPainTimer",24)
		TNT1 A 0 a_playsound ("TechMonk/StrikerPowerUpFinish",CHAN_WEAPON)
		SPOW YZ 2 bright
		SPO1 ABC 2 bright
		TNT1 A 0 a_giveinventory ("StrikerBeam",1)
		TNT1 A 0 a_selectweapon ("StrikerBeam")
		goto StrikerChange
	StrikerChange:
		TNT1 A 0
		STRI A 0 a_lower
		TNT1 A 0 a_takeinventory ("secretaction", 99)
		HBID AAAAAAAAAAA 0 a_lower
		loop
		
	AYABABADEE:
		TNT1 A 0 
		TNT1 A 2 
		TNT1 A 0 a_takeinventory ("secretaction", 99)
		HBCF N 2
		HBCF F 2
		TNT1 A 0 a_playsound ("TechMonk/RaidenYell",0)
	FlightLoop:
		HBCF G 1 a_firecustommissile ("RaidenDive")
		TNT1 A 0 a_jumpifinventory ("kickwall", 1, "DiveHit")
		TNT1 A 0 a_jumpifinventory ("kickmonster", 1, "DiveHit")
		TNT1 A 0 A_ChangeVelocity(Cos(Pitch)*10,0,Sin(Pitch)*-8,1)
		TNT1 A 0 a_giveinventory ("Divetimer",1)
		TNT1 A 0 a_jumpifinventory ("DiveTimer",18,"EndDive")
		loop
	EndDive:
		TNT1 A 0
		TNT1 A 0 a_stop
		TNT1 A 0 A_ChangeVelocity(Cos(Pitch)*3,0,Sin(Pitch)*-2,1)
		TNT1 A 0 a_takeinventory ("DiveTimer", 99)
		TNT1 A 0 a_takeinventory ("KickWall", 99)
		TNT1 A 0 a_takeinventory ("KickMonster", 99)
		HBCF MN 2
		TNT1 A 0 a_takeinventory ("KickWall", 99)
		TNT1 A 0 a_takeinventory ("KickMonster", 99)
		TNT1 A 1
		TNT1 A 0 a_takeinventory ("KickWall", 99)
		TNT1 A 0 a_takeinventory ("KickMonster", 99)
		TNT1 A 0
		HBCF EDC 2 a_weaponready (WRF_ALLOWRELOAD)
		HBID A 30 a_weaponready (WRF_ALLOWRELOAD)
		goto realready
	Divehit:
		TNT1 A 0
		TNT1 A 0 a_stop
		TNT1 A 0 A_recoil (8)
		TNT1 A 0 thrustthingz (0,30,0,0)
		TNT1 A 0 a_takeinventory ("DiveTimer", 99)
		TNT1 A 0 a_takeinventory ("KickWall", 99)
		TNT1 A 0 a_takeinventory ("KickMonster", 99)
		HBCF MN 2
		TNT1 A 0 a_takeinventory ("KickWall", 99)
		TNT1 A 0 a_takeinventory ("KickMonster", 99)
		TNT1 A 2
		TNT1 A 0 a_takeinventory ("KickWall", 99)
		TNT1 A 0 a_takeinventory ("KickMonster", 99)
		TNT1 A 0
		HBCF EDC 2 a_weaponready (WRF_ALLOWRELOAD)
		HBID A 30 a_weaponready (WRF_ALLOWRELOAD)
		goto realready
		

	}
}


actor HandBeamShot : fastprojectile
{
	Radius 8
	Height 5
	Speed 105
	Damage (15)
	Decal CANESDecal
	Projectile
	species "Player"
	+thruspecies
	+bright
	scale 0.60
	projectilekickback 200
	Obituary "%o was blitzed by %k's hand beam"
	States
	{
	Spawn:
		HBPR A 5
		HBPR A 1 a_stop
		goto death
	death:
		TNT1 A 0
		TNT1 A 0 a_stop
		HBPR B 1 a_stop
		HBPR B 1 
		stop
	Crash:
		TNT1 A 0
		TNT1 A 0 a_stop
		HBPR B 1 a_stop
		HBPR B 1
		stop
	Xdeath:
		TNT1 A 0
		TNT1 A 0 a_fadeout (0.20)
		TNT1 A 0 a_playsound ("TechMonk/HandBeamHit",0)
		HBPR BCDEF 1
		stop
	}
}


Actor LongHandBeamShot : HandBeamShot
{
	Speed 125
	Damage (25)
	states
	{
	Spawn:
		HBPR A 20
		HBPR A 1 a_stop
		goto death
	}
}


actor AugBeamShot : HandBeamShot
{
	Speed 135
	Damage (20)
	Obituary "%o was blitzed by %k's hand beam"
	projectilekickback 300
	States
	{
	Spawn:
		ABPS A 9
		ABPS A 1 a_stop
		goto death
	death:
		TNT1 A 0
		TNT1 A 0 a_stop
		ABPS B 1 a_stop
		ABPS B 1 
		stop
	Crash:
		TNT1 A 0
		TNT1 A 0 a_stop
		ABPS B 1 a_stop
		ABPS B 1
		stop
	Xdeath:
		TNT1 A 0
		TNT1 A 0 a_fadeout (0.10)
		TNT1 A 0 a_playsound ("TechMonk/HandBeamHit",0)
		ABPS BCDEF 1
		stop
	}
}


Actor LongAugBeamShot : AugBeamShot
{
	Speed 150
	Damage (35)
	states
	{
	Spawn:
		ABPS A 1
		Loop
	}
}


actor PalmJab : fastprojectile
{
	Projectile
	speed 64
	damage (15)
	obituary "%o was no match for %k's kung fu."
	+BLOODSPLATTER
	+thruspecies
	+dontblast
	+dontreflect
	+bright
	scale 0.10
	species "player"
	height 8
	radius 8
	mass 2000
	projectilekickback 900
	states
	{
	Spawn:
		TNT1 A 1
		stop
	Death:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 A_PlaySound("TechMonk/MeleeMiss", CHAN_AUTO)
		TNT1 A 0 A_SpawnDebris("WWStyleBulletSpark")
		TNT1 A 0 radius_quake (1,2,0,8,0)
		TNT1 A 5 
		stop
	Xdeath:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 A_PlaySound("TechMonk/StoneHandHit", CHAN_AUTO)
		TNT1 A 0 radius_quake (1,4,0,8,0)
		STBE B 1
		STBE B 1 a_setscale (0.30,2)
		STBE B 1 a_setscale (0.80,1)
		STBE B 1 a_setscale (1.60,1.40)
		STBE B 2 a_setscale (0.80,1)
		stop
	}
}


//===========================================================================
//===========================================================================
//KAME BOMB
//===========================================================================
//===========================================================================

actor KameBomb
{
	+notimefreeze
	projectile
	+bloodlessimpact
	+bright
	damage (0)
	speed 25
	+thruspecies
	+thruactors
	species "Player"
	+FORCEXYBILLBOARD
	+Hexenbounce
	+SKYEXPLODE
	-Bounceonfloors
	-NOGRAVITY
	radius 9
	height 8
	bouncefactor 0.50
	reactiontime 25
	scale 1
	Bouncecount 2
	Gravity 0.70
	states
	{
	spawn:
		TNT1 A 0 
		TNT1 A 0 A_PlaySound("silence", CHAN_VOICE)
	flight:
		TNT1 A 0 a_jumpifintargetinventory ("KameDet",1,"Detonate")
		KMBM A 2 a_jumpifintargetinventory ("KameDet",1,"Detonate")
		TNT1 A 0 a_jumpifintargetinventory ("KameDet",1,"Detonate")
		KMBM B 2 a_jumpifintargetinventory ("KameDet",1,"Detonate")
		TNT1 A 0 a_jumpifintargetinventory ("KameDet",1,"Detonate")
		KMBM C 2 a_jumpifintargetinventory ("KameDet",1,"Detonate")
		TNT1 A 0 a_jumpifintargetinventory ("KameDet",1,"Detonate")
		KMBM D 2 a_jumpifintargetinventory ("KameDet",1,"Detonate")
		TNT1 A 0 a_jumpifintargetinventory ("KameDet",1,"Detonate")
		TNT1 A 0 a_countdown
		loop
	Death:
		TNT1 A 0
		TNT1 A 0 a_stop
		TNT1 A 0 a_changeflag ("THRUACTORS",1)
		TNT1 A 0 a_changeflag ("MOVEWITHSECTOR",1)
		KMBM E 1 a_jumpifintargetinventory ("KameDet",1,"Detonate")
	Waitfortrigger:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("MineTimer",33,"WaitForTrigger2Start")
		KMBM E 1 a_jumpifintargetinventory ("KameDet",1,"Detonate")
		TNT1 A 0 a_giveinventory ("MineTimer",1)
		loop
	WaitForTrigger2Start:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("MineTimer",9999)
		TNT1 A 0 a_playsound ("TechMonk/MineBeep",0)
	WaitForTrigger2:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("MineTimer",33,"Startover")
		KMBM F 1 a_jumpifintargetinventory ("KameDet",1,"Detonate")
		TNT1 A 0 a_jumpifintargetinventory ("KameDet",1,"Detonate")
		TNT1 A 0 a_giveinventory ("MineTimer",1)
		loop
	Startover:
		TNT1 A 0
		KMBM E 1 a_takeinventory ("MineTimer",9999)
		goto Waitfortrigger


	Detonate:
		TNT1 A 0 
		TNT1 A 0 
		KMBM E 1
		TNT1 A 0 thrustthingz (0,15,0,0)
		KMBM ABCD 1 
		KMBM ABCD 1 
		TNT1 A 0 a_changeflag ("NOGRAVITY",1)
		TNT1 A 0 a_changeflag ("SKYEXPLODE",0)
		TNT1 A 0 a_stop
		TNT1 A 0 a_radiusgive ("KamePlayerBoost",220,RGF_PLAYERS,1)
		TNT1 A 0 a_radiusgive ("KameBoost",220,RGF_MONSTERS,1)
		TNT1 A 0 a_playsound ("TechMonk/KameBoom",0)
		TNT1 A 1 bright a_explode (20,180,1,1)
		TNT1 A 0 bright a_explode (120,200,0,1,120)
		TNT1 A 0 Radius_Quake (3,6,0,20,0)
		TNT1 A 0 a_blast (0,255,180,15)
		TNT1 A 0 a_spawnitemex ("KameBombFX",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
		TNT1 A 8
		stop
	}
}

actor KameBombFX
{
	+NOINTERACTION
	+clientsideonly
	Radius 4
	Height 5
	scale 3
	+bright
	States
	{
	Spawn:
		KMBM GHIJKLM 2
		stop
	}
}

actor KameBoost : CustomInventory
{
	states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1
		stop
	Pickup:
		TNT1 A 0 
		TNT1 A 0 A_CheckFlag ("BOSS", "NoThrust")
		TNT1 A 0 ThrustThingZ(0,65,0,0)
		stop
	NoThrust:
		TNT1 A 0 
		stop
	}
}

Actor KamePlayerBoost : KameBoost
{
	states
	{
	Pickup:
		TNT1 A 0 
		TNT1 A 0 ThrustThingZ(0,65,0,0)
		stop
	}
}




ACTOR KameDet : Powerup
{
  Powerup.Duration 20
}




actor RaidenDive
{
	Projectile
	projectilekickback 600
	speed 48
	damage 7
	obituary "%o was ninja kicked in the face by %k"
	+BLOODSPLATTER
	+thruspecies
	+dontblast
	+forcepain
	+bounceonfloors
	species "player"
	height 10
	radius 10
	+noblood
	+NOEXTREMEDEATH
	mass 1000000
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0 A_JumpIf(floorz == z, "break")
		TNT1 A 0 A_JumpIf(ceilingz == z, "break")
		TNT1 A 0 A_JumpIf(floorz == z, "break")
		TNT1 A 0 A_JumpIf(ceilingz == z, "break")
		TNT1 A 1 A_JumpIf(floorz == z, "break")
		TNT1 A 0 A_JumpIf(floorz == z, "break")
		TNT1 A 0 A_JumpIf(ceilingz == z, "break")
		stop
	break:
		TNT1 A 0 a_stop
		stop
	death:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 a_stop
		TNT1 A 0 A_PlaySound("TechMonk/DiveMiss", CHAN_AUTO)
		TNT1 A 1 a_givetotarget ("kickwall", 1)
		stop
	Xdeath:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 a_stop
		TNT1 A 0 A_PlaySound("TechMonk/DiveHit", CHAN_AUTO)
		TNT1 A 0 radius_quake (2,3,0,10,0)
		TNT1 A 0 a_givetotarget ("kickmonster", 1)
		TNT1 A 1 A_radiusthrust (12000,50,0)
		TNT1 A 4
		stop
	}
}


//Tokens
actor TechCombo1 : inventory
{inventory.maxamount 1}

actor TechCombo2 : inventory
{inventory.maxamount 1}

actor TechCombo3 : inventory
{inventory.maxamount 1}

Actor KameCoolDown : Inventory
{inventory.maxamount 300}

ACTOR MineTimer : Inventory
{inventory.maxamount 33}


ACTOR KameBombReload : Inventory
{inventory.maxamount 5}

Actor KameFired : Inventory
{inventory.maxamount 1}

Actor HandBeamSelect : Powerup
{
  Powerup.Duration 60
}

Actor CrateWeaponArmed : Powerup
{
  Powerup.Duration 80
}


Actor DiveTimer : Inventory
{inventory.maxamount 30}


//Striker Module tokens
ACTOR StrikerPrep : Inventory
{inventory.maxamount 8}

ACTOR StrikerCharge : Inventory
{inventory.maxamount 300}

ACTOR StrikerTimer : Inventory
{inventory.maxamount 300}

ACTOR StrikerReset : Inventory
{inventory.maxamount 600}
