%% *:CS_Plunder Content
%%
%%
%% The PC has been sent to plunder a ship, warehouse, or whatever else sort of
%% thing a pirate might be inclined to attack. Note that this is quite likely to
%% make the PC some enemies... Or maybe even upgrade their enemy.
%%
%% Depending on the core story enemy faction...
%% - if THIEF, PC will probably compete with them to get plunder
%% - if POLIC, they'll be guarding a ship belonging to someone else
%% - if nonexistent, PC will get a new enemy
%% - otherwise, the ship will probably belong to them, except in the case of
%%   an enemy faction upgrade.
%%
%% The target is activated as soon as this subplot is.
%%
%% When this subplot concludes, it sets one of the following triggers:
%%  .%id%_%plotid%_GoWin
%%  .%id%_%plotid%_GoLoss
%%
%% This is a MAIN COURSE subplot, and as such should alter the story context.
%%
%%
%%  Param1: The outdoors location of the target.
%%


Content
	name <New Enemy Before Raid>
	% desc <Get accosted by a new enemy NPC before the raid.>
	desc <襲撃の前に、新たな敵 NPC がちょっかいをかけてくる。>
	requires <*:CS_Plunder F:++ E:-->
	changes <E:++>

	% Element1 is the outdoors scene for the ship
	% Element2 is the encounter for the ship
	% Element3 is the enemy faction
	% Element4 is the initial encounter with the enemy
	% Element5 is the new enemy NPC
	Element2 <Prefab>
	Place2 <1>
	Element3 <Grab 2>
	Element4 <Prefab>
	Place4 <1>
	Element5 <NewNPC 3 -7>
	Place5 <4 (Enemies) sd enemy>

	% P%id%01 = Initialization Counter

	% At startup, activate the escort and level the enemy.
	update <if= P%id%01 0 P= %id%01 1  SetPlotStatus %plotid1% %id1%  SetEncounterActive %4%  NPCLevel %5% StoryDL>

	% Pass the hint-buck to the ship being plundered.
	HINT_%id% <:%id1%>

	% The narrative hooks for the BASE_PlunderShip encounter.
	%   "This is where the magic happens."
	.%id1%_%plotid1%_GoAttackShip  <>
	.%id1%_%plotid1%_GoBoardShip   <>
	.%id1%_%plotid1%_GoPlunderOK   <SetPlotStatus %plotid2% %id2%   WinSubPlot %plotid%   Trigger0 .%id%_%plotid%_GoWin>
	.%id1%_%plotid1%_GoPlunderBad  <SetPlotStatus %plotid3% %id3%   WinSubPlot %plotid%   Trigger0 .%id%_%plotid%_GoWin>
	.%id1%_%plotid1%_GoPlunderFail <LoseSubPlot %plotid%    Trigger0 .%id%_%plotid%_GoLoss>

	% SubPlot1 is the plundering core.
	% SubPlot2 is the good loot
	% SubPlot3 is whatever the PC gets for blowing up the ship
	SubPlot1 <*:CS_BASE_PlunderShip 1 2 3>
	SubPlot2 <*:CS_FilthyLucre_OK 3>
	SubPlot3 <*:CS_FilthyLucre_Bad 3>

	sub
		MetaScene 4 2
		%% An initial combat scene with the ship's escort. If combat is
		%% won, then the ship gets activated and the escort gets deactivated.
		% L1 = Encounter Over Counter
		% L2 = Initialization Counter
		% L3 = Attempt Counter
		MapWidth 50
		MapHeight 50

		Start <if= L2 0  L= 2 1   Alert 1 History 2 &SetEnemyNPC %5%  ForceChat %5%>
		nu1 <if= T1 0   Return>
		nu2 <if= T2 0   if= V1 0 V= 1 1   Alert 3   SetEncounterActive %2% Exit %1% SeekGate %2% if= L3 0 XPV 100  AddRenown 1>
		end <L+ 3 1 FreezeNPC %5% if# L1 0 SetEncounterInactive %4%>

		% Msg1 <Before you can get close to %name2% , you are intercepted by a team of mecha from %name3%. Their leader contacts you.>
		% Msg2 <Your raid was blocked by %name5%.>
		% Msg3 <You have defeated the escort. Now, you should be able to get close to %name2%.>
		Msg1 <%name2% へ接近しようとすると、%name3% のメック隊が迎撃に現れた。そのリーダーから通信が入った。>
		Msg2 <あなたの強襲は %name5% により阻止された。>
		Msg3 <護衛を撃破した。これで %name2% に接近できるはずだ。>

		sub
			team 1
			SetEnemy 2
			ParaX 5
			ParaY 5

			team 2
			name <Enemies>
			SetEnemy 1
			Deploy <if= PlotStatus %plotid% %id% SetSelfFaction %3%   WMecha 2 StoryDL 90>
			ParaX 45
			ParaY 45
		end

		Persona 5
		special <UNLISTED>
		greeting <EndChat Say %id%01 AddChat %id%01>
		*result%id%01 <*THEME_EXPO&Enemy na>
		% Msg%id%01 <I was told you'd be coming this way, \PC . In the name of %name3% you will not pass!>
		% Msg%id%01_1 <Surprised? We knew you'd be coming this way sooner or later... %name3% sent me to make sure you get no farther.>
		% Prompt%id%01 <Stop me if you can.>
		% Prompt%id%01_1 <Around you or through you, it doesn't matter to me.>
		% Prompt%id%01_2 <Yeah, try and stop me. I dare you.>
		Msg%id%01 <%JS_AGGがここを通ることは知らされていた%JV_ZO%JV_F_YO、\PC。%name3% の名において、ここは通さない%JV_F_WA！>
		Msg%id%01_1 <驚いた%JV_Q？ 遅かれ早かれここを通ることは分かっていた%JV_ZO……%JS2を確実にここで止めるために、%name3% が%JF2を遣わした%JV_N%JV_M_DAよ。>
		Prompt%id%01 <止められるものなら、やってみるといい%JV_F_WA。>
		Prompt%id%01_1 <迂回も突破も、%JF2には同じこと%JG_DAYO。>
		Prompt%id%01_2 <%JR_YES、せいぜい試してみるといい%JV_F_WA。>
	end
	inv
		STC CORE-ACTIVATABLE
		name <The S.S. %r%>
		name_I18N <宇宙船 %r% 号>

		STC CORE-ACTIVATABLE
		name <%name2%>
		name_I18N <%name2%>
	end


