
#########################################
#
# on_action_events
#对on_action_events事件修改
#########################################

namespace = action

### First Contact Diplomatic Message
country_event = {
	id = action.1
	title = action.1.name
	message_desc = action.1.message
	location = event_target:contact_empire.capital_scope
	
	picture_event_data = {
		portrait = event_target:contact_empire
		planet_background = event_target:contact_empire
		graphical_culture = event_target:contact_empire
		city_level = event_target:contact_empire
		room = event_target:contact_empire.ruler
	}
	
	### Normal (Not Xenophobe or Xenophile)
	# Militarist Autocrat
	desc = {
		text = action.1.desc_01
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_star_empire
					has_government = gov_military_dictatorship
					has_government = gov_martial_empire
					has_government = gov_martial_dictatorship
				}
			}
		}
	}
	# Spiritualist Autocrat
	desc = {
		text = action.1.desc_02
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_theocratic_monarchy
					has_government = gov_theocratic_dictatorship
					has_government = gov_divine_empire
				}
			}
		}
	}
	# Materialist Autocrat
	desc = {
		text = action.1.desc_03
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_despotic_hegemony
					has_government = gov_totalitarian_regime
					has_government = gov_illuminated_autocracy
					has_government = gov_technocratic_dictatorship
				}
			}
		}
	}
	# Pacifist Autocrat
	desc = {
		text = action.1.desc_04
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_irenic_monarchy
					has_government = gov_irenic_dictatorship
					has_government = gov_celestial_empire
				}
			}
		}
	}
	# Generic Autocrat
	desc = {
		text = action.1.desc_05
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_despotic_empire
					has_government = gov_feudal_empire
					has_government = gov_constitutional_dictatorship
					has_government = gov_enlightened_monarchy
					has_government = gov_elective_monarchy
				}
			}
		}
	}
	# Military Oligarch
	desc = {
		text = action.1.desc_06
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_military_junta
					has_government = gov_war_council
					has_government = gov_citizen_stratocracy
				}
			}
		}
	}
	# Spiritualist Oligarch
	desc = {
		text = action.1.desc_07
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_theocratic_oligarchy
					has_government = gov_holy_tribunal
				}
			}
		}
	}
	# Materialist Oligarch
	desc = {
		text = action.1.desc_08
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_executive_committee
					has_government = gov_science_directorate
				}
			}
		}
	}
	# Pacifist Oligarch
	desc = {
		text = action.1.desc_09
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				has_government = gov_irenic_bureaucracy
			}
		}
	}
	# Generic Oligarch
	desc = {
		text = action.1.desc_10
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_megacorporation
					has_government = gov_plutocratic_oligarchy
				}
			}
		}
	}
	# Militarist Democrat
	desc = {
		text = action.1.desc_11
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_military_commissariat
					has_government = gov_assembly_of_clans
					has_government = gov_citizen_republic
				}
			}
		}
	}
	# Spiritualist Democrat
	desc = {
		text = action.1.desc_12
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				has_government = gov_theocratic_republic
			}
		}
	}
	# Materialist Democrat
	desc = {
		text = action.1.desc_13
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_direct_democracy
					has_government = gov_rational_consensus
				}
			}
		}
	}
	# Pacifist Democrat
	desc = {
		text = action.1.desc_14
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				has_government = gov_moral_democracy
			}
		}
	}
	# Generic Democrat
	desc = {
		text = action.1.desc_15
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				has_government = gov_representative_democracy
			}
		}
	}
	
	### Xenophobe
	# Militarist Autocrat
	desc = {
		text = action.1.desc_16
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_star_empire
					has_government = gov_military_dictatorship
					has_government = gov_martial_empire
					has_government = gov_martial_dictatorship
				}
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }
			}
		}
	}
	# Spiritualist Autocrat
	desc = {
		text = action.1.desc_17
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_theocratic_monarchy
					has_government = gov_theocratic_dictatorship
					has_government = gov_divine_empire
				}
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }
			}
		}
	}
	# Materialist Autocrat
	desc = {
		text = action.1.desc_18
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_despotic_hegemony
					has_government = gov_totalitarian_regime
					has_government = gov_illuminated_autocracy
					has_government = gov_technocratic_dictatorship
				}
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }			
			}
		}
	}
	# Pacifist Autocrat
	desc = {
		text = action.1.desc_19
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_irenic_monarchy
					has_government = gov_irenic_dictatorship
					has_government = gov_celestial_empire
				}
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }			
			}
		}
	}
	# Generic Autocrat
	desc = {
		text = action.1.desc_20
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_despotic_empire
					has_government = gov_feudal_empire
					has_government = gov_constitutional_dictatorship
					has_government = gov_enlightened_monarchy
					has_government = gov_elective_monarchy
				}
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }				
			}
		}
	}
	# Military Oligarch
	desc = {
		text = action.1.desc_21
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_military_junta
					has_government = gov_war_council
					has_government = gov_citizen_stratocracy
				}
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }				
			}
		}
	}
	# Spiritualist Oligarch
	desc = {
		text = action.1.desc_22
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_theocratic_oligarchy
					has_government = gov_holy_tribunal
				}
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }			
			}
		}
	}
	# Materialist Oligarch
	desc = {
		text = action.1.desc_23
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_executive_committee
					has_government = gov_science_directorate
				}
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }				
			}
		}
	}
	# Pacifist Oligarch
	desc = {
		text = action.1.desc_24
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				has_government = gov_irenic_bureaucracy
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }				
			}
		}
	}
	# Generic Oligarch
	desc = {
		text = action.1.desc_25
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_megacorporation
					has_government = gov_plutocratic_oligarchy
				}
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }			
			}
		}
	}
	# Militarist Democrat
	desc = {
		text = action.1.desc_26
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_military_commissariat
					has_government = gov_assembly_of_clans
					has_government = gov_citizen_republic
				}
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }				
			}
		}
	}
	# Spiritualist Democrat
	desc = {
		text = action.1.desc_27
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				has_government = gov_theocratic_republic
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }				
			}
		}
	}
	# Materialist Democrat
	desc = {
		text = action.1.desc_28
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_direct_democracy
					has_government = gov_rational_consensus
				}
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }		
			}
		}
	}
	# Pacifist Democrat
	desc = {
		text = action.1.desc_29
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				has_government = gov_moral_democracy
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }				
			}
		}
	}
	# Generic Democrat
	desc = {
		text = action.1.desc_30
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				has_government = gov_representative_democracy
				NOT = { has_valid_civic = civic_fanatic_purifiers }			
				NOT = { has_valid_civic = civic_hive_devouring_swarm }				
			}
		}
	}
	
	### Xenophile
	# Militarist Autocrat
	desc = {
		text = action.1.desc_31
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_star_empire
					has_government = gov_military_dictatorship
					has_government = gov_martial_empire
					has_government = gov_martial_dictatorship
				}

			}
		}
	}
	# Spiritualist Autocrat
	desc = {
		text = action.1.desc_32
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_theocratic_monarchy
					has_government = gov_theocratic_dictatorship
					has_government = gov_divine_empire
				}
			}
		}
	}
	# Materialist Autocrat
	desc = {
		text = action.1.desc_33
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_despotic_hegemony
					has_government = gov_totalitarian_regime
					has_government = gov_illuminated_autocracy
					has_government = gov_technocratic_dictatorship
				}
			}
		}
	}
	# Pacifist Autocrat
	desc = {
		text = action.1.desc_34
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_irenic_monarchy
					has_government = gov_irenic_dictatorship
					has_government = gov_celestial_empire
				}
			}
		}
	}
	# Generic Autocrat
	desc = {
		text = action.1.desc_35
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_despotic_empire
					has_government = gov_feudal_empire
					has_government = gov_constitutional_dictatorship
					has_government = gov_enlightened_monarchy
					has_government = gov_elective_monarchy
				}
			}
		}
	}
	# Military Oligarch
	desc = {
		text = action.1.desc_36
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_military_junta
					has_government = gov_war_council
					has_government = gov_citizen_stratocracy
				}
			}
		}
	}
	# Spiritualist Oligarch
	desc = {
		text = action.1.desc_37
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_theocratic_oligarchy
					has_government = gov_holy_tribunal
				}
			}
		}
	}
	# Materialist Oligarch
	desc = {
		text = action.1.desc_38
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_executive_committee
					has_government = gov_science_directorate
				}
			}
		}
	}
	# Pacifist Oligarch
	desc = {
		text = action.1.desc_39
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				has_government = gov_irenic_bureaucracy
			}
		}
	}
	# Generic Oligarch
	desc = {
		text = action.1.desc_40
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_megacorporation
					has_government = gov_plutocratic_oligarchy
				}
			}
		}
	}
	# Militarist Democrat
	desc = {
		text = action.1.desc_41
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_military_commissariat
					has_government = gov_assembly_of_clans
					has_government = gov_citizen_republic
				}
			}
		}
	}
	# Spiritualist Democrat
	desc = {
		text = action.1.desc_42
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				has_government = gov_theocratic_republic
			}
		}
	}
	# Materialist Democrat
	desc = {
		text = action.1.desc_43
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_direct_democracy
					has_government = gov_rational_consensus
				}
			}
		}
	}
	# Pacifist Democrat
	desc = {
		text = action.1.desc_44
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				has_government = gov_moral_democracy
			}
		}
	}
	# Generic Democrat
	desc = {
		text = action.1.desc_45
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				has_government = gov_representative_democracy
			}
		}
	}
	
	# Cruel Foxcat
	desc = {
		text = action.1.desc_49
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				has_valid_civic = civic_fanatic_purifiers
				species_portrait = mam3
			}
		}
	}
	
	# Hive Mind
	desc = {
		text = action.1.desc_50
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				has_authority = auth_hive_mind
				NOT = { has_valid_civic = civic_hive_devouring_swarm }
			}
		}
	}

	# Fanatic Purifier
	desc = {
		text = action.1.desc_51
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				has_valid_civic = civic_fanatic_purifiers
				NAND = {
					has_valid_civic = civic_fanatic_purifiers
					species_portrait = mam3
				}
			}
		}
	}
	
	# Devouring Swarm
	desc = {
		text = action.1.desc_52
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				has_authority = auth_hive_mind
				has_valid_civic = civic_hive_devouring_swarm
			}
		}
	}	
	

	# Generic Machine Empire (To Organics)
	desc = {
		text = action.1.desc_70
		trigger = {
			NOT = { 
				is_same_species = event_target:contact_empire 
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_government = gov_machine_empire
					has_government = gov_machine_research
					has_government = gov_machine_industrial
				}
			}
		}
	}

	# Generic Machine Empire (To Machines)
	desc = {
		text = action.1.desc_71
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			OR = {
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_government = gov_machine_empire
					has_government = gov_machine_research
					has_government = gov_machine_industrial
				}
			}
		}
	}

	# Terminator Machine Empire (To Organics)
	desc = {
		text = action.1.desc_72
		trigger = {
			NOT = { 
				is_same_species = event_target:contact_empire 
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				has_government = gov_machine_terminator
			}
		}
	}

	# Terminator Machine Empire (To Machines)
	desc = {
		text = action.1.desc_73
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			OR = {
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				has_government = gov_machine_terminator
			}
		}
	}

	# Assimilator Machine Empire (To Organics)
	desc = {
		text = action.1.desc_74
		trigger = {
			NOT = { 
				is_same_species = event_target:contact_empire 
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				has_government = gov_machine_assimilator
			}
		}
	}

	# Assimilator Machine Empire (To Machines)
	desc = {
		text = action.1.desc_75
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			OR = {
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				has_government = gov_machine_assimilator
			}
		}
	}

	# Servitor Machine Empire (To Organics)
	desc = {
		text = action.1.desc_76
		trigger = {
			NOT = { 
				is_same_species = event_target:contact_empire 
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				has_government = gov_machine_servitor
			}
		}
	}				

	# Servitor Machine Empire (To Machines)
	desc = {
		text = action.1.desc_77
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			OR = {
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				has_government = gov_machine_servitor
			}
		}
	}	

	#Fallen Machine Empire (To Organics)
	desc = {
		text = action.1.desc_78
		trigger = {
			NOT = { 
				is_same_species = event_target:contact_empire 
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = fallen_empire
				has_authority = auth_machine_intelligence
			}
		}
	}				

	# Fallen Machine Empire (To Machines)
	desc = {
		text = action.1.desc_79
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			OR = {
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = fallen_empire
				has_authority = auth_machine_intelligence
			}
		}
	}	
	
	
	# Fallen Empire 1
	desc = {
		text = action.1.desc_60
		trigger = {
			event_target:contact_empire = {
				is_country_type = fallen_empire
				NOT = { has_ethic = ethic_gestalt_consciousness }
				NOT = { has_ethic = ethic_fanatic_xenophobe }
				NOT = { has_ethic = ethic_fanatic_xenophile }
				NOT = { has_ethic = ethic_fanatic_materialist }
				NOT = { has_ethic = ethic_fanatic_spiritualist }
			}
		}
	}
	# Fallen Empire 2
	desc = {
		text = action.1.desc_62
		trigger = {
			event_target:contact_empire = {
				is_country_type = fallen_empire
				has_ethic = ethic_fanatic_xenophile
			}
		}
	}
	# Fallen Empire 3
	desc = {
		text = action.1.desc_63
		trigger = {
			event_target:contact_empire = {
				is_country_type = fallen_empire
				has_ethic = ethic_fanatic_xenophobe				
			}
		}
	}
	# Fallen Empire 4
	desc = {
		text = action.1.desc_64
		trigger = {
			event_target:contact_empire = {
				is_country_type = fallen_empire
				has_ethic = ethic_fanatic_materialist
			}
		}
	}
	# Fallen Empire 5
	desc = {
		text = action.1.desc_65
		trigger = {
			event_target:contact_empire = {
				is_country_type = fallen_empire
				has_ethic = ethic_fanatic_spiritualist
			}
		}
	}
	# Awakened Fallen Empire 1
	desc = {
		text = action.1.desc_66
		trigger = {
			event_target:contact_empire = {
				is_country_type = awakened_fallen_empire
				has_ethic = ethic_fanatic_spiritualist
			}
		}
	}
	# Awakened Fallen Empire 2
	desc = {
		text = action.1.desc_67
		trigger = {
			event_target:contact_empire = {
				is_country_type = awakened_fallen_empire
				has_ethic = ethic_fanatic_xenophile
			}
		}
	}
	# Awakened Fallen Empire 3
	desc = {
		text = action.1.desc_68
		trigger = {
			event_target:contact_empire = {
				is_country_type = awakened_fallen_empire
				has_ethic = ethic_fanatic_xenophobe				
			}
		}
	}
	# Awakened Fallen Empire 4
	desc = {
		text = action.1.desc_69
		trigger = {
			event_target:contact_empire = {
				is_country_type = awakened_fallen_empire
				has_ethic = ethic_fanatic_materialist
			}
		}
	}
	#希灵帝国和平接触对话
	desc = {
		text = XILIN_PEACE_GREETING
		trigger = {
			#NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				has_authority = auth_xilin_mind
			}
		}
	}
	
	diplomatic = yes
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		event_target:contact_empire = {
			is_primitive = no
			NOT = {
				is_country_type = tiyanki
				is_country_type = neutral_faction
				is_country_type = faction
				is_country_type = pirate
				#is_country_type = nomad #triggered in a special case event
				is_country_type = amoeba
				is_country_type = crystal
				is_country_type = drone
				is_country_type = cloud
				has_relation_flag = { flag = AbandonedRefugees who = root }
			}
		}
	}
	
	immediate = {
		country_event = { id = advisor.27 }
		country_event = { id = advisor.28 }
		country_event = { id = anomaly.4016 }
		event_target:contact_empire = {
			save_event_target_as = contact_speaker
		}
	}
	
	option = {
		name = action.1.a
		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
				has_ethic = ethic_gestalt_consciousness
			}
		}
	}
	option = {
		name = action.1.ds
		trigger = {
			has_valid_civic = civic_hive_devouring_swarm
		}
	}
	option = {
		name = action.1.hm
		trigger = {
			has_authority = auth_hive_mind
			NOT = { has_valid_civic = civic_hive_devouring_swarm }
		}
	}
	option = {
		name = action.1.me
		trigger = {
			has_authority = auth_machine_intelligence
			OR = {
				has_government = gov_machine_empire
				has_government = gov_machine_research
				has_government = gov_machine_industrial
			}
		}
	}	
	option = {
		name = action.1.mt
		trigger = {
			has_valid_civic = civic_machine_terminator
			event_target:contact_empire = { NOT = { has_authority = auth_machine_intelligence } }
		}
	}
	option = {
		name = action.1.mtm
		trigger = {
			has_valid_civic = civic_machine_terminator
			event_target:contact_empire = { has_authority = auth_machine_intelligence }
		}
	}	
	option = {
		name = action.1.ma
		trigger = {
			has_valid_civic = civic_machine_assimilator
		}
	}
	option = {
		name = action.1.ms
		trigger = {
			has_valid_civic = civic_machine_servitor
		}
	}	
	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
			event_target:contact_empire = { NOT = { has_authority = auth_machine_intelligence } }
		}
	}
	option = {
		name = action.1.o
		trigger = {
			has_ethic = ethic_fanatic_spiritualist
			num_ethics < 3
			event_target:contact_empire = { NOT = { has_authority = auth_machine_intelligence } }
		}
	}
	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.r
		trigger = {
			has_ethic = ethic_spiritualist
			num_ethics < 3
			event_target:contact_empire = { has_authority = auth_machine_intelligence }
		}
	}
	option = {
		name = action.1.s
		trigger = {
			has_ethic = ethic_fanatic_spiritualist
			num_ethics < 3
			event_target:contact_empire = { has_authority = auth_machine_intelligence }
		}
	}
	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 = xilin_first_communication
		trigger = {
			has_authority = auth_xilin_mind
		}
	}

	
	after = {
		if = {
			limit = {
				NOT = {
					event_target:contact_empire = { has_relation_flag = { flag = no_coms who = root } }
				}
			}
			hidden_effect = {
				country_event = { id = progress.4 }
				country_event = { id = progress.5 }
				country_event = { id = progress.6 }
				#country_event = { id = story.7 days = 30 }
				if = {
					limit = {
						event_target:contact_empire = {
							OR = {
								is_country_type = fallen_empire
								is_country_type = awakened_fallen_empire
							}
						}
					}
					set_country_flag = Story7
					set_country_flag = has_encountered_other_empire
					if = {
						limit = { NOT = { has_country_flag = StoryFirst } }
						set_country_flag = StoryFirst
					}
				}
			}
		}
	}
}


