%%
%% *FightToDestination Plots
%%
%%  The PC wants to get somewhere. In order to do that, they're gonna have to
%%  kick a lot of arse.
%%
%%  %name2% will be used to identify the destination, so name the
%%  encounter something sensible!!!
%%
%% Mood Spec:
%%  E1 = The outdoors scene
%%  E2 = The encounter being sought
%%  E3 = The faction behind it
%%

Plot
	name <Applied Mischief>
	% desc <An NPC allied with the enemy faction may attack the PC.>
	desc <敵勢力の側にいる NPC が PC を攻撃するかもしれない。>
	requires <*FightToDestination>

	% E1 is the outdoors scene
	% E2 is an encounter to place there
	% E3 is the encounter being sought
	% E4 is the NPC to be negotiated with
	% E5 is the faction being fought
	Element1 <Grab 1>
	Element2 <Prefab>
	Place2 <1>
	Element3 <Grab 2>
	Element4 <Character !Ally -3 !G HasMecha>
	Place4 <2 (Enemies)>
	Element5 <Grab 3>

	% P1 = Time Limit/Initialization Counter
	% P2 = E4 refused to fight PC
	start <if# P1 0 ifG ComTime P1 EndPlot>
	update <if= P1 0 P= 1 ComTime P+ 1 21600 SetPlotStatus %plotid% %id%>

	&RevealEncounter <SetEncounterActive %3%  AnnihilatePlotMood Exit %1% SeekGate %3%>

	sub
		MetaScene 2 2
		% rumor%id% <%name4% is protecting %name3%.>
		rumor%id% <%name4% が %name3% を守っている>
		% L1 = Encounter Over Counter
		% L2 = Initialization Counter
		MapWidth 50
		MapHeight 50

		start <if= L2 0 L= 2 1 Alert 1 ForceChat %4%>
		nu1 <if= T1 0   Return   if= V1 0 V= 1 1    AddRenown -1        EndPlot>
		nu2 <if= T2 0   if= V1 0 V= 1 1   AddRenown 1 SALVAGE  if= P2 0 else GoJustEnd ifNPCOK %4% else GoJustEnd Monologue %4% 3 XPV 100 &RevealEncounter>
		GoJustEnd <Alert 2   EndPlot>

		% Msg1 <You are attacked by %name4% of %name5%!>
		% Msg2 <You have defeated the mecha.>
		% Msg3 <Alright, you beat me- you can find %name3% in %name1%.>
		% Msg3_1 <I surrnder! You can find %name3% in %name1%.>
		% Msg3_2 <You win this time, \PC ... %name3% is in %name1%.>
		Msg1 <%name5% の %name4% が攻撃を仕掛けてきた！>
		Msg2 <敵メックを撃破した。>
		Msg3 <分かった、%JS_AGGの勝ち%JG_DA%JV_SIL_R %name3% なら %name1% にいる%JG_YO。>
		Msg3_1 <降伏する%JV_F_WA！ %name3% は %name1% にいる%JV_ZO%JV_F_YO。>
		Msg3_2 <今回は%JS_AGGの勝ち%JV_M_DA%JV_F_YO、\PC …… %name3% は %name1% にいる%JV_ZO。>

		sub
			team 1
			SetEnemy 2
			SetAlly 3
			ParaX 5
			ParaY 5

			team 2
			name <Enemies>
			SetEnemy 1 3
			Deploy <SetSelfFaction %5% WMecha 2 %threat% 80>
			ParaX 45
			ParaY 45
		end

		Persona 4
		special <UNLISTED NOESCAPE>
		*greeting <*F2Dest_Greeting %threat% %3% GoReveal GoFight>
		GoReveal <EndChat Say 1 Retreat 2 L= 1 1 XPV 100 &RevealEncounter>
		GoFight <ifG PCRenown ChatNPCRenown else GoNoFight Goto GoThemeExpo>
		GoNoFight <EndCHat Say 2 RunAway %4% P= 2 1>
		*GoThemeExpo <*THEME_EXPO&Enemy na>
		% Msg1 <You can find %name3% in %name1%. I'll show you the way.>
		% Msg1_1 <%name3% is in %name1%... Here are the coordinates.>
		% Msg1_2 <If you're really sure you want to go, %name3% is in %name1%. Don't blame me for what you find there.>
		% Msg2 <You're not enough of a challenge for me to bother with; my lance should be able to handle you on their own.>
		% Msg2_1 <While fighting you would be fun, it wouldn't really be much of a challenge. I'm going to leave you to my men.>
		% Msg2_2 <I'm too busy to kick your arse today. My lance can do that by themselves.>
		Msg1 <%name3% なら %name1% に行けば見つかる……道を案内する%JG_YO。>
		Msg1_1 <%name3% は %name1% にいる%JV_F_WA……これが座標%JG_DAYO。>
		Msg1_2 <本当にそのつもりなら、%name1% に行けば %name3% に会える%JV_F_WA。そこでどうなっても%JF2の責任ではないから%JV_NA。>
		Msg2 <この%JF2が相手をするまでもない……%JS_AGG程度、%JF2の部下だけで十分にあしらえる%JV_ZO。>
		Msg2_1 <相手をしてやるのも悪くない%JG_GA、大して手応えはなさそう%JV_M_DA%JV_NA。%JS_AGGのことは部下に任せておく%JV_F_WA。>
		Msg2_2 <今日は忙しくて%JV_NA、%JS_AGGを叩きのめしてる暇はない%JG_NDA。代わりに%JF2の部下を置いておく%JG_YO。>
	end
	inv
		Encounter
		name <%name3%?>
		name_I18N <%name3% の一団？>
		EncounterMove 20
		use <ifG StatVal STAT_MetaVisibility -1    ifUStealth 2 else GoAutoAttack   ifYesNo 1 2 3 else GoAutoAttack Goto GoTrack>
		attack <ifG StatVal STAT_MetaVisibility -1  ifG PCScale 0    ifUStealth SkillTar %threat% else GoAutoAttack ifYesNo 1 2 3 else GoAutoAttack Goto GoTrack>
		GoAutoAttack <Alert -2 Exit Destination>
		GoTrack <Alert 4 XPV 100 &RevealEncounter Exit %1% SeekGate %3%>
		% Msg1 <You encounter a group of mecha from %name5%.>
		% Msg2 <Trail them.>
		% Msg3 <Approach them.>
		% Msg4 <You track the mecha to %name3%.>
		Msg1 <%name5% のメックの一団と遭遇した。>
		Msg2 <後を追う。>
		Msg3 <接近する。>
		Msg4 <メックの後を追い、%name3% の居場所を突き止めた。>
	end


