ACTOR ChimeraRifle:MSXWeapon{
	Weapon.SelectionOrder 200
	Inventory.PickupMessage "'Chimera' DM-REW9 Concussion Pulse Rifle"
	Inventory.PickupSound "weapons/cr_clipin"
	Weapon.AmmoType1 "criflecell"
	Weapon.AmmoType2 "crifle_ammo"
	Weapon.AmmoUse1 1
	Weapon.AmmoGive2 40
	Weapon.Kickback 100
	Weapon.BobStyle inverse
	Weapon.BobRangeX 0.4
	Weapon.BobRangeY 0.6
	Weapon.BobSpeed 2.5
	+AMMO_OPTIONAL	
	+NOALERT
	+WEAPON.NOAUTOAIM
	Scale 0.30
	States{
	Spawn:
		CNCW A -1
		stop
	Select:
		TNT1 A 0 A_JumpIf(GetCVar("MSfiXd_QuickSwap")==1,"SeLoop")
		TNT1 A 15
	 SeLoop:
		TNT1 AAAAAAAAAA 0 A_Raise
		TNT1 A 1 A_Raise
		Loop
	Deselect:
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")!=2,2)
		TNT1 A 0 {A_StopSound(6);
			A_PlaySound("weapons/cr_pulseoff",6);}
		CNCU A 1 {A_TakeInventory("crifle_mode");
			A_PlaySound("weapons/cr_deselect",CHAN_WEAPON);
			A_GunFlash("flashreset");
			A_TakeInventory("xhair_switch",1);}
		CNCU BCDEFG 1
		TNT1 AAAAAAAAAA 0 A_Lower
		TNT1 A 1 A_Lower
		Goto Deselect+9
	Ready:
		CNCU G 1 {A_TakeInventory("crifle_mode");
			A_GiveInventory("crifle_mode",1);
			A_PlaySound("weapons/cr_select",CHAN_WEAPON);
			A_SetCrosshair(10);}
		CNCU FEDCBA 1
		TNT1 A 0 A_GiveInventory("xhair_switch",1)
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")!=2,2)
		TNT1 A 0 A_PlaySound("weapons/cr_pulseidle",6,1.0,1)
	Idle:
		CNCI A 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM|WRF_ALLOWUSER1|WRF_ALLOWUSER2|WRF_ALLOWUSER3|WRF_ALLOWUSER4)
		"####" "#" 0 A_JumpIfInventory("SprintingPlayer",1,"Sprint")
		Loop
	Sprint:
		"####" "#" 0 A_JumpIf(GetCVar("MSfiXd_SprintStaminaUse")==0,"SprStart")
		TNT1 A 0 A_JumpIfInventory("PlayerStamina",1,"SprStart")
		TNT1 A 0 A_TakeInventory("SprintingPlayer",1)
		Goto Idle
	SprStart:
		TNT1 A 0 A_JumpIf(GetCVar("MSfiXd_SprintHands")==1,"SprStart_HandWeapon")
		TNT1 A 0 {A_TakeInventory("xhair_switch",1);
			A_PlaySound("sfx/sprintstart",CHAN_AUTO);
			ACS_NamedExecute("Player-ChangeSpeed",0,GetCVar("MSfiXd_SprintSpeed"),0,0);
			A_SetBlend("49 99 0",0.4,15);
			A_Recoil(-15);}
		CNCS ABCDE 1 Offset(0,32)
		"####" "#" 0 A_JumpIfInventory("SprintingPlayer",1,"SprLoop1")
		Goto SprEnd
	SprStart_HandWeapon:
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")!=2,2)
		TNT1 A 0 {A_StopSound(6);
			A_PlaySound("weapons/cr_pulseoff",6);}
		CNCU A 1{A_PlaySound("weapons/cr_deselect",CHAN_WEAPON);
			A_TakeInventory("xhair_switch",1);}
		CNCU CEG 1
		TNT1 A 1 A_GiveInventory("SprintHands")
		TNT1 A 0 A_Jump(256,"SprStart_Hands")
		Goto SprStart_Hands
	SprEnd:	
		TNT1 A 0 {A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
			ACS_NamedExecute("Player-ChangeSpeed",0,100,0,0);
			A_PlaySound("sfx/sprintend",CHAN_AUTO);}
		CNCS EDCBA 1 
		TNT1 A 0 A_GiveInventory("xhair_switch",1)
		Goto Idle
	SprEnd_HandWeapon:
		TNT1 A 0 {A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
			ACS_NamedExecute("Player-ChangeSpeed",0,100,0,0);
			A_PlaySound("sfx/sprintend",CHAN_AUTO);}
		CNCU G 1 {A_TakeInventory("SprintHands");
			A_SetCrosshair(10);
			A_PlaySound("weapons/cr_select",CHAN_WEAPON);}
		CNCU ECA 1
		TNT1 A 0 A_GiveInventory("xhair_switch",1)
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")!=2,"Idle")
		TNT1 A 0 A_PlaySound("weapons/cr_pulseidle",6,1.0,1)
		Goto Idle
	Fire:
		TNT1 A 0 A_JumpIfInventory("criflecell",1,"FireCont")
		CNCI A 8 {A_StopSound(6);
			A_PlaySound("weapons/cr_noammo",CHAN_WEAPON);
			A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);}
		Goto Idle
	FireCont:
		TNT1 A 0 A_JumpIfInventory("crifle_mode",3,"dispersefire_start")
		TNT1 A 0 A_JumpIfInventory("crifle_mode",2,"powerfire_start")
	normfire:		
		TNT1 A 1 bright {A_GunFlash("nfire_flash");
			A_StopSound(6);
			A_TakeInventory("holdcheckcount",8);
			A_TakeInventory("chargecounter",20);
			A_PlaySound("weapons/cr_fire",CHAN_WEAPON);
			A_FireCustomMissile("shock_normbolt",random(0,2),1,3,4,0,random(-1,1));}
		TNT1 A 0 {ACS_NamedExecute("Weapon-Recoil",0,28,random(-18,18),0);
			A_GiveInventory("crifleheat",8);
			ACS_NamedExecute("pmsx_TempCooldown",0,0,0,0);}
		TNT1 A 0 A_JumpIfInventory("crifleheat",200,"ovheat_pulsefire")
		CNFR BA 1 
		TNT1 A 0 A_JumpIf(CountInv("criflecell")<1,2)
		TNT1 A 0 A_Refire//("normfire")
		CNFR CDEFGHI 1
		TNT1 A 0 A_JumpIfInventory("criflecell",1,"Idle")
		TNT1 A 0 A_JumpIf(GetCVar("MSfiXd_AutoReloads")==2,"Reload")
		TNT1 A 0 A_JumpIf((GetCVar("MSfiXd_AutoReloads")==1)&&(GetCVar("MSfiXd_ChimeraAutoReloads"))==1,"Reload")
		Goto Idle
	nfire_flash:
		TNT1 A 0 A_Jump(256,1,2,3)
		CNFN A 0 A_Jump(256,3)
		CNFN B 0 A_Jump(256,2)
		CNFN C 0
		"####" "#" 1 BRIGHT
		Stop
	powerfire_start:
		TNT1 A 0 A_JumpIfInventory("criflecell",40,4)
		TNT1 A 0 A_PlaySound("weapons/cr_notenbatt",CHAN_WEAPON,0.6)
		TNT1 A 0 A_TakeInventory("holdcheckcount",8)
		CNCI A 8 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		Goto Idle
		TNT1 A 0 A_PlaySound("weapons/cr_chargestart",CHAN_WEAPON,0.5)
		TNT1 A 0 A_GunFlash("chrgflash")
		TNT1 A 0 ACS_NamedTerminate("pmsx_TempCooldown",0)
	charge:
		TNT1 A 0 A_JumpIfInventory("chargecounter",20,"fullcharge_start")
		TNT1 A 0 A_GiveInventory("chargecounter",1)
		TNT1 A 1 
		TNT1 A 0 A_Refire("charge")
		TNT1 A 0 A_PlaySound("weapons/cr_notenbatt",CHAN_WEAPON,0.6)
		TNT1 A 0 A_GunFlash("flashreset")
		TNT1 A 0 A_TakeInventory("chargecounter",99)
		Goto Idle		
	chrgflash:
		CNPC ABCDEFGHIJKLMNOPQRSTUV 1 bright
		stop
	fullcharge_start:
		TNT1 A 0 {A_GiveInventory("crifleheat",11);
			A_GunFlash("fchrgflash");
			A_PlaySound("weapons/cr_chrgloop",CHAN_WEAPON,0.5,1);}
	//fchrg_s1:
	fchrg_loop:
		TNT1 A 0 A_JumpIfInventory("crifleheat",200,"powerfire")
		//TNT1 A 1 offset(0,30)
		//
		TNT1 A 1 {A_WeaponOffset(random(-2,2),random(30,34));
			A_WeaponReady(WRF_NOBOB|WRF_NOFIRE|WRF_NOSWITCH);
			A_GiveInventory("PulseHeater");}
		TNT1 A 0 A_JumpIf(CountInv("PulseHeater")<6,2)
		TNT1 A 0 {A_TakeInventory("PulseHeater");
			A_GiveInventory("crifleheat",11);
			ACS_NamedExecute("pmsx_TempCooldown",0,0,0,0);}
		//
		//TNT1 A 0 A_Refire("fchrg_s2")
		TNT1 A 0 A_Refire("fchrg_loop")
		Goto powerfire
	/*fchrg_s2:
		TNT1 A 0 A_JumpIfInventory("crifleheat",200,"powerfire")
		TNT1 A 1 offset(-2,32)
		TNT1 A 0 A_Refire("fchrg_s3")
		Goto powerfire
	fchrg_s3:
		TNT1 A 0 A_JumpIfInventory("crifleheat",200,"powerfire")
		TNT1 A 1 offset(2,34)
		TNT1 A 0 A_Refire("fchrg_s4")
		Goto powerfire
	fchrg_s4:
		TNT1 A 0 A_JumpIfInventory("crifleheat",200,"powerfire")
		TNT1 A 1 offset(-2,30)
		TNT1 A 0 A_Refire("fchrg_s5")
		Goto powerfire
	fchrg_s5:
		TNT1 A 0 A_JumpIfInventory("crifleheat",200,"powerfire")
		TNT1 A 1 offset(0,34)
		TNT1 A 0 A_Refire("fchrg_s6")
		Goto powerfire
	fchrg_s6:
		TNT1 A 0 A_JumpIfInventory("crifleheat",200,"powerfire")
		TNT1 A 1 offset(2,32)
		TNT1 A 0 A_GiveInventory("crifleheat",11)
		TNT1 A 0 ACS_NamedExecute("pmsx_TempCooldown",0,0,0,0)//Temp down...
		TNT1 A 0 A_Refire("fchrg_s1")
		Goto powerfire*/
	fchrgflash:
		CNPH AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUU 1 bright
		loop
	powerfire:
		CNPF A 1 bright {A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
			A_StopSound(5);
			A_GunFlash("flashreset");
			A_TakeInventory("holdcheckcount",9);
			A_TakeInventory("chargecounter",99);
			A_PlaySound("weapons/cr_powfire",CHAN_WEAPON);
			A_FireCustomMissile("shock_powbolt",0,0,3,4);}
		CNPF B 1 bright {ACS_NamedExecute("Weapon-Recoil",0,70,random(-45,45),0);
			A_TakeInventory("criflecell",40,TIF_NOTAKEINFINITE);}
		TNT1 A 0 {A_GiveInventory("crifleheat",106);
			ACS_NamedExecute("pmsx_TempCooldown",0,0,0,0);}
		TNT1 A 0 A_JumpIfInventory("crifleheat",200,"ovheat_powerfire")
		CNPR ABCDEFGHIJKLM 1
		TNT1 A 0 A_JumpIfInventory("criflecell",1,"Idle")
		TNT1 A 0 A_JumpIf(GetCVar("MSfiXd_AutoReloads")==2,"Reload")
		TNT1 A 0 A_JumpIf((GetCVar("MSfiXd_AutoReloads")==1)&&(GetCVar("MSfiXd_ChimeraaAutoReloads"))==1,"Reload")
		Goto Idle
	dispersefire_start:
		TNT1 A 0 A_JumpIfInventory("criflecell",10,2)
		CNCI A 8 {A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
			A_PlaySound("weapons/cr_notenbatt",CHAN_WEAPON,0.6);
			A_TakeInventory("holdcheckcount",8);}
		Goto Idle
		TNT1 AAAAAAAAAA 0 A_FireCustomMissile("shock_dispbolt",random(-3,3),0,3,4,FPF_NOAUTOAIM,random(-3,3))
		CNPF A 1 bright {A_GunFlash("flashreset");
			A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
			A_StopSound(5);
			A_TakeInventory("holdcheckcount",9);
			A_TakeInventory("chargecounter",99);
			A_PlaySound("weapons/cr_powfire",CHAN_WEAPON);}
		CNPF B 1 bright {ACS_NamedExecute("Weapon-Recoil",0,70,random(-45,45),0);
			A_TakeInventory("criflecell",10,TIF_NOTAKEINFINITE);}
		TNT1 A 0 {A_GiveInventory("crifleheat",65);
			ACS_NamedExecute("pmsx_TempCooldown",0,0,0,0);}
		TNT1 A 0 A_JumpIfInventory("crifleheat",200,"ovheat_powerfire")
		CNPR ABCDEFG 1
		CNPR HIJKLM 1 A_WeaponReady(WRF_NOSECONDARY|WRF_NOSWITCH|WRF_NOBOB)
		TNT1 A 0 A_JumpIfInventory("criflecell",1,"Idle")
		TNT1 A 0 A_JumpIf(GetCVar("MSfiXd_AutoReloads")==2,"Reload")
		TNT1 A 0 A_JumpIf((GetCVar("MSfiXd_AutoReloads")==1)&&(GetCVar("MSfiXd_ChimeraaAutoReloads"))==1,"Reload")
		Goto Idle
	ovheat_pulsefire:
		TNT1 A 0 ACS_NamedTerminate("pmsx_TempCooldown",0)
		CPFO ABCDEFG 1
		TNT1 A 0 A_PlaySound("weapons/cr_stuck",CHAN_AUTO,2.0)
		Goto ovheat_fireloop
	ovheat_powerfire:
		TNT1 A 0 ACS_NamedTerminate("pmsx_TempCooldown",0)
		CSFO ABCDEFGHIJK 1
		TNT1 A 0 A_PlaySound("weapons/cr_stuck",CHAN_AUTO,2.0)
		Goto ovheat_fireloop
	ovheat_fireloop:
		TNT1 A 0 A_JumpIfInventory("overheat_holdtimer",100,"ovheat_fireend")
		CFOE A 1 {A_FireCustomMissile("crifle_heatsteam_spawner",0,0,5,5);
			A_GiveInventory("overheat_holdtimer",1);
			A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);}
		loop
	ovheat_fireend:
		TNT1 A 0 {A_PlaySound("weapons/cr_coolend",CHAN_WEAPON,0.5);
			A_TakeInventory("crifleheat",50);
			A_TakeInventory("overheat_holdtimer",999);
			ACS_NamedExecute("pmsx_TempCooldown",0,0,0,0);}
		CFOE BCDEFGHI 1
		TNT1 A 0 A_JumpIfInventory("criflecell",1,"Idle")
		TNT1 A 0 A_JumpIf(GetCVar("MSfiXd_AutoReloads")==2,"Reload")
		TNT1 A 0 A_JumpIf((GetCVar("MSfiXd_AutoReloads")==1)&&(GetCVar("MSfiXd_ChimeraaAutoReloads"))==1,"Reload")
		Goto Idle
	flashreset:
		TNT1 AA 1
		stop
	Zoom:
		TNT1 A 0 A_JumpIfInventory("crifle_mode",3,"Mode1Shock")
		TNT1 A 0 A_JumpIfInventory("crifle_mode",2,"Mode3Disperse")
		TNT1 A 0 A_JumpIfInventory("crifle_mode",1,"Mode2Pulse")
	Mode1Shock:	
		CNSW AB 1
		CNSW C 6 {A_StopSound(6);
			A_Print("- SHOCK MODE -");
			A_TakeInventory("crifle_mode");
			A_GiveInventory("crifle_mode",1);
			A_PlaySound("weapons/cr_modeswitch",CHAN_AUTO,1.5);}
		CNSW BA 1
		Goto Idle
	Mode2Pulse:	
		CNSW AB 1 
		CNSW C 6 {A_Print("- PULSE MODE -");
			A_StopSound(6);
			A_TakeInventory("crifle_mode");
			A_GiveInventory("crifle_mode",2);
			A_PlaySound("weapons/cr_modeswitch",CHAN_AUTO,1.5);
			A_PlaySound("weapons/cr_pulseidle",6,1.0,1);}
		CNSW BA 1
		Goto Idle
	Mode3Disperse:
		TNT1 A 0 {A_StopSound(6);
			A_PlaySound("weapons/cr_pulseoff",6);}
		CNSW AB 1 
		CNSW C 6 {A_Print("- DISPERSION MODE -");
			A_StopSound(6);
			A_TakeInventory("crifle_mode");
			A_GiveInventory("crifle_mode",3);
			A_PlaySound("weapons/cr_modeswitch",CHAN_AUTO,1.5);}
		CNSW BA 1
		Goto Idle
		
	Reload:
		TNT1 A 0 A_JumpIfInventory("criflecell",0,"Idle")
		TNT1 A 0 A_JumpIfInventory("crifle_ammo",1,1)
		Goto Idle
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")!=2,2)
		TNT1 A 0 {A_StopSound(6);
			A_PlaySound("weapons/cr_pulseoff",6);}
		CNR1 ABCD 1
		CNR1 E 1 A_PlaySound("weapons/cr_clipout",CHAN_WEAPON)
		CNR1 FGHIJK 1
		CNR1 L 2
		CNR2 ABCDEFGHIKLM 1
		CNR3 ABCDEFG 1
		CNR3 HIJJJ 2
		CNR3 L 1
		CNR3 M 2 A_PlaySound("weapons/cr_clipin",CHAN_WEAPON)
	Reload_FillClip:	
		TNT1 A 0 {A_TakeInventory("crifle_ammo",1);
			A_GiveInventory("criflecell",1);}
		TNT1 A 0 A_JumpIfInventory("criflecell",0,"ReloadFinish")
		TNT1 A 0 A_JumpIfInventory("crifle_ammo",1,"Reload_FillClip")
	ReloadFinish:
		CNR3 NNNNO 2
		CNR4 AABCDEFGHIJKLMNO 1
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")==2,1)
		Goto Idle
		TNT1 A 0 A_PlaySound("weapons/cr_pulseidle",6,1.0,1)
		Goto Idle
	User1:
		TNT1 A 0 A_JumpIfInventory("grenades",1,1)
		Goto Idle
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")!=2,2)
		TNT1 A 0 {A_StopSound(6);
			A_PlaySound("weapons/cr_pulseoff",6);}
		CNCU A 1 {A_TakeInventory("xhair_switch",1);
			A_PlaySound("weapons/tp_deselect",CHAN_WEAPON);}
		CNCU BCDEFG 1
		TNT1 A 0 A_Jump(256,"GrenadeStart")
		Goto GrenadeStart
	GrenadeEnd:
		CNCU G 1 {A_TakeInventory("GrenadeHold");
			A_PlaySound("weapons/tp_select",CHAN_WEAPON);
			A_SetCrosshair(10);}
		CNCU FEDCBA 1
		TNT1 A 0 A_GiveInventory("xhair_switch",1)
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")!=2,"Idle")
		TNT1 A 0 A_PlaySound("weapons/cr_pulseidle",6,1.0,1)
		Goto Idle
	// Health Stim Stuff //
	Stim_HolsterCheck:
		TNT1 A 0 A_JumpIf(GetCVar("MSfiXd_HolsterWeapForItems")==0,"Stimulate")
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")!=2,2)
		TNT1 A 0 {A_StopSound(6);
			A_PlaySound("weapons/cr_pulseoff",6);}
		CNCU A 1 {A_PlaySound("weapons/cr_deselect",CHAN_WEAPON);
			A_GunFlash("flashreset");
			A_TakeInventory("xhair_switch",1);}
		CNCU BCDEFG 1
		TNT1 A 0 A_Jump(256,"Stimulate")
		Goto Stimulate
	StimulateEnd:
		TNT1 A 0 A_JumpIf(GetCVar("MSfiXd_HolsterWeapForItems")==0,"StimulateEnd_Quick")
		CNCU G 1 {A_PlaySound("weapons/cr_select",CHAN_WEAPON);
			A_SetCrosshair(10);}
		CNCU FEDCBA 1
		TNT1 A 0 A_GiveInventory("xhair_switch",1)
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")!=2,"Idle")
		TNT1 A 0 A_PlaySound("weapons/cr_pulseidle",6,1.0,1)
		Goto Idle
	StimulateEnd_Quick:
		CNCI A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_JumpIf(GetPlayerInput(INPUT_BUTTONS)&(BT_USER2),"StimulateEnd_Quick")
		Goto Idle
	// Shield Booster Stuff //
	Boost_HolsterCheck:
		TNT1 A 0 A_JumpIf(GetCVar("MSfiXd_HolsterWeapForItems")==0,"Boostify")
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")!=2,2)
		TNT1 A 0 {A_StopSound(6);
			A_PlaySound("weapons/cr_pulseoff",6);}
		CNCU A 1 {A_PlaySound("weapons/cr_deselect",CHAN_WEAPON);
			A_GunFlash("flashreset");
			A_TakeInventory("xhair_switch",1);}
		CNCU BCDEFG 1
		TNT1 A 0 A_Jump(256,"Boostify")
		Goto Boostify
	BoostifyEnd:
		TNT1 A 0 A_JumpIf(GetCVar("MSfiXd_HolsterWeapForItems")==0,"BoostifyEnd_Quick")
		CNCU G 1 {A_PlaySound("weapons/cr_select",CHAN_WEAPON);
			A_SetCrosshair(10);}
		CNCU FEDCBA 1
		TNT1 A 0 A_GiveInventory("xhair_switch",1)
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")!=2,"Idle")
		TNT1 A 0 A_PlaySound("weapons/cr_pulseidle",6,1.0,1)
		Goto Idle
	BoostifyEnd_Quick:
		CNCI A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_JumpIf(GetPlayerInput(INPUT_BUTTONS)&(BT_USER3),"BoostifyEnd_Quick")
		Goto Idle
	// Jetpack Stuff //
	User4:
		TNT1 A 0 A_JumpIfInventory("Jetpack",1,1)
		Goto Idle
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")!=2,2)
		TNT1 A 0 {A_StopSound(6);
			A_PlaySound("weapons/cr_pulseoff",6);}
		CNCU A 1 {A_PlaySound("weapons/cr_deselect",CHAN_WEAPON);
			A_GunFlash("flashreset");
			A_TakeInventory("xhair_switch",1);}
		CNCU BCDEFG 1
		TNT1 A 0 A_Jump(256,"JetpackStart")
		Goto JetpackStart
	WeaponJetEnd:
		CNCU G 1 A_PlaySound("weapons/cr_select",CHAN_WEAPON)
		CNCU FEDCBA 1
		TNT1 A 0 {A_SetCrosshair(10);
			A_GiveInventory("xhair_switch",1);}
		TNT1 A 0 A_JumpIf(CountInv("crifle_mode")!=2,"Idle")
		TNT1 A 0 A_PlaySound("weapons/cr_pulseidle",6,1.0,1)
		Goto Idle
	AltFire:
		CNCM C 1 A_Recoil(-6)
		TNT1 A 0 A_PlayWeaponSound("sfx/meleeswing")
		CNCM EHJ 1
		CNCM L 9 A_CustomPunch((164+random(1,32)),1,CPF_DAGGER|CPF_NOTURN,"Chimera_meleepuff",88)
		CNCM KJIHGFEDCBA 1
		Goto Idle}}
