plot 0
	name <Secret Plan>

	% A combat template for Extra-Random plots.

	% - Edited to v0.901 "light" standard

	% E1 is the scene for the current episode.
	% E2 is the character who will give the PC a mission.
	% E3 is the scene to be used in the next episode.
	Element1 <Grab 3>
	Element2 <Character ArchAlly HasMecha>
	Element3 <Scene Town Target !Far 1>
	Element4 <Faction GoodEnemy>

	% V1 = Initialization Counter
	% V2 = Combat Counter


	% On a cleanup request just delete this plot.
	cleanup <AdvancePlot 0>

	% If Persona E2 dies, load a new plot.
	start <ifPersona E2 else GoDelete if= V1 0 MoveChar E2 E1  V= 1 1  ifG RReact E2 0 Email d5>
	GoDelete <S= 101 1 AdvancePlot 0>

	% Combat check. If combat has been entered, V2=1.
	% Combat ends in victory if the number of active masters on
	% team two drops to zero, or ends in defeat is the number of
	% active masters on team one drops to zero. After combat, V2=3
	% if the player was victorious or V2=2 is the player lost.
	nu1 <if= T1 0 if= V2 1  if= L3 1 else GoPCLost V= 2 3  Reputation 6 1>
	GoPCLost <V= 2 2  Reputation 6  -7>

	% Email messages
	Msg1 <\ELEMENT 2 @ \ELEMENT 1 :// You might be interested in this: Your old companions are up to no good in \ELEMENT 1 .>
	Msg2 <\ELEMENT 2 @ \ELEMENT 1 :// Your former boss is causing trouble in \ELEMENT 1 . Come see me.>
	Msg3 <\ELEMENT 2 @ \ELEMENT 1 :// I have a lead on something you might be interested in. Meet me in \ELEMENT 1 .>
	Msg4 <\ELEMENT 2 @ \ELEMENT 1 :// Something big is happening in \ELEMENT 1 ; I think you may have a personal interest.>
	Msg5 <\ELEMENT 2 @ \ELEMENT 1 :// Still thinking about your past? Got something for you in \ELEMENT 1 .>

