%%
%% *POLICEMISSION_Versus Content
%%
%% The PC has been sent to fight some mecha belonging to an enemy faction.
%% This is going to earn the PC the enemity of that faction.
%%
%% Winning this mission gives a point of Lawful reputation.
%%
%% This subplot is responsible for loading its own conclusions: typically, there will be
%% one conclusion for winning the battle, one conclusion for losing the battle, and a third
%% conclusion for running out of time.
%%
%% The master plot must have a PayRate set. The master plot is also responsible for E1's
%% mission reminder message.
%%
%% Param1: The NPC offering the mission
%% Param2: The outdoors scene where the encounter will be placed
%% Param3: The enemy faction

Content
	name <Faction Enemies>
	requires <*POLICEMISSION_Versus>
	desc <The PC will fight some factionless mecha.>

	% E1: The Mission Provider
	% E2: The scene where the encounter will be placed
	% E3: The enemy faction
	% E4: The combat scene
	Element4 <Prefab>
	Place4 <2>

	% P%id%01 = Time Limit
	% P%id%02 = Have entered combat
	update <if= PlotStatus %plotid% %id% else %pop% if= p%id%01 0 P= %id%01 ComTime P+ %id%01 86400>
	start <if= PlotStatus %plotid% %id% else %pop% ifG ComTime P%id%01 ifG p%id%01 0 if= P%id%02 0 SetPlotStatus %plotid% %id3%>

	% SubPlot1 = Win the battle, get a reward
	% SubPlot2 = Lose the battle, get scorned
	% SubPlot3 = Run out of time, get email
	SubPlot1 <*Util_WinMission&Mecha 1>
	SubPlot2 <*Util_LoseMission&Mecha 1>
	SubPlot3 <*Util_TimeOver 1>

	sub
		MetaScene 4 2
		% L1 = Encounter Over Counter
		MapWidth 50
		MapHeight 50

		% Set this metascene's faction to E3
		SetFaction 3

		Start <if= P%id%02 0  P= %id%02 1   PCFEnemy %3%>
		nu1 <if= T1 0   Return   if= V1 0 V= 1 1   LoseRenown                        Memo 1   Alert 1   SetPlotStatus %plotid% %id2%>
		nu2 <if= T2 0   if= V1 0 V= 1 1            XPV 100   AddRenown 1  AddLawful 1  Memo 2   Alert 2   SetPlotStatus %plotid% %id1%>

		Msg1 <You lost %name1%'s mission.>
		Msg2 <You have completed %name1%'s mission.>

		% Random scene content- there's a chance that an enemy or an ally will show up.
		Content1 <Some 1 15 Sub *CRC_Nemesis   na>
		Content2 <Some 1  5 Sub *CRC_Backup    na>

		sub
			team 1
			SetEnemy 2
			SetAlly 3
			ParaX 5
			ParaY 5

			team 2
			name <Enemies>
			SetEnemy 1 3
			Deploy <SetSelfFaction %3% WMecha 2 %threat% 100>
			ParaX 45
			ParaY 45

			team 3
			name <Allies>
			SetEnemy 2
			SetAlly 1
			ParaX 10
			ParaY 5
		end
	end
	inv
		STC PLOT-MECHAMISSION-WANDER
	end


%%
%% *POLICEMISSION_Basic Content
%%
%% The PC has been sent to fight some mecha, but hasn't been told who he'll be fighting
%% or anything else about it. Therefore, this mission is a blank slate of violent goodness.
%%
%% Winning this mission gives a point of Lawful reputation.
%%
%% This subplot is responsible for loading its own conclusions: typically, there will be
%% one conclusion for winning the battle, one conclusion for losing the battle, and a third
%% conclusion for running out of time.
%%
%% The master plot must have a PayRate set. The master plot is also responsible for E1's
%% mission reminder message.
%%
%% Param1: The NPC offering the mission
%% Param2: The outdoors scene where the encounter will be placed

Content
	name <Generic Enemies>
	requires <*POLICEMISSION_Basic>
	desc <The PC will fight some factionless mecha.>

	% E1: The Mission Provider
	% E2: The scene where the encounter will be placed
	% E3: The combat scene
	Element3 <Prefab>
	Place3 <2>

	% P%id%01 = Time Limit
	% P%id%02 = Have entered combat
	update <if= PlotStatus %plotid% %id% else %pop% if= p%id%01 0 P= %id%01 ComTime P+ %id%01 86400>
	start <if= PlotStatus %plotid% %id% else %pop% ifG ComTime P%id%01 ifG p%id%01 0 if= P%id%02 0 SetPlotStatus %plotid% %id3%>

	% SubPlot1 = Win the battle, get a reward
	% SubPlot2 = Lose the battle, get scorned
	% SubPlot3 = Run out of time, get email
	SubPlot1 <*Util_WinMission&Mecha 1>
	SubPlot2 <*Util_LoseMission&Mecha 1>
	SubPlot3 <*Util_TimeOver 1>

	sub
		MetaScene 3 2
		% L1 = Encounter Over Counter
		MapWidth 50
		MapHeight 50

		Start <if= P%id%02 0  P= %id%02 1>
		nu1 <if= T1 0   Return   if= V1 0 V= 1 1   LoseRenown                        Memo 1   Alert 1   SetPlotStatus %plotid% %id2%>
		nu2 <if= T2 0   if= V1 0 V= 1 1            XPV 100   AddRenown 1  AddLawful 1  Memo 2   Alert 2   SetPlotStatus %plotid% %id1%>

		Msg1 <You lost %name1%'s mission.>
		Msg2 <You have completed %name1%'s mission.>

		% Random scene content- there's a chance that an enemy or an ally will show up.
		Content1 <Some 1 10 Sub *CRC_Nemesis   na>
		Content2 <Some 1  5 Sub *CRC_Backup    na>

		sub
			team 1
			SetEnemy 2
			SetAlly 3
			ParaX 5
			ParaY 5

			team 2
			name <Enemies>
			SetEnemy 1 3
			Deploy <WMecha 2 %threat% 100>
			ParaX 45
			ParaY 45

			team 3
			name <Allies>
			SetEnemy 2
			SetAlly 1
			ParaX 10
			ParaY 5
		end
	end
	inv
		STC PLOT-MECHAMISSION-WANDER
	end