Content
	name <Police Confrontation>
	% desc <You can plunder a ship, but can you hold your booty?>
	desc <船を略奪することができるが、はたして戦利品を守ることはできるか？>
	requires <*:CS_Plunder (F:POLIC|F:POLIT) E:++>

	% Element1 is the outdoors scene for the ship
	% Element2 is the encounter for the ship
	% Element3 is a corporate faction for the ship; doesn't matter what
	% Element4 is the battle to get away
	% Element5 is the enemy NPC
	% Element6 is a secret about the NPC
	Element2 <Prefab>
	Place2 <1>
	Element3 <Faction Corporate>
	Element4 <Prefab>
	Place4 <1>
	Element5 <Grab 1>
	Place5 <4 (EnemyNPC) sd enemy>
	Element6 <Prefab>

	% P%id%01 = Initialization Counter
	% P%id%02 = Big Plunder (0) or Little Plunder (1)
	% P%id%03 = Have gained decimation

	% At startup activate the plunder, scale the NPC, and set the secret.
	update <if= P%id%01 0 P= %id%01 1  SetPlotStatus %plotid1% %id1%  NPCLevel %5% StoryDL  SetPlotStatus %plotid5% %id5%>

	% Pass the hint-buck to the ship being plundered.
	HINT_%id% <:%id1%>

	% The narrative hooks for the BASE_PlunderShip encounter.
	%   "This is where the magic happens."
	.%id1%_%plotid1%_GoAttackShip  <>
	.%id1%_%plotid1%_GoBoardShip   <>
	.%id1%_%plotid1%_GoPlunderOK   <Alert %id%01 Exit %4%>
	.%id1%_%plotid1%_GoPlunderBad  <P= %id%02 1 Alert %id%01 Exit %4%>
	.%id1%_%plotid1%_GoPlunderFail <LoseSubPlot %plotid%    Trigger0 .%id%_%plotid%_GoLoss>

	% The narrative hooks for the confrontation.
	.%id4%_%plotid4%_GoWin  <if= P%id%02 0 else .%id%_GoSmallWin  SetPlotStatus %plotid2% %id2%   WinSubPlot %plotid%   Trigger0 .%id%_%plotid%_GoWin>
	.%id%_GoSmallWin <SetPlotStatus %plotid3% %id3%   WinSubPlot %plotid%   Trigger0 .%id%_%plotid%_GoWin>
	.%id4%_%plotid4%_GoLoss <LoseSubPlot %plotid%    Trigger0 .%id%_%plotid%_GoLoss>

	% Other narrative hooks.
	.%id5%_%plotid5%_GoLearnSecret <if= PlotStatus %plotid6% 0 SetPlotStatus %plotid6% %id6%>
	.%id6%_%plotid6%_GoDecimation <P= %id%03 1>

	% Msg%id%01 <But before you can make a clean getaway, you are stopped by \FACTION &EnemyFac !>
	Msg%id%01 <しかし、円満に帰路に着こうとしたその瞬間、\FACTION &EnemyFac が行く手を塞いだ！>

	% SubPlot1 is the plundering core.
	% SubPlot2 is the good loot
	% SubPlot3 is whatever the PC gets for blowing up the ship
	% SubPlot4 is the Confrontation bit
	% SubPlot5 is the chance to learn about E5's raid...
	% SubPlot6 is the GainAdvantage against E5 once you do know
	SubPlot1 <*:CS_BASE_PlunderShip 1 2 3>
	SubPlot2 <*:CS_FilthyLucre_OK 3>
	SubPlot3 <*:CS_FilthyLucre_Bad 3>
	SubPlot4 <*:CS_MIX_Confrontation 5 1>
	SubPlot5 <*:CS_LearnSecretAboutNPC 6 5>
	SubPlot6 <*:CS_GainAdvantageVsNPC&Decimation 5>

	sub
		MetaScene 4 2
		%% After capturing the ship, you have to defend your take from
		%% the police.
		% L1 = Encounter Over Counter
		% L2 = Initialization Counter
		MapWidth 50
		MapHeight 50

		Start <if= L2 0  L= 2 1   Alert 1  History 2  SetPlotStatus %plotid4% %id4%  CancelSubPlot %plotid5%  CancelSubPlot %plotid6%>
		nu1 <if= T1 0   Return  if= V1 0  V= 1 1  Alert 3   Trigger0 .%id4%_%plotid4%_GoCombatLoss>
		nu2 <if= T2 0 if= T3 0   if= V1 0 V= 1 1   XPV 100  AddRenown 1   Trigger0 .%id4%_%plotid4%_GoCombatWin>
		nu3 <Goto nu2>

		% Msg1 <You'll never be able to cart off the loot with all those police in the way.>
		% Msg2 <%name5% tried to arrest you.>
		% Msg3 <You get away... but without any of your rightfully pilfered loot.>
		Msg1 <これだけの数の警察隊が展開していては、戦利品を無事に持ち帰るのは不可能だろう。>
		Msg2 <%name5% はあなたを逮捕しようとした。>
		Msg3 <逃亡には成功した……せっかく奪った戦利品をすべて置き去りにして。>

		sub
			team 1
			SetEnemy 2 3
			ParaX 5
			ParaY 5

			team 2
			name <Enemies>
			SetEnemy 1
			SetAlly 3
			Deploy <if= PlotStatus %plotid% %id% SetSelfFaction &EnemyFac   if= P%id%03 0 else GoSmallDeploy WMecha 2 StoryDL 60>
			GoSmallDeploy <WMecha 2 StoryDL 20>
			ParaX 45
			ParaY 45

			team 3
			name <EnemyNPC>
			SetEnemy 1
			SetAlly 2
			ParaX 45
			ParaY 45
		end
	end
	inv
		STC CORE-STATIONARY
		name <The S.S. %r%>
		name_I18N <宇宙船 %r% 号>

		Encounter
		name <Interceptors>
		name_I18N <迎撃部隊>
		% The people who want to steal the PC's booty.
		update <SetSelfX EncounterX %2% SetSelfY EncounterY %2% Goto GoHide>
		Use <  >
		Attack <  >

		Secret
		% Msg <%name5% has been setting a trap for you.>
		Msg <%name5% は%JS2に罠を仕掛けているらしい%JG_YO。>
	end