ACTOR PulseHeater:Inventory{Inventory.Amount 1 Inventory.MaxAmount 6}
actor criflecell:ammo{inventory.maxamount 80}
actor crifle_ammo:ammo{
	radius 16
	height 8
	scale 0.35
	inventory.pickupmessage "Power Cell for Concussion Pulse Rifle"
	inventory.pickupsound "weapons/cr_ammopick"
	inventory.amount 20
	inventory.maxamount 480
	ammo.backpackamount 80
	ammo.backpackmaxamount 960
	states{
	spawn:
		SCEL ABCDEFG 2
		loop}}
actor crifle_ammobox:crifle_ammo{
	radius 16
	height 8
	scale 0.35
	inventory.pickupmessage "Power Cell Pack for Concussion Pulse Rifle"
	inventory.pickupsound "weapons/cr_ammopick"
	inventory.amount 60
	states{
	Spawn:
		BCEL ABCDEFGHIAAIHGFEDCBA 2
		loop}}
actor crifleheat:Inventory{
	Inventory.PickupSound ""
	Inventory.Amount 1
	Inventory.MaxAmount 200
	-INVBAR}
actor overheat_holdtimer:inventory{
	Inventory.PickupSound ""
	Inventory.Amount 1
	Inventory.MaxAmount 100}
