Plot
name <Sprite Comic 4>
	requires <>

Element1 <Scene Environs>
Element2 <Prefab>
Place2 <1>



sub
	MetaScene 2 0
	MapWidth 13
	MapHeight 13

	BoxMap
	IndustrialTiles

	sub
		Team 1
		ParaX 5
		ParaY 5

		Team 2

	end
	inv
		STC DisplayCase-1
		XPos 7
		YPos 7
		use <Return>

		MONSTER Dog
		SDL_COLORS <157 172 183 122 88 193 250 0 0>
		SetTeam 2
		update <GrabSource GSetNAtt 5 10 5 GSetNAtt NAG_CharDescription NAS_CharType NAV_TempLancemate GJoinLance>

		NPC Bounty Hunter
		SDL_Colors <122 88 198 255 212 195 208 34 51>
		chardesc female
		SetTeam 2
		update <GrabSource GSetNAtt 5 10 5 GSetNAtt NAG_CharDescription NAS_CharType NAV_TempLancemate GJoinLance>
	end

end
inv
	Encounter
	EncounterMove 0
	update <ShowEncounter SetStat STAT_MetaVisibility 0  Goto GoSetOrders>
	ATTACK <  >
end




Plot
name <Local Defense>
	requires <*GENERAL>

Element1 <Scene Town>
Element2 <Scene Outdoors !Near 1>
Element3 <Character HasMecha !Near 1 !Ally 1>
Element4 <Prefab>
Place4 <2>

% V1 = Timer
% V3 = Combat Entered Indicator / Metascene Initialization / Victory Indicator
% V5 = Difficulcy Rating

start <ifNPCOK E3 else GoDelete ifG V1 0 Goto GoCheckTime>
update <ifNPCOK E3 else GoDelete if= V1 0 else GoCheckTime V= 1 ComTime V+ 1 43200 MoveNPC E3 E4  SetNPCTeam E3 2  SetEncounterName E4 .name  P= 5 PCRenown  ifG 3 P5 P= 5 d4>
.name <\ELEMENT 3 's Patrol>
GoCheckTime <ifG ComTime V1  if= P3 0  EndPlot>
GoDelete <EndPlot>


sub
	Persona 3
	rumor <%name3% is out patrolling %name2%.>
	special <NOESCAPE>
	greeting <if= P3 3 else GoCheckLoss   EndPlot   Goto GoDoWin>
	*GoDoWin <*GetYouNextTime>

	GoCheckLoss <if= P3 2 else GoCheckCombat   EndPlot   Goto GoDoLoss>
	*GoDoLoss <*YouLose>

	GoCheckCombat <if= P3 1 else GoCheckEnemy NewChat SayAnything>
	GoCheckEnemy <ifNPCArchEnemy E3 else GoNoEnemy   Goto GoFightPC>
	*GoFightPC <*BattleChallenge&Avoid GoThemeExpo GoExit>
	*GoThemeExpo <*THEME_EXPO&Enemy GoStartCombat>
	GoStartCombat <Exit E4>
	GoExit <EndPlot>
	GoNoEnemy <NewChat  Say 1  EndPlot>

	Msg1 <I'm just doing a routine patrol of the city. Nothing to see here.>
	Msg1_1 <Hello \PC ; I'm just doing a routine patrol of \SCENE E2 . This is something we have to do regularly. So far I haven't encountered any problems.>
	CMsg1_1 <ifNPCSociable Accept>
	Msg1_2 <I can't talk now; I'm on patrol.>
	CMsg1_2 <ifNPCShy Accept>
	Msg1_3 <I'm doing a patrol of \ELEMENT 1 . Everything looks OK from here.>
	CMsg1_3 <ifNPCCheerful Accept>
	Msg1_4 <There are a million forces out there who would love to destroy \ELEMENT 1 . It's our job to defend the city against them.>
	CMsg1_4 <ifNPCMelancholy Accept>
	Msg1_5 <This is \ELEMENT 3 ; I have nothing to report from my city patrol.>
	CMsg1_5 <ifNPCEasygoing Accept>
	Msg1_6 <The enemies of \SCENE E1 never sleep, so neither shall I...>
	CMsg1_6 <ifNPCPassionate Accept>
	Msg1_7 <The streets are peaceful. I've found no trace of unlicensed mecha.>
	CMsg1_7 <ifNPCLawful Accept>
	Msg1_8 <If you witness any criminal activity, report it to the authorities at once.>
	CMsg1_8 <ifNPCCriminal Accept>
	Msg1_9 <Right now I'm patrolling \ELEMENT 2 . It's our job to keep the city safe.>
	CMsg1_9 <ifNPCHeroic Accept>
	Msg1_10 <I'm looking for someone to fight. Not you, not today...>
	CMsg1_10 <ifNPCVillainous Accept>
	Msg1_11 <I'm out patrolling the city. If I run into any problems, I'll give you a call.>
	CMsg1_11 <ifG React 45 Accept>


	MetaScene 4 2
	MapWidth 30
	MapHeight 30
	content <Some 1 15 Sub *BATTLE_X ->

	% P3 = Initialization
	% L2 = Encounter Over Indicator

	start <if= P3 0  P= 3 1>

	nu1 <if= T1 0 Return if= P3 1 P= 3 2  LoseRenown               Goto GoLoss>
	nu2 <if= T2 0        if= P3 1 P= 3 3  XPV 100  AddRenown 1     Goto GoVictory>

	% The PC has won this encounter.
	GoVictory <ifNPCOK E1 else GoE1Died ForceChat E1>
	GoE1Died <EndPlot>

	% The PC has lost this encounter...
	GoLoss <ifNPCOK E1 else GoE1Died ForceChat E1>

	sub
		Team 1
		SetEnemy 2
		ParaX 5
		ParaY 5

		Team 2
		SetEnemy 1
		Deploy <SetSelfFaction NPCFac E3   WMecha 2 P5 80>
		ParaX 25
		ParaY 25
	end

end
inv
	STC ENCOUNTER-WANDER
	use <ifG StatVal STAT_MetaVisibility -1      ifG PCScale 0 else GoTooSmall   ForceChat E3>
	GoTooSmall <Print 101>
	Attack <ifG StatVal STAT_MetaVisibility -1   ifG PCScale 0   ifNPCArchEnemy E3   ifUStealth HardSkillTar %threat% else GoAutoAttack ifYesNo 1 2 3 else GoAvoidAttack  ForceChat E3>
	GoAutoAttack <ForceChat E3>
	GoAvoidAttack <Print 4 AddSociable -1>
	Msg1 <You spot a hostile patrol led by \ELEMENT 3 .>
	Msg2 <Confront \ELEMENT 3 .>
	Msg3 <Avoid \ELEMENT 3 .>
	Msg4 <You slip away unnoticed.>

	Msg101 <You fail to attract the attention of the mecha.>
	ENCOUNTER_Defense

end