sub
	Persona 2
	rumor <!2 has been waiting to speak with you.>

	% ********************
	% *** SCRIPT BLOCK ***
	% ********************
	%  V1 = Job offer counter, V1=1 is job offered, V1=-1 if job denied
	%  V2 = Message Randomizer
	%  V3 = Threat value of enemy mecha
	%  V4 = Reward offered to PC for the mission

	greeting <NewChat if= P2 3 else GoCheckLoss  Goto GoPCWon>
	GoCheckLoss <if= P2 2 else GoCheckMission Say 3 N= 3 E3 S= 101 1 S= 105 -1  AdvancePlot 0>
	GoCheckMission <if= V1 1 else GoFirstTime Say 4 AddChat 1 AddChat 2 AddChat 3>

	% Unlike most combat missions, the PC is guaranteed to be offered
	% this one, since it's personal.
	% Set V1, V3, V4 here.
	GoFirstTime <V= 1 1 V= 3 Threat S103 150  V= 4 Reward V3 150 AddChat 4 AddChat 5 AddChat 6 ifFaction N2 else GoCheckPersona Say 51 Memo 61>
	GoCheckPersona <ifPersona N1 else GoUnknownEnemy Say 52 Memo 62>
	GoUnknownEnemy <Say 53>

	% Combat being entered
	result1 <EndChat Say 5 SavePos P= 2 1 SavePos Staged .scene V3>
	.scene <SCENE_StopCourier.txt>
	% Combat being delayed
	result2 <NewChat Say 7>
	% How many points do the enemy have?
	result3 <NewChat Say 8 AddChat 1 AddChat 2>

	% Result 4 - may add Reputation command or whatnot
	result4 <NewChat Reputation 1 1 Say 9 AddChat 1 AddChat 2 AddChat 3>

	% Result 5 - may add Reputation command or whatnot
	result5 <NewChat Reputation 4 -d6 Say 9 AddChat 1 AddChat 2 AddChat 3>

	result6 <NewChat Say 10 S= 101 1 N= 3 E3 AdvancePlot 0>

	% 3 : Player has lost mission
	Msg3 <The courier got away. Now, we might never learn what they were up to... At least, not until it's too late.>

	% 4 : Player has accepted mission, has returned from repair
	Msg4 <Are you ready to head out yet? We have to act quickly, before the courier can leave this area...>

	% 5 : Combat is starting
	Msg5 <I'll upload the data I've collected to your navigation computer. Once in the area I'll identify which enemy is the courier. You must stop him, at all costs.>

	% 7 : PC needs some time to get ready
	Msg7 <Make sure you're in top condition, and get out your best mecha, because if we fail we aren't going to get a second chance.>

	% 8 : How many points? Use "\VAL V3 " for that
	Msg8 <Initial reports indicate that he'll be protected by around \VAL V3 tac points worth of equipment. That's an awful lot of hardware to be taking on by yourself... Fortunately, you just have to stop one of them.>

	% 9 : Response to Prompt4
	Msg9 <A courier will be traveling through this area soon. If we can stop his mecha, we can learn exactly what they're planning. We'll only get one chance to do this so you better be ready.>

	Msg10 <You can try to forget your past, but sometimes you just have to face up to it.>

	Msg51 <Your old buddies \NARRATIVE 2 have something cooking in \ELEMENT 1 . I've been tracing their actions for a while, and think we may have a chance to find out what they're plotting, if you're willing to help...>
	Msg52 <Remember \NARRATIVE 1 ? Well, he's got something in store for \ELEMENT 1 . I've been tracing his actions for a while, and think we may have a chance to find out what his gang is plotting, if you're willing to help...>
	Msg53 <Some people you once associated with have been plotting something for \ELEMENT 1 . I've been tracing their actions for a while, and think we may have a chance to find out what they're plotting, if you're willing to help...>

	Msg61 <\ELEMENT 2 in \ELEMENT 1 asked you to help uncover the \NARRATIVE 2 plan.>
	Msg62 <\ELEMENT 2 in \ELEMENT 1 asked you to help uncover the plans of \NARRATIVE 1 .>


	% 1 - 3 :  Standard combat entry options:
	%         Start Mission, Delay Mission, Mission Details
	Prompt1 <I'm ready to go right now.>
	Prompt2 <Maybe I should prepare first.>
	Prompt3 <How well is this courier guarded?>

	% 4 - 5 :  PC can have different reactions to Msg6 above
	Prompt4 <I can't allow them to do more harm...>
	Prompt5 <I will have my revenge upon them!>
	Prompt6 <That doesn't concern me, anymore.>



	% THe PC won the mission... Time for a big revelation of some kind.
	GoPCWon <AddChat 101 ifFaction N2 else GoWonNoFac Say 101>
	GoWonNoFac <N= 2 E4 XREnemy NAV_XREFaction  Say 102>

	result101 <NewChat AddChat 102 if= d2 1 else GoR101BiotechEnding Say 103 History 151 XRMystery NAV_XRMResolved Goto GoEndMission>
	GoR101BiotechEnding <Say 104 History 153 XRMystery NAV_XRMNotHuman Goto GoEndMission>

	% Do everything here that has to be done. If some of the ExtraRandom
	% parameters need to be changed, do that here as well.
	GoEndMission <S= 101 1 S+ 102 1 S= 105 1 N= 3 E3 AdvancePlot 0>

	result102 <NewChat Say 110>

	Msg101 <You did well out there. I've recovered the courier's datapack.>
	Msg102 <Good job capturing the courier's datapack. The first thing that you should know, I've found that your old comrades were taking orders from \NARRATIVE 2 .>
	Msg103 <It looks like \NARRATIVE 2 has been stockpiling arms, including banned munitions like nukes and biosoldiers. There's only one possible reason... They must be preparing for a full-scale takeover.>
	Msg104 <You ever hear of "Idealist"? That was an ancient human-genome biotech program... \NARRATIVE 2 has been searching for info on it, and has even used the tech on their members. You may have been subjected while you worked for them.>

	Msg110 <Only that the mecha gang you encountered was on the way to \ELEMENT 3 . I'd guess that they have some kind of operation there, but we aren't sure what.>

	Msg151 <Discovered that \NARRATIVE 2 is planning a takeover of the FedTer.>
	Msg153 <Discovered that \NARRATIVE 2 did genetic modification to its agents.>

	Prompt101 <So, what are they planning?>
	Prompt102 <Can you tell me anything else?>

end