actor crifle_mode:inventory{
	Inventory.PickupSound ""
	Inventory.Amount 1
	Inventory.MaxAmount 3}
actor holdcheckcount:inventory{
	Inventory.PickupSound ""
	inventory.amount 1
	inventory.maxamount 15}
actor chargecounter:inventory{
	Inventory.PickupSound ""
	inventory.amount 1
	inventory.maxamount 21}
ACTOR Chimera_MeleePuff:MeleePuff{DamageType "CHIMERA_Melee"}
actor shock_powbolt:fastprojectile{
	radius 5
	height 5
	scale 0.6
	mass 20
	PROJECTILE
	+NODAMAGETHRUST
	+FORCERADIUSDMG
	-FORCEPAIN
	speed 95
	damage 20
	ProjectileKickBack 250
	renderstyle add
	damagetype "CHIMERA_Bolt"
	MissileType "powbolt_trail1"
	MissileHeight 8
	var int user_boomc;
	var int user_boomsmoke;
	Decal "BigScorch"
	states{
	spawn:
		CPBL ABCDEFGHIJKL 1 bright A_SpawnItemEx("powbolt_trail2",0,0,0,0,0,0)
		loop
	death:
		TNT1 A 0 A_JumpIf(CountInv("MSfiXd_DegninOre",AAPTR_TARGET)>=1,1)
		Goto Death+2
		TNT1 A 0 A_RemoveForceField
		TNT1 A 0 {A_PlaySound("sfx/powshockblast",CHAN_AUTO);
			A_SetUserVar("user_boomc",0);
			A_SpawnItemEx("powbolt_boomflash",0,0,0,0,0,0);
			A_SpawnItemEx("powbolt_boomflashB",0,0,0,0,0,0);
			A_SpawnItemEx("powbolt_boom",0,0,0,0,0,0);
			A_SpawnItemEx("powbolt_boom2",0,random(60,70),50,0,0,0);
			A_SpawnItemEx("powbolt_boom3",0,random(-70,-60),-50,0,0,0);}
		TNT1 A 0 {for (A_SetUserVar(user_boomsmoke,0); user_boomsmoke<7; A_SetUserVar(user_boomsmoke,user_boomsmoke+1)){
			A_SpawnItemEx("powbolt_smoke",0,0,0,0,random(-5,5),random(-5,5));}}
		TNT1 A 0 {A_SpawnItemEx("pbolt_boomwave",0,0,0,0,0,0);
			A_Quake(5,20,0,864," ");
			A_Explode(300,164,1,1,64);
			A_Explode(125,300,0,1,0);}
		TNT1 A 0 A_JumpIf(user_boomc>=5,2)
		TNT1 A 1 {A_Explode(random(100,120),300,0,1,0);
			A_SetUserVar("user_boomc",user_boomc+1);}
		Goto Death+5
		TNT1 A 0 {A_ChangeFlag("FORCERADIUSDMG",0);
			A_SetUserVar("user_boomc",0);
			A_SpawnItemEx("pbolt_boomwave",0,0,0,0,0,0);}
		TNT1 A 0 {for (A_SetUserVar(user_boomsmoke,0); user_boomsmoke<7; A_SetUserVar(user_boomsmoke,user_boomsmoke+1)){
			A_SpawnItemEx("powbolt_smoke",0,0,0,0,random(-5,5),random(-5,5));}}
		TNT1 A 0 A_JumpIf(user_boomc>=20,"Null")
		TNT1 A 2 {A_Explode(random(70,80),300,0,1,0);
			A_SetUserVar("user_boomc",user_boomc+1);}
		Goto Death+9}}
