%%
%% *CS_WinDuelVs Content
%%
%%
%% The PC has won a duel against the NPC.
%%
%% The parent plot sets the plot status to this layer's ID when ready.
%%
%% Param1: The Challenger
%%

Content
	name <Job Hint>
	desc <The NPC will suggest that the PC look for a mission somewhere.>
	requires <*CS_WinDuelVs>

	% E1 is the NPC.
	% E2 is a public scene where jobs are apparently plentiful
	Element2 <Scene Public !Near -7 !Okay 1 !Okay -3 !XClude -2>

	start <ifNPCDead %1% SMemo 0 WinComp 0 .%id%_loss>
	.%id%_loss <+T-- +F-->

	sub
		Persona 1
		greeting <if= PlotStatus %plotid% %id% else %pop% NewChat Say %id%01 StoryNote %id%02 NTBWinComp %2% .%id%_next>
		.%id%_next <+Tgs +Fmi>
		Msg%id%01 <Good match, \PC . Because you beat me I'll let you in on a little secret- if you're looking for work, you should really go check out %name2%.>
		Msg%id%02 <%name1% suggested that you go look for work in %name2%.>
	end

Content
	name <You should go see MILIT...>
	desc <The NPC will reccomend that the PC go ask someone about a job.>
	requires <*CS_WinDuelVs -L:ENEMY -C:THIEF>

	% E1 is the NPC.
	% E2 is the person to see about the job
	% E3 is a public scene for the meeting.
	Element2 <Character "MILIT" !Near -7 !Ally -7 !Okay -3 !Okay 1>
	Element3 <Scene Building Public !Near -7 !Ally 2>

	start <ifNPCDead %1% SMemo 0 WinComp 0 .%id%_loss>
	.%id%_loss <+T-- +F-->

	sub
		Persona 1
		greeting <if= PlotStatus %plotid% %id% else %pop% ifNPCOK %2% else .%id%_GoE2Died NewChat Say %id%01 SMemo %id%02 &SetTargetNPC %2% WinComp %3% .%id%_win>
		.%id%_GoE2Died <NewChat Say %id%03 SMemo 0 WinComp 0 .%id%_draw>
		.%id%_win <+Tgt +Fmi>
		.%id%_draw <+T-- +F-->
		Msg%id%01 <You beat me. You should go talk with %name2% in %name3%; I hear that \SPR %2% 's looking for a good pilot.>
		Msg%id%01_1 <You won our duel. A fighter with your talents could really go places... I hear that %name2% is looking for a pilot over at %name3%. You should go talk with \OPR %2% .>
		CMsg%id%01_1 <ifNPCSociable Accept>
		Msg%id%01_2 <Good match. I've got a tip for you- %name2% in %name3% is looking for a mecha pilot. You should definitely check it out.>
		CMsg%id%01_2 <ifNPCShy Accept>
		Msg%id%01_3 <You did half decent out there, I thought. If you're interested I know of a job opening. %name2% in %name3% needs a pilot. Tell \OPR %2% I sent you.>
		CMsg%id%01_3 <ifNPCEasygoing Accept>
		Msg%id%01_4 <You've shown me the true art of fighting. I was going to go to %name3% and do a mission for %name2% , but you should go instead. You've proven yourself the better pilot.>
		CMsg%id%01_4 <ifNPCPassionate Accept>
		Msg%id%01_5 <That was a great fight. I've got a tip for you- %name2% in %name3% is looking for a pilot. You've proven yourself capable, I think you could get the job.>
		CMsg%id%01_5 <ifNPCCheerful Accept>
		Msg%id%01_6 <I can't believe I lost to you... I was supposed to run a mission for %name2% at %name3% today, but now that my mecha's in the shop I can't. If you wanted you could go take the mission yourself.>
		CMsg%id%01_6 <ifNPCMelancholy Accept>
		Msg%id%02 <%name1% reccomended that you go ask %name2% in %name3% for a mission.>
		Msg%id%03 <You won the duel. Congratulations.>
	end

%%
%% *CS_LoseDuelVs Content
%%
%%
%% The PC has lost a duel against the NPC.
%%
%% The parent plot sets the plot status to this layer's ID when ready.
%%
%% Param1: The Challenger
%%

Content
	name <Job Advice>
	desc <The NPC will suggest the PC go ask someone for a job.>
	requires <*CS_LoseDuelVs ~1:FRIEND ~1:PDASS ~P:-- -L:ENEMY>

	% E1 is the NPC.
	% E2 is the person to ask about the job.
	% E3 is a scene for the meeting.
	Element2 <Character !Ally -7 !Near -7>
	Element3 <Scene Building Public !Near -7 !Okay 2>

	start <if= PlotStatus %plotid% %id% else %pop% ifNPCDead %1% SMemo 0 LoseComp 0 .%id%_loss>
	.%id%_loss <+T-- +F-->

	sub
		Persona 1
		greeting <if= PlotStatus %plotid% %id% else %pop% ifNPCOK %2% else .%id%_GoTrivial NewChat Say %id%01 SMemo %id%02 History %id%03 &SetTargetNPC %2% LoseComp %3% .%id%_changes>
		.%id%_GoTrivial <NewChat Say %id%04 SMemo 0 NTBLoseComp 0 .%id%_loss>
		.%id%_changes <+Tgt +Fmi>
		.%id%_loss <+T-- +F-->
		Msg%id%01 <Hey, don't be disappointed about losing, you tried your best. Here's something that might cheer you up- I hear that %name2% is looking to hire a cavalier. If you get over to %name3% right away maybe you could get the job.>
		Msg%id%02 <After beating you in a duel, %name1% reccomended that you ask %name2% at %name3% for a job.>
		Msg%id%03 <%name1% reccomended that you ask %name2% for a job.>
		Msg%id%04 <You lost the duel. Good for me.>
	end

Content
	name <Ha ha!>
	desc <The NPC will just chide the PC, then end the plot.>
	requires <*CS_LoseDuelVs>

	% E1 is the NPC.

	start <if= PlotStatus %plotid% %id% else %pop% ifNPCDead %1% SMemo 0 LoseComp 0 .%id%_loss>
	.%id%_loss <+T-- +F-->

	sub
		Persona 1
		greeting <if= PlotStatus %plotid% %id% else %pop% NewChat Say %id%01 SMemo 0 NTBLoseComp 0 .%id%_changes>
		.%id%_changes <+T-- +F-->
		Msg%id%01 <You lost the duel. Good for me.>
	end

