%%
%% *Q_CHALLENGER_SUBQUEST
%%	Contains a subquest activated after defeating a mecha arena challenger.
%%	This can be an extravagant new adventure, or a pithy closing sequence.
%%
%%	The ID for this subquest must be set by the parent quest.
%%
%%  PARAM1: The Challenger
%%

Content
	name <Military Trainer>
	% The challenger can train the PC in mecha combat skills
	requires <*Q_CHALLENGER_SUBQUEST 1:MILIT -!Ne -!Lo>

	start <ifNPCDead %1% LoseSubPlot %plotid%>

	% E1 is the challenger
sub
	Persona 1
	% V%id%01 = Have accepted offer
	greeting <if# v%id%01 1 else .%id%_GoSchool if= PlotStatus %plotid% %id% else %pop% WinSubPlot %plotid%  ifG React 0 else .%id%_GoFail NewChat Say %id%01 AddChat %id%01 AddChat %id%02>
	.%id%_GoSchool <ifG React 0 else .%id%_GoChat NewChat Say %id%02 AddChat %id%03 AddChat %id%04>
	*.%id%_GoFail <*IConcedeDefeat&Battle>
	.%id%_GoChat <NewChat SayAnything>
	*.%id%_GoBye <*GoodBye>
	.%id%_Skills <1 2 3>
	result%id%01 <EndChat V= %id%01 1 Say %id%03 History %id%04 School .%id%_Skills Goto .%id%_GoBye>
	result%id%02 <EndChat Say %id%05 AddReact -10>
	result%id%03 <EndChat Say %id%06 School .%id%_Skills Goto .%id%_GoBye>
	result%id%04 <NewChat Say %id%07>
	% Msg%id%01 <You did really well out there, but if you don't mind me saying there are still a few things for you to learn. How'd you like for me to teach you some things about mecha combat?>
	% Msg%id%02 <Hello soldier. Are you ready to begin training?>
	% Msg%id%03 <That's what I wanted to hear. If you want to be a great pilot, you're going to have to train relentlessly. Let's get started right away.>
	% Msg%id%04 <%name1% offered to train you in mecha combat.>
	% Msg%id%05 <No offense intended, you did beat me after all. The only question is whether or not you're going to beat the next guy.>
	% Msg%id%06 <Let's get to it, then! Hup-to!>
	% Msg%id%07 <You'll never make it in the army with that kind of attitude. You seem to be doing pretty good as a cavalier, though...>
	% Prompt%id%01 <I'd like that. Thanks>
	% Prompt%id%02 <Learn from you? What, is that a joke?>
	% Prompt%id%03 <Yes sir!>
	% Prompt%id%04 <Not today, I'm afraid.>
	Msg%id%01 <本当に大した腕だった%JV_F_WA……でもあえて言わせてもらえば、%JS2にはまだ上達の余地がある。%JS2さえよかったら、メックでの戦い方について%JF2から少し学んでいかない%JV_KA_Q？>
	Msg%id%02 <ようこそ兵士殿。訓練の覚悟はできているか？>
	Msg%id%03 <その返事が聞きたかった%JV_F_NO。優れたパイロットになりたかったら、死ぬ気で訓練に励まないといけない。では、すぐに始め%JV_YOU！>
	Msg%id%04 <%name1% からメック戦闘の訓練に誘われた。>
	Msg%id%05 <そんなつもりじゃない%JG_NDA、%JF2は%JS2を負かしたんだから。言いたいのは、次の相手にも同じように勝てるのかっていう話%JG_DAYO。>
	Msg%id%06 <では始め%JV_YOU！ ハッ、ホ！>
	Msg%id%07 <そんなことではどこの軍にも入れてもらえない%JV_ZO%JV_F_YO！ ……メック乗りとしてならとても順調%JV_DAROU%JG_GA%JV_NA。>
	Prompt%id%01 <ありがとう、ぜひ。>
	Prompt%id%02 <%JS2から学ぶ？ それは何かの冗談%JV_KA_Q？>
	Prompt%id%03 <イェッサー！>
	Prompt%id%04 <悪いけど今日は無理%JG_DA。>
