%%
%% *Mischief Plots
%%
%%  Someone is being rowdy and unmutual. The PC can fight some henchmen or
%%  associates to learn the location of the enemy's hideout.
%%
%%  %name2% will be used to identify the mischief maker, so name the
%%  encounter something sensible!!!
%%
%%  NOTE: Don't try grabbing the NPC, because it's most likely in use by
%%    whatever plot/quest spawned this mood. Then why is it part of the spec?
%%    Because its context might be useful to know, that's why.
%%
%% Mood Spec:
%%  E1 = The outdoors scene
%%  E2 = The encounter being sought
%%  E3 = **The NPC behind it all
%%

Plot
	name <Applied Mischief>
	% desc <An NPC allied with the mischief-maker may attack the PC.>
	desc <トラブルメーカーの仲間である NPC が PC を攻撃するかもしれない。>
	requires <*Mischief>

	% 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
	Element1 <Grab 1>
	Element2 <Prefab>
	Place2 <1>
	Element3 <Grab 2>
	Element4 <Character !Okay -3 (Criminal|Villainous|Enemy) !G HasMecha>
	Place4 <2 (Enemies)>

	% 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 on the way to %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%!>
		% 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 <%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 NPCFac MoodE 3 WMecha 2 %threat% 80>
			ParaX 45
			ParaY 45
		end

		Persona 4
		special <UNLISTED NOESCAPE>
		*greeting <*Mischief_EnemyGreeting %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 <Mischief Makers>
		name_I18N <怪しい一団>
		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 %name3%.>
		% Msg2 <Trail them.>
		% Msg3 <Approach them.>
		% Msg4 <You track the mecha to %name3%.>
		Msg1 <%name3% のメックの一団と遭遇した。>
		Msg2 <後を追う。>
		Msg3 <接近する。>
		Msg4 <メックの後を追い、%name3% の居場所を突き止めた。>
	end

Plot
	name <Pure Mischief>
	% desc <Some mecha allied with the mischief-maker may attack the PC.>
	desc <トラブルメーカーの仲間のメック隊 が PC を攻撃するかもしれない。>
	requires <*Mischief>

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

	% 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% <mecha from %name3% have been causing trouble in %name1%.>
		rumor%id% <%name3% から来ているメックの集団が %name1% で問題を起こしてる>
		% 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 of \PERSONA MoodE 3 's henchmen!>
		% 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 <\PERSONA MoodE 3 の取り巻きが襲ってきた！>
		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 NPCFac MoodE 3 WMecha 2 %threat% 80>
			ParaX 45
			ParaY 45
		end
	end
	inv
		Encounter
		name <Mischief Makers>
		name_I18N <怪しい一団>
		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 %name3%.>
		% Msg2 <Trail them.>
		% Msg3 <Approach them.>
		% Msg4 <You track the mecha to %name3%.>
		Msg1 <%name3% のメックの一団と遭遇した。>
		Msg2 <後を追う。>
		Msg3 <接近する。>
		Msg4 <メックの後を追い、%name3% の居場所を突き止めた。>
	end

