#include "zcommon.acs"
#import "strnghld.acs"

script 100 open
{
	Waves	= 10;
	BossMonster	= 18;	// The id of the Overmind. This can be any kind of monster
	BossTarget	= 2;	// The id of the overmind's target(s).
	BossHealth	= 30000;// Overmind's health

	Thing_Hate(BossMonster, BossTarget, 6);	// This is an additional option to make the overmind only hate the targets
						// ignore the player to keep it moving, but it is not necessary
        Thing_SetGoal(BossMonster, 3, 0, 1); 	// And this is the route option, also only necessary depending on your map


	// Prison Stuff - If you use the same prison from STR02, none of this will neeed changes
	PrisonSpot	= 678;	// There should be multiple teleport spots with this tid
				// (Not a series of tids as in older versions!)
				// Set to 0 (or don't set it at all as it is the default) if map doesn't use a prison
	PrisonExit	= 699;

	PrisonCamStart	= 691;	// This is the tid of the first camera for the jail. The next 5 tids should also be cameras.
				// These will be set as the cameras for the CT_1 through CT_6 textures.

	PrisonTeleporterLineId	= 99;

	PrisonTeleporterThrustAngle = 0;	// Angle the teleporter thrusts when it is off
	PrisonExitThrustAngle	= 128;	// Angle prison exit thrusts when there are players still in game

	TeleporterOnLight	= 99;	// This will be activated when prison teleporter is on
	TeleporterOffLight	= 98;	// This will be activated when prison teleporter is off

	// Corner A, corner b, first patrol node
	// You define a zone by setting two map spots to form the opposite corners of a rectangle that will be
	// the zone that monsters spawn in. The difference in height between the mapspots will also be taken into
	// account to define the height of the rectangle (useful for flying enemies). The angle the monsters face
	// is the angle of the first mapspot given here.
    	AddZone( 30, 31, 4 );
	AddZone( 32, 33, 6 );
	AddZone( 34, 35, 10 );
	AddZone( 36, 37, 10 );
	AddZone( 38, 39, 3 );


//	Monsters
//			wave,	   actor,	number to spawn
	WaveEnemy(	1,	"Demon",	10	);
	WaveEnemy(	1,	"ShotgunGuy",	10	);
	WaveEnemy(	1,	"DoomImp",	20	);

	WaveEnemy(	2,	"Hellion",	12	);
	WaveEnemy(	2,	"ShotgunGuy",	16	);
	WaveEnemy(	2,	"DoomImp",	30	);

	WaveEnemy(	3,	"Spectre",	8	);
	WaveEnemy(	3,	"BloodDemon",	8	);
	WaveEnemy(	3,	"Catharsi",	14	);

	WaveEnemy(	4,	"DuneWarrior",	12	);
	WaveEnemy(	4,	"Hellion",	16	);
	WaveEnemy(	4,	"Catharsi",	18	);

	WaveEnemy(	5,	"SuicideBomber",30	);
	WaveEnemy(	5,	"HellKnight",	6	);
  	WaveEnemy(	5,	"ZombieTank",	8	);
 

	WaveEnemy(	6,	"BaronOfHell",	4	);
	WaveEnemy(	6,	"HellKnight",	8	);
	WaveEnemy(	6,	"BruiserDemon",	4	);

	WaveEnemy(	7,	"CacoDemon",	12	);
	WaveEnemy(	7,	"EnhancedCaco",	12	);
	WaveEnemy(	7,	"Helemental",	2	);

	WaveEnemy(	8,	"BaronOfHell",	8	);
	WaveEnemy(	8,	"Cybruiser",	6	);

	WaveEnemy(	9,	"HellKnight",	10	);
	WaveEnemy(	9,	"SuicideBomber",40	);
	WaveEnemy(	9,	"Cyberdemon",	5	);

	WaveEnemy(	10,	"ArchVile",	5	);
	WaveEnemy(	10,	"Diabloist",	5	);

//	Messages

	RadioName[0] =	RADIO_RANDOM;	// RADIO_RANDOM is default for all indexes, so this line isn't strictly needed
//	RadioName[1] =	RADIO_CLOUD;

//	First argument is ID. Positive values correspond to the beginning of that number wave. 0 is not usable.
//	Second argument tells who gives the message
//	Third argument is the message. Length per line shouldn't be more than 25 characters, use \n for newline!
   	WaveMessage(   2,   0,   "Incoming!!"   );
   	WaveMessage(   2,   0,   "\caHellions \cfare on their way.\nGo get a \chbackpack\cf, it's\nwaiting inside the\ncommand control!"   );

   	WaveMessage(   3,   0,   "Careful now, Hell's\nsending in \caflying units."   );
   	WaveMessage(   3,   0,   "If given the opportunity,\nthey'll attack the \cjpower\n\cjcores \cfas well!"   );

   	WaveMessage(   4,   0,   "More freakin' monsters\ncoming through. I think\nit's time for more firepower."   );
   	WaveMessage(   4,   0,   "Go grab a \cihoming rocket\n\cilauncher \cffrom one of the\nweapon pads!"   );

   	WaveMessage(   5,   0,   "Incoming \cakamikazes!"   );
   	WaveMessage(   5,   0,   "A \cichaingun \cfshould\ntake care of them, no\nproblem."   );

   	WaveMessage(   6,   0,   "More powerful \cahell nobles,\neven \cabruiser demons\ncoming through."   );
   	WaveMessage(   6,   0,   "Time to have a little bbq\nwith the \ciflamer!"   );

   	WaveMessage(   7,   0,   "Looks like it's getting\npretty hair-raising down\nthere. Grab some \chhealth."   );
   	WaveMessage(   7,   0,   "Find some good cover away\nfrom the \camancubi\cf, and the\nOvermind's attacks!"   );

   	WaveMessage(   8,   0,   "Incoming \caCybruisers\cf! Stay\nalert!"   );
   	WaveMessage(   8,   0,   "A \chmegasphere \cfought to\nhelp you out here."   );

   	WaveMessage(   9,   0,   "Shit's about to get real."   );
   	WaveMessage(   9,   0,   "Watch the hell out for\nthe \caCyberdemon!"   );

   	WaveMessage(   10,   0,   "You've got the Overmind\nseverely weakened! It's\nalmost over!"   );
   	WaveMessage(   10,   0,   "You only have to contend\nwith a few \caDiabloists\nnow!"   );

   	WaveMessage(   11,   0,   "The \cjOvermind \cfhas been\nslain! Awesome job,\nmarine!"   );
   	WaveMessage(   11,   0,   "The electromagnetic jammer\n has been successfully\n defended!"   );

//	Items and stuff

	WavePowerup(	1,	"Backpack",	1	);
	WavePowerup(	2,	"Backpack",	1	);
	WavePowerup(	3,	"BlueArmor",	1	);
	WavePowerup(	4,	"Backpack",	1	);
	WavePowerup(	5,	"Soulsphere",	1	);
	WavePowerup(	6,	"BlueArmor",	1	);
	WavePowerup(	7,	"Soulsphere",	1	);
	WavePowerup(	8,	"Megasphere",	1	);
	WavePowerup(	9,	"TimeFreezerPickup",	-1	);

	WaveMedic(	1,	"Stimpack",	8	);
	WaveMedic(	1,	"MediKit",	2	);

	WaveMedic(	2,	"Stimpack",	8	);
	WaveMedic(	2,	"MediKit",	2	);

	WaveMedic(	3,	"Stimpack",	8	);
	WaveMedic(	3,	"MediKit",	2	);

	WaveMedic(	4,	"Stimpack",	8	);
	WaveMedic(	4,	"MediKit",	2	);

	WaveMedic(	5,	"Stimpack",	8	);
	WaveMedic(	5,	"MediKit",	3	);

	WaveMedic(	6,	"Stimpack",	9	);
	WaveMedic(	6,	"MediKit",	3	);

	WaveMedic(	7,	"Stimpack",	4	);
	WaveMedic(	7,	"MediKit",	4	);

	WaveMedic(	8,	"Stimpack",	12	);
	WaveMedic(	8,	"MediKit",	4	);

	WaveMedic(	9,	"Stimpack",	11	);
	WaveMedic(	9,	"MediKit",	4	);

	WaveMedic(	10,	"Stimpack",	12	);
	WaveMedic(	10,	"MediKit",	5	);

	WaveWeapon(	2,	"SuperShotgun"	);
	WaveWeapon(	3,	"RocketLauncher"	);
	WaveWeapon(	4,	"HRL"	);
  	WaveWeapon(	5,	"Chaingun"	);
	WaveWeapon(	6,	"Flamer"	);
	WaveWeapon(	8,	"RailGun"	);
 	WaveWeapon(	10,	"Devastator"	);

//	Ammo
//	The amount given here is the actual amount of ammo spawned. The script knows about all
//	of the ammo pickups and how much is in each, and correctly spawns the right types.
//	WaveAmmo(	2,	BULLETS,	50	);
//	WaveAmmo(	2,	SHELLS,	8	);
//	WaveAmmo(	2,	ROCKETS,	0	);
//	WaveAmmo(	2,	CELLS,	0	);
//	WaveAmmo(	2,	GAS,	0	);
//	WaveAmmo(	2,	MINES,	0	);

	WaveAmmo(	1,	BULLETS,	50	);
	WaveAmmo(	1,	SHELLS,	80	);
	WaveAmmo(	1,	ROCKETS,	20	);

	WaveAmmo(	2,	BULLETS,	150	);
	WaveAmmo(	2,	SHELLS,	120	);
	WaveAmmo(	2,	ROCKETS,	20	);

	WaveAmmo(	3,	BULLETS,	175	);
	WaveAmmo(	3,	SHELLS,	120	);
	WaveAmmo(	3,	ROCKETS,	30	);
	WaveAmmo(	3,	CELLS,	100	);

	WaveAmmo(	4,	BULLETS,	175	);
	WaveAmmo(	4,	SHELLS,	124	);
	WaveAmmo(	4,	ROCKETS,	40	);
	WaveAmmo(	4,	CELLS,	100	);

	WaveAmmo(	5,	BULLETS,	200	);
	WaveAmmo(	5,	SHELLS,	140	);
	WaveAmmo(	5,	ROCKETS,	50	);
	WaveAmmo(	5,	CELLS,	100	);

	WaveAmmo(	6,	BULLETS,	220	);
	WaveAmmo(	6,	SHELLS,	164	);
	WaveAmmo(	6,	ROCKETS,	50	);
	WaveAmmo(	6,	CELLS,	140	);

	WaveAmmo(	7,	BULLETS,	220	);
	WaveAmmo(	7,	SHELLS,	180	);
	WaveAmmo(	7,	ROCKETS,	50	);
	WaveAmmo(	7,	CELLS,	140	);

	WaveAmmo(	8,	BULLETS,	240	);
	WaveAmmo(	8,	SHELLS,	180	);
	WaveAmmo(	8,	ROCKETS,	50	);
	WaveAmmo(	8,	CELLS,	140	);

	WaveAmmo(	9,	BULLETS,	240	);
	WaveAmmo(	9,	SHELLS,	180	);

	WaveAmmo(	10,	BULLETS,	240	);
	WaveAmmo(	10,	SHELLS,	180	);
	WaveAmmo(	10,	ROCKETS,	50	);
	WaveAmmo(	10,	CELLS,	200	);

//	Spots
//	The tids of the mapspots at each of the spawners are given here.
	AddMedicSpot	( 100 );
  	AddMedicSpot	( 104 );
  	AddMedicSpot	( 114 );

	AddAmmoSpot	( 101 );
  	AddAmmoSpot	( 105 );
  	AddAmmoSpot	( 115 );

	AddPowerupSpot	( 102 );

	AddWeaponSpot	( 103 );

//	Time to do stuff


	ACS_ExecuteWait(S_OVERMIND,0,0);

//	The player has beaten the deadline mode!

	ACS_Execute(S_MISSION_COMPLETE,0,0);	// Says "Mission Complete", screen fades out, and Exit_Normal(0) is called
}