Content
	name <Criminal Confrontation>
	% desc <You can plunder a ship, but can you hold your booty?>
	desc <船を略奪することができるが、はたして戦利品を守ることはできるか？>
	%% Prototype: Mecha fight after ship; lose mission if lost
	requires <*:CS_Plunder F:CRIME E:++>

	% Element1 is the outdoors scene for the ship
	% Element2 is the encounter for the ship
	% Element3 is a corporate faction for the ship; doesn't matter what
	% Element4 is the battle to keep the booty
	% Element5 is the enemy NPC
	% Element6 is a secret about the NPC
	Element2 <Prefab>
	Place2 <1>
	Element3 <Faction Corporate>
	Element4 <Prefab>
	Place4 <1>
	Element5 <Grab 1>
	Place5 <4 (EnemyNPC) sd enemy>
	Element6 <Prefab>

	% P%id%01 = Initialization Counter
	% P%id%02 = Big Plunder (0) or Little Plunder (1)
	% P%id%03 = Have gained decimation

	% At startup activate the plunder, scale the NPC, and set the secret.
	update <if= P%id%01 0 P= %id%01 1  SetPlotStatus %plotid1% %id1%  NPCLevel %5% StoryDL  SetPlotStatus %plotid5% %id5%>

	% Pass the hint-buck to the ship being plundered.
	HINT_%id% <:%id1%>

	% The narrative hooks for the BASE_PlunderShip encounter.
	%   "This is where the magic happens."
	.%id1%_%plotid1%_GoAttackShip  <>
	.%id1%_%plotid1%_GoBoardShip   <>
	.%id1%_%plotid1%_GoPlunderOK   <Alert %id%01 Exit %4%>
	.%id1%_%plotid1%_GoPlunderBad  <P= %id%02 1 Alert %id%01 Exit %4%>
	.%id1%_%plotid1%_GoPlunderFail <LoseSubPlot %plotid%    Trigger0 .%id%_%plotid%_GoLoss>

	% The narrative hooks for the confrontation.
	.%id4%_%plotid4%_GoWin  <if= P%id%02 0 else .%id%_GoSmallWin  SetPlotStatus %plotid2% %id2%   WinSubPlot %plotid%   Trigger0 .%id%_%plotid%_GoWin>
	.%id%_GoSmallWin <SetPlotStatus %plotid3% %id3%   WinSubPlot %plotid%   Trigger0 .%id%_%plotid%_GoWin>
	.%id4%_%plotid4%_GoLoss <LoseSubPlot %plotid%    Trigger0 .%id%_%plotid%_GoLoss>

	% Other narrative hooks.
	.%id5%_%plotid5%_GoLearnSecret <if= PlotStatus %plotid6% 0 SetPlotStatus %plotid6% %id6%>
	.%id6%_%plotid6%_GoDecimation <P= %id%03 1>

	% Msg%id%01 <But before you can haul off your booty, you are attacked by rivals from \FACTION &EnemyFac !>
	Msg%id%01 <しかし、戦利品を抱えて逃げ帰ろうとしたその瞬間、\FACTION &EnemyFac が行く手を塞いだ！>

	% SubPlot1 is the plundering core.
	% SubPlot2 is the good loot
	% SubPlot3 is whatever the PC gets for blowing up the ship
	% SubPlot4 is the Confrontation bit
	% SubPlot5 is the chance to learn about E5's raid...
	% SubPlot6 is the GainAdvantage against E5 once you do know
	SubPlot1 <*:CS_BASE_PlunderShip 1 2 3>
	SubPlot2 <*:CS_FilthyLucre_OK 3>
	SubPlot3 <*:CS_FilthyLucre_Bad 3>
	SubPlot4 <*:CS_MIX_Confrontation 5 1>
	SubPlot5 <*:CS_LearnSecretAboutNPC 6 5>
	SubPlot6 <*:CS_GainAdvantageVsNPC&Decimation 5>

	sub
		MetaScene 4 2
		%% After capturing the ship, you have to defend your take from
		%% these other crooks.
		% L1 = Encounter Over Counter
		% L2 = Initialization Counter
		MapWidth 50
		MapHeight 50

		Start <if= L2 0  L= 2 1   Alert 1  History 2  SetPlotStatus %plotid4% %id4%  CancelSubPlot %plotid5%  CancelSubPlot %plotid6%>
		nu1 <if= T1 0   Return  if= V1 0  V= 1 1  Alert 3   Trigger0 .%id4%_%plotid4%_GoCombatLoss>
		nu2 <if= T2 0 if= T3 0   if= V1 0 V= 1 1   XPV 100  AddRenown 1   Trigger0 .%id4%_%plotid4%_GoCombatWin>
		nu3 <Goto nu2>

		% Msg1 <The enemy gang is being led by %name5%.>
		% Msg2 <%name5% attempted to steal your booty.>
		% Msg3 <%name5%'s gang steals all of your rightfully-pilfered loot.>
		Msg1 <敵の一味は %name5% に率いられている。>
		Msg2 <%name5% はあなたの戦利品を奪い取ろうとした。>
		Msg3 <%name5% の一味は、あなたの努力の成果をすべて奪っていった。>

		sub
			team 1
			SetEnemy 2 3
			ParaX 5
			ParaY 5

			team 2
			name <Enemies>
			SetEnemy 1
			SetAlly 3
			Deploy <if= PlotStatus %plotid% %id% SetSelfFaction &EnemyFac   if= P%id%03 0 else GoSmallDeploy WMecha 2 StoryDL 60>
			GoSmallDeploy <WMecha 2 StoryDL 20>
			ParaX 45
			ParaY 45

			team 3
			name <EnemyNPC>
			SetEnemy 1
			SetAlly 2
			ParaX 45
			ParaY 45
		end
	end
	inv
		STC CORE-STATIONARY
		name <The S.S. %r%>
		name_I18N <宇宙船 %r% 号>

		Encounter
		name <Interceptors>
		name_I18N <襲撃部隊>
		% The people who want to steal the PC's booty.
		update <SetSelfX EncounterX %2% SetSelfY EncounterY %2% Goto GoHide>
		Use <  >
		Attack <  >

		Secret
		% Msg <%name5% has been planning a raid against %name2%.>
		Msg <%name5% は %name2% への襲撃を企てている%JG_YO。>
	end


