﻿# Sacred Architecture - RICE Unofficial Update Compatibility 1.0.4
# Prefix: sacra_rice. Every key and file of this mod starts with sacra_rice / zz_sacra_rice_.

sacra_rice_choose_sacred_architecture_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
	}
	decision_group_type = religious
	sort_order = 90
	ai_check_interval = 0

	desc = sacra_rice_choose_sacred_architecture_decision_desc
	selection_tooltip = sacra_rice_choose_sacred_architecture_decision_tooltip

	cooldown = { years = 10 }

	is_shown = {
		is_ai = no
		is_landed = yes
		sacra_rice_supported_religion_trigger = yes
	}

	is_valid = {
		custom_tooltip = {
			text = sacra_req_rite_leader
			sacra_can_reform_rite_trigger = yes
		}
	}

	is_valid_showing_failures_only = {
		is_imprisoned = no
		is_at_war = no
	}

	cost = {
		piety = major_piety_value
	}

	widget = {
		gui = "decision_view_widget_option_list_generic"
		controller = decision_option_list_controller
		decision_to_second_step_button = "sacra_choose_sacred_architecture_next_step"
		show_from_start = yes

		item = {
			value = sacra_style_catholic
			localization = sacra_style_catholic
			current_description = sacra_style_catholic_desc
			icon = "gfx/interface/icons/faith/catholic.dds"
			flat = no
			is_shown = {
				faith = { NOT = { has_graphical_faith = catholic_gfx } }
			}
			ai_chance = { value = 0 }
		}

		item = {
			value = sacra_style_orthodox
			localization = sacra_style_orthodox
			current_description = sacra_style_orthodox_desc
			icon = "gfx/interface/icons/faith/christianity_orthodox_cross_01.dds"
			flat = no
			is_shown = {
				faith = { NOT = { has_graphical_faith = orthodox_gfx } }
			}
			ai_chance = { value = 0 }
		}

		item = {
			value = sacra_style_islamic
			localization = sacra_style_islamic
			current_description = sacra_style_islamic_desc
			icon = "gfx/interface/icons/faith/sunni.dds"
			flat = no
			is_shown = {
				faith = { NOT = { has_graphical_faith = islamic_gfx } }
			}
			ai_chance = { value = 0 }
		}

		item = {
			value = sacra_style_dharmic
			localization = sacra_style_dharmic
			current_description = sacra_style_dharmic_desc
			icon = "gfx/interface/icons/faith/hinduism_01.dds"
			flat = no
			is_shown = {
				faith = { NOT = { has_graphical_faith = dharmic_gfx } }
			}
			ai_chance = { value = 0 }
		}

		item = {
			value = sacra_style_sinitic
			localization = sacra_style_sinitic
			current_description = sacra_style_sinitic_desc
			icon = "gfx/interface/icons/faith/taoism_01.dds"
			flat = no
			is_shown = {
				faith = { NOT = { has_graphical_faith = sinitic_gfx } }
			}
			ai_chance = { value = 0 }
		}

		item = {
			value = sacra_style_shinto
			localization = sacra_style_shinto
			current_description = sacra_style_shinto_desc
			icon = "gfx/interface/icons/faith/shinto.dds"
			flat = no
			is_shown = {
				faith = { NOT = { has_graphical_faith = shinto_gfx } }
			}
			ai_chance = { value = 0 }
		}

		item = {
			value = sacra_style_zoroastrian
			localization = sacra_style_zoroastrian
			current_description = sacra_style_zoroastrian_desc
			icon = "gfx/interface/icons/faith/zoroastrian_custom.dds"
			flat = no
			is_shown = {
				faith = { NOT = { has_graphical_faith = zoroastrian_gfx } }
			}
			ai_chance = { value = 0 }
		}

		item = {
			value = sacra_style_tengrism
			localization = sacra_style_tengrism
			current_description = sacra_style_tengrism_desc
			icon = "gfx/interface/icons/faith/tengri_01.dds"
			flat = no
			is_shown = {
				faith = { NOT = { has_graphical_faith = tengrism_gfx } }
			}
			ai_chance = { value = 0 }
		}

		item = {
			value = sacra_style_kamuyism
			localization = sacra_style_kamuyism
			current_description = sacra_style_kamuyism_desc
			icon = "gfx/interface/icons/faith/kamuyism_01.dds"
			flat = no
			is_shown = {
				faith = { NOT = { has_graphical_faith = kamuyism_gfx } }
			}
			ai_chance = { value = 0 }
		}

		item = {
			value = sacra_style_pagan
			localization = sacra_style_pagan
			current_description = sacra_style_pagan_desc
			icon = "gfx/interface/icons/faith/pagan_01.dds"
			flat = no
			is_shown = {
				faith = { NOT = { has_graphical_faith = pagan_gfx } }
			}
			ai_chance = { value = 0 }
		}
	}

	effect = {
		save_scope_as = sacra_reformer
		rite = { save_scope_as = sacra_rite }
		faith = { save_scope_as = sacra_old_faith }
		custom_tooltip = sacra_choose_sacred_architecture_effect_tt
		hidden_effect = {
		if = {
			limit = { scope:sacra_style_catholic = yes }
			sacra_rice_move_rite_effect = { STYLE = catholic }
		}
		else_if = {
			limit = { scope:sacra_style_orthodox = yes }
			sacra_rice_move_rite_effect = { STYLE = orthodox }
		}
		else_if = {
			limit = { scope:sacra_style_islamic = yes }
			sacra_rice_move_rite_effect = { STYLE = islamic }
		}
		else_if = {
			limit = { scope:sacra_style_dharmic = yes }
			sacra_rice_move_rite_effect = { STYLE = dharmic }
		}
		else_if = {
			limit = { scope:sacra_style_sinitic = yes }
			sacra_rice_move_rite_effect = { STYLE = sinitic }
		}
		else_if = {
			limit = { scope:sacra_style_shinto = yes }
			sacra_rice_move_rite_effect = { STYLE = shinto }
		}
		else_if = {
			limit = { scope:sacra_style_zoroastrian = yes }
			sacra_rice_move_rite_effect = { STYLE = zoroastrian }
		}
		else_if = {
			limit = { scope:sacra_style_tengrism = yes }
			sacra_rice_move_rite_effect = { STYLE = tengrism }
		}
		else_if = {
			limit = { scope:sacra_style_kamuyism = yes }
			sacra_rice_move_rite_effect = { STYLE = kamuyism }
		}
		else_if = {
			limit = { scope:sacra_style_pagan = yes }
			sacra_rice_move_rite_effect = { STYLE = pagan }
		}
			sacra_fix_old_faith_effect = yes
		}
	}

	ai_potential = { always = no }
	ai_will_do = { base = 0 }
}
