# Copyright (c) 2014-2015 by Michael Zahniser
#
# Endless Sky is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later version.
#
# Endless Sky is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

mission "Kestrel Testing"
	name "戦闘艦の試験"
	description "<waypoints>星系へ行き、タラゼド社が試験している試作戦闘艦と戦って無力化せよ。船を破壊してはならない。さもないと、あなたは報酬とそれを購入する機会を失うことだろう。"
	source "Wayfarer"
	waypoint "Umbral"
	# The Kestrel is a secret that can only be unlocked after completing the rest of the game. Combat rating is used to track gameplay progression.
	# After finding the Kestrel once, the threshold is lowered so players can use the ship during the human campaign on a later playthrough.
	# Any requests to reduce the requirements will be rejected.
	to offer
		or
			"combat rating" > 6000
			and
				"combat rating" > 2000
				has "global: unlocked kestrel"
	
	on offer
		conversation
			"宇宙港のバーにいると、ひとりの男があなたに気がついた。「<fullname> !」 と、その男が呼びかけてくる。「会えて光栄です。戦いにおけるあなたの功績はよく知られていますよ」。男は自分の飲み物を取りあげて、あなたの隣に歩いてきて座った。「わたしの名前はチャールズ・アチノーダ」 と、男は言う。「タラゼド社の星間船の主任設計者です。さて、新しい戦闘艦の実地試験をしてわれわれを助けてくれるつもりはありませんか ?」"
			choice
				"	「もっと詳しく教えてください」"
				"	「残念ですが、今は時間がありません」"
					defer
			"	「まあ、」と彼は言う。「こういう話だ。七年前、深刻な個人的危機の最中に、私はタラゼドの職を捨てて銀河を放浪した。リュックの中身は着替え一式と水筒、それに非常食が数箱だけ。辺境世界の一つで、無政府主義者のコミューンが私を迎え入れてくれた。一月ほど過ごした頃、村の長老が私の内なる葛藤を察して、彼らのスウェットロッジでのビジョンクエストに誘ってくれた。私はトランス状態に落ち、意識は数多の宇宙を旅して、奇妙なものを見た。光でできた剣を見た。青い太陽を見た。それから……」彼は少し言葉を切る。「……コンピュータをハッキングするウェルシュ・コーギー？　理解しがたいものもあったな」"
			choice
				"	「心が奪われますね」"
					goto continue
				"	「そのビジョンクエストには違法物質が関係していたんでは ?」"
			"	アチノーダはあなたの質問を無視してつづけた。「しかしそれから、わたしはまたべつのものを見ました」"
				goto kestrel
			label continue
			"	「しかしそれから、わたしはまたべつのものを見ました」 と、アチノーダは言った。"
			label kestrel
			"	アチノーダはしばらくだまり、それから言う。「わたしは暗い船を見ました。それまでわたしが設計したどんな船より優美でしとやかでした。それが赤いまだらの船殻をもった異星人の船と戦っていたんです。そしてそれを見たときに、わたしはそのような船を作らなければならないとわかりました。わたしはヒッチハイクしてウェイフェアラーに戻って、まえの仕事に復職したいと頼み、仕事にかかりました。7 年たって、その船はもうすぐできあがります。非破壊試験はすべてみごとに通過しました。唯一残すのは戦闘試験だけです。そしてその戦いには高名な戦士以上にふさわしい者がいるでしょうか、<fullname> ?」"
			choice
				"	「喜んでやりますよ」"
					goto test
				"	「見返りになにを受けとれるんですか ?」"
			"	「気前のよい支払いです」 と、アチノーダは言った。「そしてもしあなたが望むなら、製造ラインを出たまさに最初のユニットのひとつを買う権利です」"
			"	「よさそうですね」 と、あなたは言った。"
			label test
			"	「それはよかった」 と、アチノーダが言う。「いくつか書類にサインしてもらう必要があります。あなたが死んだ場合の債務の放棄とか、宣伝用にあなたの名前と写真を使う許可とかですよ。ほら、いつもの法律的ないろいろです」"
			choice
				"	「問題ありません。その船とはどこで戦うんですか ?」"
				"	「残念ですが、そんなものに同意できるとは思えません」"
					decline
			"	「われわれはほとんどの星間船の試験を<waypoints>星系でしています」 と、アチノーダは言った。試験用の船はまちがえようがありません。そこへ行って、破壊しないように無力化してください。それからここへ戻ってきて、あなたの見つけた弱点やわれわれが改良すべき点について聞かせてください。それからもしあなたが船を破壊したり盗んだりしたら、とうぜん報酬は没収します」"
				accept
	
	npc disable save
		government "Test Dummy"
		personality disables staying nemesis heroic
		system "Umbral"
		ship "Unknown Ship Type" "Tarazed Prototype"
	
	on complete
		payment 2000000
		"global: unlocked kestrel" ++
		conversation
			"あなたが着陸するとアチノーダがすぐに会いにきた。「あなたが生きのびたのはわかりました」 と、アチノーダが言った。「難しい戦いでしたか ?」"
			choice
				"	「ええ、あなたは印象に残る船を作りましたね」"
					goto yes
				"	「いいえ。残念ですが、簡単な仕事でした」"
					goto no
			
			label yes
			"	「それは何よりだ」と彼は言う。「さて、この船を量産する前に、いくつか手を加える機会がある。どんな変更を勧める？」"
				goto changes
			
			label no
			"	「まあいい」と彼は言う。「何しろ君はあの悪名高い<first> <last>だ。軍艦一隻程度では君の脅威にはなるまい。さて、この船を量産する前に、いくつか手を加える機会がある。どんな変更を勧める？」"
				goto changes
			
			label changes
			choice
				"	「たくさん武器区画があるものをわたしはいつも最優先にしています」"
					goto weapons
				"	「どんなエンジンでも積めるだけの余地をもつようにすべきです」"
					goto engines
				"	「たぶんシールドと船殻の改良に取り組むべきじゃないでしょうか」"
					goto shields
				"	「これだけ大きな船なら、戦闘機用のベイがもっとあるべきだと思う」"
					goto bays
			
			label weapons
			"action"
				set "kestrel: more weapons"
			"	「承知しました」 と、アチノーダが言った。「武器の収容力を拡大していちばん大きな武器でも乗せられるようにできるか調べてみましょう」"
				goto name
			
			label engines
			"action"
				set "kestrel: more engines"
			"	「承知しました」 と、アチノーダが言った。「エンジンの収容力を拡大していちばん大きなエンジンでも乗せられるようにできるか調べてみましょう」"
				goto name
			
			label shields
			"action"
				set "kestrel: more shields"
			"	「わかりました」 と、アチノーダが言った。「船殻とシールド発生源の強化に集中しましょう」"
				goto name
			
			label bays
			"action"
				set "kestrel: more bays"
			"	「いいだろう」と彼は言う。「船体にもっと戦闘機ベイを組み込めるか検討してみよう」"
				goto name
			
			label name
			"	「もうこの船の型に名前はつけたんですか ?」 と、あなたはたずねる。"
			"	「まだです」 と、アチノーダが答えた。「提案がありますか ?」"
			choice
				"	「レイス」"
					goto wraith
				"	「グレイグース」"
					goto goose
			
			label wraith
			"	「悪くないと思います」 と、アチノーダが言った。「でもタラゼドではいつも動物から名前をとっているんです。ほかに考えはありますか ?」"
			choice
				"	「ダイアウルフ」"
					goto wolf
				"	「ケストレル」"
					goto kestrel
			
			label goose
			"	「それは飛んでいるところがガンのようだからですね」 と、アチノーダが言った。「しかしまるで威圧感のない名前ですよ。なにかもっと怖そうなものはありませんか ?」"
			choice
				"	「リーパー」"
					goto reaper
				"	「ケストレル」"
					goto kestrel
			
			label wolf
			"	「悪くありません」 と、アチノーダが言った。「ですが、われわれのほかの船はみんな⸺ファルコンとか、オスプレイとか、ホークとか⸺鳥の名前なんです。鳥の名前ではどうでしょうか ?」"
			choice
				"	「グレイグース」"
					goto goose
				"	「ケストレル」"
					goto kestrel
			
			label reaper
			"	アチノーダが言った。「ええと、それはちょっとやりすぎだと思います。ほかに提案はありませんか ?」"
			choice
				"	「レイス」"
					goto wraith
				"	「ケストレル」"
					goto kestrel
			
			label kestrel
			"	あなたが 「ケストレル」 と口に出すと、アチノーダは雷に撃たれたかのようにのけぞった。「それだ」 と、アチノーダが言う。「それですよ !　ぴったりな名前はそれだ。ありがとう、船長。ケストレルを販売できるようになったらすぐに知らせます。それから設計に最後の修正をするときにはあなたの忠告を考慮に入れます」。アチノーダは 2M クレジット支払い、あなたの将来の成功を祈った。"



