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

script 100 open
{
	Waves	= 7;
	HateEpicenter	= 996;

	EventScript	= 101;	// Similar to old script 667, but a bit different
				// Called when new wave X is announced message disappears, as items
				// for wave X spawn.
				// First argument given to script is the integer X

	// Prison Stuff
	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, 8 );
	AddZone( 32, 33, 9 );

//	Monsters
	WaveEnemy(	1,	"Doomimp",	36	);
	WaveEnemy(	1,	"Catharsi",	24	);
	WaveEnemy(	1,	"Suicidebomber",	56	);
	WaveEnemy(	1,	"Demon",	32	);

	WaveEnemy(	2,	"Catharsi",	24	);
	WaveEnemy(	2,	"Doomimp",	16	);
	WaveEnemy(	2,	"Hellknight",	32	);
	WaveEnemy(	2,	"Demon",	20	);
	WaveEnemy(	2,	"Spectre",	16	);

	WaveEnemy(	3,	"Hellknight",	32	);
	WaveEnemy(	3,	"Cacodemon",	16	);
	WaveEnemy(	3,	"Blooddemon",	16	);
	WaveEnemy(	3,	"Revenant",	24	);

	WaveEnemy(	4,	"Hellknight",	32	);
	WaveEnemy(	4,	"Baronofhell",	16	);
	WaveEnemy(	4,	"Cybruiser",	8	);
	WaveEnemy(	4,	"Bruiserdemon",	4	);

	WaveEnemy(	5,	"Suicidebomber",	56	);
	WaveEnemy(	5,	"Blooddemon",	24	);
	WaveEnemy(	5,	"HS",	56	);
	WaveEnemy(	5,	"Helemental",	-8	);

	WaveEnemy(	6,	"Shadow",	48	);
	WaveEnemy(	6,	"Phaseimp",	32	);
	WaveEnemy(	6,	"Nightmaredemon",	24	);
	WaveEnemy(	6,	"Terminator",	3	);

	WaveEnemy(	7,	"Wicked",	48	);
	WaveEnemy(	7,	"Hellion",	96	);
	WaveEnemy(	7,	"Enhancedcaco",	16	);
	WaveEnemy(	7,	"Archvile",	16	);

//	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
	WaveMessage(	2,	0,	"We ain't seen nothing yet.\nGo get some \charmor \cfand\n\cdhealth."	);
	WaveMessage(	2,	0,	"A huge legion of \caHell\n\caKnights \cfis on its way.\nHold as many behind the\n\cjlimit gateway \cfas you can!"	);

	WaveMessage(	3,	0,	"Some more \charmor \cfand \cgammo\nis waiting for you."	);
	WaveMessage(	3,	0,	"Watch out - the \carevenants\nand \cablood demons \cfare\nbound to make your task\nharder."	);

	WaveMessage(	4,	0,	"Stay alert, marine.\n\caCybruisers \cfare closing\nin."	);
	WaveMessage(	4,	0,	"Looks like they're\nbringing along their\n\cabruiser \cfdaddies. Check\nthe powerup pad for a\n\chdoomsphere!"	);

	WaveMessage(	5,	0,	"I think you've earned a\n\cirailgun \cfand \chmegasphere."	);
	WaveMessage(	5,	0,	"Use it to take care of\nthe \caHades spheres!"	);

	WaveMessage(	6,	0,	"Incoming \cashadows \cfand\n\canightmare demons."	);
	WaveMessage(	6,	0,	"These bastards are fast,\nso go grab a \cirepeater \cfand\nanother \chdoomsphere."	);

	WaveMessage(	7,	0,	"One last wave to go! It's\ngonna be a tough one."	);
	WaveMessage(	7,	0,	"Grab a \ciBFG9000 \cfand show\n'em what you're made of!"	);

	WaveMessage(	8,	0,	"Marvelous job, marine!"	);
	WaveMessage(	8,	0,	"You have successfully\ndefended this UAC\ninstallation!"	);