end

Content
	name <Friendship>
	% The challenger will likely become friends with the PC.
	requires <*Q_CHALLENGER_SUBQUEST>
	special <REUSABLE>

	start <ifNPCDead %1% LoseSubPlot %plotid%>

	% E1 is the challenger
sub
	Persona 1
	greeting <if= PlotStatus %plotid% %id% else %pop% WinSubPlot %plotid% ifG React d20 else .%id%_GoFail PCFriend ChatNPCID NewChat Say %id%01>
	*.%id%_GoFail <*IConcedeDefeat&Battle>
	% Msg%id%01 <That was a great battle. Maybe we'll see each other again, next time away from the battlefield.>
	% Msg%id%01_1 <I have to admit, you're a formidible warrior. Maybe some time later we can get together again and swap stories. I'd like to do that very much.>
	% CMsg%id%01_1 <ifNPCSociable Accept>
	% Msg%id%01_2 <I like you. Let's get together again someday.>
	% CMsg%id%01_2 <ifNPCShy Accept>
	% Msg%id%01_3 <I admit it, you're way better than me. Let's get together again later and swap stories.>
	% CMsg%id%01_3 <ifNPCEasygoing Accept>
	% Msg%id%01_4 <It's very rare for me to meet someone I can call an equal. I feel that there's a bond between the two of us.>
	% CMsg%id%01_4 <ifNPCPassionate Accept>
	% Msg%id%01_5 <Wow, you are an excellent pilot. I want to invite you and your team out for dinner sometime.>
	% CMsg%id%01_5 <ifNPCCheerful Accept>
	% Msg%id%01_6 <As much as I hate to admit it, you beat me... but let's not have any hard feelings over any of that. I'd like to meet with you again.>
	% CMsg%id%01_6 <ifNPCMelancholy Accept>
	Msg%id%01 <とてもいい戦いだった%JG_YO。次は、戦場からは離れた場所で会ってみたいもの%JG_DANE。>
	Msg%id%01_1 <%JS2のことは手練だと認めるしかない%JV_F_WA%JV_NA。また今度、ゆっくり話でもしない%JV_KA_Q？ よかったら、ぜひ。>
	CMsg%id%01_1 <ifNPCSociable Accept>
	Msg%id%01_2 <気に入ったよ……%JS2のこと。またいつか会%JV_OU……。>
	CMsg%id%01_2 <ifNPCShy Accept>
	Msg%id%01_3 <参った%JG_SY%JV_SIL_R完全に%JF2より上だね。また今度、ゆっくり話でもし%JV_YOU。>
	CMsg%id%01_3 <ifNPCEasygoing Accept>
	Msg%id%01_4 <この%JF2が対等と呼べる相手に会うなんて、滅多に無いこと%JG_DAYO%JV_SIL_R。%JS2とはこれからも縁がありそう%JG_DANE。>
	CMsg%id%01_4 <ifNPCPassionate Accept>
	Msg%id%01_5 <ホントに凄いパイロット%JG_TY%JV_SIL_R。今度、%JS2と%JS2の友人方を招いて食事でもしたいね。>
	CMsg%id%01_5 <ifNPCCheerful Accept>
	Msg%id%01_6 <ものすごく認めたくないけど、%JS2の方が上%JV_M_DA%JV_NA……でも恨みつらみは無しにしよう、%JS2とはまた会いたい%JV_F_WA……。>
	CMsg%id%01_6 <ifNPCMelancholy Accept>
end

Content
	name <Mentor/Ally>
	% The challenger will likely become either a mentor or ally to the PC,
	% depending on their relative ages.
	requires <*Q_CHALLENGER_SUBQUEST (1:ADVEN|1:MILIT) -!Ne -!Lo>

	start <ifNPCDead %1% LoseSubPlot %plotid%>

	% E1 is the challenger
