﻿# Heirs of Ērānšahr — DEBUG decisions (TESTING ONLY).
# ===================================================================================
#  DELETE THIS FILE  +  zz_he_debug_l_english.yml  BEFORE PUBLISHING TO THE WORKSHOP.
# ===================================================================================
# Only the Sasanian player ever sees these. Each "Jump to …" decision teleports the camp
# into a house's homeland and runs the arrival check, so the per-region house-rising can be
# tested without physically travelling across Iran. "Raise all" skips travel entirely;
# "Reset" clears the risen-flags so the sequence can be replayed.

# --- Teleport into a homeland and fire the arrival check (instant) ---------------------
he_debug_jump_suren_decision = {
	picture = { reference = "gfx/interface/illustrations/decisions/decision_dynasty_house.dds" }
	sort_order = 9005
	is_shown = { debug_only = yes he_is_sasanian_trigger = yes }
	is_valid = { always = yes }
	effect = {
		set_location = title:c_zaranj.title_province		# Sistan → Suren
		he_check_house_arrivals_effect = yes
	}
	ai_will_do = { base = 0 }
}

he_debug_jump_ispahbudhan_decision = {
	picture = { reference = "gfx/interface/illustrations/decisions/decision_dynasty_house.dds" }
	sort_order = 9004
	is_shown = { debug_only = yes he_is_sasanian_trigger = yes }
	is_valid = { always = yes }
	effect = {
		set_location = title:c_gurgan.title_province		# Gurgan → Ispahbudhan
		he_check_house_arrivals_effect = yes
	}
	ai_will_do = { base = 0 }
}

he_debug_jump_waraz_decision = {
	picture = { reference = "gfx/interface/illustrations/decisions/decision_dynasty_house.dds" }
	sort_order = 9003
	is_shown = { debug_only = yes he_is_sasanian_trigger = yes }
	is_valid = { always = yes }
	effect = {
		set_location = title:c_hamadan.title_province		# Media → Waraz
		he_check_house_arrivals_effect = yes
	}
	ai_will_do = { base = 0 }
}

he_debug_jump_spandiyadh_decision = {
	picture = { reference = "gfx/interface/illustrations/decisions/decision_dynasty_house.dds" }
	sort_order = 9002
	is_shown = { debug_only = yes he_is_sasanian_trigger = yes }
	is_valid = { always = yes }
	effect = {
		set_location = title:c_isfahan.title_province		# Isfahan → Spandiyadh
		he_check_house_arrivals_effect = yes
	}
	ai_will_do = { base = 0 }
}

he_debug_jump_zik_decision = {
	picture = { reference = "gfx/interface/illustrations/decisions/decision_dynasty_house.dds" }
	sort_order = 9001
	is_shown = { debug_only = yes he_is_sasanian_trigger = yes }
	is_valid = { always = yes }
	effect = {
		set_location = title:c_tabriz.title_province		# Azerbaijan → Zik
		he_check_house_arrivals_effect = yes
	}
	ai_will_do = { base = 0 }
}

# --- Raise every dormant house at once, no travel (tests all payloads + event windows) --
he_debug_raise_all_decision = {
	picture = { reference = "gfx/interface/illustrations/decisions/decision_dynasty_house.dds" }
	sort_order = 9000
	is_shown = { debug_only = yes he_is_sasanian_trigger = yes }
	is_valid = { always = yes }
	effect = {
		save_scope_as = actor
		if = { limit = { NOT = { has_character_flag = he_house_suren_risen } }		add_character_flag = he_house_suren_risen		he_raise_suren_effect = yes }
		if = { limit = { NOT = { has_character_flag = he_house_ispahbudhan_risen } }	add_character_flag = he_house_ispahbudhan_risen	he_raise_ispahbudhan_effect = yes }
		if = { limit = { NOT = { has_character_flag = he_house_waraz_risen } }		add_character_flag = he_house_waraz_risen		he_raise_waraz_effect = yes }
		if = { limit = { NOT = { has_character_flag = he_house_spandiyadh_risen } }	add_character_flag = he_house_spandiyadh_risen	he_raise_spandiyadh_effect = yes }
		if = { limit = { NOT = { has_character_flag = he_house_zik_risen } }		add_character_flag = he_house_zik_risen		he_raise_zik_effect = yes }
	}
	ai_will_do = { base = 0 }
}

# --- Clear the risen-flags so the sequence can be replayed ------------------------------
# (Champions already created and armies already spawned persist — reload a save for a fully
#  clean slate; this just re-arms the triggers.)
he_debug_reset_decision = {
	picture = { reference = "gfx/interface/illustrations/decisions/decision_dynasty_house.dds" }
	sort_order = 8999
	is_shown = { debug_only = yes he_is_sasanian_trigger = yes }
	is_valid = { always = yes }
	effect = {
		remove_character_flag = he_house_suren_risen
		remove_character_flag = he_house_ispahbudhan_risen
		remove_character_flag = he_house_waraz_risen
		remove_character_flag = he_house_spandiyadh_risen
		remove_character_flag = he_house_zik_risen
		remove_character_flag = he_reached_eranshahr
	}
	ai_will_do = { base = 0 }
}