Content
	name <Raid Corporate Cruiser (L5PAT)>
	% desc <The ship you're raiding? Belongs to a corporation. Now they hate you.>
	desc <あなたが襲撃しているその船？ とある企業の所属だ。これで嫌われた。>
	%% Prototype: Mecha fight before ship; may re-attempt fight if lost
	requires <*:CS_Plunder F:-- (L:FCOMS|L:RISHI|L:CRIHN|L:MAQUI|L:BOHEM|L:REDMA) -P:PRIVA>
	changes <F:++>

	% Element1 is the outdoors scene for the ship
	% Element2 is the encounter for the ship
	% Element3 is the corporate faction
	% Element4 is the initial encounter with corporate guards
	Element2 <Prefab>
	Place2 <1>
	Element3 <Faction (MUGLE|COMET|HOELL) -PCFAC -Ally>
	Element4 <Prefab>
	Place4 <1>

	% P%id%01 = Initialization Counter

	% At startup, activate the escort.
	update <if= P%id%01 0 P= %id%01 1  SetPlotStatus %plotid1% %id1%  SetEncounterActive %4%>

	% Pass the hint-buck to the ship being plundered.
	HINT_%id% <:%id1%>

	% The narrative hooks for the BASE_PlunderShip encounter.
	%   "This is where the magic happens."
	.%id1%_%plotid1%_GoAttackShip  <>
	.%id1%_%plotid1%_GoBoardShip   <>
	.%id1%_%plotid1%_GoPlunderOK   <SetPlotStatus %plotid2% %id2%   WinSubPlot %plotid%   Trigger0 .%id%_%plotid%_GoWin>
	.%id1%_%plotid1%_GoPlunderBad  <SetPlotStatus %plotid3% %id3%   WinSubPlot %plotid%   Trigger0 .%id%_%plotid%_GoWin>
	.%id1%_%plotid1%_GoPlunderFail <LoseSubPlot %plotid%    Trigger0 .%id%_%plotid%_GoLoss>

	% SubPlot1 is the plundering core.
	% SubPlot2 is the good loot
	% SubPlot3 is whatever the PC gets for blowing up the ship
	SubPlot1 <*:CS_BASE_PlunderShip 1 2 3>
	SubPlot2 <*:CS_FilthyLucre_OK 3>
	SubPlot3 <*:CS_FilthyLucre_Bad 3>

	sub
		MetaScene 4 2
		%% An initial combat scene with the ship's escort. If combat is
		%% won, then the ship gets activated and the escort gets deactivated.
		% L1 = Encounter Over Counter
		% L2 = Initialization Counter
		MapWidth 50
		MapHeight 50

		Start <if= L2 0  L= 2 1   Alert 1 History 2 &SetEnemyFac %3%>
		nu1 <if= T1 0   Return>
		nu2 <if= T2 0   if= V1 0 V= 1 1   XPV 100  AddRenown 1   Alert 3   SetEncounterActive %2% Exit %1% SeekGate %2%>
		end <if# L1 0 SetEncounterInactive %4%>

		% Msg1 <Before you can get close to %name2% , you are intercepted by a team of mecha from %name3%. With any luck this corporate vessel will have all kinds of merchandise to steal.>
		% Msg2 <You attacked a ship belonging to %name3%.>
		% Msg3 <You have defeated the escort. Now, you should be able to get close to %name2%.>
		Msg1 <%name2% に接近を試みると、%name3% のメック隊に迎撃を受けた。運が良ければ、大企業の所有するあの船にはあらゆる種類のお宝が積まれているだろう。>
		Msg2 <%name3% に所属する船を襲撃した。>
		Msg3 <護衛部隊を撃破した。これで %name2% に接近できるはずだ。>

		sub
			team 1
			SetEnemy 2
			ParaX 5
			ParaY 5

			team 2
			name <Enemies>
			SetEnemy 1
			Deploy <if= PlotStatus %plotid% %id% SetSelfFaction %3%   WMecha 2 StoryDL 120>
			ParaX 45
			ParaY 45
		end

	end
	inv
		STC CORE-ACTIVATABLE
		name <The S.S. %r%>
		name_I18N <宇宙船 %r% 号>

		STC CORE-ACTIVATABLE
		name <%name2%>
		name_I18N <%name2%>
	end