actor powbolt_boom{
	height 5
	radius 5
	scale 1.5
	alpha 1.0
	renderstyle add
	+NOINTERACTION
	+FORCEXYBILLBOARD
	states{
	spawn:
		CBE1 ABCDEFGHIJKLMNOPQRSTUVWX 1 bright
		stop}}
actor powbolt_boom2:powbolt_boom{
	scale 1.3
	states{
	spawn:
		CBE2 ABCDEFGHIJKLMNOP 1 bright
		stop}}
actor powbolt_boom3:powbolt_boom{
	scale 1.45
	states{
	spawn:
		CBE3 ABCDEFGHIJKLMNOP 1 bright
		stop}}
actor powbolt_boomflash{
	scale 0.95
	alpha 1.0
	renderstyle add
	+NOINTERACTION
	+FORCEXYBILLBOARD
	states{
	spawn:
		CBFL A 3 bright
		CBFL A 1 bright A_FadeOut(0.05) 
		stop}}
actor normbolt_boomflash:powbolt_boomflash{
	scale 0.25
	states{
	spawn:
		CBFL A 3 bright
		CBFL A 1 bright A_FadeOut(0.1) 
		stop}}
actor powbolt_boomflashB{
	scale 0.6
	alpha 1.0
	renderstyle add
	+NOINTERACTION
	+FORCEXYBILLBOARD
	states{
	spawn:
		TNT1 A 0 NoDelay A_Jump(256,1,2,3,4)
		CFB2 A 0 A_Jump(256,4)
		CFB2 B 0 A_Jump(256,3)
		CFB2 C 0 A_Jump(256,2)
		CFB2 D 0
		"####" "#" 1 BRIGHT A_FadeOut(0.1,1)
		Wait}}
