plot 0
	name <Mars Needs Clones>

	% The PC will fight his arch-enemy unexpectedly in town...
	% Then, he'll hear that the arch-enemy has been sighted
	% in another town...
	% Then he'll fight the arch-enemy again, but stronger this
	% time...
	% Someone has a clone factory set up. The PC will be given
	% the chance to infiltrate and destroy it. The PC might also
	% rescue the original version of his arch-enemy, who may then
	% become an ally.

	Element1 <Grab 3>
	Element2 <Scene Town Target !Far 1>
	Element3 <Grab 1>
	element4 <Prefab>
	element5 <Prefab>
	element6 <Faction GoodEnemy>
	element7 <Prefab>

	% Stage One: The initial fight
	start <ifPersona E3 else GoEndPlot  if= V1 0 else GoSetOrder V= 1 1 Compose UTD E3 .killerdies MoveChar E3 E1 Goto GoSetOrder>
	GoEndPlot <S= 101 1 XREnemy NAV_XREUnknown AdvancePlot 0>
	.killerdies <if# V1 5 V= 1 5 ForceChat E3 Print 3 History 2>
	GoSetOrder <ifNPCInPlay E3 NPCGoPC E3>

	TM1 <if= SceneID E1 ifNPCinPlay E3 if= V1 1 ifG 6 Range PCUID NPCUID E3  Print 1 ForceChat E3>
	Msg1 <\ELEMENT 3 strikes up a conversation with you.>
	Msg2 <You killed \ELEMENT 3 , whose body then dissolved.>
	Msg3 <The body of \ELEMENT 3 quickly dissolves into pink goo...>

sub
	Persona 3
	rumor <!3 will take a contract to kill anybody, as long as the price is right.>
	% V2 = Message Randomizer
	greeting <NewChat ifPersona E3 else GoE3Dead P= 1 2 Say 1 AddChat 1 AddChat 2 AddChat 3>
	result1 <EndChat Say 2 Reputation 4 -d10 Goto GoStartFight>
	result2 <EndChat Say 3 Reputation 1 1 Goto GoStartFight>
	result3 <EndChat Say 4 Reputation 3 -d10 Goto GoStartFight>
	Msg1 <So \PC , I've found you at last. It's time for us to settle matters once and for all, right here and right now.>
	Msg2 <That's the spirit! Killing you would be boring if you didn't bother to fight back!>
	Msg3 <Oh, what a noble sentiment... Not that it matter to me anymore. They can all be replaced. We can all be replaced.>
	Msg4 <I have been wondering that very same thing myself... so now, it is time to end our game. Either you will die or I will die, and I can't even manage to care which...>
	Prompt1 <Okay, let's do it.>
	Prompt2 <No, there are innocent people here!>
	Prompt3 <Uh, who are you again?>
	GoStartFight <EndChat SoloAttack E3>
	GoE3Dead <EndChat Say 101 N= 3 E2 FreezeItem E5 FreezeChar E7 FreezeChar E3 AdvancePlot 1>
	Msg101 <You haven't won yet... I can still defeat you...>

Plot 1
	% The second fight... The PC will meet the NPC again, this
	% time in the second town.

	% V1 = Initialization Counter

	% Stage Two: The advanced fight
	start <if= V1 0 else GoSetOrder V= 1 S103 V+ 1 10 NPCLevel E3 V1 V= 1 1 Compose UTD E3 .killerdies MoveChar E3 E2 Goto GoSetOrder>
	GoEndPlot <S= 101 1 XREnemy NAV_XREUnknown AdvancePlot 0>
	.killerdies <if# V1 5 V= 1 5 ForceChat E3 Print 3 History 2>
	GoSetOrder <ifNPCInPlay E3 NPCGoPC E3>

	TM1 <if= SceneID E2 ifNPCinPlay E3 if= V1 1 ifG 6 Range PCUID NPCUID E3  Print 1 ForceChat E3>
	Msg1 <\ELEMENT 3 strikes up a conversation with you.>
	Msg2 <You killed \ELEMENT 3 a second time, with similar results.>
	Msg3 <The body of \ELEMENT 3 once again dissolves into pink goo... This time, leaving behind a dataslate.>