Content
	name <Privateer's First Raid>
	% desc <The ship you're raiding? Belongs to an enemy faction.>
	desc <あなたが襲撃しているその船？ 敵勢力に所属している。>
	requires <*:CS_Plunder F:-- P:PRIVA>
	changes <F:++>

	% Element1 is the outdoors scene for the ship
	% Element2 is the encounter for the ship
	% Element3 is the corporate faction
	% Element4 is the initial encounter with corporate guards
	Element2 <Prefab>
	Place2 <1>
	Element3 <Faction (AEGIS|AEGSF|REDMA)>
	Element4 <Prefab>
	Place4 <1>

	% P%id%01 = Initialization Counter

	% At startup, activate the escort.
	update <if= P%id%01 0 P= %id%01 1  SetPlotStatus %plotid1% %id1%  SetEncounterActive %4%>

	% Pass the hint-buck to the ship being plundered.
	HINT_%id% <:%id1%>

	% The narrative hooks for the BASE_PlunderShip encounter.
	%   "This is where the magic happens."
	.%id1%_%plotid1%_GoAttackShip  <>
	.%id1%_%plotid1%_GoBoardShip   <>
	.%id1%_%plotid1%_GoPlunderOK   <SetPlotStatus %plotid2% %id2%   WinSubPlot %plotid%   Trigger0 .%id%_%plotid%_GoWin>
	.%id1%_%plotid1%_GoPlunderBad  <SetPlotStatus %plotid3% %id3%   WinSubPlot %plotid%   Trigger0 .%id%_%plotid%_GoWin>
	.%id1%_%plotid1%_GoPlunderFail <LoseSubPlot %plotid%    Trigger0 .%id%_%plotid%_GoLoss>

	% SubPlot1 is the plundering core.
	% SubPlot2 is the good loot
	% SubPlot3 is whatever the PC gets for blowing up the ship
	SubPlot1 <*:CS_BASE_PlunderShip 1 2 3>
	SubPlot2 <*:CS_FilthyLucre_OK 3>
	SubPlot3 <*:CS_FilthyLucre_Bad 3>

	sub
		MetaScene 4 2
		%% An initial combat scene with the ship's escort. If combat is
		%% won, then the ship gets activated and the escort gets deactivated.
		% L1 = Encounter Over Counter
		% L2 = Initialization Counter
		MapWidth 50
		MapHeight 50

		Start <if= L2 0  L= 2 1   Alert 1 History 2 &SetEnemyFac %3%>
		nu1 <if= T1 0   Return>
		nu2 <if= T2 0   if= V1 0 V= 1 1   XPV 100  AddRenown 1   Alert 3   SetEncounterActive %2% Exit %1% SeekGate %2%>
		end <if# L1 0 SetEncounterInactive %4%>

		% Msg1 <%name2% is being escorted by a team of mecha from %name3%. With any luck, they're carrying something worth stealing.>
		% Msg2 <You attacked a ship belonging to %name3%.>
		% Msg3 <You have defeated the escort. Now, you should be able to get close to %name2%.>
		Msg1 <%name2% は %name3% のメック隊により護衛されている。運が良ければ、彼らは何がしかの価値のあるものを運んでいるだろう。>
		Msg2 <%name3% に所属する船を襲撃した。>
		Msg3 <護衛部隊を撃破した。これで %name2% に接近できるはずだ。>

		sub
			team 1
			SetEnemy 2
			ParaX 5
			ParaY 5

			team 2
			name <Enemies>
			SetEnemy 1
			Deploy <if= PlotStatus %plotid% %id% SetSelfFaction %3%   WMecha 2 StoryDL 120>
			ParaX 45
			ParaY 45
		end

	end
	inv
		STC CORE-ACTIVATABLE
		name <The S.S. %r%>
		name_I18N <宇宙船 %r% 号>

		STC CORE-ACTIVATABLE
		name <%name2%>
		name_I18N <%name2%>
	end