//	Items and stuff

	WavePowerup(	2,	"GreenArmor",	1	);
	WavePowerup(	2,	"Backpack",	1	);
	WavePowerup(	2,	"Soulsphere",	1	);
	WavePowerup(	3,	"Bluearmor",	1	);
	WavePowerup(	3,	"SoulSphere",	1	);
	WavePowerup(	4,	"Bluearmor",	1	);
	WavePowerup(	4,	"Quaddamagepowerup",	1	);
	WavePowerup(	5,	"Megasphere",	1	);
	WavePowerup(	6,	"Quaddamagepowerup",	1	);
	WavePowerup(	7,	"Megasphere",	1	);

	WaveMedic(	2,	"Stimpack",	10	);
	WaveMedic(	2,	"MediKit",	4	);
	WaveMedic(	3,	"Stimpack",	16	);
	WaveMedic(	3,	"MediKit",	8	);
	WaveMedic(	4,	"Stimpack",	24	);
	WaveMedic(	4,	"MediKit",	12	);
	WaveMedic(	5,	"Stimpack",	24	);
	WaveMedic(	5,	"MediKit",	12	);
	WaveMedic(	6,	"Stimpack",	24	);
	WaveMedic(	6,	"MediKit",	12	);
	WaveMedic(	7,	"Stimpack",	24	);
	WaveMedic(	7,	"MediKit",	12	);

	WaveWeapon(	2,	"Plasmarifle"	);
	WaveWeapon(	3,	"Autoshotgun"	);
	WaveWeapon(	4,	"Chaingun"	);
	WaveWeapon(	5,	"Railgun"	);
	WaveWeapon(	6,	"Repeater"	);
	WaveWeapon(	7,	"BFG9000"	);

//	Ammo

	WaveAmmo(	2,	BULLETS,	400	);
	WaveAmmo(	2,	SHELLS,		200	);
	WaveAmmo(	2,	ROCKETS,	30	);
	WaveAmmo(	2,	CELLS,		40	);

	WaveAmmo(	3,	BULLETS,	500	);
	WaveAmmo(	3,	SHELLS,		300	);
	WaveAmmo(	3,	ROCKETS,	60	);
	WaveAmmo(	3,	CELLS,		80	);

	WaveAmmo(	4,	BULLETS,	600	);
	WaveAmmo(	4,	SHELLS,		400	);
	WaveAmmo(	4,	ROCKETS,	120	);
	WaveAmmo(	4,	CELLS,		160	);

	WaveAmmo(	5,	BULLETS,	700	);
	WaveAmmo(	5,	SHELLS,		500	);
	WaveAmmo(	5,	ROCKETS,	240	);
	WaveAmmo(	5,	CELLS,		240	);

	WaveAmmo(	6,	BULLETS,	700	);
	WaveAmmo(	6,	SHELLS,		500	);
	WaveAmmo(	6,	ROCKETS,	240	);
	WaveAmmo(	6,	CELLS,		340	);

	WaveAmmo(	7,	BULLETS,	700	);
	WaveAmmo(	7,	SHELLS,		500	);
	WaveAmmo(	7,	ROCKETS,	240	);
	WaveAmmo(	7,	CELLS,		500	);

//	Spots

	AddMedicSpot	( 100 );
	AddMedicSpot	( 105 );
	AddAmmoSpot	( 101 );
	AddAmmoSpot	( 106 );
	AddPowerupSpot	( 102 );
	AddWeaponSpot	( 103 );
					// There should be only one mapspot for each of these tids
//	AddWeaponSpot	( 104 );	// Put another entry if you have more than one spawn point

//	Limit Amount
	LimitMax = 50;	// Set the amount of monsters that may travel through


//	Time to do stuff

	ACS_ExecuteWait(S_LIMIT_GAME,0,0);	// Runs the main deadline script
	
//	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
}

//	This script is called shortly before the wave starts, with the wave number passed to it.
script 101 (int wave)
{
	switch(wave)
	{
	case 3: //After Wave 2:
		Floor_LowerToNearest(18, 255*255);
		light_fade(20, 160, 35);
		AddZone( 34, 35, 19 );
		AddZone( 36, 37, 20 );		
		break;
	}
}