Content
	name <Asteroid Encounter>
	requires <*POLICEMISSION_Basic 2:SPACE>
	desc <The PC will fight some factionless mecha... on an asteroid!>

	% E1: The Mission Provider
	% E2: The scene where the encounter will be placed
	% E3: The combat scene
	Element3 <Prefab>
	Place3 <2>

	% P%id%01 = Time Limit
	% P%id%02 = Have entered combat
	update <if= PlotStatus %plotid% %id% else %pop% if= p%id%01 0 P= %id%01 ComTime P+ %id%01 86400>
	start <if= PlotStatus %plotid% %id% else %pop% ifG ComTime P%id%01 ifG p%id%01 0 if= P%id%02 0 SetPlotStatus %plotid% %id3%>

	% SubPlot1 = Win the battle, get a reward
	% SubPlot2 = Lose the battle, get scorned
	% SubPlot3 = Run out of time, get email
	SubPlot1 <*Util_WinMission&Mecha 1>
	SubPlot2 <*Util_LoseMission&Mecha 1>
	SubPlot3 <*Util_TimeOver 1>

	sub
		MetaScene 3 2
		% L1 = Encounter Over Counter
		MapWidth 50
		MapHeight 50
		AsteroidMap
		RockyTiles

		% Suffocation effect...
		Vacuum
		SpaceBackdrop

		Start <if= P%id%02 0  P= %id%02 1 Alert 3>
		nu1 <if= T1 0   Return   if= V1 0 V= 1 1   LoseRenown                        Memo 1  Alert 1   SetPlotStatus %plotid% %id2%>
		nu2 <if= T2 0   if= V1 0 V= 1 1            XPV 100   AddRenown 1  AddLawful 1  Memo 2  Alert 2   SetPlotStatus %plotid% %id1%>

		Msg1 <You lost %name1%'s mission.>
		Msg2 <You have completed %name1%'s mission.>
		Msg3 <You locate your targets on a large asteroid.>

		% Random scene content- there's a chance that an enemy or an ally will show up.
		Content1 <Some 1 10 Sub *CRC_Nemesis   na>
		Content2 <Some 1  5 Sub *CRC_Backup    na>

		sub
			team 1
			SetEnemy 2
			SetAlly 3
			ParaX 5
			ParaY 5

			team 2
			SetEnemy 1 3
			Deploy <WMecha 2 %threat% 100>
			ParaX 45
			ParaY 45

			team 3
			name <Allies>
			SetEnemy 2
			SetAlly 1
			ParaX 10
			ParaY 5
		end
	end
	inv
		STC PLOT-MECHAMISSION-WANDER
	end

Content
	name <Faction Enemies>
	requires <*POLICEMISSION_Basic>
	desc <The PC will fight some enemies of the mission-giving NPC.>

	% E1: The Mission Provider
	% E2: The scene where the encounter will be placed
	% E3: The combat scene
	% E4: The enemy faction
	Element3 <Prefab>
	Place3 <2>
	Element4 <Faction !Enemy 1>

	% P%id%01 = Time Limit
	% P%id%02 = Have entered combat
	update <if= PlotStatus %plotid% %id% else %pop% if= p%id%01 0 P= %id%01 ComTime P+ %id%01 86400>
	start <if= PlotStatus %plotid% %id% else %pop% ifG ComTime P%id%01 ifG p%id%01 0 if= P%id%02 0 SetPlotStatus %plotid% %id3%>

	% SubPlot1 = Win the battle, get a reward
	% SubPlot2 = Lose the battle, get scorned
	% SubPlot3 = Run out of time, get email
	SubPlot1 <*Util_WinMission&Mecha 1>
	SubPlot2 <*Util_LoseMission&Mecha 1>
	SubPlot3 <*Util_TimeOver 1>

	sub
		MetaScene 3 2
		% L1 = Encounter Over Counter
		MapWidth 50
		MapHeight 50

		% Set this metascene's faction to E4
		SetFaction 4

		Start <if= P%id%02 0  P= %id%02 1>
		nu1 <if= T1 0   Return   if= V1 0 V= 1 1   LoseRenown                        Memo 1  Alert 1   SetPlotStatus %plotid% %id2%>
		nu2 <if= T2 0   if= V1 0 V= 1 1            XPV 100   AddRenown 1  AddLawful 1  Memo 2  Alert 2   SetPlotStatus %plotid% %id1%>

		Msg1 <You lost %name1%'s mission.>
		Msg2 <You have completed %name1%'s mission.>

		% Random scene content- there's a chance that an enemy or an ally will show up.
		Content1 <Some 1 15 Sub *CRC_Nemesis   na>
		Content2 <Some 1  5 Sub *CRC_Backup    na>

		sub
			team 1
			SetEnemy 2
			SetAlly 3
			ParaX 5
			ParaY 5

			team 2
			name <Enemies>
			SetEnemy 1 3
			Deploy <SetSelfFaction %4% WMecha 2 %threat% 100>
			ParaX 45
			ParaY 45

			team 3
			name <Allies>
			SetEnemy 2
			SetAlly 1
			ParaX 10
			ParaY 5
		end
	end
	inv
		STC PLOT-MECHAMISSION-WANDER
	end