%%
%% *CS_SeekPlunder
%%
%% The PC has to find someone and convince them to hand over some info leading
%% to a plunder event. For instance, an enemy base may be raided to steal their
%% info, or a thief might give the PC a corporate route plan in exchange for
%% some kind of service.
%%
%% This subplot needs a HINT_%id%, which will explain to the PC what needs to
%% be done to gain the info (or, at least, how to meet the person who will
%% explain).
%%

Content
	name <Moderately Easy Tip>
	% desc <Looking for easy money? It could be easier, but not by much.>
	desc <楽に稼ぎたい？ 楽ではあるが、そこまでの差は。>
	requires <*CS_SeekPlunder>

	% The PC can get the tip by performing a service for the NPC.

	% E1 is a local public scene
	% E2 is the NPC to pass the info
	% E3 is the datachip with the info
	% E4 is the environs scene for the robbery
	Element1 <Scene (Building|Meeting) Public !Near -7>
	Element2 <Character THIEF -Enemy !Okay -3 !XClude -2 !Near 1 NeverFail>
	NeverFail2 <Thief>
	Place2 </>
	Element3 <Prefab>
	Place3 <2>
	Element4 <Scene Environs !Near -7>

	%% HINT
	% HINT_%id% <%name2% knows how to score some easy money, but won't be giving the info away for free.>
	HINT_%id% <%name2% は楽な儲け方を知っている%JG_GA、タダでは教えてくれない%JV_DAROU。>

	% P%id%01 = Initialization Counter

	update <if= P%id%01 0 P= %id%01 1 MoveNPC %2% %1%>

	%% FAIL CONDITIONS:
	%% - E2 dies before PLUNDER activated
	end <if= PlotStatus %plotid1% 0 ifNPCDead %2% LoseEpisode>

	% Stealing the datachip will give the PC the info.
	Get%3% <if= PlotStatus %plotid1% 0  Alert %id%02  DeleteItem %3%  SetPlotStatus %plotid1% %id1%  SMemo %id%03  History %id%04>

	% Completing the PLUNDER ends this episode.
	.%id1%_%plotid1%_GoWin  <WinEpisode>
	.%id1%_%plotid1%_GoLoss <LoseEpisode>

	% Msg%id%02 <This datachip contains all the info needed to pull off a big heist. \HINT %id1%>
	% Msg%id%03 <You stole a datachip from %name2% leading to an easy target. \HINT %id1%>
	% Msg%id%04 <You stole a datachip from %name2%.>
	Msg%id%02 <このデータチップには、格好の盗みの対象についての情報が含まれていた。\HINT %id1%>
	DEBUG_MSG%id%02 <Datachip MCMP1>
	Msg%id%03 <%name2% から盗んだデータチップには、格好の獲物についての情報があった。\HINT %id1%>
	DEBUG_MSG%id%03 <Datachip MCMP1>
	Msg%id%04 <%name2% からデータチップを盗んだ。>
	DEBUG_MSG%id%04 <Datachip MCMP1>

	% SubPlot1 is the Plunder itself.
	% SubPlot2 is the mission the PC must complete.
	SubPlot1 <*:CS_Plunder 4>
	SubPlot2 <*:CS_MinorMission 2>

	sub
		Persona 2
		&Price <Reward StoryDL 500>
		greeting <if= PlotStatus %plotid% %id% else .%id%_GoChat if= PlotStatus %plotid1% 0 else .%id%_GoChat if= PlotStatus %plotid2% 0 else .%id%_GoCheckWin Goto .%id%_GoGreet>
		.%id%_GoCheckWin <ifSubPlotWon %plotid2% else .%id%_GoCheckLoss NewChat Say %id%01 Goto .%id%_GoGiveTip>
		.%id%_GoCheckLoss <ifSubPlotLost %plotid2% else .%id%_GoRemind NewChat Say %id%02 AddChat %id%01 AddChat %id%04 AddChat %id%03>
		*.%id%_GoRemind <*GenericMissionReminder>
		.%id%_GoGiveTip <SMemo %id%03 History %id%04 SetPlotStatus %plotid1% %id1%>
		.%id%_GoChat <RevertPersona>
		*.%id%_GoGreet <*IHaveInformation&AboutMoney .%id%_GoOffer na>
		.%id%_GoOffer <NewChat Say %id%05 AddChat %id%05 AddChat %id%02>
		result%id%01 <NewChat Say %id%06  Cash+ -&Price Goto .%id%_GoGiveTip>
		*result%id%02 <*YourLossSucker .%id%_GoLoseEpisode>
		.%id%_GoLoseEpisode <LoseEpisode>
		*result%id%03 <*HurryBackWithMoney>
		result%id%04 <Goto result%id%02>
		result%id%05 <Goto .%id2%_GoInit>
		% Msg%id%01 <Good going, \PC . I suppose I owe you this... \HINT %id1% These coords will take you where you're going.>
		% Msg%id%02 <You list the mission... but, if you want, the info can still be yours for a mere $ \VAL &Price .>
		% Msg%id%03 <%name2% told you about a good target. \HINT %id1%>
		% Msg%id%04 <%name2% told you about a good target.>
		% Msg%id%05 <I've got some transport logs which should let you pull off an easy heist. I'm willing to share them with you, but first you've got to do something for me...>
		% Msg%id%06 <Thanks... with this money, I can hire someone better to do that mission you screwed up. \HINT %id1% This datachip has all the info you need.>
		% Prompt%id%01 <You're a thief, \CHATNPC . [Give Money]>
		% CPrompt%id%01 <ifG PC$ &Price Accept>
		% Prompt%id%02 <Sorry, I don't do that kind of work.>
		% Prompt%id%03 <I'll be back for it later.>
		% Prompt%id%04 <No thanks, I've lost interest.>
		% Prompt%id%05 <What kind of mission are you talking about?>
		Msg%id%01 <いい調子%JV_M_DA%JV_NA、\PC。これなら仕方ない%JV_F_WA…… \HINT %id1% この座標に向かえば、目的の場所に辿り着ける%JV_DAROU。>
		Msg%id%02 <仕事に失敗した%JV_F_NO%JV_F_NE%JV_KA_Q……それでも諦めないなら、たったの $ \VAL &Price で情報を売ってやる%JV_F_WA%JV_YO%JV_SIL。>
		Msg%id%03 <%name2% から格好の獲物についての情報を得た。\HINT %id1%>
		Msg%id%04 <%name2% から格好の獲物についての情報を得た。>
		Msg%id%05 <楽な獲物を探し当てるのに使える、流通網の記録を入手した%JG_NDA。%JS2にも教えてやって構わない%JG_GA、その前に少し頼まれ事をしてほしい%JV_F_WA%JV_NA……。>
		Msg%id%06 <どうも……この金で%JS2の失敗の尻拭いをする人間が雇える%JG_YO。\HINT %id1% 必要な情報はこのデータチップに全部入ってる%JV_ZO%JV_F_YO。>
		DEBUG_MSG%id%06 <Datachip MCMP1>
		Prompt%id%01 <%JS2も盗っ人%JV_M_DA%JV_NA、\CHATNPC。[金を渡す]>
		CPrompt%id%01 <ifG PC$ &Price Accept>
		Prompt%id%02 <悪い%JG_GA、そういう仕事はしない%JG_NDA。>
		Prompt%id%03 <また後で戻ってくる%JV_F_WA。>
		Prompt%id%04 <%JR_NO、もう興味は無くなった%JG_YO。>
		Prompt%id%05 <どんな話%JV_M_DA%JV_SIL？>
	end
	inv
		Treasure
		name <Datachip>
		name_I18N <データチップ>
		DEBUG_NAME <Datachip MCMP1>
		SDL_PORTRAIT <item_datakey.png>
	end