actor powbolt_smoke{
	scale 1.3
	alpha 0.8
	Translation "0:255=%[0.0,0.0,0.0]:[0.2,1.0,0.0]"
	renderstyle add
	+NOTELEPORT
	+FLOORCLIP
	+NOGRAVITY
	+FORCEXYBILLBOARD
	+NOINTERACTION
	states{
	spawn:
		TNT1 A 0 NoDelay A_Jump(256,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24)
		SMK5 A 0 A_Jump(256,24)
		SMK5 B 0 A_Jump(256,23)
		SMK5 C 0 A_Jump(256,22)
		SMK5 D 0 A_Jump(256,21)
		SMK5 E 0 A_Jump(256,20)
		SMK5 F 0 A_Jump(256,19)
		SMK5 G 0 A_Jump(256,18)
		SMK5 H 0 A_Jump(256,17)
		SMK5 I 0 A_Jump(256,16)
		SMK5 J 0 A_Jump(256,15)
		SMK5 K 0 A_Jump(256,14)
		SMK5 L 0 A_Jump(256,13)
		SMK5 M 0 A_Jump(256,12)
		SMK5 N 0 A_Jump(256,11)
		SMK5 O 0 A_Jump(256,10)
		SMK5 P 0 A_Jump(256,9)
		SMK5 Q 0 A_Jump(256,8)
		SMK5 R 0 A_Jump(256,7)
		SMK5 S 0 A_Jump(256,6)
		SMK5 T 0 A_Jump(256,5)
		SMK5 U 0 A_Jump(256,4)
		SMK5 V 0 A_Jump(256,3)
		SMK5 W 0 A_Jump(256,2)
		SMK5 X 0
		"####" "#" 3 {A_ScaleVelocity(0.9);
			A_FadeOut(0.05);}
		Wait}}