sub
	Persona 3
	% V2 = Message Randomizer
	greeting <NewChat ifPersona E3 else GoE3Dead P= 1 2 Say 1 AddChat 1 AddChat 2>
	result1 <EndChat Say 2 Reputation 4 -d8 Goto GoStartFight>
	result2 <EndChat Say 2 Reputation 4  d8 Goto GoStartFight>
	GoStartFight <EndChat SoloAttack E3>
	Msg1 <\PC , so we meet at last. I've heard that you defeated me before... but I can hardly believe that. Now, you are going to die.>
	Msg2 <Let's do this!>
	Prompt1 <I killed you once, I can do it again.>
	Prompt2 <Believe it or not, we'll find out.>
	GoE3Dead <EndChat Say 101 N= 3 E1 GiveKeyItem E5 FreezeChar E3 ItemVar= E5 1 E1 AdvancePlot 2>
	Msg101 <Impossible... You cannot be my equal... There is no-one...>

	Persona 4
	rumor <!4 knows something about your enemy.>
	greeting <NewChat if= V1 0 else GoBeenBefore V= 1 1 Say 1 Addchat 1 Memo 2>
	GoBeenBefore <SayAnything>
	result1 <NewChat Say 3>
	Msg1 <I have some strange news for you about \ELEMENT 3 . I know the two of you fought here recently, and he apparently died... But the guardian office in \ELEMENT 2 claims \OPR E3 's been there all this time!>
	Msg2 <\ELEMENT 3 has been sighted in \ELEMENT 2 .>
	Msg3 <\ELEMENT 3 is wanted for a list of crimes as long as a phone book. We've been keeping tabs on \PPR E3 whereabouts for some time now.>
	Prompt1 <Why do you care about \ELEMENT 3 ?>

Plot 2
	% If the player goes to E1 and uses the crystal key, he will be
	% able to enter the dungeon.

	start <ifPersona E7 else GoWinMission ifItemOK E5 else GoEndMission if= V1 0 V= 1 1 Compose Key E5 .usekey ifFaction N2 else GoSetFaction>
	GoSetFaction <N= 2 E6>
	.usekey <ifYesNo 1 2 3 SavePos MStaged .keyscene S103 .mdesc NPCLevel E7 S103 DynaNPC E7 3 PassVar 1 E3 PassVar 2 E7 SeekGate -1>
	.keyscene <TS_XRAN_SCENE_MarsNeedsClones.txt>
	.mdesc <Criminal Robot Synth Hunter-X>

	GoWinMission <S+ 102 1 N= 1 0 N= 3 E2 XREnemy NAV_XREFaction S= 101 1 AdvancePlot 3>
	GoEndMission <S= 101 1 AdvancePlot 0>

	Msg1 <This key contains a data map leading to a ruin outside of town. Do you want to go there?>
	Msg2 <Yes please.>
	Msg3 <No thank you.>

sub
	Persona 3
	greeting <NewChat Say 1 AddChat 1 AddChat 2 AddChat 3>
	result1 <EndChat Say 2 MoveChar E3 E1 DeleteChar E7 Print 5>
	result2 <EndChat Say 3 MoveChar E3 E1 DeleteChar E7 Print 5>
	result3 <EndChat Say 4 MoveChar E3 E1 DeleteChar E7 Print 5>
	Msg1 <Ugh... Who are you!? Are you with \NARRATIVE 2 , or did you come to rescue me?>
	Msg2 <Remember? Wait... You were captured the same time I was, weren't you? We better talk... but not here; I'll meet you again in town.>
	Msg3 <This place? It's all a blur, but I think I know... We were captured at the same time, weren't we? I have to talk with you... but not here; let's meet again in town.>
	Msg4 <Kill me again? Oh... I see what \NARRATIVE 2 has done... We must get out of this place. Please believe me. Let's get back to town. I'll tell you there... I think I know everything.>
	Msg5 <\ELEMENT 3 has left the area.>
	Prompt1 <Don't you remember me?>
	Prompt2 <What is this place?>
	Prompt3 <I came here to kill you one last time!>

	Persona 7
	greeting <NewChat Say 1 AddChat 1 AddChat 2>
	result1 <EndChat Say 2 Goto GoStartFight>
	result2 <EndChat Say 3 Goto GoStartFight>
	GoStartFight <History 4 History 5  SoloAttack E7>
	Msg1 <You? How did you get here? This is an unexpected development, but not entirely unwelcome...>
	Msg2 <This is the \NARRATIVE 2 clone bank. We copied \ELEMENT 3 to defeat you, but our first tests were not powerful enough... Now that you are here, I can add you to our subject bank, and your clones will make powerful warriors for us!>
	Msg3 <Which one? You see, \NARRATIVE 2 hired me to clone \ELEMENT 3 in order to hunt you down, but the first two were less than perfect... Now that you are here, I can add you to our subject bank, and your clones will be powerful warriors for us!>
	Msg4 <You discovered that your enemy \ELEMENT 3 had been a clone.>
	Msg5 <The clones were manufactured by \NARRATIVE 2 .>
	Prompt1 <What is this place?>
	Prompt2 <I'm looking for \ELEMENT 3 .>