mission "Kestrel: More Weapons"
	name "ケストレル : 武装強化"
	landing
	invisible
	non-blocking
	to offer
		has "kestrel: more weapons"
	on offer
		event "kestrel available: more weapons" 50
		fail



mission "Kestrel: More Engines"
	name "ケストレル : エンジン強化"
	landing
	invisible
	non-blocking
	to offer
		has "kestrel: more engines"
	on offer
		event "kestrel available: more engines" 50
		fail



mission "Kestrel: More Shields"
	name "ケストレル : シールド強化"
	landing
	invisible
	non-blocking
	to offer
		has "kestrel: more shields"
	on offer
		event "kestrel available: more shields" 50
		fail



mission "Kestrel: More Bays"
	landing
	invisible
	non-blocking
	to offer
		has "kestrel: more bays"
	on offer
		event "kestrel available: more bays" 50
		fail



mission "Kestrel Available"
	name "ケストレル発売"
	landing
	source
		near "Tarazed" 100
	to offer
		has "kestrel available"
	destination "Wayfarer"
	on offer
		conversation
			branch engines
				has "kestrel: more engines"
			
			branch shields
				has "kestrel: more shields"
			
			branch bays
				has "kestrel: more bays"
			
			scene "thumbnail/kestrelw"
			``
				goto message
			
			label engines
			scene "thumbnail/kestrele"
			``
				goto message
			
			label shields
			scene "thumbnail/kestrels"
			``
				goto message
				
			label bays
			scene "thumbnail/kestrelc"
			``
			label message
			"あなたはタラゼド社の星間船設計者のチャールズ・アチノーダからメッセージを受けとった。「<last>船長、あなたにわれわれの最新の戦闘艦がこのウェイフェアラーで購入可能になったことをお伝えできてうれしく思います。われわれは最後の設計段階であなたの意見をすべて考慮に入れました。もういちどお礼を言わせてください !」"
				decline


