

//***Che this is #include'd from Cyberdemon.txt



//***Che: cross-mod hardening: see ACTOR TheCyberdemon: FBD_Cyberdemon replaces Cyberdemon {} in Doom_Replacements.txt


ACTOR FBD_Cyberdemon: AbstractCyberdemon 17620
{
	//***Che radius, height and maxdropoffheight (n/a for flying ones) MUST be kept consistent with FBD_TrySpawn in FBD_CORE.acs!
	
	//***Che this was formerly my supercyberdemon tier 1
	// after some consideration I decided the regular cyberdemon should be buffed into this
	// and supercyberdemons become various breeds of annihilators.
	
	// meaning he *leaps* as he stomps 
	// and he aims at the ground to get you with splash
	
	// compared to chad, attack timings reverted to their regular slower tempo
		// normal cybers have 15 tics between attacks (6-6-3), chad has 10 (7-3)
		// normal cybers have 12 tics between speciall atack shots (4-4-3), chad has 8 (5-3)

	
	var int user_pitch_adjust;
	var int user_targeting_pitch;
	
	Species "Cyberdemons"
	
	States {
		Missile:
			//TNT1 A 0 A_JumpIf(CallACS("GetDistanceToTarget", 999) <= 256 && CallACS("GetIsZDeltaToTargetInRange", -40, 40) && !CallACS("GetIsTargetUnStompeable"), "Stomp")
			TNT1 A 0 A_JumpIf(CallACS("GetCyberdemonCanStompTarget", 256), "Stomp")
			
			TNT1 A 0 A_JumpIfInTargetInventory("IsInATank", 1, "SpecialAttack")
		
			// Kinslayer check:	
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsACyberdemon", 1, 2)
			TNT1 A 0 A_JumpIf(true, 2)
			TNT1 A 0 ACS_NamedExecuteWithResult("FBD_InfightFriendlyFireOn")	
			
			TNT1 A 0 A_JumpIfInventory("Enraged", 1, "SpecialAttack")
			
			TNT1 A 0 A_JumpIfCloser(768, "MissileSaturation")
			
			TNT1 A 0 A_Jump(64, "SpecialAttack")
	
		MissileRegular:
			
			TNT1 A 0
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", -12, -6, 96)
		
			TNT1 A 0 A_JumpIfTargetInLOS(2)
			TNT1 A 0 A_JumpIf(user_dont_adjust_aim, 2)
			TNT1 A 0 A_FaceTarget
			CYBR E 8
			TNT1 A 0 A_SetUserVar("user_dont_adjust_aim", 0)

			

			// MUST use auto-aiming at visible targets, otherwise misses at close range due to projectile's origin offset
			TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 2)
			TNT1 A 0 A_JumpIfTargetInLOS(3)
			// the version with auto-aim disabled:		
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH)
			TNT1 A 0 A_Jump(256, 2)
			// the auto-aimed version:
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,0,0)

			//TNT1 A 0 A_JumpIf(CallACS("GetDistanceToTarget", 999) <= 180 && CallACS("GetIsZDeltaToTargetInRange", -40, 40) && !CallACS("GetIsTargetUnStompeable"), "Stomp")
			TNT1 A 0 A_JumpIf(CallACS("GetCyberdemonCanStompTarget", 180), "Stomp")
			
			
				//***Che: do NOT adjust aim if target goes out of sight or is invisible
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget
			
			CYBR E 6 //A_FaceTarget

				//***Che: do NOT adjust aim if target goes out of sight or is invisible
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget
			
			CYBR E 6 //A_FaceTarget
			
			

			// MUST use auto-aiming at visible targets, otherwise misses at close range due to projectile's origin offset
			TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 2)
			TNT1 A 0 A_JumpIfTargetInLOS(3)
			// the version with auto-aim disabled:		
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle - 7, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH)
			TNT1 A 0 A_Jump(256, 2)
			// the auto-aimed version:
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,-7,0)

			
			
				//***Che: do NOT adjust aim if target goes out of sight or is invisible
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget
			
			CYBR E 6 //A_FaceTarget

				//***Che: do NOT adjust aim if target goes out of sight or is invisible
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget
			
			CYBR E 6 //A_FaceTarget

			
			// MUST use auto-aiming at visible targets, otherwise misses at close range due to projectile's origin offset
			TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 2)
			TNT1 A 0 A_JumpIfTargetInLOS(3)
			// the version with auto-aim disabled:		
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle + 7, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH)
			TNT1 A 0 A_Jump(256, 2)
			// the auto-aimed version:
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,7,0)		

			
			
				//***Che: do NOT adjust aim if target goes out of sight or is invisible
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget
			
			CYBR E 6 //A_FaceTarget

				//***Che: do NOT adjust aim if target goes out of sight or is invisible
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget
			
			CYBR E 6 //A_FaceTarget
			
			
			// MUST use auto-aiming at visible targets, otherwise misses at close range due to projectile's origin offset
			TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 2)
			TNT1 A 0 A_JumpIfTargetInLOS(3)
			// the version with auto-aim disabled:		
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH)
			TNT1 A 0 A_Jump(256, 2)
			// the auto-aimed version:
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,0,0)
			
			
			
				//***Che: do NOT adjust aim if target goes out of sight or is invisible
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget
			
			CYBR E 7 //A_FaceTarget
			
			CYBR E 12
			Goto See	
			
		MissileSaturation:
			TNT1 A 0 
			//TNT1 A 0 A_JumpIfHigherOrLower("MissileRegular", "MissileRegular", 32, 128, FALSE) // compare z-height without factoring in actor heights
			//Invalid state parameter a_jumpifhigherorlower

			
			TNT1 A 0
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", -12, -6, 96)
			TNT1 A 0 A_JumpIfTargetInLOS(2)
			TNT1 A 0 A_JumpIf(user_dont_adjust_aim, 2)
			TNT1 A 0 A_FaceTarget
			
			//TNT1 A 0 A_CustomMissile("FBD_CheckIfTargetIsAbove40")
			//TNT1 A 0 A_CustomMissile("FBD_CheckIfTargetIsBelow40")
			
			CYBR E 8
			TNT1 A 0 A_SetUserVar("user_dont_adjust_aim", 0)


			// saturation attack is never auto-aimed
			
			TNT1 A 0 A_SetUserVar("user_pitch_adjust", CallAcs("CyberSaturationPitchAdjust",60,-25))
			
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle - 2, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH, - 12 * 0.08 * user_pitch_adjust)


			//TNT1 A 0 A_JumpIf(CallACS("GetDistanceToTarget", 999) <= 180 && CallACS("GetIsZDeltaToTargetInRange", -40, 40) && !CallACS("GetIsTargetUnStompeable"), "Stomp")
			TNT1 A 0 A_JumpIf(CallACS("GetCyberdemonCanStompTarget", 256), "Stomp")
			
			
				//***Che: do NOT adjust aim if target goes out of sight or is invisible
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 5)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 3)
				TNT1 A 0 A_FaceTarget
				//***Che I'm so clever: ONLY recalculate pitch adjust when the target is in sight.
				// result: if you hit him up close then hide behind a corner, he'd keep
				// pounding the ground as if you were still nearby thus laying down suppressive fire.
				TNT1 A 0 A_SetUserVar("user_pitch_adjust", CallAcs("CyberSaturationPitchAdjust",60,-25))
			
			CYBR E 6 //A_FaceTarget

				//***Che: do NOT adjust aim if target goes out of sight or is invisible
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 5)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 3)
				TNT1 A 0 A_FaceTarget
				TNT1 A 0 A_SetUserVar("user_pitch_adjust", CallAcs("CyberSaturationPitchAdjust",60,-25))
			
			CYBR E 6 //A_FaceTarget
			
			
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle - 12, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH, -7 * 0.08 * CallAcs("CyberSaturationPitchAdjust",60,-25))

			
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 5)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 3)
				TNT1 A 0 A_FaceTarget
				TNT1 A 0 A_SetUserVar("user_pitch_adjust", CallAcs("CyberSaturationPitchAdjust",60,-25))
			
			CYBR E 6 //A_FaceTarget
			
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 5)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 3)
				TNT1 A 0 A_FaceTarget
				TNT1 A 0 A_SetUserVar("user_pitch_adjust", CallAcs("CyberSaturationPitchAdjust",60,-25))
			
			CYBR E 6 //A_FaceTarget			

			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle + 10, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH, -7 * 0.08 * user_pitch_adjust)		

			
			
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 5)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 3)
				TNT1 A 0 A_FaceTarget
				TNT1 A 0 A_SetUserVar("user_pitch_adjust", CallAcs("CyberSaturationPitchAdjust",60,-25))
			
			CYBR E 6 //A_FaceTarget
			
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 5)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 3)
				TNT1 A 0 A_FaceTarget
				TNT1 A 0 A_SetUserVar("user_pitch_adjust", CallAcs("CyberSaturationPitchAdjust",60,-25))
			
			CYBR E 6 //A_FaceTarget			
			
			
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle - 2, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH, -20 * 0.08 * user_pitch_adjust)
			
			
			
				//***Che: do NOT adjust aim if target goes out of sight or is invisible
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget
			
			CYBR E 7 //A_FaceTarget
			
			CYBR E 12
			Goto See			
		
		SpecialAttack:
			
			TNT1 A 0
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", -12, -6, 96)
			TNT1 A 0 A_JumpIfTargetInLOS(2)
			TNT1 A 0 A_JumpIf(user_dont_adjust_aim, 2)
			TNT1 A 0 A_FaceTarget
			CYBR E 6
			TNT1 A 0 A_SetUserVar("user_dont_adjust_aim", 0)

			
			
			// MUST use auto-aiming at visible targets, otherwise misses at close range due to projectile's origin offset
			TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 2)
			TNT1 A 0 A_JumpIfTargetInLOS(3)
			// the version with auto-aim disabled:		
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH)
			TNT1 A 0 A_Jump(256, 2)
			// the auto-aimed version:
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,0,0)
			
			//TNT1 A 0 A_JumpIf(CallACS("GetDistanceToTarget", 999) <= 180 && CallACS("GetIsZDeltaToTargetInRange", -40, 40) && !CallACS("GetIsTargetUnStompeable"), "Stomp")
			TNT1 A 0 A_JumpIf(CallACS("GetCyberdemonCanStompTarget", 256), "Stomp")
			
			CYBR E 5 //A_FaceTarget
				//***Che: do NOT adjust aim if target goes out of sight or is invisible
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget
			
			
			
			// MUST use auto-aiming at visible targets, otherwise misses at close range due to projectile's origin offset
			TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 2)
			TNT1 A 0 A_JumpIfTargetInLOS(3)
			// the version with auto-aim disabled:		
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle - 7, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH)
			TNT1 A 0 A_Jump(256, 2)
			// the auto-aimed version:
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,-7,0)
			
			//TNT1 A 0 A_JumpIf(CallACS("GetDistanceToTarget", 999) <= 180 && CallACS("GetIsZDeltaToTargetInRange", -40, 40) && !CallACS("GetIsTargetUnStompeable"), "Stomp")
			TNT1 A 0 A_JumpIf(CallACS("GetCyberdemonCanStompTarget", 256), "Stomp")
			
			CYBR E 5 //A_FaceTarget
				//***Che: do NOT adjust aim if target goes out of sight or is invisible
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget

			
			
			// MUST use auto-aiming at visible targets, otherwise misses at close range due to projectile's origin offset
			TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 2)
			TNT1 A 0 A_JumpIfTargetInLOS(3)
			// the version with auto-aim disabled:		
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle + 7, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH)
			TNT1 A 0 A_Jump(256, 2)
			// the auto-aimed version:
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,7,0)
			
			//TNT1 A 0 A_JumpIf(CallACS("GetDistanceToTarget", 999) <= 180 && CallACS("GetIsZDeltaToTargetInRange", -40, 40) && !CallACS("GetIsTargetUnStompeable"), "Stomp")
			TNT1 A 0 A_JumpIf(CallACS("GetCyberdemonCanStompTarget", 256), "Stomp")
			
			CYBR E 4 //A_FaceTarget
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget
			
			CYBR E 4 //A_FaceTarget
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget	
			
			
			
			// MUST use auto-aiming at visible targets, otherwise misses at close range due to projectile's origin offset
			TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 2)
			TNT1 A 0 A_JumpIfTargetInLOS(3)
			// the version with auto-aim disabled:		
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH)
			TNT1 A 0 A_Jump(256, 2)
			// the auto-aimed version:
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,0,0)
			
			//TNT1 A 0 A_JumpIf(CallACS("GetDistanceToTarget", 999) <= 180 && CallACS("GetIsZDeltaToTargetInRange", -40, 40) && !CallACS("GetIsTargetUnStompeable"), "Stomp")
			TNT1 A 0 A_JumpIf(CallACS("GetCyberdemonCanStompTarget", 256), "Stomp")
			
			CYBR E 4 //A_FaceTarget
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget
			
			CYBR E 4 //A_FaceTarget
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget	
			
			
			
			// MUST use auto-aiming at visible targets, otherwise misses at close range due to projectile's origin offset
			TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 2)
			TNT1 A 0 A_JumpIfTargetInLOS(3)
			// the version with auto-aim disabled:		
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH)
			TNT1 A 0 A_Jump(256, 2)
			// the auto-aimed version:
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,0,0)
			

			CYBR E 4 //A_FaceTarget
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget
			
			CYBR E 4 //A_FaceTarget
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget			
			
			// MUST use auto-aiming at visible targets, otherwise misses at close range due to projectile's origin offset
			TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 2)
			TNT1 A 0 A_JumpIfTargetInLOS(3)
			// the version with auto-aim disabled:		
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,angle, CMF_ABSOLUTEANGLE | CMF_OFFSETPITCH | CMF_SAVEPITCH)
			TNT1 A 0 A_Jump(256, 2)
			// the auto-aimed version:
			CYBR F 3 BRIGHT A_CustomMissile("CyberBalls",60,-25,0,0)

			Goto See

		Melee:
			TNT1 A 0 A_JumpIf(!CallACS("GetIsZDeltaToTargetInRange", -40, 40) || CallACS("GetIsTargetUnStompeable"), "Missile")
			
		Stomp:
			TNT1 A 0
			TNT1 A 0 A_JumpIfInTargetInventory("IsInATank", 1, "SpecialAttack")
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, -7, 96)
			
			// Kinslayer check:	
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsACyberdemon", 1, 2)
			TNT1 A 0 A_JumpIf(true, 2)
			TNT1 A 0 ACS_NamedExecuteWithResult("FBD_InfightFriendlyFireOn")	
			
			
			
			//TNT1 A 0 A_CustomMissile("FBD_CheckIfTargetIsAbove40")
			//TNT1 A 0 A_CustomMissile("FBD_CheckIfTargetIsBelow40")

			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 2, 0, 96)
			
			//***Che adding a windup sound
			TNT1 A 0 A_PlaySound("KYBWHRR", CHAN_BODY)
			
			CYBR A 4 A_FaceTarget
			
			//TNT1 A 0 A_JumpIfInventory("TargetIsAbove", 1, "NoStomp")
			//TNT1 A 0 A_JumpIfInventory("TargetIsBelow", 1, "NoStomp")
			
			CYBR A 1
			
			TNT1 A 0 A_Recoil(-4) //versus chad's -5)
			
			
				//***Che: do NOT adjust aim if target goes out of sight or is invisible
				TNT1 A 0 A_JumpIf(CallAcs("FBD_TargetIsInvisible"), 4)
				TNT1 A 0 A_JumpIfTargetInLOS(2)
				TNT1 A 0 A_Jump(256, 2)
				TNT1 A 0 A_FaceTarget
				
			TNT1 A 0 ThrustThingZ(0,25,0,1)
			TNT1 A 0 A_Recoil(-8) // versus chad's -10)
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 9, -12, 96)	
			CYMA A 7 //A_FaceTarget
			CYMA AAAAAAAAAAAAA 1 A_CheckFloor("StompLand")
		StompLand:
			
			TNT1 A 0 A_CustomMissile("CyberStomp",10,0,0,0)
			CYMA B 7
			
			CYMA B 7
			
			Goto See			
	}

}	


/*
//***Che: formerly required for chebskies-eday to support both bd 21 and 22test3
// Has no boss checks and also no potpourri check!
ACTOR NoSwapCyberdemon: FBD_Cyberdemon 17620
{
	States {
		//***Che: no boss checks, no potpourri checks!
		Spawn: // removed boss replacement checks!
			CYBR D 0 NODELAY ACS_NamedExecuteWithResult("FBD_RunMonster", 1) // cyberdemon headbox
			TNT1 A 0 A_SetUserVar("user_headshot_stun_limit", 8) // prevents permanent stunlock
			TNT1 A 0 A_GiveInventory("TargetIsACyberdemon")
			TNT1 A 0 A_GiveInventory("TargetIsABoss")
			//CYBR Z 7 // Must not do anything until scripts init
			TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
			Goto Stand
	}
}
*/

/*
ACTOR EDAY_Cyberdemon: NoSwapCyberdemon 17620
{
	// Chebskies-EDAY uses custom doomed numbers for many monsters because reasons
	// This was originally called "IrreplaceableCyberdemon"
}
*/