Plot
	name <I Feel Like Beef Tonight>
	% desc <Some mecha from the faction for a little beefgate action.>
	desc <特定勢力のメック隊を相手にちょっとしたモグラ叩き。>
	requires <*FightToDestination>

	% E1 is the outdoors scene
	% E2 is an encounter to place there
	% E3 is the encounter being sought
	% E4 is the faction
	Element1 <Grab 1>
	Element2 <Prefab>
	Place2 <1>
	Element3 <Grab 2>
	Element4 <Grab 3>

	% P1 = Time Limit/Initialization Counter
	start <if# P1 0 ifG ComTime P1 EndPlot>
	update <if= P1 0 P= 1 ComTime P+ 1 21600 SetPlotStatus %plotid% %id%>

	&RevealEncounter <SetEncounterActive %3%  AnnihilatePlotMood Exit %1% SeekGate %3%>

	sub
		MetaScene 2 2
		% rumor%id% <%name3% is somewhere in %name1%, but you'll have to get past %name4%.>
		rumor%id% <%name3% は %name1% の何処かにいる%JG_GA、まずは %name4% を何とかしないといけない>
		% L1 = Encounter Over Counter
		% L2 = Initialization Counter
		MapWidth 50
		MapHeight 50

		start <if= L2 0 L= 2 1 Alert 1>
		nu1 <if= T1 0   Return   if= V1 0 V= 1 1    AddRenown -1        EndPlot>
		nu2 <if= T2 0   if= V1 0 V= 1 1   AddRenown 1 SALVAGE   ifInsight SkillTar %threat% else GoCheckSurvival Alert 3 &RevealEncounter  XPV 100>
		GoCheckSurvival <ifSurvival SkillTar %threat% else GoTrackFailed  Alert 4 &RevealEncounter  XPV 100>
		GoTrackFailed <Alert 2   EndPlot>

		% Msg1 <You are attacked by some mecha from %name4%!>
		% Msg2 <You have defeated the mecha.>
		% Msg3 <In one of the defeated mecha you find the coordinates to %name3%.>
		% Msg4 <After defeating these mecha, you track their movements back to %name3%.>
		Msg1 <%name4% のメック部隊が襲ってきた！>
		Msg2 <敵メックを撃破した。>
		Msg3 <撃破したメックの１台から、%name3% の居場所を示す座標を発見した。>
		Msg4 <メックを撃破した後、彼らがやってきた痕跡を辿って %name3% に辿り着いた。>

		sub
			team 1
			SetEnemy 2
			SetAlly 3
			ParaX 5
			ParaY 5

			team 2
			name <Enemies>
			SetEnemy 1 3
			Deploy <SetSelfFaction %4%  WMecha 2 %threat% 100>
			ParaX 45
			ParaY 45
		end
	end
	inv
		Encounter
		name <%name3%?>
		name_I18N <%name3% の一団？>
		EncounterMove 20
		use <ifG StatVal STAT_MetaVisibility -1    ifUStealth 2 else GoAutoAttack   ifYesNo 1 2 3 else GoAutoAttack Goto GoTrack>
		attack <ifG StatVal STAT_MetaVisibility -1  ifG PCScale 0    ifUStealth SkillTar %threat% else GoAutoAttack ifYesNo 1 2 3 else GoAutoAttack Goto GoTrack>
		GoAutoAttack <Alert -2 Exit Destination>
		GoTrack <Alert 4 XPV 100 &RevealEncounter Exit %1% SeekGate %3%>
		% Msg1 <You encounter a group of mecha from %name4%.>
		% Msg2 <Trail them.>
		% Msg3 <Approach them.>
		% Msg4 <You track the mecha to %name3%.>
		Msg1 <%name4% のメックの一団と遭遇した。>
		Msg2 <後を追う。>
		Msg3 <接近する。>
		Msg4 <メックの後を追い、%name3% の居場所を突き止めた。>
	end