actor normbolt_smoke:powbolt_smoke{scale 0.4}
actor pbolt_boomwave{
	var int user_scale;
	alpha 1.0
	renderstyle add
	+NOINTERACTION
	+FORCEXYBILLBOARD
	states{
	spawn:
		TNT1 A 0 NoDelay A_SetUserVar("user_scale",4)
		TNT1 A 0 A_SetScale((user_scale*0.01)) 
		TNT1 A 0 A_JumpIf(user_scale>=110,3)
		CPEW B 1 bright A_FadeOut(0.06)
		TNT1 A 0 A_SetUserVar("user_scale",user_scale+10)
		Goto Spawn+1
		CPEW B 1 Bright A_FadeOut(0.1)
		wait}}
actor powbolt_trail1{
	scale 0.1
	alpha 1.0
	renderstyle add
	+NOINTERACTION
	+NOGRAVITY
	+FORCEXYBILLBOARD
	+NOTELEPORT
	states{
	spawn:
		CPST ABCDE 2 bright
	tofade:
		CPST FGHIJKLLMMNNOOOO 2 bright A_Fadeout(0.1)
		stop}}
actor powbolt_trail2{
	var int user_scale;
	alpha 1.0
	renderstyle add
	+NOINTERACTION
	+FORCEXYBILLBOARD
	states{
	spawn:
		TNT1 A 0 NoDelay A_SetUserVar("user_scale",4)
		TNT1 A 0 A_SetScale((user_scale*0.01)) 
		TNT1 A 0 A_JumpIf(user_scale>=30,3)
		CPEW A 1 bright A_FadeOut(0.04)
		TNT1 A 0 A_SetUserVar("user_scale",user_scale+1)
		Goto Spawn+1
		CPEW A 1 Bright A_FadeOut(0.1)
		Wait}}
