#################################
#
# ¼޸
# 
#################################

namespace = nomad

# Nomads take contact(Ӧť)
country_event = {
	id = nomad.10
	title = nomad.10.name
	desc = nomad.10.desc

	picture_event_data = {
		portrait = event_target:contact_speaker_leader
		room = ethic_spaceship_room
	}

	diplomatic = yes
	is_triggered_only = yes

	trigger = {
		exists = fromfrom
		fromfrom = {
			is_country_type = nomad
		}
		NOT = {
			has_country_flag = nomad_ignores
		}
	}

	immediate = {
		fromfrom = {
			save_event_target_as = contact_speaker
			random_owned_ship = {
				fleet = {
					leader = { save_event_target_as = contact_speaker_leader }
				}
			}
		}
		event_target:contact_speaker = {
			establish_communications_no_message = root
		}
		set_country_flag = nomads_contacted
	}

	option = {
		name = action.1.a
		default_hide_option = yes
		trigger = {
			NOT = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
				has_ethic = ethic_xenophile
				has_ethic = ethic_fanatic_xenophile
				has_ethic = ethic_egalitarian
				has_ethic = ethic_fanatic_egalitarian
				has_ethic = ethic_authoritarian
				has_ethic = ethic_fanatic_authoritarian
				has_ethic = ethic_militarist
				has_ethic = ethic_fanatic_militarist
				has_ethic = ethic_pacifist
				has_ethic = ethic_fanatic_pacifist
				has_ethic = ethic_materialist
				has_ethic = ethic_fanatic_materialist
				has_ethic = ethic_spiritualist
				has_ethic = ethic_fanatic_spiritualist
			}
		}
	}
	option = {
		name = action.1.b
		trigger = {
			has_ethic = ethic_xenophobe
			num_ethics < 3
		}
	}
	option = {
		name = action.1.d
		trigger = {
			has_ethic = ethic_fanatic_xenophobe
			num_ethics < 3
		}
	}
	option = {
		name = action.1.c
		trigger = {
			has_ethic = ethic_xenophile
			num_ethics < 3
		}
	}
	option = {
		name = action.1.e
		trigger = {
			has_ethic = ethic_fanatic_xenophile
			num_ethics < 3
		}
	}
	option = {
		name = action.1.f
		trigger = {
			has_ethic = ethic_authoritarian
			num_ethics < 3
		}
	}
	option = {
		name = action.1.g
		trigger = {
			has_ethic = ethic_fanatic_authoritarian
			num_ethics < 3
		}
	}
	option = {
		name = action.1.h
		trigger = {
			has_ethic = ethic_egalitarian
			num_ethics < 3
		}
	}
	option = {
		name = action.1.i
		trigger = {
			has_ethic = ethic_fanatic_egalitarian
			num_ethics < 3
		}
	}
	option = {
		name = action.1.j
		trigger = {
			has_ethic = ethic_militarist
			num_ethics < 3
		}
	}
	option = {
		name = action.1.k
		trigger = {
			has_ethic = ethic_fanatic_militarist
			num_ethics < 3
		}
	}
	option = {
		name = action.1.l
		trigger = {
			has_ethic = ethic_pacifist
			num_ethics < 3
		}
	}
	option = {
		name = action.1.m
		trigger = {
			has_ethic = ethic_fanatic_pacifist
			num_ethics < 3
		}
	}
	option = {
		name = action.1.n
		trigger = {
			has_ethic = ethic_spiritualist
			num_ethics < 3
		}
	}
	option = {
		name = action.1.o
		trigger = {
			has_ethic = ethic_fanatic_spiritualist
			num_ethics < 3
		}
	}
	option = {
		name = action.1.p
		trigger = {
			has_ethic = ethic_materialist
			num_ethics < 3
		}
	}
	option = {
		name = action.1.q
		trigger = {
			has_ethic = ethic_fanatic_materialist
			num_ethics < 3
		}
	}
	option = {
		name = action.1.aa
		trigger = {
			OR = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
			}
			OR = {
				has_ethic = ethic_materialist
				has_ethic = ethic_fanatic_materialist
			}
		}
	}
	option = {
		name = action.1.ab
		trigger = {
			OR = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
			}
			OR = {
				has_ethic = ethic_spiritualist
				has_ethic = ethic_fanatic_spiritualist
			}
		}
	}
	option = {
		name = action.1.ac
		trigger = {
			OR = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
			}
			OR = {
				has_ethic = ethic_egalitarian
				has_ethic = ethic_fanatic_egalitarian
			}
		}
	}
	option = {
		name = action.1.ad
		trigger = {
			OR = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
			}
			OR = {
				has_ethic = ethic_authoritarian
				has_ethic = ethic_fanatic_authoritarian
			}
		}
	}
	option = {
		name = action.1.ae
		trigger = {
			OR = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
			}
			OR = {
				has_ethic = ethic_militarist
				has_ethic = ethic_fanatic_militarist
			}
		}
	}
	option = {
		name = action.1.af
		trigger = {
			OR = {
				has_ethic = ethic_xenophobe
				has_ethic = ethic_fanatic_xenophobe
			}
			OR = {
				has_ethic = ethic_pacifist
				has_ethic = ethic_fanatic_pacifist
			}
		}
	}
	option = {
		name = action.1.ag
		trigger = {
			OR = {
				has_ethic = ethic_xenophile
				has_ethic = ethic_fanatic_xenophile
			}
			OR = {
				has_ethic = ethic_materialist
				has_ethic = ethic_fanatic_materialist
			}
		}
	}
	option = {
		name = action.1.ah
		trigger = {
			OR = {
				has_ethic = ethic_xenophile
				has_ethic = ethic_fanatic_xenophile
			}
			OR = {
				has_ethic = ethic_spiritualist
				has_ethic = ethic_fanatic_spiritualist
			}
		}
	}
	option = {
		name = action.1.ai
		trigger = {
			OR = {
				has_ethic = ethic_xenophile
				has_ethic = ethic_fanatic_xenophile
			}
			OR = {
				has_ethic = ethic_egalitarian
				has_ethic = ethic_fanatic_egalitarian
			}
		}
	}
	option = {
		name = action.1.aj
		trigger = {
			OR = {
				has_ethic = ethic_xenophile
				has_ethic = ethic_fanatic_xenophile
			}
			OR = {
				has_ethic = ethic_authoritarian
				has_ethic = ethic_fanatic_authoritarian
			}
		}
	}
	option = {
		name = action.1.ak
		trigger = {
			OR = {
				has_ethic = ethic_xenophile
				has_ethic = ethic_fanatic_xenophile
			}
			OR = {
				has_ethic = ethic_militarist
				has_ethic = ethic_fanatic_militarist
			}
		}
	}
	option = {
		name = action.1.al
		trigger = {
			OR = {
				has_ethic = ethic_xenophile
				has_ethic = ethic_fanatic_xenophile
			}
			OR = {
				has_ethic = ethic_pacifist
				has_ethic = ethic_fanatic_pacifist
			}
		}
	}
	option = {
		name = action.1.am
		trigger = {
			OR = {
				has_ethic = ethic_authoritarian
				has_ethic = ethic_fanatic_authoritarian
			}
			OR = {
				has_ethic = ethic_spiritualist
				has_ethic = ethic_fanatic_spiritualist
			}
		}
	}
	option = {
		name = action.1.an
		trigger = {
			OR = {
				has_ethic = ethic_authoritarian
				has_ethic = ethic_fanatic_authoritarian
			}
			OR = {
				has_ethic = ethic_materialist
				has_ethic = ethic_fanatic_materialist
			}
		}
	}
	option = {
		name = action.1.ao
		trigger = {
			OR = {
				has_ethic = ethic_authoritarian
				has_ethic = ethic_fanatic_authoritarian
			}
			OR = {
				has_ethic = ethic_militarist
				has_ethic = ethic_fanatic_militarist
			}
		}
	}
	option = {
		name = action.1.ap
		trigger = {
			OR = {
				has_ethic = ethic_authoritarian
				has_ethic = ethic_fanatic_authoritarian
			}
			OR = {
				has_ethic = ethic_pacifist
				has_ethic = ethic_fanatic_pacifist
			}
		}
	}
	option = {
		name = action.1.aq
		trigger = {
			OR = {
				has_ethic = ethic_egalitarian
				has_ethic = ethic_fanatic_egalitarian
			}
			OR = {
				has_ethic = ethic_spiritualist
				has_ethic = ethic_fanatic_spiritualist
			}
		}
	}
	option = {
		name = action.1.ar
		trigger = {
			OR = {
				has_ethic = ethic_egalitarian
				has_ethic = ethic_fanatic_egalitarian
			}
			OR = {
				has_ethic = ethic_materialist
				has_ethic = ethic_fanatic_materialist
			}
		}
	}
	option = {
		name = action.1.as
		trigger = {
			OR = {
				has_ethic = ethic_egalitarian
				has_ethic = ethic_fanatic_egalitarian
			}
			OR = {
				has_ethic = ethic_pacifist
				has_ethic = ethic_fanatic_pacifist
			}
		}
	}
	option = {
		name = action.1.at
		trigger = {
			OR = {
				has_ethic = ethic_egalitarian
				has_ethic = ethic_fanatic_egalitarian
			}
			OR = {
				has_ethic = ethic_militarist
				has_ethic = ethic_fanatic_militarist
			}
		}
	}
	option = {
		name = action.1.au
		trigger = {
			OR = {
				has_ethic = ethic_spiritualist
				has_ethic = ethic_fanatic_spiritualist
			}
			OR = {
				has_ethic = ethic_militarist
				has_ethic = ethic_fanatic_militarist
			}
		}
	}
	option = {
		name = action.1.av
		trigger = {
			OR = {
				has_ethic = ethic_spiritualist
				has_ethic = ethic_fanatic_spiritualist
			}
			OR = {
				has_ethic = ethic_pacifist
				has_ethic = ethic_fanatic_pacifist
			}
		}
	}
	option = {
		name = action.1.aw
		trigger = {
			OR = {
				has_ethic = ethic_materialist
				has_ethic = ethic_fanatic_materialist
			}
			OR = {
				has_ethic = ethic_militarist
				has_ethic = ethic_fanatic_militarist
			}
		}
	}
	option = {
		name = action.1.ax
		trigger = {
			OR = {
				has_ethic = ethic_materialist
				has_ethic = ethic_fanatic_materialist
			}
			OR = {
				has_ethic = ethic_pacifist
				has_ethic = ethic_fanatic_pacifist
			}
		}
	}
	option = {
		name = action.1.aaa
		trigger = {
			has_ethic = ethic_xenophobe
			has_ethic = ethic_authoritarian
			has_ethic = ethic_militarist
		}
	}
	option = {
		name = action.1.aab
		trigger = {
			has_ethic = ethic_xenophobe
			has_ethic = ethic_egalitarian
			has_ethic = ethic_materialist
		}
	}
	option = {
		name = action.1.aac
		trigger = {
			has_ethic = ethic_xenophobe
			has_ethic = ethic_egalitarian
			has_ethic = ethic_spiritualist
		}
	}
	option = {
		name = action.1.aad
		trigger = {
			has_ethic = ethic_xenophobe
			has_ethic = ethic_militarist
			has_ethic = ethic_spiritualist
		}
	}
	option = {
		name = action.1.aae
		trigger = {
			has_ethic = ethic_xenophile
			has_ethic = ethic_authoritarian
			has_ethic = ethic_militarist
		}
	}
	#ϣ۹Ӧ
	option = {
		name = action.1.j
		trigger = {
			has_authority = auth_xilin_mind
		}
	}

	after = {
		if = {
			limit = {
				NOT = {
					event_target:contact_speaker = { has_relation_flag = { flag = no_coms who = root } }
				}
			}
			hidden_effect = { country_event = { id = story.7 days = 30 } }
		}
		hidden_effect = {
			end_event_chain = "nomads_observation_chain"
		}
	}
}