Content
	name <Easy Tip>
	% desc <Looking for easy money? Can't get easier than this.>
	desc <楽に稼ぎたい？ これ以上に楽なものはない。>
	requires <*CS_SeekPlunder ~!Ne>

	% The PC will get a call from someone about a fast cash opportunity.
	% Then they can buy the info, steal it, or maybe even talk it out.

	% E1 is a local public scene
	% E2 is the NPC to pass the info
	% E3 is the datachip with the info
	% E4 is the environs scene for the robbery
	Element1 <Scene (Building|Meeting) Public !Near -7>
	Element2 <Character THIEF -Enemy !Okay -3 !XClude -2 !Near 1 NeverFail>
	NeverFail2 <Thief>
	Place2 </>
	Element3 <Prefab>
	Place3 <2>
	Element4 <Scene Environs !Near -7>

	%% HINT
	% HINT_%id% <%name2% will be selling some valuable info to the higest bidder.>
	HINT_%id% <%name2% は何か価値のある情報を売っているらしい%JG_YO。>

	% P%id%01 = Initialization Counter

	update <if= P%id%01 0 P= %id%01 1 MoveNPC %2% %1%>

	%% FAIL CONDITIONS:
	%% - E2 dies before PLUNDER activated
	end <if= PlotStatus %plotid1% 0 ifNPCDead %2% LoseEpisode>

	% Stealing the datachip will give the PC the info.
	Get%3% <if= PlotStatus %plotid1% 0  Alert %id%02  DeleteItem %3%  SetPlotStatus %plotid1% %id1%  SMemo %id%03  History %id%04>

	% Completing the PLUNDER ends this episode.
	.%id1%_%plotid1%_GoWin  <WinEpisode>
	.%id1%_%plotid1%_GoLoss <LoseEpisode>

	% Msg%id%02 <This datachip contains all the info needed to pull off a big heist. \HINT %id1%>
	% Msg%id%03 <You stole a datachip from %name2% leading to an easy target. \HINT %id1%>
	% Msg%id%04 <You stole a datachip from %name2%.>
	Msg%id%02 <このデータチップには、格好の盗みの対象についての情報が含まれていた。\HINT %id1%>
	DEBUG_MSG%id%02 <Datachip MCMP2>
	Msg%id%03 <%name2% から盗んだデータチップには、格好の獲物についての情報があった。\HINT %id1%>
	DEBUG_MSG%id%03 <Datachip MCMP2>
	Msg%id%04 <%name2% からデータチップを盗んだ。>
	DEBUG_MSG%id%04 <Datachip MCMP2>

	% SubPlot1 is the Plunder itself. Nice and simple.
	SubPlot1 <*:CS_Plunder 4>

	sub
		Persona 2
		&Price <Reward StoryDL 300>
		greeting <if= PlotStatus %plotid% %id% else .%id%_GoChat if= PlotStatus %plotid1% 0 else .%id%_GoChat Goto .%id%_GoGreet>
		.%id%_GoChat <RevertPersona>
		*.%id%_GoGreet <*IHaveInformation&AboutMoney .%id%_GoOffer na>
		.%id%_GoOffer <NewChat Say %id%01 AddChat %id%01 AddChat %id%02 AddChat %id%03>
		result%id%01 <NewChat Say %id%02 SMemo %id%03 History %id%04 Cash+ -&Price SetPlotStatus %plotid1% %id1%>
		*result%id%02 <*YourLossSucker .%id%_GoLoseEpisode>
		.%id%_GoLoseEpisode <LoseEpisode>
		*result%id%03 <*HurryBackWithMoney>
		% Msg%id%01 <I've got some inside info on a ripe target for a heist... if you want it, it's just $ \VAL &Price .>
		% Msg%id%02 <No worries, this is a smart investment... unless you manage to screw up. \HINT %id1% This datachip should tell you everything you need to know.>
		% Msg%id%03 <%name2% told you about a good target. \HINT %id1%>
		% Msg%id%04 <%name2% told you about a good target.>
		% Prompt%id%01 <This better be worth it. [Give Money]>
		% CPrompt%id%01 <ifG PC$ &Price Accept>
		% Prompt%id%02 <Sorry, I don't do that kind of work.>
		% Prompt%id%03 <I'll be back for it later.>
		Msg%id%01 <盗り甲斐のある楽な獲物についての内部情報がある%JG_NDA……もし興味があるなら、値段はたったの $ \VAL &Price %JG_DAYO。>
		Msg%id%02 <心配は要らない%JV_F_WA、これは賢い投資%JG_DAYO%JV_SIL_R自分でヘマさえしなければ%JV_NA。\HINT %id1% このデータチップに必要な情報は全部入ってる%JG_YO。>
		DEBUG_MSG%id%02 <Datachip MCMP2>
		Msg%id%03 <%name2% から格好の獲物についての情報を得た。\HINT %id1%>
		Msg%id%04 <%name2% から格好の獲物についての情報を得た。>
		Prompt%id%01 <無駄金にならないといい%JG_GA%JV_NA。[金を渡す]>
		CPrompt%id%01 <ifG PC$ &Price Accept>
		Prompt%id%02 <悪い%JG_GA、そういう仕事はしない%JG_NDA。>
		Prompt%id%03 <また後で戻ってくる%JV_F_WA。>
	end
	inv
		Treasure
		name <Datachip>
		name_I18N <データチップ>
		DEBUG_NAME <Datachip MCMP2>
		SDL_PORTRAIT <item_datakey.png>
	end