sub
	Persona 1
	% V%id%01 = Have become trainer
	greeting <if# v%id%01 1 else .%id%_GoSchool if= PlotStatus %plotid% %id% else %pop% WinSubPlot %plotid%  ifG React d30 else .%id%_GoFail ifG ChatNPCDAge PCDAge else .%id%_GoMakeAlly if= d2 1 else .%id%_GoMakeAlly V= %id%01 1 NewChat Say %id%02 History %id%03 PCFriend %1% AddChat %id%01>
	.%id%_GoSchool <NewChat Say %id%04 AddChat %id%01>
	.%id%_GoMakeAlly <PCAlly %1% NewChat Say %id%01>
	*.%id%_GoFail <*IConcedeDefeat&Battle>

	result%id%01 <EndChat Say %id%05 School .%id%_Skills Goto .%id%_GoBye>
	.%id%_Skills <1 2 3 4 5 6 11 15 16>
	*.%id%_GoBye <*GoodBye>

	% Msg%id%01 <You're a great pilot. The next time we meet on the battlefield, I plan to be on your side.>
	% Msg%id%01_1 <>
	% CMsg%id%01_1 <ifNPCSociable Accept>
	% Msg%id%01_2 <>
	% CMsg%id%01_2 <ifNPCShy Accept>
	% Msg%id%01_3 <>
	% CMsg%id%01_3 <ifNPCEasygoing Accept>
	% Msg%id%01_4 <>
	% CMsg%id%01_4 <ifNPCPassionate Accept>
	% Msg%id%01_5 <>
	% CMsg%id%01_5 <ifNPCCheerful Accept>
	% Msg%id%01_6 <>
	% CMsg%id%01_6 <ifNPCMelancholy Accept>
	Msg%id%01 <%JS2は優れたパイロット%JG_DANE。次に戦場で会う時は、%JS2の側で戦う%JG_YO。>
	Msg%id%01_1 <>
	CMsg%id%01_1 <ifNPCSociable Accept>
	Msg%id%01_2 <>
	CMsg%id%01_2 <ifNPCShy Accept>
	Msg%id%01_3 <>
	CMsg%id%01_3 <ifNPCEasygoing Accept>
	Msg%id%01_4 <>
	CMsg%id%01_4 <ifNPCPassionate Accept>
	Msg%id%01_5 <>
	CMsg%id%01_5 <ifNPCCheerful Accept>
	Msg%id%01_6 <>
	CMsg%id%01_6 <ifNPCMelancholy Accept>

	% Msg%id%02 <You did pretty well out there, but if you don't mind me saying so, there are still a couple of things you could learn. I can teach you a few new tricks.>
	% Msg%id%02_1 <>
	% CMsg%id%02_1 <ifNPCSociable Accept>
	% Msg%id%02_2 <>
	% CMsg%id%02_2 <ifNPCShy Accept>
	% Msg%id%02_3 <>
	% CMsg%id%02_3 <ifNPCEasygoing Accept>
	% Msg%id%02_4 <>
	% CMsg%id%02_4 <ifNPCPassionate Accept>
	% Msg%id%02_5 <>
	% CMsg%id%02_5 <ifNPCCheerful Accept>
	% Msg%id%02_6 <>
	% CMsg%id%02_6 <ifNPCMelancholy Accept>
	% Msg%id%03 <%name1% in \SCENE RootSceneID offered to become your mentor.>
	Msg%id%02 <本当に大した腕だった%JG_GA、あえて言わせてもらえば%JS2にはまだいくつか学べることがある%JG_YO。ちょっとしたトリック、習っていく気はある%JG_KANA？>
	Msg%id%02_1 <>
	CMsg%id%02_1 <ifNPCSociable Accept>
	Msg%id%02_2 <>
	CMsg%id%02_2 <ifNPCShy Accept>
	Msg%id%02_3 <>
	CMsg%id%02_3 <ifNPCEasygoing Accept>
	Msg%id%02_4 <>
	CMsg%id%02_4 <ifNPCPassionate Accept>
	Msg%id%02_5 <>
	CMsg%id%02_5 <ifNPCCheerful Accept>
	Msg%id%02_6 <>
	CMsg%id%02_6 <ifNPCMelancholy Accept>
	Msg%id%03 <\SCENE RootSceneID の %name1% が、メック操縦の教官となることを申し出た。>

	% Msg%id%04 <Hello, \PC . I hope that your adventure's been going well.>
	% Msg%id%04_1 <>
	% CMsg%id%04_1 <ifNPCSociable Accept>
	% Msg%id%04_2 <>
	% CMsg%id%04_2 <ifNPCShy Accept>
	% Msg%id%04_3 <>
	% CMsg%id%04_3 <ifNPCEasygoing Accept>
	% Msg%id%04_4 <>
	% CMsg%id%04_4 <ifNPCPassionate Accept>
	% Msg%id%04_5 <>
	% CMsg%id%04_5 <ifNPCCheerful Accept>
	% Msg%id%04_6 <>
	% CMsg%id%04_6 <ifNPCMelancholy Accept>
	Msg%id%04 <ああ、\PC。稼業は順調%JG_KANA？>
	Msg%id%04_1 <>
	CMsg%id%04_1 <ifNPCSociable Accept>
	Msg%id%04_2 <>
	CMsg%id%04_2 <ifNPCShy Accept>
	Msg%id%04_3 <>
	CMsg%id%04_3 <ifNPCEasygoing Accept>
	Msg%id%04_4 <>
	CMsg%id%04_4 <ifNPCPassionate Accept>
	Msg%id%04_5 <>
	CMsg%id%04_5 <ifNPCCheerful Accept>
	Msg%id%04_6 <>
	CMsg%id%04_6 <ifNPCMelancholy Accept>

	% Msg%id%05 <I'll show you some of the things that have helped me in the arena.>
	% Msg%id%05_1 <>
	% CMsg%id%05_1 <ifNPCSociable Accept>
	% Msg%id%05_2 <>
	% CMsg%id%05_2 <ifNPCShy Accept>
	% Msg%id%05_3 <>
	% CMsg%id%05_3 <ifNPCEasygoing Accept>
	% Msg%id%05_4 <>
	% CMsg%id%05_4 <ifNPCPassionate Accept>
	% Msg%id%05_5 <>
	% CMsg%id%05_5 <ifNPCCheerful Accept>
	% Msg%id%05_6 <>
	% CMsg%id%05_6 <ifNPCMelancholy Accept>
	Msg%id%05 <アリーナで役立ったことをいくつか教えてあげる%JG_YO。>
	Msg%id%05_1 <>
	CMsg%id%05_1 <ifNPCSociable Accept>
	Msg%id%05_2 <>
	CMsg%id%05_2 <ifNPCShy Accept>
	Msg%id%05_3 <>
	CMsg%id%05_3 <ifNPCEasygoing Accept>
	Msg%id%05_4 <>
	CMsg%id%05_4 <ifNPCPassionate Accept>
	Msg%id%05_5 <>
	CMsg%id%05_5 <ifNPCCheerful Accept>
	Msg%id%05_6 <>
	CMsg%id%05_6 <ifNPCMelancholy Accept>

	% Prompt%id%01 <I'd like to train.>
	% Prompt%id%01_1 <Let's do some training now.>
	% Prompt%id%01_2 <I'd like to study now.>
	Prompt%id%01 <訓練したい。>
	Prompt%id%01_1 <少し訓練し%JV_YOU。>
	Prompt%id%01_2 <勉強しに来た%JV_F_WA。>

end

