game_manager
{
	spawn
	{
		wait 300
		
		wm_allied_respawntime 20
		wm_axis_respawntime 20
		wm_set_round_timelimit 20
		wm_number_of_objectives 3

		//objectives
		//1 Primary Objective: Allies must destroy the tower door.
		//2 Primary Objective: Allies must steal both the books.
		//3 Priamry Objective: Allies must bring both the books to the transmitter.
		wm_objective_status 1 0 0
		wm_objective_status 1 1 0
		wm_objective_status 2 0 0	
		wm_objective_status 2 1 0
		wm_objective_status 3 0 0
		wm_objective_status 3 1 0
		

		wm_setwinner 0
	}

	trigger allies_win
	{
		wm_setwinner 1
		wait 1500
		wm_endround
	}

	trigger nog_1
	{
		setstate booktrigger default
	}
}

book1
{
	trigger stolen
	{
		wm_announce "Allies stole the first book!"
		wm_objective_status 2 0 2
		wm_objective_status 2 1 1
	}

	trigger returned
	{
		wm_announce "Axis returned the first book!"
		wm_objective_status 2 0 0
		wm_objective_status 2 1 0
	}

	trigger dropped
	{
		wm_announce "Allies dropped the first book!"
		wm_objective_status 2 0 0
		wm_objective_status 2 1 0
	}

	trigger captured
	{
		wm_announce "Allies captured the first book!"
		wm_objective_status 3 0 2
		wm_objective_status 3 1 1
	}
}

book2
{
	trigger stolen
	{
		wm_announce "Allies stole the second book!"
		wm_objective_status 2 0 2
		wm_objective_status 2 1 1
	}

	trigger returned
	{
		wm_announce "Axis returned the second book!"
		wm_objective_status 2 0 0
		wm_objective_status 2 1 0
	}

	trigger dropped
	{
		wm_announce "Allies dropped the second book!"
		wm_objective_status 2 0 0
		wm_objective_status 2 1 0
	}

	trigger captured
	{
		wm_announce "Allies captured the second book!"
		wm_objective_status 3 0 1
		wm_objective_status 3 1 2
	}
}

booktrigger
{
	spawn
	{
		wait 300
		accum 1 set 0
	}

	death
	{
		accum 1 inc 1
		accum 1 trigger_if_equal 1 game_manager nog_1
		accum 1 trigger_if_equal 2 game_manager allies_win
	}

}

door
{
	spawn
	{
		constructible_class 3
	}

	death
	{
		wm_announce "The allies destroyed the towerdoor!"
		wm_objective_status 1 0 2
		wm_objective_status 1 1 1
	}
}