shipyard "Kestrel"

event "kestrel available: more weapons"
	set "kestrel available"
	shipyard "Kestrel"
		"Kestrel (More Weapons)"
	planet Wayfarer
		add shipyard "Kestrel"
event "kestrel available: more engines"
	set "kestrel available"
	shipyard "Kestrel"
		"Kestrel (More Engines)"
	planet Wayfarer
		add shipyard "Kestrel"
event "kestrel available: more shields"
	set "kestrel available"
	shipyard "Kestrel"
		"Kestrel (More Shields)"
	planet Wayfarer
		add shipyard "Kestrel"
event "kestrel available: more bays"
	set "kestrel available"
	shipyard "Kestrel"
		"Kestrel (More Bays)"
	planet Wayfarer
		add shipyard "Kestrel"


ship "Unknown Ship Type"
	"display name" "未知の船種"
	plural "未知の船種"
	sprite "ship/kestrel"
	thumbnail "thumbnail/kestrel"
	attributes
		category "Heavy Warship"
		"cost" 14700000
		"shields" 19400
		"hull" 7200
		"required crew" 64
		"bunks" 128
		"mass" 2135
		"drag" 20.9
		"heat dissipation" .32
		"fuel capacity" 500
		"cargo space" 120
		"outfit space" 810
		"weapon capacity" 390
		"engine capacity" 210
		weapon
			"blast radius" 260
			"shield damage" 2600
			"hull damage" 1300
			"hit force" 3900
	outfits
		"Particle Cannon" 4
		"Torpedo Launcher" 2
		"Torpedo" 60
		"Heavy Laser Turret" 4
		
		"Fusion Reactor"
		"LP144a Battery Pack"
		"D94-YV Shield Generator"
		"Liquid Nitrogen Cooler"
		"Tactical Scanner" 2
		
		"Orca Plasma Thruster"
		"Orca Plasma Steering"
		"Hyperdrive"
	engine 13 170
	engine -13 170
	gun -73.5 46 "Torpedo Launcher"
	gun 73.5 46 "Torpedo Launcher"
	gun -51 49.5 "Particle Cannon"
	gun 51 49.5 "Particle Cannon"
	gun -29.5 52 "Particle Cannon"
	gun 29.5 52 "Particle Cannon"
	turret -8 -10.5 "Heavy Laser Turret"
	turret 8 -10.5 "Heavy Laser Turret"
	turret -20.5 9 "Heavy Laser Turret"
	turret 20.5 9 "Heavy Laser Turret"
	explode "small explosion" 25
	explode "medium explosion" 35
	explode "large explosion" 45
	explode "huge explosion" 30
	"final explode" "final explosion large"


