package main

// WayfarerQuestDefs — восемь проработанных сюжетных квестов, каждый
// со своими ветвлениями. Сами тексты — в translations_wayfarer.go
// (ключи вида "quest.<имя>.stepN" / "quest.<имя>.choiceN.M" и т.д.),
// здесь только структура: индексы шагов и последствия выборов.
var WayfarerQuestDefs = []WayfarerQuestDef{
	questSupernova,
	questEscort,
	questDerelict,
	questSmuggler,
	questContact,
	questBounty,
	questPlague,
	questArtifact,
}

// --- 1. Эвакуация перед вспышкой сверхновой -------------------------

var questSupernova = WayfarerQuestDef{
	Key:      "quest.supernova",
	TitleKey: "quest.supernova.title",
	BriefKey: "quest.supernova.brief",
	Steps: []WayfarerQuestStep{
		{
			TextKey: "quest.supernova.step0",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.supernova.choice0.0", NextStep: 1, CargoIdx: -1},
				{LabelKey: "quest.supernova.choice0.1", NextStep: 2, CargoIdx: -1},
				{LabelKey: "quest.supernova.choice0.2", Terminal: true, Success: false, ResultKey: "quest.supernova.result0.2", CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.supernova.step1",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.supernova.choice1.0", Terminal: true, Success: true, ResultKey: "quest.supernova.result1.0",
					CreditsDelta: 900, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.supernova.step2",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.supernova.choice2.0", NextStep: 3, CargoIdx: -1},
				{LabelKey: "quest.supernova.choice2.1", NextStep: 4, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.supernova.step3",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.supernova.choice3.0", Terminal: true, Success: true, ResultKey: "quest.supernova.result3.0",
					CreditsDelta: 1600, HullDelta: -35, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.supernova.step4",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.supernova.choice4.0", Terminal: true, Success: true, ResultKey: "quest.supernova.result4.0",
					CreditsDelta: 400, CargoIdx: -1},
			},
		},
	},
}

// --- 2. Дипломатический эскорт --------------------------------------

var questEscort = WayfarerQuestDef{
	Key:      "quest.escort",
	TitleKey: "quest.escort.title",
	BriefKey: "quest.escort.brief",
	Steps: []WayfarerQuestStep{
		{
			TextKey: "quest.escort.step0",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.escort.choice0.0", NextStep: 1, CargoIdx: -1},
				{LabelKey: "quest.escort.choice0.1", Terminal: true, Success: false, ResultKey: "quest.escort.result0.1", CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.escort.step1",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.escort.choice1.0", NextStep: 2, HullDelta: -20, KillsDelta: 1, CargoIdx: -1},
				{LabelKey: "quest.escort.choice1.1", NextStep: 3, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.escort.step2",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.escort.choice2.0", Terminal: true, Success: true, ResultKey: "quest.escort.result2.0",
					CreditsDelta: 1100, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.escort.step3",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.escort.choice3.0", Terminal: true, Success: true, ResultKey: "quest.escort.result3.0",
					CreditsDelta: 700, CargoIdx: -1},
			},
		},
	},
}

// --- 3. Сигнал с обломков --------------------------------------------

var questDerelict = WayfarerQuestDef{
	Key:      "quest.derelict",
	TitleKey: "quest.derelict.title",
	BriefKey: "quest.derelict.brief",
	Steps: []WayfarerQuestStep{
		{
			TextKey: "quest.derelict.step0",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.derelict.choice0.0", NextStep: 1, CargoIdx: -1},
				{LabelKey: "quest.derelict.choice0.1", Terminal: true, Success: false, ResultKey: "quest.derelict.result0.1", CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.derelict.step1",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.derelict.choice1.0", NextStep: 2, CargoIdx: -1},
				{LabelKey: "quest.derelict.choice1.1", NextStep: 3, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.derelict.step2",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.derelict.choice2.0", Terminal: true, Success: true, ResultKey: "quest.derelict.result2.0",
					CreditsDelta: 1400, HullDelta: -10, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.derelict.step3",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.derelict.choice3.0", Terminal: true, Success: true, ResultKey: "quest.derelict.result3.0",
					CreditsDelta: 500, CargoIdx: -1},
			},
		},
	},
}

// --- 4. Груз для мятежников (моральный выбор) ------------------------

var questSmuggler = WayfarerQuestDef{
	Key:      "quest.smuggler",
	TitleKey: "quest.smuggler.title",
	BriefKey: "quest.smuggler.brief",
	Steps: []WayfarerQuestStep{
		{
			TextKey: "quest.smuggler.step0",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.smuggler.choice0.0", NextStep: 1, CargoIdx: -1},
				{LabelKey: "quest.smuggler.choice0.1", Terminal: true, Success: true, ResultKey: "quest.smuggler.result0.1",
					CreditsDelta: 300, CargoIdx: -1},
				{LabelKey: "quest.smuggler.choice0.2", Terminal: true, Success: false, ResultKey: "quest.smuggler.result0.2", CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.smuggler.step1",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.smuggler.choice1.0", NextStep: 2, CargoIdx: -1},
				{LabelKey: "quest.smuggler.choice1.1", NextStep: 3, HullDelta: -15, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.smuggler.step2",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.smuggler.choice2.0", Terminal: true, Success: true, ResultKey: "quest.smuggler.result2.0",
					CreditsDelta: 1100, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.smuggler.step3",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.smuggler.choice3.0", Terminal: true, Success: true, ResultKey: "quest.smuggler.result3.0",
					CreditsDelta: 1500, KillsDelta: 1, CargoIdx: -1},
			},
		},
	},
}