### Duplicated action.1 so we can message both sides
country_event = {
	id = action.100
	title = action.1.name
	message_desc = action.1.message
	
	picture_event_data = {
		portrait = event_target:contact_empire
		planet_background = event_target:contact_empire
		graphical_culture = event_target:contact_empire
		city_level = event_target:contact_empire
		room = event_target:contact_empire.ruler
	}
	
	### Normal (Not Xenophobe or Xenophile)
	# Militarist Autocrat
	desc = {
		text = action.1.desc_01
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_star_empire
					has_government = gov_military_dictatorship
					has_government = gov_martial_empire
					has_government = gov_martial_dictatorship
				}
			}
		}
	}
	# Spiritualist Autocrat
	desc = {
		text = action.1.desc_02
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_theocratic_monarchy
					has_government = gov_theocratic_dictatorship
					has_government = gov_divine_empire
				}
			}
		}
	}
	# Materialist Autocrat
	desc = {
		text = action.1.desc_03
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_despotic_hegemony
					has_government = gov_totalitarian_regime
					has_government = gov_illuminated_autocracy
					has_government = gov_technocratic_dictatorship
				}
			}
		}
	}
	# Pacifist Autocrat
	desc = {
		text = action.1.desc_04
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_irenic_monarchy
					has_government = gov_irenic_dictatorship
					has_government = gov_celestial_empire
				}
			}
		}
	}
	# Generic Autocrat
	desc = {
		text = action.1.desc_05
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_despotic_empire
					has_government = gov_feudal_empire
					has_government = gov_constitutional_dictatorship
					has_government = gov_enlightened_monarchy
					has_government = gov_elective_monarchy
				}
			}
		}
	}
	# Military Oligarch
	desc = {
		text = action.1.desc_06
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_military_junta
					has_government = gov_war_council
					has_government = gov_citizen_stratocracy
				}
			}
		}
	}
	# Spiritualist Oligarch
	desc = {
		text = action.1.desc_07
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_theocratic_oligarchy
					has_government = gov_holy_tribunal
				}
			}
		}
	}
	# Materialist Oligarch
	desc = {
		text = action.1.desc_08
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_executive_committee
					has_government = gov_science_directorate
				}
			}
		}
	}
	# Pacifist Oligarch
	desc = {
		text = action.1.desc_09
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				has_government = gov_irenic_bureaucracy
			}
		}
	}
	# Generic Oligarch
	desc = {
		text = action.1.desc_10
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_megacorporation
					has_government = gov_plutocratic_oligarchy
				}
			}
		}
	}
	# Militarist Democrat
	desc = {
		text = action.1.desc_11
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_military_commissariat
					has_government = gov_assembly_of_clans
					has_government = gov_citizen_republic
				}
			}
		}
	}
	# Spiritualist Democrat
	desc = {
		text = action.1.desc_12
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				has_government = gov_theocratic_republic
			}
		}
	}
	# Materialist Democrat
	desc = {
		text = action.1.desc_13
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				OR = {
					has_government = gov_direct_democracy
					has_government = gov_rational_consensus
				}
			}
		}
	}
	# Pacifist Democrat
	desc = {
		text = action.1.desc_14
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				has_government = gov_moral_democracy
			}
		}
	}
	# Generic Democrat
	desc = {
		text = action.1.desc_15
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				NOT = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_xenophile
						has_ethic = ethic_fanatic_xenophile
					}
				}
				has_government = gov_representative_democracy
			}
		}
	}
	
	### Xenophobe
	# Militarist Autocrat
	desc = {
		text = action.1.desc_16
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_star_empire
					has_government = gov_military_dictatorship
					has_government = gov_martial_empire
					has_government = gov_martial_dictatorship
				}
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}
			}
		}
	}
	# Spiritualist Autocrat
	desc = {
		text = action.1.desc_17
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_theocratic_monarchy
					has_government = gov_theocratic_dictatorship
					has_government = gov_divine_empire
				}
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	# Materialist Autocrat
	desc = {
		text = action.1.desc_18
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_despotic_hegemony
					has_government = gov_totalitarian_regime
					has_government = gov_illuminated_autocracy
					has_government = gov_technocratic_dictatorship
				}
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	# Pacifist Autocrat
	desc = {
		text = action.1.desc_19
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_irenic_monarchy
					has_government = gov_irenic_dictatorship
					has_government = gov_celestial_empire
				}
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	# Generic Autocrat
	desc = {
		text = action.1.desc_20
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_despotic_empire
					has_government = gov_feudal_empire
					has_government = gov_constitutional_dictatorship
					has_government = gov_enlightened_monarchy
					has_government = gov_elective_monarchy
				}
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	# Military Oligarch
	desc = {
		text = action.1.desc_21
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_military_junta
					has_government = gov_war_council
					has_government = gov_citizen_stratocracy
				}
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	# Spiritualist Oligarch
	desc = {
		text = action.1.desc_22
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_theocratic_oligarchy
					has_government = gov_holy_tribunal
				}
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	# Materialist Oligarch
	desc = {
		text = action.1.desc_23
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_executive_committee
					has_government = gov_science_directorate
				}
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	# Pacifist Oligarch
	desc = {
		text = action.1.desc_24
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				has_government = gov_irenic_bureaucracy
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	# Generic Oligarch
	desc = {
		text = action.1.desc_25
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_megacorporation
					has_government = gov_plutocratic_oligarchy
				}
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	# Militarist Democrat
	desc = {
		text = action.1.desc_26
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_military_commissariat
					has_government = gov_assembly_of_clans
					has_government = gov_citizen_republic
				}
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	# Spiritualist Democrat
	desc = {
		text = action.1.desc_27
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				has_government = gov_theocratic_republic
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	# Materialist Democrat
	desc = {
		text = action.1.desc_28
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				OR = {
					has_government = gov_direct_democracy
					has_government = gov_rational_consensus
				}
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	# Pacifist Democrat
	desc = {
		text = action.1.desc_29
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				has_government = gov_moral_democracy
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	# Generic Democrat
	desc = {
		text = action.1.desc_30
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophobe
					has_ethic = ethic_fanatic_xenophobe
				}
				has_government = gov_representative_democracy
				OR = {
					NOT = { has_valid_civic = civic_fanatic_purifiers }
					NOT = { species_portrait = mam3 }
				}				
			}
		}
	}
	
	### Xenophile
	# Militarist Autocrat
	desc = {
		text = action.1.desc_31
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_star_empire
					has_government = gov_military_dictatorship
					has_government = gov_martial_empire
					has_government = gov_martial_dictatorship
				}
			}
		}
	}
	# Spiritualist Autocrat
	desc = {
		text = action.1.desc_32
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_theocratic_monarchy
					has_government = gov_theocratic_dictatorship
					has_government = gov_divine_empire
				}
			}
		}
	}
	# Materialist Autocrat
	desc = {
		text = action.1.desc_33
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_despotic_hegemony
					has_government = gov_totalitarian_regime
					has_government = gov_illuminated_autocracy
					has_government = gov_technocratic_dictatorship
				}
			}
		}
	}
	# Pacifist Autocrat
	desc = {
		text = action.1.desc_34
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_irenic_monarchy
					has_government = gov_irenic_dictatorship
					has_government = gov_celestial_empire
				}
			}
		}
	}
	# Generic Autocrat
	desc = {
		text = action.1.desc_35
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_despotic_empire
					has_government = gov_feudal_empire
					has_government = gov_constitutional_dictatorship
					has_government = gov_enlightened_monarchy
					has_government = gov_elective_monarchy
				}
			}
		}
	}
	# Military Oligarch
	desc = {
		text = action.1.desc_36
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_military_junta
					has_government = gov_war_council
					has_government = gov_citizen_stratocracy
				}
			}
		}
	}
	# Spiritualist Oligarch
	desc = {
		text = action.1.desc_37
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_theocratic_oligarchy
					has_government = gov_holy_tribunal
				}
			}
		}
	}
	# Materialist Oligarch
	desc = {
		text = action.1.desc_38
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_executive_committee
					has_government = gov_science_directorate
				}
			}
		}
	}
	# Pacifist Oligarch
	desc = {
		text = action.1.desc_39
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				has_government = gov_irenic_bureaucracy
			}
		}
	}
	# Generic Oligarch
	desc = {
		text = action.1.desc_40
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_megacorporation
					has_government = gov_plutocratic_oligarchy
				}
			}
		}
	}
	# Militarist Democrat
	desc = {
		text = action.1.desc_41
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_military_commissariat
					has_government = gov_assembly_of_clans
					has_government = gov_citizen_republic
				}
			}
		}
	}
	# Spiritualist Democrat
	desc = {
		text = action.1.desc_42
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				has_government = gov_theocratic_republic
			}
		}
	}
	# Materialist Democrat
	desc = {
		text = action.1.desc_43
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				OR = {
					has_government = gov_direct_democracy
					has_government = gov_rational_consensus
				}
			}
		}
	}
	# Pacifist Democrat
	desc = {
		text = action.1.desc_44
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				has_government = gov_moral_democracy
			}
		}
	}
	# Generic Democrat
	desc = {
		text = action.1.desc_45
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_ethic = ethic_xenophile
					has_ethic = ethic_fanatic_xenophile
				}
				has_government = gov_representative_democracy
			}
		}
	}
	
	# Fallen Empire 1
	desc = {
		text = action.1.desc_60
		trigger = {
			event_target:contact_empire = {
				is_country_type = fallen_empire
				has_ethic = ethic_fanatic_militarist
			}
		}
	}
	# Fallen Empire 2
	desc = {
		text = action.1.desc_61
		trigger = {
			event_target:contact_empire = {
				is_country_type = fallen_empire
				NOT = { has_ethic = ethic_fanatic_xenophobe }
				NOT = { has_ethic = ethic_fanatic_xenophile }
				NOT = { has_ethic = ethic_fanatic_militarist }
				NOT = { has_ethic = ethic_fanatic_materialist }
				NOT = { has_ethic = ethic_fanatic_spiritualist }
			}
		}
	}
	# Fallen Empire 3
	desc = {
		text = action.1.desc_62
		trigger = {
			event_target:contact_empire = {
				is_country_type = fallen_empire
				has_ethic = ethic_fanatic_xenophile
			}
		}
	}
	# Fallen Empire 4
	desc = {
		text = action.1.desc_63
		trigger = {
			event_target:contact_empire = {
				is_country_type = fallen_empire
				has_ethic = ethic_fanatic_xenophobe				
			}
		}
	}
	# Fallen Empire 5
	desc = {
		text = action.1.desc_64
		trigger = {
			event_target:contact_empire = {
				is_country_type = fallen_empire
				has_ethic = ethic_fanatic_materialist
			}
		}
	}
	# Fallen Empire 6
	desc = {
		text = action.1.desc_65
		trigger = {
			event_target:contact_empire = {
				is_country_type = fallen_empire
				has_ethic = ethic_fanatic_spiritualist
			}
		}
	}
	# Awakened Fallen Empire 1
	desc = {
		text = action.1.desc_66
		trigger = {
			event_target:contact_empire = {
				is_country_type = awakened_fallen_empire
				has_ethic = ethic_fanatic_spiritualist
			}
		}
	}
	# Awakened Fallen Empire 2
	desc = {
		text = action.1.desc_67
		trigger = {
			event_target:contact_empire = {
				is_country_type = awakened_fallen_empire
				has_ethic = ethic_fanatic_xenophile
			}
		}
	}
	# Awakened Fallen Empire 3
	desc = {
		text = action.1.desc_68
		trigger = {
			event_target:contact_empire = {
				is_country_type = awakened_fallen_empire
				has_ethic = ethic_fanatic_xenophobe				
			}
		}
	}
	# Awakened Fallen Empire 4
	desc = {
		text = action.1.desc_69
		trigger = {
			event_target:contact_empire = {
				is_country_type = awakened_fallen_empire
				has_ethic = ethic_fanatic_materialist
			}
		}
	}

	# Cruel Foxcat
	desc = {
		text = action.1.desc_49
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				has_valid_civic = civic_fanatic_purifiers
				species_portrait = mam3
			}
		}
	}

	# Hive Mind
	desc = {
		text = action.1.desc_50
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				has_authority = auth_hive_mind
				NOT = { has_valid_civic = civic_hive_devouring_swarm }
			}
		}
	}

	# Fanatic Purifier
	desc = {
		text = action.1.desc_51
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				has_valid_civic = civic_fanatic_purifiers
				NAND = {
					has_valid_civic = civic_fanatic_purifiers
					species_portrait = mam3
				}
			}
		}
	}
	
	# Devouring Swarm
	desc = {
		text = action.1.desc_52
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				is_country_type = default
				has_authority = auth_hive_mind
				has_valid_civic = civic_hive_devouring_swarm
			}
		}
	}

	# Generic Machine Empire (To Organics)
	desc = {
		text = action.1.desc_70
		trigger = {
			NOT = { 
				is_same_species = event_target:contact_empire 
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_government = gov_machine_empire
					has_government = gov_machine_research
					has_government = gov_machine_industrial
				}
			}
		}
	}

	# Generic Machine Empire (To Machines)
	desc = {
		text = action.1.desc_71
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			OR = {
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				OR = {
					has_government = gov_machine_empire
					has_government = gov_machine_research
					has_government = gov_machine_industrial
				}
			}
		}
	}

	# Terminator Machine Empire (To Organics)
	desc = {
		text = action.1.desc_72
		trigger = {
			NOT = { 
				is_same_species = event_target:contact_empire 
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				has_government = gov_machine_terminator
			}
		}
	}

	# Terminator Machine Empire (To Machines)
	desc = {
		text = action.1.desc_73
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			OR = {
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				has_government = gov_machine_terminator
			}
		}
	}

	# Assimilator Machine Empire (To Organics)
	desc = {
		text = action.1.desc_74
		trigger = {
			NOT = { 
				is_same_species = event_target:contact_empire 
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				has_government = gov_machine_assimilator
			}
		}
	}

	# Assimilator Machine Empire (To Machines)
	desc = {
		text = action.1.desc_75
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			OR = {
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				has_government = gov_machine_assimilator
			}
		}
	}

	# Servitor Machine Empire (To Organics)
	desc = {
		text = action.1.desc_76
		trigger = {
			NOT = { 
				is_same_species = event_target:contact_empire 
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				has_government = gov_machine_servitor
			}
		}
	}				

	# Servitor Machine Empire (To Machines)
	desc = {
		text = action.1.desc_77
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			OR = {
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = default
				has_government = gov_machine_servitor
			}
		}
	}	

	#Fallen Machine Empire (To Organics)
	desc = {
		text = action.1.desc_78
		trigger = {
			NOT = { 
				is_same_species = event_target:contact_empire 
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = fallen_empire
				has_authority = auth_machine_intelligence
			}
		}
	}				

	# Fallen Machine Empire (To Machines)
	desc = {
		text = action.1.desc_79
		trigger = {
			NOT = { is_same_species = event_target:contact_empire }
			OR = {
				has_authority = auth_machine_intelligence 
				has_country_flag = synthetic_empire
			}
			event_target:contact_empire = {
				is_country_type = fallen_empire
				has_authority = auth_machine_intelligence
			}
		}
	}
	#希灵帝国和平开场白
	desc = {
		text = XILIN_PEACE_GREETING
		trigger = {
			#NOT = { is_same_species = event_target:contact_empire }
			event_target:contact_empire = {
				has_authority = auth_xilin_mind
			}
		}
	}


	diplomatic = yes
	is_triggered_only = yes
	
	trigger = {
		is_ai = no
		event_target:contact_empire = {
			is_primitive = no
			NOT = {
				is_country_type = tiyanki
				is_country_type = neutral_faction
				is_country_type = faction
				is_country_type = pirate
				is_country_type = amoeba
				is_country_type = crystal
				is_country_type = drone
				is_country_type = cloud
				has_relation_flag = { flag = AbandonedRefugees who = root }
			}
		}
	}
	
	immediate = {
		country_event = { id = advisor.27 }
		country_event = { id = advisor.28 }
		country_event = { id = anomaly.4016 }
		event_target:contact_empire = {
			save_event_target_as = contact_speaker
		}
	}
	
	option = {
		name = action.1.a
		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
				has_ethic = ethic_gestalt_consciousness
			}
		}
	}
	option = {
		name = action.1.ds
		trigger = {
			has_valid_civic = civic_hive_devouring_swarm
		}
	}
	option = {
		name = action.1.hm
		trigger = {
			has_authority = auth_hive_mind
			NOT = { has_valid_civic = civic_hive_devouring_swarm }
		}
	}
	option = {
		name = action.1.me
		trigger = {
			has_authority = auth_machine_intelligence
			OR = {
				has_government = gov_machine_empire
				has_government = gov_machine_research
				has_government = gov_machine_industrial
			}
		}
	}	
	option = {
		name = action.1.mt
		trigger = {
			has_valid_civic = civic_machine_terminator
			event_target:contact_empire = { NOT = { has_authority = auth_machine_intelligence } }
		}
	}
	option = {
		name = action.1.mtm
		trigger = {
			has_valid_civic = civic_machine_terminator
			event_target:contact_empire = { has_authority = auth_machine_intelligence }
		}
	}	
	option = {
		name = action.1.ma
		trigger = {
			has_valid_civic = civic_machine_assimilator
		}
	}
	option = {
		name = action.1.ms
		trigger = {
			has_valid_civic = civic_machine_servitor
		}
	}	
	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
			event_target:contact_empire = { NOT = { has_authority = auth_machine_intelligence } }
		}
	}
	option = {
		name = action.1.o
		trigger = {
			has_ethic = ethic_fanatic_spiritualist
			num_ethics < 3
			event_target:contact_empire = { NOT = { has_authority = auth_machine_intelligence } }
		}
	}
	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 = xilin_first_communication
		trigger = {
			has_authority = auth_xilin_mind
		}
	}

	after = {
		if = {
			limit = {
				NOT = {
					event_target:contact_empire = { has_relation_flag = { flag = no_coms who = root } }
				}
			}
			hidden_effect = {
				country_event = { id = progress.4 }
				country_event = { id = progress.5 }
				country_event = { id = progress.6 }
				#country_event = { id = story.7 days = 30 } REMOVED DUE TO ON_ACTIONS ALSO TRIGGERING THIS, CAUSING SCOPING ISSUES
				if = {
					limit = {
						event_target:contact_empire = {
							OR = {
								is_country_type = fallen_empire
								is_country_type = awakened_fallen_empire
							}
						}
					}
					set_country_flag = Story7
					set_country_flag = has_encountered_other_empire
					if = {
						limit = { NOT = { has_country_flag = StoryFirst } }
						set_country_flag = StoryFirst
					}
				}
			}
		}
	}
}