Plot 3
	% The plot is finished, but the PC can speak with the former
	% enemy if he survived.
	start <if= EScene 3 E1 else GoNoAlly ifPersona E3 else GoDelete Memo 1>
	GoDelete <AdvancePlot 0>
	GoNoAlly <DeleteChar E3 AdvancePlot 0>
	Msg1 <Your old enemy \ELEMENT 3 wanted to speak with you in \ELEMENT 1 .>
sub
	Persona 3
	greeting <NewChat Say 1 AddChat 1 AddChat 2>

	result1 <NewChat Say 2 AddChat 3>
	result2 <NewChat Say 3 AddChat 3>
	result3 <NewChat Say 4 AddChat 4>
	result4 <NewChat if= XRM NAV_XRMAmnesia else GoR4NoAm Say 5 XRMystery NAV_XRMNotHuman Goto GoFinishUp>
	GoR4NoAm <Say 6 Goto GoFinishUp>
	result5 <NewChat Say 7>

	GoFinishUp <PCAlly E3 NPCLevel E3 89 History 8 AdvancePlot 0 AddChat 5>

	Msg1 <That place was the \NARRATIVE 2 clone factory. They made copies of me, which did horrible things to you... I know there's no way you could ever come to trust me.>
	Msg2 <The clones emulated my memories and combat skills, but they were twisted somehow... Changed to serve only \NARRATIVE 2 . Maybe there was something of myself in them. I want to think they were just monsters.>
	Msg3 <I want to believe that the clones were no part of me... that they were just monsters, not real people. The process used copied my memories and combat skills, but twisted these to serve only \NARRATIVE 2 . It's a scary technology.>
	Msg4 <The process uses some kind of Pre-Zero machinery. I didn't see much... There was a tank of something, some organic mass. It seemed like the clones would form themselves from this material.>
	Msg5 <Good question. I think I knew you... you look like someone who fought with me against \NARRATIVE 2 , and were caught at the same time as I was. I don't know what really happened, or who you really are... But I know I must continue to fight them.>
	Msg6 <Who can say? We have both opposed them... I would suppose that we were just a test for their new technology. Who can say what other inventions they're cooking up? I am more determined than ever to stop them, even at the cost of my own self...>
	Msg7 <Get back in shape... My body's been in a tank of water for months. Find out what evil my clones have done and try to correct what I can. They will be after me, of course... and you too. I'll aid you when they come.>
	Msg8 <The original \ELEMENT 3 became your ally.>

	Prompt1 <You've got that right.>
	Prompt2 <Don't be so sure.>
	Prompt3 <How did they make these clones?>
	Prompt4 <Why did they choose you to fight me?>
	Prompt5 <What will you do now?>

end
% Plot 3 subcom ending above...

end
% Plot 2 subcom ending above...

end
% Plot 1 subcom ending above...

end
% Plot 0 subcom ending above...

inv
	NPC Guardian
	Place <1>

	Treasure 40
	name <Dataslate>
	% V1 = Scene where the clone dungeon is
	use <if= SceneID V1 else GoNotHere ifNoObjections KEY SelfNID Print 1>
	GoNotHere <Print 1>
	Msg1 <This crystal key holds a data map which appears to lead to a ruin outside of \SCENE V1 .>

	NPC Scientist
	EquipChar 20000
	skill 6 1
	skill 7 1
	skill 10 1
	skill 18 1
	skill 33 1

end