actor shock_normbolt:fastprojectile{
	Radius 6
	Height 6
	Scale 0.15
	Mass 20
	PROJECTILE
	+NODAMAGETHRUST
	Speed 50
	Damage 2
	ProjectileKickBack 180
	RenderStyle add
	DamageType "CHIMERA_Bolt"
	MissileType "normbolt_trail"
	MissileHeight 8
	var int user_boltsmoke;
	Decal "SmallScorch"
	States{
	Spawn:
		CPBL ABCDEFGHIJKL 1 bright
		loop
	Death:
		TNT1 A 0 A_JumpIf(CountInv("MSfiXd_DegninOre",AAPTR_TARGET)>=1,1)
		Goto Death+2
		TNT1 A 0 A_RemoveForceField
		TNT1 A 0 {A_PlaySound("sfx/normshockblast",CHAN_AUTO);
			A_SpawnItemEx("normbolt_boomflash",0,0,0,0,0,0);
			A_SpawnItemEx("nbolt_boomflashB",0,0,0,0,0,0);
			A_SpawnItemEx("normbolt_boom",0,0,0,0,0,0);
			A_SpawnItemEx("nbolt_boomwave",0,0,0,0,0,0);
			A_Explode(12,48,1,1,0);}
		TNT1 A 0 {for(A_SetUserVar(user_boltsmoke,0); user_boltsmoke<4; A_SetUserVar(user_boltsmoke,user_boltsmoke+1)){
			A_SpawnItemEx("normbolt_smoke",0,0,0,0,random(-1,1),random(-1,1));}}
		TNT1 AAAAAAAAAA 2 A_Explode(6,92,0,1,48)
		Stop}}
