Plot
	name <Vigilant Police Patrol>
	requires <*GENERAL LAWFUL>
	% This police patrol is tougher, gets reinforcements, and there's no way
	% to talk your way out of it. Ouch.

	% E1 is the Town scene
	% E2 is the outdoors scene for the patrol.
	% E3 is the encounter for the patrol
	% E4 is the local police faction
	% E5 is the police officer to be used
	Element1 <Scene Town>
	Element2 <Scene Outdoors>
	Element3 <Prefab>
	Place3 <2>
	Element4 <Faction POLIC !Ally 1>
	Element5 <Character HasMecha !Near 1 !Comrade 4>
	Place5 <3 (Guards) sd enemy>

	% P1 = Timer
	% P2 = Have entered combat

	start <ifNPCOK %5% else GoDelete ifG V1 0 Goto GoCheckTime>
	update <ifNPCOK %5% else GoDelete if= V1 0 else GoCheckTime V= 1 ComTime V+ 1 43200  ifG %threat% NPCRenown %5%  NPCLevel %5% %threat%>
	GoCheckTime <ifG ComTime V1  if= P2 0  EndPlot>
	GoDelete <EndPlot>

	sub
		MetaScene 3 2
		MapWidth 30
		MapHeight 30

		% L1 = Reinforcements level

		% start <if= P2 0  P= 2 1  ForceChat %5% L= 1 %threat%>
		start <GrabPlot ifGOK if= P2 0  P= 2 1  ForceChat %5% L= 1 %threat%>
		end <EndPlot>
		5min <if= P2 1  Alert 1  L+ 1 d10  WMecha 2 L1 50>

		% nu1 <if= T1 0 Return if= P2 1 P= 2 2  AddRenown -3             Goto GoLoss>
		% nu2 <if= T2 0        if= P2 1 P= 2 3  XPV 100  AddRenown 1     Goto GoVictory>
		nu1 <if= T1 0 Return GrabPlot ifGOK if= P2 1 P= 2 2  AddRenown -3             Goto GoLoss>
		nu2 <if= T2 0        GrabPlot ifGOK if= P2 1 P= 2 3  XPV 100  AddRenown 1     Goto GoVictory>

		% The PC has won this encounter.
		GoVictory <ifNPCOK %5% ForceChat %5%>

		% The PC has lost this encounter...
		GoLoss <ifNPCOK %5% ForceChat %5%>

		% Msg1 <Suddenly, reinforcements arrive!>
		Msg1 <突然、敵の増援が現れた！>

		sub
			Team 1
			SetEnemy 2
			ParaX 5
			ParaY 5

			Team 2
			name <Guards>
			SetEnemy 1
			Deploy <SetSelfFaction %4%   WMecha 2 %threat% 100>
			ParaX 25
			ParaY 25
		end

		Persona 5
		special <UNLISTED>
		% rumor <%name5% is out on patrol.>
		rumor <%name5% はパトロール中>
		greeting <if= P2 3 else GoCheckLoss        Goto GoDoWin>
		*GoDoWin <*GetYouNextTime>
		GoCheckLoss <if= P2 2 else GoFightPC       Goto GoDoLoss>
		*GoDoLoss <*YouLose>
		*GoFightPC <*BattleChallenge GoThemeExpo na>
		*GoThemeExpo <*THEME_EXPO&Enemy GoStartCombat>
	end
	inv
		STC ENCOUNTER-WANDER
		name <%name5%'s Patrol>
		name_I18N <%name5% のパトロール隊>
		&ifShouldAttack <ifPCCriminal>
		use <ifG StatVal STAT_MetaVisibility -1      ifG PCScale 0 else GoTooSmall   &ifShouldAttack else GoNoAttack  Print 7  Exit Destination>
		GoTooSmall <Print 6>
		GoNoAttack <Monologue %5% 5  EndPlot>
		Attack <ifG StatVal STAT_MetaVisibility -1   ifG PCScale 0   &ifShouldAttack    ifUStealth HardSkillTar %threat% else GoAutoAttack Goto GoMakeChoice>
		GoMakeChoice <ifYesNo 1 2 3 else GoAvoidAttack  Print 4 Exit Destination>
		% Msg1 <You spot a hostile patrol led by %name5%.>
		% Msg2 <Confront them.>
		% Msg3 <Avoid them.>
		% Msg4 <You slip away unnoticed.>
		% Msg5 <Nothing to see here. Move along, citizen.>
		% Msg5_1 <Hello \PC ; I'm just doing a routine patrol of \EXACT_SCENE %2% . This is something we have to do regularly. So far I haven't encountered any problems.>
		% CMsg5_1 <ifNPCSociable Accept>
		% Msg5_2 <I can't talk now; I'm on patrol.>
		% CMsg5_2 <ifNPCShy Accept>
		% Msg5_3 <I'm doing a patrol of \SCENE RootSceneID . Everything looks OK from here.>
		% CMsg5_3 <ifNPCCheerful Accept>
		% Msg5_4 <There are a million forces out there who would love to destroy \SCENE RootSceneID . It's my job to defend the city against them.>
		% CMsg5_4 <ifNPCMelancholy Accept>
		% Msg5_5 <Can't talk now... donuts!>
		% CMsg5_5 <ifNPCEasygoing Accept>
		% Msg5_6 <The enemies of \SCENE RootSceneID never sleep, so neither shall I...>
		% CMsg5_6 <ifNPCPassionate Accept>
		% Msg5_7 <The streets are peaceful. I've found no trace of unlicensed mecha.>
		% CMsg5_7 <ifNPCLawful Accept>
		% Msg5_8 <If you witness any criminal activity, report it to the authorities at once.>
		% CMsg5_8 <ifNPCCriminal Accept>
		% Msg5_9 <Right now I'm patrolling \EXACT_SCENE %2% . It's my sword duty job to protect this city from criminals.>
		% CMsg5_9 <ifNPCHeroic Accept>
		% Msg5_10 <Be pure, be vigilant, behave!>
		% CMsg5_10 <ifNPCVillainous Accept>
		% Msg5_11 <No signs of criminal activity here. Move along, \PC .>
		% Msg6 <You fail to attract the attention of %name5%.>
		% Msg7 <You confront %name5%.>
		Msg1 <%name5% の率いる敵パトロール隊を発見した。>
		Msg2 <戦いを挑む。>
		Msg3 <離れる。>
		Msg4 <気付かれずに離脱した。>
		Msg5 <ここには何もない%JV_F_WA%JV_YO%JV_SIL。さあ行きなさい、市民。>
		Msg5_1 <やあ \PC、こちらはただの \EXACT_SCENE %2% の定期パトロール中%JG_DAYO。こういうのを続けるのが仕事だから%JV_NA。今のところ何も問題は発生してない%JG_YO。>
		CMsg5_1 <ifNPCSociable Accept>
		Msg5_2 <今はお喋りは無し%JG_DA%JV_SIL_Rパトロール中%JV_M_DA。>
		CMsg5_2 <ifNPCShy Accept>
		Msg5_3 <\SCENE RootSceneID のパトロール中%JG_DAYO。この辺は何も異常無しみたい%JG_DANE。>
		CMsg5_3 <ifNPCCheerful Accept>
		Msg5_4 <\SCENE RootSceneID を滅ぼしたがってる奴らはごまんといるから%JV_NA。そいつらから街を守るのが%JF2の仕事%JG_DAYO。>
		CMsg5_4 <ifNPCMelancholy Accept>
		Msg5_5 <今は仕事中%JG_DAYO%JV_SIL_Rおマヌケさん！>
		CMsg5_5 <ifNPCEasygoing Accept>
		Msg5_6 <\SCENE RootSceneID の敵は眠らない……だから%JF2も%JG_DA。>
		CMsg5_6 <ifNPCPassionate Accept>
		Msg5_7 <街は平和そのもの%JG_DANE。無許可のメックの姿もない%JG_YO。>
		CMsg5_7 <ifNPCLawful Accept>
		Msg5_8 <もし何か犯罪の現場を目撃したら、すぐに所轄の部署に連絡して%JG_R。>
		CMsg5_8 <ifNPCCriminal Accept>
		Msg5_9 <今は \EXACT_SCENE %2% のパトロールをしてる%JG_NDA。この街を犯罪から守るのが、%JF2がこのメックに誓った使命%JG_DAYO。>
		CMsg5_9 <ifNPCHeroic Accept>
		Msg5_10 <迷わず、慎重に、大胆に！>
		CMsg5_10 <ifNPCVillainous Accept>
		Msg5_11 <ここには犯罪の兆候は見当たらない%JV_F_WA%JV_NA。\PC も構わず行って%JG_R。>
		Msg6 <%name5% の注意を引くことができなかった。>
		Msg7 <%name5% の部隊に接近した。>
		ENCOUNTER_Defense
	end