%%
%% *:CS_FilthyLucre_OK Content
%% *:CS_FilthyLucre_Bad Content
%%
%% The PC has just robbed someone. Give them their filthy lucre! Just set the
%% plotstatus to give the loot and cancel this subplot.
%%
%% Note that *CORE_EMO_ should get better loot than other plunder missions.
%%
%%  Param1: The faction wot is being robbed.
%%

Content
	name <Easy Nothing But Money>
	requires <*:CS_FilthyLucre_OK *CORE_EMO_>

	update <Alert %id%01  CashPrize Reward StoryDL 1500  CancelSubPlot %plotid%>
	% Msg%id%01 <You raid the cargo hold, finding valuables worth $ \VAL Reward StoryDL 1500 .>
	Msg%id%01 <貨物庫を漁って回り、$ \VAL Reward StoryDL 1500 の価値のある物品を手に入れた。>

Content
	name <Difficult Money, Apparently>
	requires <*:CS_FilthyLucre_OK -*CORE_EMO_>

	update <Alert %id%01  CashPrize Reward StoryDL 750  CancelSubPlot %plotid%>
	% Msg%id%01 <You raid the cargo hold, finding valuables worth $ \VAL Reward StoryDL 1500 .>
	Msg%id%01 <貨物庫を漁って回り、$ \VAL Reward StoryDL 1500 の価値のある物品を手に入れた。>

Content
	name <Nothing But Not Much Cash>
	requires <*:CS_FilthyLucre_Bad>

	update <Alert %id%01  CashPrize Reward StoryDL 100  CancelSubPlot %plotid%>
	% Msg%id%01 <There isn't much left in the cargo hold. You find valuables worth $ \VAL Reward StoryDL 1500 .>
	Msg%id%01 <貨物庫にはほとんど何も残っていなかった。$ \VAL Reward StoryDL 1500 の価値のある物品を手に入れた。>