actor shock_dispbolt:shock_normbolt{
	Speed 25
	States{
	Spawn:
		CPBL ABCDEFGHIJKL 1 bright
		TNT1 A 0 {A_Stop;
			A_Scream;}
		Goto Super::Death}}
actor normbolt_trail{
	Scale 0.10
	Alpha 0.36
	RenderStyle add
	+NOINTERACTION
	+NOGRAVITY
	+FORCEXYBILLBOARD
	+NOTELEPORT
	States{
	Spawn:
		CPTR ABCDEFJHIJKLMNO 1 bright A_FadeOut(0.1)
		Stop}}
ACTOR normbolt_boom{
	Scale 0.4
	Alpha 1.0
	RenderStyle "Add"
	+NOINTERACTION
	+FORCEXYBILLBOARD
	States{
	Spawn:
		CBE2 ABCDEFGHIJKLMNOP 1 bright
		Stop}}
ACTOR nbolt_boomflashB{
	Scale 0.1
	Alpha 1.0
	RenderStyle "Add"
	+NOINTERACTION
	+FORCEXYBILLBOARD
	States{
	Spawn:
		TNT1 A 0 NoDelay A_Jump(256,1,2,3,4)
		CFB2 A 0 A_Jump(256,4)
		CFB2 B 0 A_Jump(256,3)
		CFB2 C 0 A_Jump(256,2)
		CFB2 D 0
		"####" "#" 1 bright A_FadeOut(0.05) 
		Wait}}
ACTOR nbolt_boomwave{
	var int user_scale;
	Alpha 1.0
	RenderStyle "Add"
	+NOINTERACTION
	+FORCEXYBILLBOARD
	States{
	Spawn:
		TNT1 A 0 NoDelay A_SetUserVar("user_scale",2)
		TNT1 A 0 A_SetScale((user_scale*0.005))
		TNT1 A 0 A_JumpIf(user_scale>=55,3)
		CPEW B 1 bright A_FadeOut(0.1)
		TNT1 A 0 A_SetUserVar("user_scale",user_scale+8)
		Goto Spawn+1
		CPEW B 1 Bright A_FadeOut(0.1)
		Wait}}