ship "Kestrel"
	"display name" "ケストレル"
	plural "ケストレル"
	sprite "ship/kestrel"
	thumbnail "thumbnail/kestrel"
	attributes
		category "Heavy Warship"
		"cost" 14700000
		"shields" 19400
		"hull" 7200
		"required crew" 64
		"bunks" 128
		"mass" 2135
		"drag" 20.9
		"heat dissipation" .32
		"fuel capacity" 500
		"cargo space" 120
		"outfit space" 810
		"weapon capacity" 390
		"engine capacity" 210
		weapon
			"blast radius" 260
			"shield damage" 2600
			"hull damage" 1300
			"hit force" 3900
	outfits
		"Particle Cannon" 4
		"Torpedo Launcher" 2
		"Torpedo" 60
		"Heavy Laser Turret" 4
		
		"Fusion Reactor"
		"LP144a Battery Pack"
		"D94-YV Shield Generator"
		"Liquid Nitrogen Cooler"
		"Tactical Scanner" 2
		
		"Orca Plasma Thruster"
		"Orca Plasma Steering"
		"Hyperdrive"
	engine 13 170
	engine -13 170
	gun -73.5 46 "Torpedo Launcher"
	gun 73.5 46 "Torpedo Launcher"
	gun -51 49.5 "Particle Cannon"
	gun 51 49.5 "Particle Cannon"
	gun -29.5 52 "Particle Cannon"
	gun 29.5 52 "Particle Cannon"
	turret -8 -10.5 "Heavy Laser Turret"
	turret 8 -10.5 "Heavy Laser Turret"
	turret -20.5 9 "Heavy Laser Turret"
	turret 20.5 9 "Heavy Laser Turret"
	bay "Fighter" -46 106 under
		"launch effect" "human internal"
	bay "Fighter" 46 106 under
		"launch effect" "human internal"
	explode "small explosion" 25
	explode "medium explosion" 35
	explode "large explosion" 45
	explode "huge explosion" 30
	"final explode" "final explosion large"
	description "数年まえ、精神的な再起を求めてスウエットロッジを訪問中に、タラゼドの主任星間船設計者はトランス状態におちいって、われわれのものとはべつの現実の中の旅をした。そこでその設計者は奇妙で優雅な星間船の幻影を見ることになる。新たな目的をもって仕事に復帰したその男は、その後の 7 年をかけてケストレルを現実のものとした。"


ship "Kestrel" "Kestrel (More Engines)"
	sprite "ship/kestrele"
	thumbnail "thumbnail/kestrele"
	add attributes
		"drag" -1.9
		"fuel capacity" 100
		"engine capacity" 30
	engine 13 170
	engine -13 170
	engine 24.5 160 0.4
	engine -24.5 160 0.4

ship "Kestrel" "Kestrel (More Shields)"
	sprite "ship/kestrels"
	thumbnail "thumbnail/kestrels"
	add attributes
		"shields" 3000
		"hull" 1500
		"heat dissipation" .032

ship "Kestrel" "Kestrel (More Weapons)"
	sprite "ship/kestrelw"
	thumbnail "thumbnail/kestrelw"
	add attributes
		"weapon capacity" 40
	gun -76.5 49
	gun 76.5 49
	gun -73.5 46 "Torpedo Launcher"
	gun 73.5 46 "Torpedo Launcher"
	gun -55.5 52.5
	gun 55.5 52.5
	gun -51 49.5 "Particle Cannon"
	gun 51 49.5 "Particle Cannon"
	gun -33 55
	gun 33 55
	gun -29.5 52 "Particle Cannon"
	gun 29.5 52 "Particle Cannon"
	turret -8 -10.5 "Heavy Laser Turret"
	turret 8 -10.5 "Heavy Laser Turret"
	turret -20.5 9 "Heavy Laser Turret"
	turret 20.5 9 "Heavy Laser Turret"

ship "Kestrel" "Kestrel (More Bays)"
	sprite "ship/kestrelc"
	thumbnail "thumbnail/kestrelc"
	add attributes
		"mass" 60
		"weapon capacity" -20
	outfits
		"Particle Cannon" 2
		"Torpedo Launcher" 2
		"Torpedo" 60
		"Heavy Laser Turret" 4
		
		"Fusion Reactor"
		"LP144a Battery Pack"
		"D94-YV Shield Generator"
		"Liquid Nitrogen Cooler"
		"Tactical Scanner" 2
		
		"Orca Plasma Thruster"
		"Orca Plasma Steering"
		"Hyperdrive"
	gun -73.5 46 "Torpedo Launcher"
	gun 73.5 46 "Torpedo Launcher"
	gun -29.5 52 "Particle Cannon"
	gun 29.5 52 "Particle Cannon"
	turret -8 -10.5 "Heavy Laser Turret"
	turret 8 -10.5 "Heavy Laser Turret"
	turret -20.5 9 "Heavy Laser Turret"
	turret 20.5 9 "Heavy Laser Turret"
	bay "Fighter" -46 106
		"launch effect" "human internal"
	bay "Fighter" 46 106
		"launch effect" "human internal"
	bay "Fighter" -62 78
		"launch effect" "human internal"
	bay "Fighter" 62 78
		"launch effect" "human internal"
	bay "Fighter" -56 70
		"launch effect" "human internal"
	bay "Fighter" 56 70
		"launch effect" "human internal"
