plot 0
	name <PLOT: Face Your Enemy>

	% 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 <Grab 1>
	Element3 <Scene Town Target !Far 1>
	Element4 <Character Citizen !Near 1>

	% V1 = Initialization Counter
	% V2 = Combat Counter
	% V3 = Conversation 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 ifG P2 1 else GoCheckStartCombat ForceChat E2>
	GoCheckStartCombat <if= P2 1 else GoCheckInit ifNPCInPlay E2 else GoCheckInit if= V3 0 V= 3 1 ForceChat E2>
	GoCheckInit <if= V1 0 else GoCheckTown V= 1 1  MoveChar E2 E1 Compose UTD E2 .e2dies>
	GoCheckTown <if= V1 1 else GoCheckExit if= SceneID E1 V= 1 2>
	GoCheckExit <if= V1 2 if= SceneID 1 Goto GoStartCombat>
	GoDelete <S= 101 1 XREnemy NAV_XREFaction AdvancePlot 0>

	GoStartCombat <Print 101 Block SavePos P= 2 1 Dynamic 2 Threat S103 150 .nu1 .nu2 DynaNPC E2 2>
	.e2dies <ForceChat E2 ifG V2 0 Retreat 2>
	.nu1 <if= T1 0 Return>
	.nu2 <if= T2 0 Salvage>

	% 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  V= 2 2  Reputation 6 -7>
	nu2 <if= T2 0 if= V2 1  V= 2 3  Reputation 6  1  XPV 100 ifPersona E2 ForceChat E2>

	Msg101 <While leaving town, you are attacked by mecha!>

sub
	Persona 2
	greeting <EndChat ifPersona E2 else GoE2Dead if= P2 3 else GoCheckLoss Say 1 S= 101 1 S+ 102 1 N= 3 E3 History 2 AdvancePlot 0>
	GoE2Dead <ifG P2 0 else GoE2DeadNoCombat Say 3 S= 101 1 S+ 102 1 N= 3 E3 XREnemy NAV_XREFaction History 4 AdvancePlot 0>
	GoE2DeadNoCombat <Say 13 History 14 XREnemy NAV_XREUnknown S= 101 1 N= 3 E3 AdvancePlot 0>
	GoCheckLoss <if= P2 2 else GoCheckFirst Say 5 History 6 S= 101 1 N= 3 E3 AdvancePlot 0>
	GoCheckFirst <ifG P2 0 else GoInTown Say 7 AddChat 1 AddChat 2>
	GoInTown <NewChat ifG NPCRep E2 2 0 else GoNoLaw Say 10 AddChat 3 AddChat 4 AddChat 5>
	GoNoLaw <ifG 0 NPCRep E2 4 else GoNoPassion EndChat Say 11 FreezeChar E2>
	GoNoPassion <Say 12 AddChat 3 AddChat 4 AddChat 5>

	result1 <EndChat Say 8>
	result2 <EndChat Say 9 AddReact -d10 Reputation 4 d10>
	result3 <NewChat Say 15 FreezeChar E2>
	result4 <NewChat Say 16 FreezeChar E2>
	result5 <NewChat Say 17 FreezeChar E2>

	Msg1 <Don't think that you've won today. You've merely prolonged the inevitable.>
	Msg2 <You defeated \ELEMENT 2 outside of \ELEMENT 1 .>
	Msg3 <You have defeated me... You are the better pilot. But... know that... \NARRATIVE 2 will destroy you... no-one escapes forever...>
	Msg4 <You defeated \ELEMENT 2 , who was working for \NARRATIVE 2 .>
	Msg5 <You are lucky to have escaped us today. That luck will soon run out, I assure you. Until the next time we meet...>
	Msg6 <You were defeated by \ELEMENT 2 outside of \ELEMENT 1 .>
	Msg7 <I've been waiting for you to show yourself. Now, we will battle!>
	Msg8 <May the better pilot win...>
	Msg9 <I am a force you should not take so lightly!!!>
	Msg10 <Imagine seeing you here. So long as we are both in town there is no reason why we should not be civil. Once we leave here, though, we will be enemies again.>
	Msg11 <What? You!? I did not expect to meet you here... I can't stand to be in the same city as you. I'll be leaving this place now.>
	Msg12 <Well, if it isn't \PC . Count yourself lucky that we're in town, otherwise I'd snuff out your worthless life in an instant.>
	Msg13 <I die...>
	Msg14 <You killed \ELEMENT 2 in \ELEMENT 1 .>
	Msg15 <You haven't figured that out on your own yet? You must be stupider than you look. Perhaps they are wrong... perhaps you're not as much of a danger as they say.>
	Msg16 <In the middle of \ELEMENT 1 ? You must be daft. Aside from the obvious problems of bystanders and the Guardians, there's also my reputation to think about.>
	Msg17 <Then why did you speak with me? If you have nothing to say, then don't disturb me.>

	Prompt1 <I'm ready to take you.>
	Prompt2 <Sure, I have nothing better to do.>
	Prompt3 <Why do you want to kill me?>
	Prompt4 <Let's settle this here.>
	Prompt5 <I have nothing to say to you.>

	Persona 4
	rumor <!4 saw !2 in town.>
	greeting <NewChat ifNPCInPlay E2 else GoNotInPlay Say 1>
	GoNotInPlay <SayAnything>
	Msg1 <\ELEMENT 2 is in town doing some shopping.>

end