// --- 5. Первый контакт -------------------------------------------------

var questContact = WayfarerQuestDef{
	Key:      "quest.contact",
	TitleKey: "quest.contact.title",
	BriefKey: "quest.contact.brief",
	Steps: []WayfarerQuestStep{
		{
			TextKey: "quest.contact.step0",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.contact.choice0.0", NextStep: 1, CargoIdx: -1},
				{LabelKey: "quest.contact.choice0.1", NextStep: 2, CargoIdx: -1},
				{LabelKey: "quest.contact.choice0.2", Terminal: true, Success: false, ResultKey: "quest.contact.result0.2", CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.contact.step1",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.contact.choice1.0", Terminal: true, Success: true, ResultKey: "quest.contact.result1.0",
					CreditsDelta: 1300, CargoIdx: 0, CargoDelta: -3},
			},
		},
		{
			TextKey: "quest.contact.step2",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.contact.choice2.0", NextStep: 3, CargoIdx: -1},
				{LabelKey: "quest.contact.choice2.1", Terminal: true, Success: false, ResultKey: "quest.contact.result2.1", HullDelta: -25, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.contact.step3",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.contact.choice3.0", Terminal: true, Success: true, ResultKey: "quest.contact.result3.0",
					CreditsDelta: 800, CargoIdx: -1},
			},
		},
	},
}

// --- 6. Охота за головой -----------------------------------------------

var questBounty = WayfarerQuestDef{
	Key:      "quest.bounty",
	TitleKey: "quest.bounty.title",
	BriefKey: "quest.bounty.brief",
	Steps: []WayfarerQuestStep{
		{
			TextKey: "quest.bounty.step0",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.bounty.choice0.0", NextStep: 1, CargoIdx: -1},
				{LabelKey: "quest.bounty.choice0.1", Terminal: true, Success: false, ResultKey: "quest.bounty.result0.1", CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.bounty.step1",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.bounty.choice1.0", NextStep: 2, HullDelta: -30, KillsDelta: 1, CargoIdx: -1},
				{LabelKey: "quest.bounty.choice1.1", NextStep: 3, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.bounty.step2",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.bounty.choice2.0", Terminal: true, Success: true, ResultKey: "quest.bounty.result2.0",
					CreditsDelta: 2200, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.bounty.step3",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.bounty.choice3.0", Terminal: true, Success: true, ResultKey: "quest.bounty.result3.0",
					CreditsDelta: 900, CargoIdx: -1},
			},
		},
	},
}

// --- 7. Карантин (мор на шахтёрской станции) ---------------------------

var questPlague = WayfarerQuestDef{
	Key:      "quest.plague",
	TitleKey: "quest.plague.title",
	BriefKey: "quest.plague.brief",
	Steps: []WayfarerQuestStep{
		{
			TextKey: "quest.plague.step0",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.plague.choice0.0", NextStep: 1, CargoIdx: -1},
				{LabelKey: "quest.plague.choice0.1", Terminal: true, Success: false, ResultKey: "quest.plague.result0.1", CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.plague.step1",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.plague.choice1.0", NextStep: 2, CargoIdx: 5, CargoDelta: -10},
				{LabelKey: "quest.plague.choice1.1", NextStep: 3, CargoIdx: 5, CargoDelta: -10},
			},
		},
		{
			TextKey: "quest.plague.step2",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.plague.choice2.0", Terminal: true, Success: true, ResultKey: "quest.plague.result2.0",
					CreditsDelta: 300, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.plague.step3",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.plague.choice3.0", Terminal: true, Success: true, ResultKey: "quest.plague.result3.0",
					CreditsDelta: 2000, CargoIdx: -1},
			},
		},
	},
}

// --- 8. Находка предтеч --------------------------------------------------

var questArtifact = WayfarerQuestDef{
	Key:      "quest.artifact",
	TitleKey: "quest.artifact.title",
	BriefKey: "quest.artifact.brief",
	Steps: []WayfarerQuestStep{
		{
			TextKey: "quest.artifact.step0",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.artifact.choice0.0", NextStep: 1, CargoIdx: -1},
				{LabelKey: "quest.artifact.choice0.1", Terminal: true, Success: false, ResultKey: "quest.artifact.result0.1", CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.artifact.step1",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.artifact.choice1.0", NextStep: 2, CargoIdx: -1},
				{LabelKey: "quest.artifact.choice1.1", NextStep: 3, CargoIdx: -1},
				{LabelKey: "quest.artifact.choice1.2", NextStep: 4, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.artifact.step2",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.artifact.choice2.0", Terminal: true, Success: true, ResultKey: "quest.artifact.result2.0",
					CreditsDelta: 600, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.artifact.step3",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.artifact.choice3.0", Terminal: true, Success: true, ResultKey: "quest.artifact.result3.0",
					CreditsDelta: 2500, CargoIdx: -1},
			},
		},
		{
			TextKey: "quest.artifact.step4",
			Choices: []WayfarerQuestChoice{
				{LabelKey: "quest.artifact.choice4.0", Terminal: true, Success: true, ResultKey: "quest.artifact.result4.0",
					CreditsDelta: 1400, CargoIdx: -1},
			},
		},
	},
}