Plot
	name <Regular Police Patrol>
	requires <*GENERAL -LAWFUL -LAWLESS>

	% E1 is the Town scene
	% E2 is the outdoors scene for the patrol.
	% E3 is the encounter for the patrol
	% E4 is the local police faction
	% E5 is the police officer to be used
	Element1 <Scene Town>
	Element2 <Scene Outdoors>
	Element3 <Prefab>
	Place3 <2>
	Element4 <Faction POLIC !Ally 1>
	Element5 <Character HasMecha !Near 1 !Comrade 4>
	Place5 <3 (Guards) sd enemy>

	% P1 = Timer
	% P2 = Have entered combat

	start <ifNPCOK %5% else GoDelete ifG V1 0 Goto GoCheckTime>
	update <ifNPCOK %5% else GoDelete if= V1 0 else GoCheckTime V= 1 ComTime V+ 1 43200>
	GoCheckTime <ifG ComTime V1  if= P2 0  EndPlot>
	GoDelete <EndPlot>

	sub
		MetaScene 3 2
		MapWidth 30
		MapHeight 30

		% L2 = Encounter Over Indicator

		% start <if= P2 0  P= 2 1  ForceChat %5%>
		start <GrabPlot ifGOK if= P2 0  P= 2 1  ifNPCOK %5% ForceChat %5%>
		end <EndPlot>
		5min <if= P2 1  WMecha 2 %threat% 30>

		% nu1 <if= T1 0 Return if= P2 1 P= 2 2  AddRenown -3             Goto GoLoss>
		% nu2 <if= T2 0        if= P2 1 P= 2 3  XPV 100  AddRenown 1     Goto GoVictory>
		nu1 <if= T1 0 Return GrabPlot ifGOK if= P2 1 P= 2 2  AddRenown -3             Goto GoLoss>
		nu2 <if= T2 0        GrabPlot ifGOK if= P2 1 P= 2 3  XPV 100  AddRenown 1     Goto GoVictory>

		% The PC has won this encounter.
		GoVictory <ifNPCOK %5% ForceChat %5%>

		% The PC has lost this encounter...
		GoLoss <ifNPCOK %5% ForceChat %5%>

		sub
			Team 1
			SetEnemy 2
			ParaX 5
			ParaY 5

			Team 2
			name <Guards>
			SetEnemy 1
			Deploy <SetSelfFaction %4%   WMecha 2 %threat% 80>
			ParaX 25
			ParaY 25
		end

		Persona 5
		special <UNLISTED>
		% rumor <%name5% is out on patrol.>
		rumor <%name5% はパトロールで外に出ている>
		% If the PC isn't of sufficient level to handle this NPC, the battle
		% will be left up to the lancemates.
		greeting <if= P2 3 else GoCheckLoss        Goto GoDoWin>
		*GoDoWin <*GetYouNextTime>
		GoCheckLoss <if= P2 2 else GoFightPC       Goto GoDoLoss>
		*GoDoLoss <*YouLose>
		*GoFightPC <*BattleChallenge&Avoid GoCheckRenown GoExit>
		GoCheckRenown <ifG ChatNPCRenown PCRenown else GoThemeExpo  EndChat Say 1 RunAway %5% WMecha 2 %threat% 50>
		*GoThemeExpo <*THEME_EXPO&Enemy GoStartCombat>
		GoExit <P= 3 4  Return  EndPlot>
		% Msg1 <There's no reason for me to stay here. My lance can take you on their own.>
		% Msg1_1 <I have to continue on with the patrol. Men, make sure that \PC doesn't get away.>
		% Msg1_2 <It would hardly seem fair to beat you down myself... I'll just have my squad do it instead.>
		Msg1 <%JF2がここに留まる理由はない%JV_F_WA%JV_NA。%JS_AGGの相手なら部下だけで十分%JG_DA。>
		Msg1_1 <%JF2はパトロールを続けないといけない%JV_F_WA。全員、\PC を絶対に逃がさないように。>
		Msg1_2 <%JF2が相手をしてしまうのは不公平に過ぎる%JV_F_WA%JV_NA……ここは部下に任せる%JV_ZO。>
	end
	inv
		STC ENCOUNTER-WANDER
		name <%name5%'s Patrol>
		name_I18N <%name5% のパトロール隊>
		&ifShouldAttack <ifPCCriminal>
		use <ifG StatVal STAT_MetaVisibility -1      ifG PCScale 0 else GoTooSmall   &ifShouldAttack else GoNoAttack  Print 7  Exit Destination>
		GoTooSmall <Print 6>
		GoNoAttack <Monologue %5% 5  EndPlot>
		Attack <ifG StatVal STAT_MetaVisibility -1   ifG PCScale 0   &ifShouldAttack    ifUStealth HardSkillTar %threat% else GoAutoAttack Goto GoMakeChoice>
		GoMakeChoice <ifYesNo 1 2 3 else GoAvoidAttack  Print 4 Exit Destination>
		% Msg1 <You spot a hostile patrol led by %name5%.>
		% Msg2 <Confront them.>
		% Msg3 <Avoid them.>
		% Msg4 <You slip away unnoticed.>
		% Msg5 <Nothing to see here. Move along, citizen.>
		% Msg5_1 <Hello \PC ; I'm just doing a routine patrol of \EXACT_SCENE %2% . This is something we have to do regularly. So far I haven't encountered any problems.>
		% CMsg5_1 <ifNPCSociable Accept>
		% Msg5_2 <I can't talk now; I'm on patrol.>
		% CMsg5_2 <ifNPCShy Accept>
		% Msg5_3 <I'm doing a patrol of \SCENE RootSceneID . Everything looks OK from here.>
		% CMsg5_3 <ifNPCCheerful Accept>
		% Msg5_4 <There are a million forces out there who would love to destroy \SCENE RootSceneID . It's my job to defend the city against them.>
		% CMsg5_4 <ifNPCMelancholy Accept>
		% Msg5_5 <Can't talk now... donuts!>
		% CMsg5_5 <ifNPCEasygoing Accept>
		% Msg5_6 <The enemies of \SCENE RootSceneID never sleep, so neither shall I...>
		% CMsg5_6 <ifNPCPassionate Accept>
		% Msg5_7 <The streets are peaceful. I've found no trace of unlicensed mecha.>
		% CMsg5_7 <ifNPCLawful Accept>
		% Msg5_8 <If you witness any criminal activity, report it to the authorities at once.>
		% CMsg5_8 <ifNPCCriminal Accept>
		% Msg5_9 <Right now I'm patrolling \EXACT_SCENE %2% . It's my sword duty job to protect this city from criminals.>
		% CMsg5_9 <ifNPCHeroic Accept>
		% Msg5_10 <Be pure, be vigilant, behave!>
		% CMsg5_10 <ifNPCVillainous Accept>
		% Msg5_11 <No signs of criminal activity here. Move along, \PC .>
		% Msg6 <You fail to attract the attention of %name5%.>
		% Msg7 <You confront %name5%.>
		Msg1 <%name5% の率いる敵パトロール隊を発見した。>
		Msg2 <戦いを挑む。>
		Msg3 <離れる。>
		Msg4 <気付かれずに離脱した。>
		Msg5 <ここには何もない%JV_F_WA%JV_YO%JV_SIL。さあ行きなさい、市民。>
		Msg5_1 <やあ \PC、こちらはただの \EXACT_SCENE %2% の定期パトロール中%JG_DAYO。こういうのを続けるのが仕事だから%JV_NA。今のところ何も問題は発生してない%JG_YO。>
		CMsg5_1 <ifNPCSociable Accept>
		Msg5_2 <今はお喋りは無し%JG_DA%JV_SIL_Rパトロール中%JV_M_DA。>
		CMsg5_2 <ifNPCShy Accept>
		Msg5_3 <\SCENE RootSceneID のパトロール中%JG_DAYO。この辺は何も異常無しみたい%JG_DANE。>
		CMsg5_3 <ifNPCCheerful Accept>
		Msg5_4 <\SCENE RootSceneID を滅ぼしたがってる奴らはごまんといるから%JV_NA。そいつらから街を守るのが%JF2の仕事%JG_DAYO。>
		CMsg5_4 <ifNPCMelancholy Accept>
		Msg5_5 <今は仕事中%JG_DAYO%JV_SIL_Rおマヌケさん！>
		CMsg5_5 <ifNPCEasygoing Accept>
		Msg5_6 <\SCENE RootSceneID の敵は眠らない……だから%JF2も%JG_DA。>
		CMsg5_6 <ifNPCPassionate Accept>
		Msg5_7 <街は平和そのもの%JG_DANE。無許可のメックの姿もない%JG_YO。>
		CMsg5_7 <ifNPCLawful Accept>
		Msg5_8 <もし何か犯罪の現場を目撃したら、すぐに所轄の部署に連絡して%JG_R。>
		CMsg5_8 <ifNPCCriminal Accept>
		Msg5_9 <今は \EXACT_SCENE %2% のパトロールをしてる%JG_NDA。この街を犯罪から守るのが、%JF2がこのメックに誓った使命%JG_DAYO。>
		CMsg5_9 <ifNPCHeroic Accept>
		Msg5_10 <迷わず、慎重に、大胆に！>
		CMsg5_10 <ifNPCVillainous Accept>
		Msg5_11 <ここには犯罪の兆候は見当たらない%JV_F_WA%JV_NA。\PC も構わず行って%JG_R。>
		Msg6 <%name5% の注意を引くことができなかった。>
		Msg7 <%name5% の部隊に接近した。>
		ENCOUNTER_Defense
	end

