######################################
# Astral Rifts Events - 2000 to 2900 #
######################################

#####################################
# Astral Rift - Research Lab Events #
#####################################

namespace = astral_rift

astral_rift_event = {
	id = astral_rift.2000
	title = astral_rift.2000.name
	desc = astral_rift.2000.desc
	picture = GFX_evt_astral_rift_research_lab
	show_sound = ap_rift_event_20_alien_eggs_pulsing
	difficulty = @astral_rift_initial_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2000.a
		set_next_astral_rift_event = { id = astral_rift.2015 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2000.b
		set_next_astral_rift_event = { id = astral_rift.2010 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2010
	title = astral_rift.2010.name
	desc = astral_rift.2010.desc
	picture = GFX_evt_astral_rift_research_lab_specimen
	show_sound = ap_rift_event_20_quantum_parasites_skittering_and_warping
	difficulty = @astral_rift_medium_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2010.a
		set_next_astral_rift_event = { id = astral_rift.2020 }
	}
	option = {
		name = astral_rift.2010.b
		set_next_astral_rift_event = { id = astral_rift.2025 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2015
	title = astral_rift.2015.name
	desc = astral_rift.2015.desc
	picture = GFX_evt_astral_rift_research_lab
	show_sound = event_bad_omen
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2015.a
		set_next_astral_rift_event = { id = astral_rift.2010 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2015.b
		set_next_astral_rift_event = { id = astral_rift.2040 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2020
	title = astral_rift.2020.name
	desc = astral_rift.2020.desc
	picture = GFX_evt_astral_rift_research_lab_specimen
	show_sound = ap_rift_event_20_alien_eggs_pulsing
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2020.a
		set_next_astral_rift_event = { id = astral_rift.2030 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
			min = 1
		}
	}
	option = {
		name = astral_rift.2020.b
		allow = {
			explorer = {
				has_resource = { type = astral_threads amount >= 10 }
			}
		}
		set_astral_rift_flag = labs_injected_astral_thread
		explorer = {
			add_resource = { astral_threads = -10 }
		}
		set_next_astral_rift_event = {
			id = astral_rift.2035
			on_roll_failed = astral_rift.2030
			fail_probability = @default_failure_probability
		}

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = society_research
				value = @tier1researchreward
				min = @tier1researchmin
				max = @tier1researchmax
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2025
	title = astral_rift.2025.name
	desc = astral_rift.2025.desc
	picture = GFX_evt_astral_rift_research_lab_specimen
	show_sound = ap_rift_event_20_acid_dissolving_biological_material
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2025.a
		explorer = {
			add_monthly_resource_mult = {
				resource = physics_research
				value = @tier4researchreward
				min = @tier4researchmin
				max = @tier4researchmax
			}
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}

	option = {
		exclusive_trigger = { explorer = { has_origin = origin_evolutionary_predators } }
		name = astral_rift.2025.b.evopred
		explorer = {
			give_evolutionary_predator_situation_progress_and_dna = { AMOUNT = small TYPE = reptilian }
			add_monthly_resource_mult = {
				resource = physics_research
				value = @tier4researchreward
				min = @tier4researchmin
				max = @tier4researchmax
			}
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2030
	title = astral_rift.2030.name
	desc = {
		trigger = {
			has_astral_rift_flag = labs_injected_astral_thread
		}
		text = astral_rift.2030.desc.injected
	}
	desc = {
		trigger = {
			NOT = { has_astral_rift_flag = labs_injected_astral_thread }
		}
		text = astral_rift.2030.desc.default
	}
	picture = GFX_evt_astral_rift_research_lab_specimen
	show_sound = ap_rift_event_20_alien_splatting_warping_apart
	difficulty = @astral_rift_transition_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2030.a
	}

	option = {
		exclusive_trigger = { explorer = { has_origin = origin_evolutionary_predators } }
		name = astral_rift.2030.b.evopred
		explorer = {
			give_evolutionary_predator_situation_progress_and_dna = { AMOUNT = small TYPE = reptilian }
		}
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = physics_research
				value = @tier3researchreward
				min = @tier3researchmin
				max = @tier3researchmax
			}
			astral_thread_large_reward = yes
			hidden_effect = {
				country_event = {
					id = astral_rift.2045
					days = 30
					scopes = { from = root.leader fromfrom = prev }
				}
			}
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2035
	title = astral_rift.2035.name
	desc = {
		trigger = {
			has_astral_rift_flag = description_exterminator
		}
		text = astral_rift.2035.desc.exterminator
	}
	desc = {
		trigger = {
			NOT = { has_astral_rift_flag = description_pacifist }
			NOT = { has_astral_rift_flag = description_exterminator }
		}
		text = astral_rift.2035.desc.non_pacifist
	}
	desc = {
		trigger = {
			has_astral_rift_flag = description_pacifist
			NOT = { has_astral_rift_flag = description_exterminator }
		}
		text = astral_rift.2035.desc
	}
	picture = GFX_evt_astral_rift_research_lab_specimen
	show_sound = ap_rift_event_20_newborn_alien_warpling_scream
	difficulty = @astral_rift_medium_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2035.a
		custom_tooltip = astral_rift.2035.a.tooltip
		explorer = {
			set_country_flag = unlocked_warplings
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2040
	title = astral_rift.2040.name
	desc = astral_rift.2040.desc
	picture = GFX_evt_astral_rift_research_lab
	show_sound = ap_rift_event_20_quantum_parasites_skittering_and_warping
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2040.a
		explorer = {
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

# Disintegrate parasited scientist from Research Labs Rift
country_event = {
	id = astral_rift.2045
	title = astral_rift.2045.name
	desc = astral_rift.2045.desc
	picture = GFX_evt_astral_rift_research_lab

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			from = {
				kill_leader = { show_notification = yes }
			}
		}
	}

	option = {
		name = UNFORTUNATE
		custom_tooltip = astral_rift.2045.a.tooltip
	}
}
##############################
# Astral Rift - Clock Events #
##############################

namespace = astral_rift

astral_rift_event = {
	id = astral_rift.2100
	title = astral_rift.2100.name
	desc = astral_rift.2100.desc
	picture = GFX_evt_astral_rift_clock
	show_sound = ap_rift_event_21_giant_alien_clock
	difficulty = @astral_rift_initial_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2100.a
		explorer = {
			astral_thread_small_reward = yes
		}
		set_next_astral_rift_event = { id = astral_rift.2105 }
	}
}

astral_rift_event = {
	id = astral_rift.2105
	title = astral_rift.2105.name
	desc = astral_rift.2105.desc
	picture = GFX_evt_astral_rift_clock
	show_sound = ap_rift_event_21_dimensional_machine
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2105.a
		set_next_astral_rift_event = { id = astral_rift.2110 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2105.b
		set_next_astral_rift_event = { id = astral_rift.2115 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = engineering_research
				value = @tier2researchreward
				min = @tier2researchmin
				max = @tier2researchmax
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2110
	title = astral_rift.2110.name
	desc = astral_rift.2110.desc
	picture = GFX_evt_astral_rift_clock
	show_sound = ap_rift_event_6_anchor_retrieval
	difficulty = @astral_rift_transition_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = FASCINATING
		explorer = {
			add_monthly_resource_mult = {
				resource = engineering_research
				value = @tier5researchreward
				min = @tier5researchmin
				max = @tier5researchmax
			}
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2115
	title = astral_rift.2115.name
	desc = astral_rift.2115.desc
	picture = GFX_evt_astral_rift_clock
	show_sound = ap_rift_event_21_giant_alien_clock_halt
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2115.a
		set_next_astral_rift_event = {
			id = astral_rift.2125
			on_roll_failed = astral_rift.2120
			fail_probability = @default_failure_probability
		}
	}

	after = {
		explorer = {
			astral_thread_medium_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2120
	title = astral_rift.2120.name
	desc = astral_rift.2120.desc
	picture = GFX_evt_astral_rift_clock
	show_sound = ap_rift_event_6_anchor_retrieval
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = UNFORTUNATE
		explorer = {
			add_monthly_resource_mult = {
				resource = engineering_research
				value = @tier5researchreward
				min = @tier5researchmin
				max = @tier5researchmax
			}
			astral_thread_large_reward = yes
		}
		leader = { add_age = 20 }
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2125
	title = astral_rift.2125.name
	desc = astral_rift.2125.desc
	picture = GFX_evt_astral_rift_clock
	show_sound = ap_rift_event_3_clock_slowing_down
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = FASCINATING
		explorer = {
			add_relic = r_continuum
		}
		finish_astral_rift = yes
	}
}
#########################################
# Astral Rift - Dimensional Dump Events #
#########################################

namespace = astral_rift

astral_rift_event = {
	id = astral_rift.2200
	title = astral_rift.2200.name
	desc = astral_rift.2200.desc
	picture = GFX_evt_astral_rift_dimensional_dump
	show_sound = event_scanner
	difficulty = @astral_rift_initial_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		trigger = {
			explorer = { is_unfriendly = no }
		}
		name = astral_rift.2200.a
		set_astral_rift_flag = dimensional_dump_help
		set_next_astral_rift_event = { id = astral_rift.2205 }

		ai_chance = {
			modifier = {
				add = 10
				explorer = {
					is_xenophile = yes
				}
			}
		}
	}
	option = {
		name = astral_rift.2200.b
		set_astral_rift_flag = dimensional_dump_recover_gear
		set_next_astral_rift_event = { id = astral_rift.2205 }

		ai_chance = {
			modifier = {
				add = 10
				explorer = {
					is_materialist = yes
				}
			}
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2205
	title = astral_rift.2205.name
	desc = {
		trigger = {
			has_astral_rift_flag = dimensional_dump_help
		}
		text = astral_rift.2205.desc.help
	}
	desc = {
		trigger = {
			has_astral_rift_flag = dimensional_dump_recover_gear
		}
		text = astral_rift.2205.desc.recover_gear
	}
	picture = GFX_evt_astral_rift_dimensional_dump
	show_sound = event_red_alert
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2205.a
		trigger = {
			has_astral_rift_flag = dimensional_dump_recover_gear
		}
		set_next_astral_rift_event = { id = astral_rift.2210 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2205.a
		trigger = {
			has_astral_rift_flag = dimensional_dump_help
		}
		set_next_astral_rift_event = {
			id = astral_rift.2210
			on_roll_failed = astral_rift.2220
			fail_probability = @default_failure_probability
		}

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		trigger = {
			explorer = { is_unfriendly = no }
		}
		name = astral_rift.2205.b
		set_next_astral_rift_event = { id = astral_rift.2215 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
			modifier = {
				add = 100
				explorer = {
					OR = {
						is_pacifist = yes
						is_xenophile = yes
					}
				}
			}
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2210
	title = astral_rift.2210.name
	desc = {
		trigger = {
			has_astral_rift_flag = dimensional_dump_help
		}
		text = astral_rift.2210.desc.help
	}
	desc = {
		trigger = {
			has_astral_rift_flag = dimensional_dump_recover_gear
		}
		text = astral_rift.2210.desc.recover_gear
	}
	picture = GFX_evt_astral_rift_dimensional_dump
	show_sound = ap_rift_event_22_plasma_pistol
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2210.a
		if = {
			limit = {
				has_astral_rift_flag = dimensional_dump_recover_gear
			}
			explorer = {
				add_monthly_resource_mult = {
					resource = engineering_research
					value = @tier5researchreward
					min = @tier5researchmin
					max = @tier5researchmax
				}
			}
		}
		explorer = {
			add_monthly_resource_mult = {
				resource = minerals
				value = @tier4materialreward
				min = @tier4materialmin
				max = @tier4materialmax
			}
			add_monthly_resource_mult = {
				resource = alloys
				value = @tier4materialreward
				min = @tier4materialmin
				max = @tier4materialmax
			}
			astral_thread_medium_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2215
	title = astral_rift.2215.name
	desc = astral_rift.2215.desc
	picture = GFX_evt_astral_rift_dimensional_dump
	show_sound = event_conversation
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2215.a
		explorer = {
			astral_thread_small_reward = yes
		}
		set_next_astral_rift_event = { id = astral_rift.2225 }
	}
}

astral_rift_event = {
	id = astral_rift.2220
	title = astral_rift.2220.name
	desc = astral_rift.2220.desc
	picture = GFX_evt_astral_rift_dimensional_dump
	show_sound = ap_rift_event_22_plasma_pistol
	difficulty = @astral_rift_medium_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = UNFORTUNATE
		leader = {
			kill_leader = { class = scientist show_notification = yes }
		}
		explorer = {
			add_monthly_resource_mult = {
				resource = alloys
				value = @tier4materialreward
				min = @tier4materialmin
				max = @tier4materialmax
			}
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2225
	title = astral_rift.2225.name
	desc = astral_rift.2225.desc
	picture = GFX_evt_astral_rift_dimensional_dump
	show_sound = event_conversation
	difficulty = @astral_rift_transition_difficulty
	astral_rift = yes

	is_triggered_only = yes

	immediate = {
		explorer = {
			create_species = {
				name = random
				class = HUM
				portrait = random
				traits = random
				allow_negative_traits = no
				namelist = random_class
				effect = {
					save_event_target_as = astral_rift_dimensional_dump_species
				}
			}
			create_leader = {
				species = event_target:astral_rift_dimensional_dump_species
				class = commander
				skill = 6
				effect = {
					save_global_event_target_as = astral_rift_dimensional_dump_leader_loc
					save_event_target_as = astral_rift_dimensional_dump_leader@owner
					exile_leader_as = astral_rift_dimensional_dump_leader@owner
				}
				traits = {
					1 = leader_trait_rift_warped
				}
			}
		}
	}

	option = {
		name = astral_rift.2225.a
		custom_tooltip = astral_rift.2225.a.tt
		explorer = {
			add_monthly_resource_mult = {
				resource = society_research
				value = @tier3researchreward
				min = @tier3researchmin
				max = @tier3researchmax
			}
			astral_thread_large_reward = yes
			country_event = {
				id = astral_rift.2230
				days = 360
				scopes = { from = event_target:astral_rift_dimensional_dump_leader@this }
			}
		}
		finish_astral_rift = yes
	}
}

country_event = {
	id = astral_rift.2230
	title = astral_rift.2230.name
	desc = astral_rift.2230.desc
	picture = GFX_evt_astral_rift_dimensional_dump
	show_sound = event_conversation

	is_triggered_only = yes

	trigger = {
		exists = from
	}

	immediate = {
		from = {
			save_global_event_target_as = astral_rift_dimensional_dump_leader_loc
		}
	}

	option = {
		name = astral_rift.2230.a
		clone_leader = {
			target = from
		}
		hidden_effect = {
			from = {
				kill_leader = { show_notification = yes }
			}
		}
	}
}

################################
# Astral Rift - Genesis Events #
################################

namespace = astral_rift

astral_rift_event = {
	id = astral_rift.2300
	title = astral_rift.2300.name
	desc = astral_rift.2300.desc
	picture = GFX_evt_astral_rift_genesis_1
	show_sound = ap_rift_event_23_alien_holoprojection
	difficulty = @astral_rift_initial_difficulty
	astral_rift = yes

	is_triggered_only = yes

	immediate = {
		create_species = {
			name = random
			class = random_pre_ftl
			portrait = random
			traits = {}
			effect = {
				save_global_event_target_as = genesis_new_species_base
			}
		}

		# Selects a planet to spawn the new pop
		solar_system = {
			find_closest_player_planet = {
				OWNER_SCOPE = root.explorer
				GLOBAL_TARGET = genesis_new_species_selected_planet
			}
		}
	}

	option = {
		name = astral_rift.2300.a
		set_next_astral_rift_event = { id = astral_rift.2305 }

		ai_chance = {
			modifier = {
				add = 10
				explorer = {
					OR = {
						has_ethic = ethic_militarist
						has_ethic = ethic_authoritarian
					}
				}
			}
			modifier = {
				add = 100
				explorer = {
					OR = {
						has_ethic = ethic_fanatic_militarist
						has_ethic = ethic_fanatic_authoritarian
					}
				}
			}
		}
	}
	option = {
		name = astral_rift.2300.b
		set_next_astral_rift_event = { id = astral_rift.2310 }

		ai_chance = {
			modifier = {
				add = 10
				explorer = {
					OR = {
						has_ethic = ethic_egalitarian
						has_ethic = ethic_pacifist
						has_ethic = ethic_materialist
					}
				}
			}
			modifier = {
				add = 100
				explorer = {
					OR = {
						is_fanatic_egalitarian = yes
						has_ethic = ethic_fanatic_pacifist
						has_ethic = ethic_fanatic_materialist
					}
				}
			}
		}
	}
	option = {
		name = astral_rift.2300.c
		set_next_astral_rift_event = { id = astral_rift.2315 }

		ai_chance = {
			modifier = {
				add = 10
				explorer = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_spiritualist
					}
				}
			}
			modifier = {
				add = 100
				explorer = {
					OR = {
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_fanatic_spiritualist
					}
				}
			}
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2305
	title = astral_rift.2305.name
	desc = astral_rift.2305.desc
	picture = GFX_evt_astral_rift_genesis_2
	show_sound = ap_rift_event_23_alien_holoprojection
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	immediate = {
		set_astral_rift_flag = new_civ_strength_path
		event_target:genesis_new_species_base = {
			modify_species = {
				species = this
				base = none
				add_trait = trait_strong
				effect = {
					save_global_event_target_as = genesis_new_species_first_step
				}
			}
		}
	}

	option = {
		name = astral_rift.2305.a
		set_next_astral_rift_event = { id = astral_rift.2320 }

		ai_chance = {
			base = 1
			modifier = {
				add = 10
				explorer = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_militarist
						has_ethic = ethic_authoritarian
						has_ethic = ethic_materialist
					}
				}
			}
			modifier = {
				add = 100
				explorer = {
					OR = {
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_fanatic_militarist
						has_ethic = ethic_fanatic_authoritarian
						has_ethic = ethic_fanatic_materialist
					}
				}
			}
		}
	}
	option = {
		name = astral_rift.2305.b
		set_next_astral_rift_event = { id = astral_rift.2325 }

		ai_chance = {
			base = 1
			modifier = {
				add = 10
				explorer = {
					OR = {
						has_ethic = ethic_pacifist
						has_ethic = ethic_egalitarian
						has_ethic = ethic_spiritualist
						has_ethic = ethic_xenophile
					}
				}
			}
			modifier = {
				add = 100
				explorer = {
					OR = {
						has_ethic = ethic_fanatic_pacifist
						is_fanatic_egalitarian = yes
						has_ethic = ethic_fanatic_spiritualist
						has_ethic = ethic_fanatic_xenophile
					}
				}
			}
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2310
	title = astral_rift.2310.name
	desc = astral_rift.2310.desc
	picture = GFX_evt_astral_rift_genesis_2
	show_sound = ap_rift_event_23_alien_holoprojection
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	immediate = {
		set_astral_rift_flag = new_civ_intelligence_path
		event_target:genesis_new_species_base = {
			modify_species = {
				species = this
				base = none
				add_trait = trait_presapient_natural_intellectuals
				effect = {
					save_global_event_target_as = genesis_new_species_first_step
				}
			}
		}
	}

	option = {
		name = astral_rift.2310.a
		set_next_astral_rift_event = { id = astral_rift.2320 }

		ai_chance = {
			base = 1
			modifier = {
				add = 10
				explorer = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_militarist
						has_ethic = ethic_authoritarian
						has_ethic = ethic_materialist
					}
				}
			}
			modifier = {
				add = 100
				explorer = {
					OR = {
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_fanatic_militarist
						has_ethic = ethic_fanatic_authoritarian
						has_ethic = ethic_fanatic_materialist
					}
				}
			}
		}
	}
	option = {
		name = astral_rift.2310.b
		set_next_astral_rift_event = { id = astral_rift.2325 }

		ai_chance = {
			base = 1
			modifier = {
				add = 10
				explorer = {
					OR = {
						has_ethic = ethic_pacifist
						has_ethic = ethic_egalitarian
						has_ethic = ethic_spiritualist
						has_ethic = ethic_xenophile
					}
				}
			}
			modifier = {
				add = 100
				explorer = {
					OR = {
						has_ethic = ethic_fanatic_pacifist
						is_fanatic_egalitarian = yes
						has_ethic = ethic_fanatic_spiritualist
						has_ethic = ethic_fanatic_xenophile
					}
				}
			}
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2315
	title = astral_rift.2315.name
	desc = astral_rift.2315.desc
	picture = GFX_evt_sapient_AI
	show_sound = ap_rift_event_10_emp_sound

	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes
	is_triggered_only = yes
	specimen = genesis_core

	option = {
		name = OK
		explorer = {
			add_monthly_resource_mult = {
				resource = alloys
				value = @tier5materialreward
				min = @tier5materialmin
				max = @tier5materialmax
			}
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2320
	title = astral_rift.2320.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				new_civ_strength_path = { text = astral_rift.2320.desc.strength }
				new_civ_intelligence_path = { text = astral_rift.2320.desc.intelligence }
			}
		}
	}
	picture = GFX_evt_astral_rift_genesis_3
	show_sound = ap_rift_event_23_alien_holoprojection
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	immediate = {
		set_astral_rift_flag = new_civ_diligence_path
		event_target:genesis_new_species_first_step = {
			modify_species = {
				species = this
				base = none
				add_trait = trait_presapient_proles
				effect = {
					save_global_event_target_as = genesis_new_species_second_step
				}
			}
		}
	}

	option = {
		name = astral_rift.2320.a
		set_astral_rift_flag = new_civ_conservative_path
		set_next_astral_rift_event = { id = astral_rift.2330 }

		ai_chance = {
			base = 1
			modifier = {
				add = 10
				explorer = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_militarist
						has_ethic = ethic_authoritarian
						has_ethic = ethic_materialist
					}
				}
			}
			modifier = {
				add = 100
				explorer = {
					OR = {
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_fanatic_militarist
						has_ethic = ethic_fanatic_authoritarian
						has_ethic = ethic_fanatic_materialist
					}
				}
			}
		}
	}
	option = {
		name = astral_rift.2320.b
		set_astral_rift_flag = new_civ_starborn_path
		set_next_astral_rift_event = { id = astral_rift.2330 }

		ai_chance = {
			base = 1
			modifier = {
				add = 10
				explorer = {
					OR = {
						has_ethic = ethic_pacifist
						has_ethic = ethic_egalitarian
						has_ethic = ethic_spiritualist
						has_ethic = ethic_xenophile
					}
				}
			}
			modifier = {
				add = 100
				explorer = {
					OR = {
						has_ethic = ethic_fanatic_pacifist
						is_fanatic_egalitarian = yes
						has_ethic = ethic_fanatic_spiritualist
						has_ethic = ethic_fanatic_xenophile
					}
				}
			}
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2325
	title = astral_rift.2325.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				new_civ_strength_path = { text = astral_rift.2325.desc.strength }
				new_civ_intelligence_path = { text = astral_rift.2325.desc.intelligence }
			}
		}
	}
	picture = GFX_evt_astral_rift_genesis_3
	show_sound = ap_rift_event_23_alien_holoprojection
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	immediate = {
		set_astral_rift_flag = new_civ_creativity_path
		event_target:genesis_new_species_first_step = {
			modify_species = {
				species = this
				base = none
				add_trait = trait_ingenious
				effect = {
					save_global_event_target_as = genesis_new_species_second_step
				}
			}
		}
	}

	option = {
		name = astral_rift.2325.a
		set_astral_rift_flag = new_civ_conservative_path
		set_next_astral_rift_event = { id = astral_rift.2330 }

		ai_chance = {
			base = 1
			modifier = {
				add = 10
				explorer = {
					OR = {
						has_ethic = ethic_xenophobe
						has_ethic = ethic_militarist
						has_ethic = ethic_authoritarian
						has_ethic = ethic_materialist
					}
				}
			}
			modifier = {
				add = 100
				explorer = {
					OR = {
						has_ethic = ethic_fanatic_xenophobe
						has_ethic = ethic_fanatic_militarist
						has_ethic = ethic_fanatic_authoritarian
						has_ethic = ethic_fanatic_materialist
					}
				}
			}
		}
	}
	option = {
		name = astral_rift.2325.b
		set_astral_rift_flag = new_civ_starborn_path
		set_next_astral_rift_event = { id = astral_rift.2330 }

		ai_chance = {
			base = 1
			modifier = {
				add = 10
				explorer = {
					OR = {
						has_ethic = ethic_pacifist
						has_ethic = ethic_egalitarian
						has_ethic = ethic_spiritualist
						has_ethic = ethic_xenophile
					}
				}
			}
			modifier = {
				add = 100
				explorer = {
					OR = {
						has_ethic = ethic_fanatic_pacifist
						is_fanatic_egalitarian = yes
						has_ethic = ethic_fanatic_spiritualist
						has_ethic = ethic_fanatic_xenophile
					}
				}
			}
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2330
	title = astral_rift.2330.name
	desc = astral_rift.2330.desc
	picture = GFX_evt_astral_rift_genesis_3
	show_sound = ap_rift_event_23_alien_holoprojection_shutdown
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	immediate = {
		event_target:genesis_new_species_second_step = {
			if = {
				limit = {
					root = { has_astral_rift_flag = new_civ_conservative_path }
				}
				modify_species = {
					species = this
					base = none
					add_trait = trait_presapient_conservative
					ideal_planet_class = event_target:genesis_new_species_selected_planet
					effect = {
						save_event_target_as = genesis_new_species_final_step
					}
				}
			}
			else_if = {
				limit = {
					root = { has_astral_rift_flag = new_civ_starborn_path }
				}
				modify_species = {
					species = this
					base = none
					add_trait = trait_presapient_starborn
					ideal_planet_class = event_target:genesis_new_species_selected_planet
					effect = {
						save_event_target_as = genesis_new_species_final_step
					}
				}
			}
		}
	}

	option = {
		name = FASCINATING
		explorer = {
			astral_thread_large_reward = yes
			if = {
				limit = { is_gestalt = yes }
				add_monthly_resource_mult = {
					resource = society_research
					value = @tier3researchreward
					min = @tier3researchmin
					max = @tier3researchmax
				}
				add_modifier = {
					modifier = "genesis_insight_modifier"
				}
			}
		}
		event_target:genesis_new_species_selected_planet = {
			create_pop_group = {
				species = event_target:genesis_new_species_final_step
			}
		}
		finish_astral_rift = yes
	}
}

# Lock Genesis rift from pool when it's drawn (once at a time)
# THIS = Country: Explorer country
# FROM = AstralRift: Explored astral rift
# FROMFROM = Explorer fleet
country_event = {
	id = astral_rift.2398
	hide_window = yes

	is_triggered_only = yes

	trigger = {
		has_astral_planes_dlc = yes
		from = {
			has_astral_rift_flag = genesis_rift
		}
	}

	immediate = {
		set_global_flag = genesis_rift_being_explored

		# Clear global event targets that will be used by the rift
		if = {
			limit = { exists = event_target:genesis_new_species_base }
			clear_global_event_target = genesis_new_species_base
		}
		if = {
			limit = { exists = event_target:genesis_new_species_first_step }
			clear_global_event_target = genesis_new_species_first_step
		}
		if = {
			limit = { exists = event_target:genesis_new_species_second_step }
			clear_global_event_target = genesis_new_species_second_step
		}
		if = {
			limit = { exists = event_target:genesis_new_species_selected_planet }
			clear_global_event_target = genesis_new_species_selected_planet
		}
	}
}

# Unlock Genesis rift from pool when it's over
# THIS = Country: Explorer country
# FROM = AstralRift: Explored astral rift
# FROMFROM = Explorer fleet
country_event = {
	id = astral_rift.2399
	hide_window = yes

	is_triggered_only = yes

	trigger = {
		has_astral_planes_dlc = yes
		from = {
			has_astral_rift_flag = genesis_rift
		}
	}

	immediate = {
		remove_global_flag = genesis_rift_being_explored
	}
}
##############################################
# Astral Rift - Entangled Dark Matter Events #
##############################################

namespace = astral_rift

astral_rift_event = {
	id = astral_rift.2400
	title = astral_rift.2400.name
	desc = astral_rift.2400.desc
	picture = GFX_evt_astral_rift_entangled_dark_matter
	show_sound = ap_rift_event_24_electric_fence
	difficulty = @astral_rift_initial_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2400.a
		set_next_astral_rift_event = { id = astral_rift.2405 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2400.b
		trigger = {
			has_astral_rift_flag = description_organic
		}
		set_next_astral_rift_event = { id = astral_rift.2410 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2400.b
		trigger = {
			has_astral_rift_flag = description_robotic
			NOT = { has_astral_rift_flag = description_organic }
		}
		set_next_astral_rift_event = { id = astral_rift.2411 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = sr_dark_matter
				value = @tier1materialreward
				min = @tier1materialmin
				max = @tier1materialmax
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2405
	title = astral_rift.2405.name
	desc = astral_rift.2405.desc
	picture = GFX_evt_astral_rift_entangled_dark_matter
	show_sound = ap_rift_event_24_electric_fence
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2405.a
		set_next_astral_rift_event = { id = astral_rift.2425 }
	}
	option = {
		name = astral_rift.2405.b
		trigger = {
			has_astral_rift_flag = description_organic
		}
		set_next_astral_rift_event = { id = astral_rift.2410 }
	}
	option = {
		name = astral_rift.2405.b
		trigger = {
			has_astral_rift_flag = description_robotic
		}
		set_next_astral_rift_event = { id = astral_rift.2411 }
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = engineering_research
				value = @tier2researchreward
				min = @tier2researchmin
				max = @tier2researchmax
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2410
	title = astral_rift.2410.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_gestalt = { text = astral_rift.2410.desc.gestalt }
				default = { text = astral_rift.2410.desc.default }
			}
		}
	}
	picture = GFX_evt_astral_rift_entangled_dark_matter
	show_sound = ap_rift_event_24_ethereal_mental_comms
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2410.a
		set_next_astral_rift_event = { id = astral_rift.2415 }
	}
	option = {
		name = astral_rift.2410.b
		set_next_astral_rift_event = { id = astral_rift.2415 }
	}
	option = {
		name = astral_rift.2410.c
		set_next_astral_rift_event = { id = astral_rift.2415 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2411
	title = astral_rift.2411.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_gestalt = { text = astral_rift.2411.desc.gestalt }
				default = { text = astral_rift.2411.desc.default }
			}
		}
	}
	picture = GFX_evt_astral_rift_entangled_dark_matter
	show_sound = ap_rift_event_24_ethereal_mental_comms
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2410.a
		set_next_astral_rift_event = { id = astral_rift.2415 }
	}
	option = {
		name = astral_rift.2410.b
		set_next_astral_rift_event = { id = astral_rift.2415 }
	}
	option = {
		name = astral_rift.2410.c
		set_next_astral_rift_event = { id = astral_rift.2415 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2415
	title = astral_rift.2415.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_gestalt = {
					switch = {
						trigger = has_astral_rift_flag
						description_psionic = { text = astral_rift.2415.desc.gestalt_psionic }
						default = { text = astral_rift.2415.desc.gestalt }
					}
				}
				default = {
					switch = {
						trigger = has_astral_rift_flag
						description_psionic = { text = astral_rift.2415.desc.psionic }
						default = { text = astral_rift.2415.desc.default }
					}
				}
			}
		}
	}
	picture = GFX_evt_astral_rift_entangled_dark_matter
	show_sound = ap_rift_event_24_ethereal_mental_comms
	difficulty = @astral_rift_transition_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2415.a
		trigger = {
			NOR = {
				has_astral_rift_flag = description_gestalt
				has_astral_rift_flag = description_psionic
			}

		}
		allow = {
			explorer = {
				is_egalitarian = no
			}
		}
		set_next_astral_rift_event = {
			id = astral_rift.2430
			on_roll_failed = astral_rift.2435
			fail_probability = @default_failure_probability
		}
	}
	option = {
		name = astral_rift.2415.a
		trigger = {
			NOT = { has_astral_rift_flag = description_gestalt }
			has_astral_rift_flag = description_psionic
		}
		set_next_astral_rift_event = { id = astral_rift.2431 }
	}
	option = {
		name = astral_rift.2415.b
		trigger = {
			NOT = { has_astral_rift_flag = description_gestalt }
		}
		set_next_astral_rift_event = { id = astral_rift.2420 }
	}
	option = {
		name = astral_rift.2415.c
		trigger = {
			has_astral_rift_flag = description_gestalt
		}
		set_next_astral_rift_event = { id = astral_rift.2440 }
	}
	option = {
		name = astral_rift.2415.d
		trigger = {
			has_astral_rift_flag = description_gestalt
		}
		set_next_astral_rift_event = { id = astral_rift.2420 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2420
	title = astral_rift.2420.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_machine_consciousness = { text = astral_rift.2420.desc.machine }
				description_hive_mind = { text = astral_rift.2420.desc.hive }
				default = { text = astral_rift.2420.desc.default }
			}
		}
	}
	picture = GFX_evt_astral_rift_entangled_dark_matter
	show_sound = ap_rift_event_24_ethereal_mental_despair
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		trigger = {
			explorer = { is_unfriendly = no }
		}
		name = astral_rift.2420.a
		set_next_astral_rift_event = { id = astral_rift.2426 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2420.b
		set_next_astral_rift_event = { id = astral_rift.2445 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		trigger = {
			explorer = { is_unfriendly = yes }
		}
		name = astral_rift.2420.c
		set_next_astral_rift_event = { id = astral_rift.2427 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2425
	title = astral_rift.2425.name
	desc = astral_rift.2425.desc
	picture = GFX_evt_astral_rift_entangled_dark_matter_2
	show_sound = ap_rift_event_24_electric_death
	difficulty = @astral_rift_medium_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2425.a
	}

	option = {
		name = astral_rift.2425.b
	}

	after = {
		explorer = {
			astral_thread_large_reward = yes
			add_monthly_resource_mult = {
				resource = sr_dark_matter
				value = @tier5materialreward
				min = @tier5materialmin
				max = @tier5materialmax
			}
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2426
	title = astral_rift.2426.name
	desc = astral_rift.2426.desc
	picture = GFX_evt_astral_rift_entangled_dark_matter_2
	show_sound = ap_rift_event_24_electric_death
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2425.a
	}

	option = {
		name = astral_rift.2425.b
	}

	after = {
		explorer = {
			astral_thread_large_reward = yes
			add_monthly_resource_mult = {
				resource = sr_dark_matter
				value = @tier5materialreward
				min = @tier5materialmin
				max = @tier5materialmax
			}
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2427
	title = astral_rift.2427.name
	desc = astral_rift.2427.desc
	picture = GFX_evt_astral_rift_entangled_dark_matter_2
	show_sound = ap_rift_event_24_electric_death
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2425.a
	}

	option = {
		name = astral_rift.2425.b
	}

	option = {
		trigger = {
			explorer = { is_unfriendly = yes }
		}
		name = astral_rift.2427.c
	}

	after = {
		explorer = {
			astral_thread_large_reward = yes
			add_monthly_resource_mult = {
				resource = sr_dark_matter
				value = @tier5materialreward
				min = @tier5materialmin
				max = @tier5materialmax
			}
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2430
	title = astral_rift.2430.name
	desc = astral_rift.2430.desc
	picture = GFX_evt_astral_rift_entangled_dark_matter_2
	show_sound = ap_rift_event_24_ethereal_mental_comms
	difficulty = @astral_rift_medium_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2430.a
		leader = {
			remove_all_traits = yes
			set_skill = 5
			hidden_effect = {
				add_trait = {
					trait = subclass_scientist_scholar
					consume_selection = yes
				}
				add_trait = {
					trait = leader_trait_resilient
					consume_selection = yes
				}
				add_trait = {
					trait = leader_trait_planar_theorist
					consume_selection = yes
				}
				add_trait = {
					trait = leader_trait_psionic
				}
				add_trait = {
					trait = leader_trait_academic_astral_rift_expert
					consume_selection = yes
				}
				add_trait = {
					trait = leader_trait_foreign_consciousness
					consume_selection = yes
				}
				add_initial_leader_traits_effect = yes
			}
		}
		explorer = {
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2431
	title = astral_rift.2430.name
	desc = astral_rift.2431.desc
	picture = GFX_evt_astral_rift_entangled_dark_matter_2
	show_sound = ap_rift_event_24_ethereal_mental_comms
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2430.a
		leader = {
			if = {
				limit = {
					NOT = { has_trait = leader_trait_resilient }
				}
				add_trait = {
					trait = leader_trait_resilient
				}
			}
			if = {
				limit = {
					NOT = { has_trait_tier1or2 = { TRAIT = leader_trait_planar_theorist } }
				}
				add_trait = {
					trait = leader_trait_planar_theorist
				}
			}
			else_if = {
				limit = {
					NOT = { has_trait = leader_trait_planar_theorist_2 }
				}
				add_trait = {
					trait = leader_trait_planar_theorist_2
				}
			}
			add_trait = {
				trait = leader_trait_foreign_consciousness
			}
		}
		explorer = {
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2435
	title = astral_rift.2435.name
	desc = astral_rift.2435.desc
	picture = GFX_evt_astral_rift_entangled_dark_matter_2
	show_sound = event_screams
	difficulty = @astral_rift_medium_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = UNFORTUNATE
		explorer = {
			astral_thread_large_reward = yes
			add_monthly_resource_mult = {
				resource = sr_dark_matter
				value = @tier5materialreward
				min = @tier5materialmin
				max = @tier5materialmax
			}
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2440
	title = astral_rift.2430.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_machine_consciousness = { text = astral_rift.2440.desc.machine }
				description_hive_mind = { text = astral_rift.2440.desc.hive }
			}
		}
	}
	picture = GFX_evt_astral_rift_entangled_dark_matter_2
	show_sound = ap_rift_event_24_ethereal_mental_comms
	difficulty = @astral_rift_medium_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2430.a
		explorer = {
			astral_thread_large_reward = yes
			add_modifier = {
				modifier = foreign_consciousness_modifier
			}
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2445
	title = astral_rift.2445.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_robotic = { text = astral_rift.2445.desc.robotic }
				default = { text = astral_rift.2445.desc.default }
			}
		}
	}
	picture = GFX_evt_astral_rift_entangled_dark_matter_2
	show_sound = evn_fc_observation
	difficulty = @astral_rift_medium_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2445.a
		add_deposit = d_physics_25
		add_deposit = d_engineering_25
		explorer = {
			astral_thread_large_reward = yes
		}
		hidden_effect = {
			explorer = {
				country_event = {
					id = astral_rift.2450
					days = 3600
					random = 360
					scopes = { from = prev }
				}
			}
		}
		finish_astral_rift = yes
	}
}

country_event = {
	id = astral_rift.2450
	title = astral_rift.2450.name
	desc = astral_rift.2450.desc
	picture = GFX_evt_astral_rift_entangled_dark_matter_2
	show_sound = event_bad_omen

	is_triggered_only = yes

	option = {
		name = UNFORTUNATE
		from = {
			remove_deposit = d_physics_25
			remove_deposit = d_engineering_25
		}
	}
}
########################################
# Astral Rift - Bleached Planet Events #
########################################

namespace = astral_rift

astral_rift_event = {
	id = astral_rift.2500
	title = astral_rift.2500.name
	desc = astral_rift.2500.desc
	picture = GFX_evt_astral_rift_bleached_planet
	show_sound = ap_rift_event_25_calm_alien_tranquility
	difficulty = @astral_rift_initial_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2500.a
		explorer = {
			astral_thread_small_reward = yes
		}
		set_next_astral_rift_event = { id = astral_rift.2505 }
	}
}

astral_rift_event = {
	id = astral_rift.2505
	title = astral_rift.2505.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_plantoid = { text = astral_rift.2505.desc.plantoid }
				default = { text = astral_rift.2505.desc.default }
			}
		}
	}
	picture = GFX_evt_astral_rift_bleached_planet
	show_sound = ap_rift_event_25_calm_alien_tranquility
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2505.a
		set_next_astral_rift_event = { id = astral_rift.2510 }
	}
	option = {
		name = astral_rift.2505.b
		set_next_astral_rift_event = { id = astral_rift.2515 }
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = society_research
				value = @tier3researchreward
				min = @tier3researchmin
				max = @tier3researchmax
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2510
	title = astral_rift.2510.name
	desc = astral_rift.2510.desc
	picture = GFX_evt_astral_rift_bleached_planet_3
	show_sound = ap_rift_event_25_rock_creatures
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2510.a
		set_next_astral_rift_event = { id = astral_rift.2520 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2510.b
		set_next_astral_rift_event = { id = astral_rift.2530 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2515
	title = astral_rift.2515.name
	desc = astral_rift.2515.desc
	picture = GFX_evt_astral_rift_bleached_planet_3
	show_sound = ap_rift_event_25_rock_creatures
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2515.a
		set_next_astral_rift_event = { id = astral_rift.2525 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2515.b
		set_next_astral_rift_event = { id = astral_rift.2530 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = society_research
				value = @tier2researchreward
				min = @tier2researchmin
				max = @tier2researchmax
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2520
	title = astral_rift.2520.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_gestalt = { text = astral_rift.2520.desc.gestalt }
				description_organic = { text = astral_rift.2520.desc.organic_non_gestalt }
				default = { text = astral_rift.2520.desc.default }
			}
		}
	}
	picture = GFX_evt_astral_rift_bleached_planet_2
	show_sound = ap_rift_event_25_black_sun
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2520.a
		set_next_astral_rift_event = { id = astral_rift.2535 }
	}
	option = {
		name = astral_rift.2520.b
		set_astral_rift_flag = ordered_turn_away
		set_next_astral_rift_event = { id = astral_rift.2535 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2525
	title = astral_rift.2525.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_lithoid = { text = astral_rift.2525.desc.lithoid }
				default = {
					if = {
						limit = {
							explorer = { is_unfriendly = yes }
						}
						text = astral_rift.2525.desc.unfriendly_nonlithoid
					}
					else = {
						text = astral_rift.2525.desc.default
					}
				}
			}
		}
	}
	picture = GFX_evt_astral_rift_bleached_planet_3
	show_sound = ap_rift_event_25_rock_creatures
	difficulty = @astral_rift_medium_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2525.a
		explorer = {
			add_random_research_option = {
				add_progress = 0.25
				category = biology
			}
		}
		hidden_effect = {
			add_stage_modifier = { modifier = astral_rift_difficulty_increase_2 }
		}
		set_next_astral_rift_event = { id = astral_rift.2530 }
	}
}

astral_rift_event = {
	id = astral_rift.2530
	title = astral_rift.2530.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_gestalt = { text = astral_rift.2530.desc.gestalt }
				default = { text = astral_rift.2530.desc.default }
			}
		}
	}
	picture = GFX_evt_astral_rift_bleached_planet_3
	show_sound = ap_rift_event_25_rock_creatures
	difficulty = @astral_rift_transition_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2530.a
		hidden_effect = {
			add_stage_modifier = { modifier = astral_rift_difficulty_increase_2 }
		}
		set_next_astral_rift_event = { id = astral_rift.2535 }
	}
	option = {
		name = astral_rift.2530.b
		set_next_astral_rift_event = { id = astral_rift.2540 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2535
	title = astral_rift.2535.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				ordered_turn_away = {
					switch = {
						trigger = has_astral_rift_flag
						description_machine_consciousness = { text = astral_rift.2535.desc.ordered_turn_away_machine }
						description_hive_mind = { text = astral_rift.2535.desc.ordered_turn_away_hive }
						default = { text = astral_rift.2535.desc.ordered_turn_away_default }
					}
				}
				default = {
					switch = {
						trigger = has_astral_rift_flag
						description_machine_consciousness = { text = astral_rift.2535.desc.machine }
						description_hive_mind = { text = astral_rift.2535.desc.hive }
						default = { text = astral_rift.2535.desc.default }
					}
				}
			}
		}
	}
	picture = GFX_evt_astral_rift_bleached_planet_2
	show_sound = ap_rift_event_25_black_sun
	difficulty = @astral_rift_transition_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = FASCINATING
		explorer = {
			astral_thread_large_reward = yes
		}
		leader = {
			if = {
				limit = {
					NOT = { has_trait = leader_trait_spark_of_genius_2 }
				}
				add_trait = {
					trait = leader_trait_spark_of_genius_2
				}
			}
			add_trait = {
				trait = leader_trait_black_light_blinded
			}
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2540
	title = astral_rift.2540.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_gestalt = { text = astral_rift.2540.desc.gestalt }
				default = { text = astral_rift.2540.desc.default }
			}
		}
	}
	picture = GFX_evt_astral_rift_bleached_planet_2
	show_sound = evn_fc_observation
	difficulty = @astral_rift_transition_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = FASCINATING
		explorer = {
			astral_thread_large_reward = yes
		}
		add_deposit = d_physics_10
		finish_astral_rift = yes
	}
}
########################################
# Astral Rift - Cleaning Drones Events #
########################################

namespace = astral_rift

astral_rift_event = {
	id = astral_rift.2600
	title = astral_rift.2600.name
	desc = astral_rift.2600.desc
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = event_scanner
	difficulty = @astral_rift_initial_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2600.a
		set_next_astral_rift_event = { id = astral_rift.2605 }
	}
	option = {
		name = astral_rift.2600.b
		set_next_astral_rift_event = { id = astral_rift.2610 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2605
	title = astral_rift.2605.name
	desc = astral_rift.2605.desc
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = event_ancient_drone
	difficulty = @astral_rift_medium_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2605.a
		set_next_astral_rift_event = { id = astral_rift.2615 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2605.b
		set_next_astral_rift_event = { id = astral_rift.2620 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
			modifier = {
				add = 100
				explorer = {
					is_xenophobe = yes
				}
			}
		}
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = engineering_research
				value = @tier2researchreward
				min = @tier2researchmin
				max = @tier2researchmax
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2610
	title = astral_rift.2610.name
	desc = astral_rift.2610.desc
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = ap_rift_event_2_bio_cavern
	difficulty = @astral_rift_medium_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2610.a
		hidden_effect = {
			add_stage_modifier = { modifier = astral_rift_difficulty_decrease_1 }
		}
		set_next_astral_rift_event = { id = astral_rift.2625 }
	}
	option = {
		name = astral_rift.2610.b
		hidden_effect = {
			add_stage_modifier = { modifier = astral_rift_difficulty_decrease_1 }
		}
		set_next_astral_rift_event = { id = astral_rift.2630 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2615
	title = astral_rift.2615.name
	desc = astral_rift.2615.desc
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = ap_rift_event_26_spray_foam
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	immediate = {
		set_astral_rift_flag = clean_shot
	}

	option = {
		name = astral_rift.2615.a
		hidden_effect = {
			add_stage_modifier = { modifier = astral_rift_difficulty_decrease_3 }
		}
		set_next_astral_rift_event = { id = astral_rift.2635 }
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2620
	title = astral_rift.2620.name
	desc = astral_rift.2620.desc
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = ap_rift_event_10_emp_sound
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2620.a
		set_next_astral_rift_event = { id = astral_rift.2635 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2620.b
		set_next_astral_rift_event = { id = astral_rift.2660 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2625
	title = astral_rift.2625.name
	desc = astral_rift.2625.desc
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = event_vivisection
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	immediate = {
		set_astral_rift_flag = avian_autopsy
	}

	option = {
		name = astral_rift.2625.a
		trigger = {
			NOT = { has_astral_rift_flag = drone_reactivated }
		}
		hidden_effect = {
			add_stage_modifier = { modifier = astral_rift_difficulty_decrease_2 }
		}
		set_next_astral_rift_event = { id = astral_rift.2630 }
	}
	option = {
		trigger = {
			has_astral_rift_flag = avian_autopsy
			has_astral_rift_flag = drone_reactivated
			explorer = { NOT = { has_origin = origin_evolutionary_predators } }
		}
		name = astral_rift.2625.b
		set_next_astral_rift_event = { id = astral_rift.2640 }
	}

	option = {
		trigger = {
			has_astral_rift_flag = avian_autopsy
			has_astral_rift_flag = drone_reactivated
			explorer = { has_origin = origin_evolutionary_predators }
		}
		name = astral_rift.2625.b.evopred
		set_next_astral_rift_event = { id = astral_rift.2640 }
		explorer = {
			give_evolutionary_predator_situation_progress_and_dna = { AMOUNT = small TYPE = avian }
		}
	}

	after = {
		explorer = {
			add_random_research_option = {
				add_progress = 0.25
				category = biology
				ignore_prereqs = yes
				fail_effects = {
					add_monthly_resource_mult = {
						resource = society_research
						value = @tier3researchreward
						min = @tier3researchmin
						max = @tier3researchmax
					}
				}
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2630
	title = astral_rift.2630.name
	desc = astral_rift.2630.desc
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = ap_rift_event_26_spray_foam
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	immediate = {
		set_astral_rift_flag = drone_reactivated
	}

	option = {
		name = astral_rift.2630.a
		trigger = {
			NOT = { has_astral_rift_flag = avian_autopsy }
		}
		hidden_effect = {
			add_stage_modifier = { modifier = astral_rift_difficulty_decrease_2 }
		}
		set_next_astral_rift_event = { id = astral_rift.2625 }
	}
	option = {
		trigger = {
			has_astral_rift_flag = avian_autopsy
			has_astral_rift_flag = drone_reactivated
		}
		name = astral_rift.2630.b
		set_next_astral_rift_event = { id = astral_rift.2640 }
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = engineering_research
				value = @tier2researchreward
				min = @tier2researchmin
				max = @tier2researchmax
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2635
	title = astral_rift.2635.name
	desc = astral_rift.2635.desc
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = event_robot_encounter
	difficulty = @astral_rift_medium_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2635.a
		set_next_astral_rift_event = { id = astral_rift.2645 }
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2640
	title = astral_rift.2640.name
	desc = astral_rift.2640.desc
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = event_mystic_reveal
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2640.a
		set_next_astral_rift_event = { id = astral_rift.2665 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2640.b
		set_next_astral_rift_event = { id = astral_rift.2670 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		allow = {
			explorer = { is_gestalt = no }
		}
		name = astral_rift.2640.c
		set_next_astral_rift_event = { id = astral_rift.2675 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = society_research
				value = @tier2researchreward
				min = @tier2researchmin
				max = @tier2researchmax
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2645
	title = astral_rift.2645.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				clean_shot = { text = astral_rift.2645.desc.clean }
				default = { text = astral_rift.2645.desc }
			}
		}
	}
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = ap_rift_event_26_cleansing_ambience
	difficulty = @astral_rift_medium_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		trigger = {
			explorer = {
				is_organic_species = yes
				owner = {
					is_wilderness_empire = no
				}
			}
		}
		name = astral_rift.2645.a
		set_next_astral_rift_event = { id = astral_rift.2650 }
	}
	option = {
		trigger = {
			explorer = { is_organic_species = no }
		}
		name = FASCINATING
		set_next_astral_rift_event = { id = astral_rift.2655 }
	}
	option = {
		trigger = {
			explorer = { is_organic_species = yes }
		}
		name = astral_rift.2645.b
		set_next_astral_rift_event = { id = astral_rift.2655 }
	}

	after = {
		explorer = {
			add_random_research_option = {
				add_progress = 0.25
				category = computing
				ignore_prereqs = yes
				fail_effects = {
					add_monthly_resource_mult = {
						resource = society_research
						value = @tier3researchreward
						min = @tier3researchmin
						max = @tier3researchmax
					}
				}
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2650
	title = astral_rift.2650.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_gestalt = { text = astral_rift.2650.desc.gestalt }
				default = { text = astral_rift.2650.desc.default }
			}
		}
	}
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = ap_rift_event_26_cleansing_ambience
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = EXCELLENT
		explorer = {
			astral_thread_large_reward = yes
			if = {
				limit = { is_gestalt = yes }
				add_monthly_resource_mult = {
					resource = society_research
					value = @tier3researchreward
					min = @tier3researchmin
					max = @tier3researchmax
				}
			}
			hidden_effect = {
				set_country_flag = edict_automated_disinfection
			}
		}
		custom_tooltip = astral_rift.2650.tooltip
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2655
	title = astral_rift.2655.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_xenophile= { text = astral_rift.2655.desc.xenophile }
				default = {
					if = {
						limit = {
							explorer = { is_unfriendly = yes }
						}
						text = astral_rift.2655.desc.unfriendly
					}
					else = {
						text = astral_rift.2655.desc.default
					}
				}
			}
		}
	}
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = event_power_down
	difficulty = @astral_rift_medium_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		trigger = {
			explorer = { is_unfriendly = no }
		}
		name = EXCELLENT
		explorer = {
			add_monthly_resource_mult = {
				resource = energy
				value = @tier4materialreward
				min = @tier4materialmin
				max = @tier4materialmax
			}
		}
	}

	option = {
		trigger = {
			explorer = { is_unfriendly = yes }
		}
		name = EXCELLENT
		explorer = {
			add_monthly_resource_mult = {
				resource = energy
				value = @tier5materialreward
				min = @tier5materialmin
				max = @tier5materialmax
			}
		}
	}

	after = {
		explorer = {
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2660
	title = astral_rift.2660.name
	desc = astral_rift.2660.desc
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = ap_rift_event_26_cleansing_ambience
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = EXCELLENT
		explorer = {
			add_monthly_resource_mult = {
				resource = alloys
				value = @tier3materialreward
				min = @tier3materialmin
				max = @tier3materialmax
			}
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2665
	title = astral_rift.2665.name
	desc = astral_rift.2665.desc
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = event_ancient_drone
	difficulty = @astral_rift_medium_difficulty
	astral_rift = yes

	is_triggered_only = yes

	specimen = repurposed_cleaning_drone

	option = {
		name = EXCELLENT
		explorer = {
			astral_thread_large_reward = yes
			if = {
				limit = {
					is_wilderness_empire = no
				}
				add_modifier = { modifier = colonization_drones_modifier }
			}
			else = {
				add_modifier = { modifier = colonization_drones_modifier_wilderness }
			}
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2670
	title = astral_rift.2670.name
	desc = astral_rift.2670.desc
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = event_espionage_concluded
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = EXCELLENT
		explorer = {
			astral_thread_large_reward = yes
			inverted_switch = {
				trigger = has_technology
				tech_encryption_1 = { give_technology = { tech = tech_encryption_1 } }
				tech_decryption_1 = { give_technology = { tech = tech_decryption_1 } }
				tech_encryption_2 = { give_technology = { tech = tech_encryption_2 } }
				tech_decryption_2 = { give_technology = { tech = tech_decryption_2 } }
				tech_encryption_3 = { give_technology = { tech = tech_encryption_3 } }
				tech_decryption_3 = { give_technology = { tech = tech_decryption_3 } }
				default = {
					add_random_research_option = {
						add_progress = 1
						category = computing
						fail_effects = {
							add_monthly_resource_mult = {
								resource = physics_research
								value = @tier3researchreward
								min = @tier3researchmin
								max = @tier3researchmax
							}
						}
					}
				}
			}
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2675
	title = astral_rift.2675.name
	desc = astral_rift.2675.desc
	picture = GFX_evt_astral_rift_cleaning_drones
	show_sound = event_ancient_drone
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = EXCELLENT
		explorer = {
			astral_thread_large_reward = yes
		}
		leader = {
			add_trait = {
				trait = leader_trait_sanitary_drone
			}
		}
		finish_astral_rift = yes
	}
}

carrier_event = {
	id = astral_rift.2698
	hide_window = yes
	is_triggered_only = yes

	trigger = {
		has_astral_planes_dlc = yes
		owner = {
			OR = {
				has_modifier = colonization_drones_modifier
				has_modifier = colonization_drones_modifier_wilderness
			}
		}
		habitable_planet_not_urban = yes
	}

	immediate = {
		random_list = {
			25 = {
				add_deposit = d_dangerous_wildlife_blocker
			}
			25 = {
				add_deposit = d_dense_jungle
				modifier = {
					factor = 2
					OR = {
						is_planet_class = pc_continental
						is_planet_class = pc_tropical
					}
				}
			}
			25 = {
				add_deposit = d_noxious_swamp
				modifier = {
					factor = 2
					is_planet_class = pc_tundra
				}
			}
			25 = {
				add_deposit = d_toxic_kelp
				modifier = {
					factor = 2
					is_planet_class = pc_ocean
				}
			}
			10 = {}
		}
	}
}

carrier_event = {
	id = astral_rift.2699
	hide_window = yes
	is_triggered_only = yes

	trigger = {
		has_astral_planes_dlc = yes
		owner = {
			OR = {
				has_modifier = colonization_drones_modifier
				has_modifier = colonization_drones_modifier_wilderness
			}
		}
		FROM = {
			OR = {
				is_deposit_type = d_dangerous_wildlife_blocker
				is_deposit_type = d_dense_jungle
				is_deposit_type = d_noxious_swamp
				is_deposit_type = d_toxic_kelp
				is_deposit_type = d_poisonous_algae
				is_deposit_type = d_venomous_insects
			}
		}
	}

	immediate = {
		owner = {
			add_monthly_resource_mult = {
				resource = society_research
				value = @tier1researchreward
				min = @tier1researchreward
				max = 2500
			}
		}
	}
}
#########################################
# Astral Rift - Windswept Planet Events #
#########################################

namespace = astral_rift

astral_rift_event = {
	id = astral_rift.2700
	title = astral_rift.2700.name
	desc = astral_rift.2700.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = event_wind_ruins
	difficulty = @astral_rift_initial_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2700.a
		set_next_astral_rift_event = { id = astral_rift.2705 }
	}
	option = {
		name = astral_rift.2700.b
		set_next_astral_rift_event = { id = astral_rift.2710 }
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = exotic_gases
				value = @tier1materialreward
				min = @tier1materialmin
				max = @tier1materialmax
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2705
	title = astral_rift.2705.name
	desc = astral_rift.2705.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = event_wind_ruins
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2705.a
		set_next_astral_rift_event = { id = astral_rift.2715 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2710
	title = astral_rift.2710.name
	desc = astral_rift.2710.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = ap_rift_event_27_toxic_spores_burst
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2710.a
		set_next_astral_rift_event = { id = astral_rift.2720 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2715
	title = astral_rift.2715.name
	desc = astral_rift.2715.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = ap_rift_event_27_living_wind
	difficulty = @astral_rift_medium_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2715.a
		set_next_astral_rift_event = { id = astral_rift.2725 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2720
	title = astral_rift.2720.name
	desc = astral_rift.2720.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = ap_rift_event_27_toxic_spores_burst
	difficulty = @astral_rift_medium_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2720.a
		set_next_astral_rift_event = { id = astral_rift.2730 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2725
	title = astral_rift.2725.name
	desc = astral_rift.2725.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = ap_rift_event_27_toxic_spores_burst
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2725.a
		allow = {
			explorer = { has_resource = { type = alloys amount >= 25 } }
		}
		explorer = { add_resource = { alloys = -25 } }
		set_next_astral_rift_event = { id = astral_rift.2755 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2725.b
		set_next_astral_rift_event = { id = astral_rift.2735 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2730
	title = astral_rift.2730.name
	desc = astral_rift.2730.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = ap_rift_event_27_living_wind
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2730.a
		allow = {
			explorer = { has_resource = { type = minerals amount >= 50 } }
		}
		explorer = { add_resource = { minerals = -50 } }
		set_next_astral_rift_event = { id = astral_rift.2760 }


		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
			modifier = {
				factor = 0
				explorer = { is_unfriendly = yes }
			}
		}
	}
	option = {
		name = astral_rift.2730.b
		set_next_astral_rift_event = { id = astral_rift.2740 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2735
	title = astral_rift.2735.name
	desc = astral_rift.2735.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = ap_rift_event_27_toxic_spores_burst
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2735.a
		set_next_astral_rift_event = { id = astral_rift.2745 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2740
	title = astral_rift.2740.name
	desc = astral_rift.2740.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = ap_rift_event_27_living_wind
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2740.a
		set_next_astral_rift_event = { id = astral_rift.2750 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2745
	title = astral_rift.2745.name
	desc = {
		trigger = {
			explorer = { is_unfriendly = no }
		}
		text = astral_rift.2745.desc.default
	}
	desc = {
		trigger = {
			explorer = { is_unfriendly = yes }
		}
		text = astral_rift.2745.desc.unfriendly
	}
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = ap_rift_event_27_toxic_spores_burst
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2745.a
		allow = {
			explorer = { has_resource = { type = alloys amount >= 25 } }
		}
		explorer = { add_resource = { alloys = -25 } }
		hidden_effect = {
			add_stage_modifier = { modifier = astral_rift_difficulty_decrease_3 }
		}
		set_next_astral_rift_event = { id = astral_rift.2755 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2745.b
		allow = {
			explorer = { has_resource = { type = minerals amount >= 50 } }
		}
		explorer = { add_resource = { minerals = -50 } }
		hidden_effect = {
			add_stage_modifier = { modifier = astral_rift_difficulty_decrease_3 }
		}
		set_next_astral_rift_event = { id = astral_rift.2760 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		trigger = {
			explorer = {
				is_homicidal = no
			}
		}
		name = astral_rift.2745.c
		set_next_astral_rift_event = { id = astral_rift.2765 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		trigger = {
			explorer = {
				is_homicidal = yes
			}
		}
		name = astral_rift.2745.d
		set_next_astral_rift_event = { id = astral_rift.2770 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
			modifier = {
				add = 100
				always = yes
			}
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2750
	title = astral_rift.2750.name
	desc = {
		trigger = {
			explorer = { is_unfriendly = no }
		}
		text = astral_rift.2750.desc.default
	}
	desc = {
		trigger = {
			explorer = { is_unfriendly = yes }
		}
		text = astral_rift.2750.desc.unfriendly
	}
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = ap_rift_event_27_living_wind
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2750.a
		allow = {
			explorer = { has_resource = { type = minerals amount >= 50 } }
		}
		explorer = { add_resource = { minerals = -50 } }
		hidden_effect = {
			add_stage_modifier = { modifier = astral_rift_difficulty_decrease_3 }
		}
		set_next_astral_rift_event = { id = astral_rift.2760 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2750.b
		allow = {
			explorer = { has_resource = { type = alloys amount >= 25 } }
		}
		explorer = { add_resource = { alloys = -25 } }
		hidden_effect = {
			add_stage_modifier = { modifier = astral_rift_difficulty_decrease_3 }
		}
		set_next_astral_rift_event = { id = astral_rift.2755 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		trigger = {
			explorer = {
				is_homicidal = no
			}
		}
		name = astral_rift.2750.c
		set_next_astral_rift_event = { id = astral_rift.2765 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		trigger = {
			explorer = {
				is_homicidal = yes
			}
		}
		name = astral_rift.2745.d
		set_next_astral_rift_event = { id = astral_rift.2770 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
			modifier = {
				add = 100
				always = yes
			}
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2755
	title = astral_rift.2755.name
	desc = astral_rift.2755.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = ap_rift_event_27_cutting_winds
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = GOOD
		explorer = {
			hidden_effect = {
				set_variable = {
					which = num_authorized_wind_creatures
					value = 3
				}
			}
			custom_tooltip = can_incubate_wind_creatures_tt
		}
		finish_astral_rift = yes
	}

	option = {
		exclusive_trigger = { explorer = { has_origin = origin_evolutionary_predators } }
		name = astral_rift.2755.b.evopred
		explorer = {
			give_evolutionary_predator_situation_progress_and_dna = { AMOUNT = small TYPE = fungoid }
			hidden_effect = {
				set_variable = {
					which = num_authorized_wind_creatures
					value = 3
				}
			}
			custom_tooltip = can_incubate_wind_creatures_tt
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2760
	title = astral_rift.2760.name
	desc = astral_rift.2760.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = ap_rift_event_27_fungal_spread

	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes
	is_triggered_only = yes
	specimen = extradimensional_fungus

	option = {
		name = GOOD
		explorer = {
			add_modifier = { modifier = extra_dimensional_spores_modifier }
		}
		finish_astral_rift = yes
	}

	option = {
		exclusive_trigger = { explorer = { has_origin = origin_evolutionary_predators } }
		name = astral_rift.2760.b.evopred
		explorer = {
			give_evolutionary_predator_situation_progress_and_dna = { AMOUNT = small TYPE = avian }
			add_modifier = { modifier = extra_dimensional_spores_modifier }
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2765
	title = astral_rift.2765.name
	desc = astral_rift.2765.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = evn_fc_observation
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = GOOD
	}

	option = {
		exclusive_trigger = { explorer = { has_origin = origin_evolutionary_predators } }
		name = astral_rift.2765.b.evopred
		explorer = {
			give_evolutionary_predator_situation_progress_and_dna = { AMOUNT = small TYPE = fungoid }
			give_evolutionary_predator_situation_progress_and_dna = { AMOUNT = small TYPE = avian }
		}
	}

	after = {
		add_deposit = d_society_10
		explorer = {
			add_monthly_resource_mult = {
				resource = exotic_gases
				value = @tier3materialreward
				min = @tier3materialmin
				max = @tier3materialmax
			}
			add_monthly_resource_mult = {
				resource = energy
				value = @tier3materialreward
				min = @tier3materialmin
				max = @tier3materialmax
			}
			astral_thread_large_reward = yes
		}
		if = {
			limit = {
				explorer = { is_gestalt = yes }
			}
			explorer = {
				add_monthly_resource_mult = {
					resource = unity
					value = @tier3unityreward
					min = @tier3unitymin
					max = @tier3unitymax
				}
			}
		}
		else = {
			fleet.leader = {
				leader_event = {
					id = astral_rift.2790
					days = 2
					scopes = {
						from = root
					}
				}
			}
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2770
	title = astral_rift.2770.name
	desc = astral_rift.2770.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = evn_fc_observation
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2770.a
	}

	option = {
		exclusive_trigger = { explorer = { has_origin = origin_evolutionary_predators } }
		name = astral_rift.2765.b.evopred
		explorer = {
			give_evolutionary_predator_situation_progress_and_dna = { AMOUNT = small TYPE = fungoid }
			give_evolutionary_predator_situation_progress_and_dna = { AMOUNT = small TYPE = avian }
		}
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = food
				value = @tier5materialreward
				min = @tier5materialmin
				max = @tier5materialmax
			}
			add_monthly_resource_mult = {
				resource = unity
				value = @tier3unityreward
				min = @tier3unitymin
				max = @tier3unitymax
			}
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

leader_event = {
	id = astral_rift.2790
	title = astral_rift.2790.name
	desc = astral_rift.2790.desc
	picture = GFX_evt_astral_rift_windswept_planet
	show_sound = event_default

	is_triggered_only = yes

	option = {
		name = astral_rift.2790.a
		custom_tooltip = astral_rift.2790.a.tt
		hidden_effect = {
			unassign_leader = this
			owner = { add_modifier = { modifier = reconverted_leader_modifier } }
		}
		change_leader_class = envoy

		ai_chance = {
			modifier = {
				factor = 0
				owner = {
					OR = {
						is_unfriendly = yes
						is_militarist = yes
						is_xenophobe = yes
					}
				}
			}
		}
	}
	option = {
		name = astral_rift.2790.b

		ai_chance = {
			modifier = {
				factor = 0
				owner = { is_xenophile = yes }
			}
			modifier = {
				add = 1
				owner = {
					OR = {
						is_unfriendly = yes
						is_militarist = yes
					}
				}
			}
		}
	}
}
####################################
# Astral Rift - Tiny Planet Events #
####################################

namespace = astral_rift

astral_rift_event = {
	id = astral_rift.2800
	title = astral_rift.2800.name
	desc = astral_rift.2800.desc
	picture = GFX_evt_astral_rift_tiny_planet
	show_sound = ap_rift_event_28_tiny_alien_voices_radio
	difficulty = @astral_rift_initial_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2800.a
		explorer = {
			add_monthly_resource_mult = {
				resource = physics_research
				value = @tier1researchreward
				min = @tier1researchmin
				max = @tier1researchmax
			}
		}
		set_next_astral_rift_event = { id = astral_rift.2805 }
	}
}

astral_rift_event = {
	id = astral_rift.2805
	title = astral_rift.2805.name
	desc = astral_rift.2805.desc
	picture = GFX_evt_astral_rift_tiny_planet
	show_sound = ap_rift_event_28_collision_tiny_astroid
	difficulty = @astral_rift_transition_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2805.a
		explorer = { astral_thread_small_reward = yes }
		set_next_astral_rift_event = { id = astral_rift.2810 }
	}
}

astral_rift_event = {
	id = astral_rift.2810
	title = astral_rift.2810.name
	desc = {
		trigger = {
			explorer = { is_unfriendly = no }
		}
		text = astral_rift.2810.desc.default
	}
	desc = {
		trigger = {
			explorer = { has_valid_civic = civic_barbaric_despoilers }
		}
		text = astral_rift.2810.desc.barbaric_despoilers
	}
	desc = {
		trigger = {
			explorer = { is_homicidal = yes }
		}
		text = astral_rift.2810.desc.homicidal
	}
	picture = GFX_evt_astral_rift_tiny_planet
	show_sound = ap_rift_event_28_tiny_alien_voices_radio
	difficulty = @astral_rift_transition_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		trigger = {
			explorer = { is_unfriendly = no }
		}
		name = astral_rift.2810.a
		set_next_astral_rift_event = { id = astral_rift.2815 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		trigger = {
			explorer = { is_unfriendly = no }
		}
		name = astral_rift.2810.b
		set_next_astral_rift_event = { id = astral_rift.2830 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
			modifier = {
				factor = 0
				explorer = {
					OR = {
						is_spiritualist = yes
						is_xenophile = yes
						is_pacifist = yes
					}
				}
			}
		}
	}
	option = {
		trigger = {
			explorer = { has_valid_civic = civic_barbaric_despoilers }
		}
		name = astral_rift.2810.c
		set_next_astral_rift_event = { id = astral_rift.2815 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		trigger = {
			explorer = { is_homicidal = yes }
		}
		name = astral_rift.2810.d
		set_next_astral_rift_event = { id = astral_rift.2815 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		trigger = {
			explorer = { is_unfriendly = yes }
		}
		name = astral_rift.2810.e
		set_next_astral_rift_event = { id = astral_rift.2830 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = society_research
				value = @tier2researchreward
				min = @tier2researchmin
				max = @tier2researchmax
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2815
	title = astral_rift.2815.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_xenophile = { text = astral_rift.2815.desc.xenophile }
				description_pacifist = { text = astral_rift.2815.desc.pacifist }
				default = {
					if = {
						limit = {
							explorer = { is_homicidal = yes }
						}
						text = astral_rift.2815.desc.homicidal
					}
					else_if = {
						limit = {
							explorer = { has_valid_civic = civic_barbaric_despoilers }
						}
						text = astral_rift.2815.desc.barbaric_despoilers
					}
					else = {
						text = astral_rift.2815.desc.default
					}
				}
			}
		}
	}
	picture = GFX_evt_astral_rift_tiny_planet
	show_sound = ap_rift_event_28_tiny_alien_voices_radio
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	immediate = {
		set_astral_rift_flag = communications_established
	}

	option = {
		trigger = {
			explorer = { is_unfriendly = no }
		}
		name = astral_rift.2815.a
		set_next_astral_rift_event = { id = astral_rift.2820 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
			modifier = {
				factor = 0
				explorer = {
					is_xenophile = no
					is_pacifist = no
				}
			}
		}
	}
	option = {
		name = astral_rift.2815.b
		trigger = {
			explorer = {
				is_pacifist = no
				is_xenophile = no
			}
		}
		set_next_astral_rift_event = { id = astral_rift.2825 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		trigger = {
			explorer = { is_unfriendly = no }
		}
		name = astral_rift.2815.c
		hidden_effect = {
			add_stage_modifier = { modifier = astral_rift_difficulty_decrease_2 }
		}
		set_next_astral_rift_event = { id = astral_rift.2830 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
			modifier = {
				factor = 0
				explorer = {
					is_xenophile = yes
				}
			}
		}
	}
	option = {
		trigger = {
			explorer = { is_unfriendly = yes }
		}
		name = astral_rift.2815.d
		hidden_effect = {
			add_stage_modifier = { modifier = astral_rift_difficulty_decrease_2 }
		}
		if = {
			limit = {
				explorer = { is_homicidal = yes }
			}
			explorer = {
				add_monthly_resource_mult = {
					resource = unity
					value = @tier3unityreward
					min = @tier3unitymin
					max = @tier3unitymax
				}
			}
		}
		set_next_astral_rift_event = { id = astral_rift.2830 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = { astral_thread_small_reward = yes }
	}
}

astral_rift_event = {
	id = astral_rift.2820
	title = astral_rift.2820.name
	desc = astral_rift.2820.desc
	picture = GFX_evt_astral_rift_tiny_planet
	show_sound = ap_rift_event_28_tiny_alien_voices_radio
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = EXCELLENT
		explorer = {
			add_monthly_resource_mult = {
				resource = physics_research
				value = @tier3researchreward
				min = @tier3researchmin
				max = @tier3researchmax
			}
		}
		set_next_astral_rift_event = { id = astral_rift.2835 }
	}
}

astral_rift_event = {
	id = astral_rift.2825
	title = astral_rift.2825.name
	desc = {
		trigger = {
			explorer = { is_unfriendly = no }
		}
		text = astral_rift.2825.desc.default
	}
	desc = {
		trigger = {
			explorer = { is_unfriendly = yes }
		}
		text = astral_rift.2825.desc.unfriendly
	}
	picture = GFX_evt_astral_rift_tiny_planet
	show_sound = event_super_explosion
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	specimen = mini_moon_dust

	option = {
		name = astral_rift.2825.a
		set_next_astral_rift_event = { id = astral_rift.2840 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2825.b
		set_next_astral_rift_event = { id = astral_rift.2845 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			add_resource = { minerals = 5 }
			add_monthly_resource_mult = {
				resource = physics_research
				value = @tier1researchreward
				min = @tier1researchmin
				max = @tier1researchmax
			}
			if = {
				limit = {
					is_unfriendly = yes
				}
				add_monthly_resource_mult = {
					resource = unity
					value = @tier3unityreward
					min = @tier3unitymin
					max = @tier3unitymax
				}
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2830
	title = astral_rift.2830.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				communications_established = {
					if = {
						limit = {
							explorer = { is_unfriendly = yes }
						}
						text = astral_rift.2830.desc.unfriendly.communications
					}
					else = {
						text = astral_rift.2830.desc.communications
					}
				}
				default = {
					if = {
						limit = {
							explorer = { is_unfriendly = yes }
						}
						text = astral_rift.2830.desc.unfriendly
					}
					else = {
						text = astral_rift.2830.desc.default
					}
				}
			}
		}
	}
	picture = GFX_evt_astral_rift_tiny_planet
	show_sound = evn_fc_observation
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = EXCELLENT
		add_deposit = d_society_10
		explorer = {
			astral_thread_large_reward = yes
			add_monthly_resource_mult = {
				resource = society_research
				value = @tier1researchreward
				min = @tier1researchmin
				max = @tier1researchmax
			}
			if = {
				limit = {
					is_unfriendly = yes
				}
				add_monthly_resource_mult = {
					resource = unity
					value = @tier3unityreward
					min = @tier3unitymin
					max = @tier3unitymax
				}
			}
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2835
	title = astral_rift.2835.name
	desc = astral_rift.2835.desc
	picture = GFX_evt_astral_rift_tiny_planet
	show_sound = ap_rift_event_28_tiny_alien_voices_radio
	difficulty = @astral_rift_transition_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = EXCELLENT
		explorer = {
			hidden_effect = {
				set_country_flag = tidal_lock_knowledge
			}
			custom_tooltip = astral_rift.2835.tt
			astral_thread_large_reward = yes
			add_monthly_resource_mult = {
				resource = unity
				value = @tier1unityreward
				min = @tier1unitymin
				max = @tier1unitymax
			}
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2840
	title = astral_rift.2840.name
	desc = astral_rift.2840.desc
	picture = GFX_evt_astral_rift_tiny_planet
	show_sound = ap_rift_event_28_collision_tiny_astroid
	difficulty = @astral_rift_transition_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = EXCELLENT
		explorer = {
			hidden_effect = {
				set_country_flag = can_build_microplanet_memorial
			}
			custom_tooltip = astral_rift.2840.tt
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2845
	title = astral_rift.2845.name
	desc = astral_rift.2845.desc
	picture = GFX_evt_astral_rift_tiny_planet
	show_sound = evn_fc_observation
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = EXCELLENT
		add_deposit = d_society_15
		explorer = {
			astral_thread_large_reward = yes
			add_monthly_resource_mult = {
				resource = society_research
				value = @tier1researchreward
				min = @tier1researchmin
				max = @tier1researchmax
			}
			country_event = {
				id = astral_rift.2890
				days = 3600
				scopes = {
					from = root
				}
			}
		}
		finish_astral_rift = yes
	}
}

country_event = {
	id = astral_rift.2890
	title = astral_rift.2890.name
	desc = astral_rift.2890.desc
	picture = GFX_evt_astral_rift_tiny_planet
	show_sound = event_default

	is_triggered_only = yes

	immediate = {
		from = { remove_deposit = d_society_15 }
	}

	option = {
		name = astral_rift.2890.a
	}
}
############################################
# Astral Rift - Entertainment Nexus Events #
############################################

namespace = astral_rift

astral_rift_event = {
	id = astral_rift.2900
	title = astral_rift.2900.name
	desc = astral_rift.2900.desc
	picture = GFX_evt_astral_rift_interdimensional_circus
	show_sound = ap_rift_event_29_dimensional_circus
	difficulty = @astral_rift_initial_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2900.a
		set_next_astral_rift_event = { id = astral_rift.2905 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2905
	title = astral_rift.2905.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_organic = { text = astral_rift.2905.desc.organic }
				default = { text = astral_rift.2905.desc.inorganic }
			}
		}
	}
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus
	difficulty = @astral_rift_transition_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2905.a
		set_next_astral_rift_event = { id = astral_rift.2910 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2910
	title = astral_rift.2910.name
	desc = astral_rift.2910.desc
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2910.a
		set_next_astral_rift_event = { id = astral_rift.2915 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2915
	title = astral_rift.2915.name
	desc = astral_rift.2915.desc
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2915.a
		set_next_astral_rift_event = { id = astral_rift.2920 }
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2920
	title = astral_rift.2920.name
	desc = astral_rift.2920.desc
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2920.a
		set_next_astral_rift_event = { id = astral_rift.2925 }
	}

	after = {
		explorer = {
			add_monthly_resource_mult = {
				resource = rare_crystals
				value = @tier1materialreward
				min = @tier1materialmin
				max = @tier1materialmax
			}
		}
	}
}

astral_rift_event = {
	id = astral_rift.2925
	title = astral_rift.2925.name
	desc = astral_rift.2925.desc
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2925.a
		set_next_astral_rift_event = { id = astral_rift.2930 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2925.b
		set_next_astral_rift_event = { id = astral_rift.2935 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}
	option = {
		name = astral_rift.2925.c
		set_next_astral_rift_event = { id = astral_rift.2940 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2930
	title = astral_rift.2930.name
	desc = astral_rift.2930.desc
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2930.a
		set_next_astral_rift_event = { id = astral_rift.2960 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}

		if = {
			limit = {
				explorer = { has_origin = origin_evolutionary_predators }
			}
			explorer = {
				give_evolutionary_predator_situation_progress_and_dna = { AMOUNT = small TYPE = mammalian }
			}
		}
	}

	option = {
		name = astral_rift.2930.b
		allow = {
			explorer = { has_resource = { type = energy amount >= 1000 } }
		}
		explorer = { add_resource = { energy = -1000 } }
		set_next_astral_rift_event = { id = astral_rift.2965 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
			modifier = {
				add = 100
				explorer = {
					is_xenophobe = yes
				}
			}
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2935
	title = astral_rift.2935.name
	desc = astral_rift.2935.desc
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2935.a
		set_next_astral_rift_event = { id = astral_rift.2970 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
		if = {
			limit = {
				explorer = { has_origin = origin_evolutionary_predators }
			}
			explorer = {
				give_evolutionary_predator_situation_progress_and_dna = { AMOUNT = medium TYPE = reptilian }
			}
		}
	}

	option = {
		name = astral_rift.2935.b
		allow = {
			explorer = { has_resource = { type = food amount >= 1000 } }
		}
		explorer = { add_resource = { food = -1000 } }
		set_next_astral_rift_event = { id = astral_rift.2975 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
			modifier = {
				add = 100
				explorer = {
					is_xenophobe = yes
				}
			}
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2940
	title = astral_rift.2940.name
	desc = astral_rift.2940.desc
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus
	difficulty = @astral_rift_easy_plus_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = astral_rift.2940.a
		set_next_astral_rift_event = { id = astral_rift.2980 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
		}
		if = {
			limit = {
				explorer = { has_origin = origin_evolutionary_predators }
			}
			explorer = {
				give_evolutionary_predator_situation_progress_and_dna = { AMOUNT = medium TYPE = lithoid }
			}
		}
	}

	option = {
		name = astral_rift.2940.b
		allow = {
			explorer = { has_resource = { type = energy amount >= 1000 } }
		}
		explorer = { add_resource = { energy = -1000 } }
		set_next_astral_rift_event = { id = astral_rift.2985 }

		ai_chance = {
			inline_script = astral_rift/rift_difficulty_ai_weight
			modifier = {
				add = 100
				explorer = {
					is_xenophobe = yes
				}
			}
		}
	}

	after = {
		explorer = {
			astral_thread_small_reward = yes
		}
	}
}

astral_rift_event = {
	id = astral_rift.2960
	title = astral_rift.2960.name
	desc = astral_rift.2960.desc
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus

	difficulty = @astral_rift_medium_difficulty
	astral_rift = yes
	is_triggered_only = yes
	specimen = wormhole_fur

	option = {
		name = FASCINATING
		custom_tooltip = astral_rift.2960.tt
		hidden_effect = {
			explorer = {
				# Gives the first possible tech option
				add_tech_option_exclusive_effect = { TECH = tech_genome_mapping }
				add_tech_option_exclusive_effect = { TECH = tech_vitality_boosters }
				add_tech_option_exclusive_effect = { TECH = tech_gene_tailoring }
				add_tech_option_exclusive_effect = { TECH = tech_epigenetic_triggers }
				add_tech_option_exclusive_effect = { TECH = tech_cloning }
				add_tech_option_exclusive_effect = { TECH = tech_subdermal_stimulation }
				add_tech_option_exclusive_effect = { TECH = tech_repeatable_improved_leader_life_span }
				add_tech_option_exclusive_effect = { TECH = tech_selected_lineages }
				add_tech_option_exclusive_effect = { TECH = tech_glandular_acclimation }
				add_tech_option_exclusive_effect = { TECH = tech_gene_expressions }
				add_tech_option_exclusive_effect = { TECH = tech_gene_seed_purification }
				add_tech_option_exclusive_effect = { TECH = tech_morphogenetic_field_mastery }
				add_tech_option_exclusive_effect = { TECH = tech_gene_banks }
				add_tech_option_exclusive_effect = { TECH = tech_tracking_implants }
				add_tech_option_exclusive_effect = { TECH = tech_capacity_boosters }
				if = {
					limit = {
						NOT = { has_country_flag = tech_option_already_given }
					}
					add_random_research_option = {
						add_progress = 1
						category = biology
						fail_effects = {
							add_monthly_resource_mult = {
								resource = society_research
								value = @tier3researchreward
								min = @tier3researchmin
								max = @tier3researchmax
							}
						}
					}
				}
				else = {
					remove_country_flag = tech_option_already_given
				}
			}
		}
		explorer = {
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2965
	title = astral_rift.2965.name
	desc = astral_rift.2965.desc
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = FASCINATING
		explorer = {
			if = {
				limit = {
					NOT = { has_technology = tech_wormhole_stabilization }
					can_research_technology = tech_wormhole_stabilization
				}
				add_research_option = tech_wormhole_stabilization
				add_tech_progress = {
					tech = tech_wormhole_stabilization
					progress = 1
				}
			}
			else_if = {
				limit = {
					NOT = { has_technology = tech_hyper_drive_2 }
					can_research_technology = tech_hyper_drive_2
				}
				add_research_option = tech_hyper_drive_2
				add_tech_progress = {
					tech = tech_hyper_drive_2
					progress = 0.5
				}
			}
			else = {
				add_random_research_option = {
					add_progress = 0.5
					category = particles
					fail_effects = {
						add_monthly_resource_mult = {
							resource = physics_research
							value = @tier3researchreward
							min = @tier3researchmin
							max = @tier3researchmax
						}
					}
				}
			}
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2970
	title = astral_rift.2970.name
	desc = {
		trigger = {
			switch = {
				trigger = has_astral_rift_flag
				description_gestalt = { text = astral_rift.2970.desc.inorganic }
				description_lithoid = { text = astral_rift.2970.desc.inorganic }
				description_robotic = { text = astral_rift.2970.desc.inorganic }
				default = { text = astral_rift.2970.desc.organic }
			}
		}
	}
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus

	difficulty = @astral_rift_medium_plus_difficulty
	astral_rift = yes
	is_triggered_only = yes
	specimen = mutative_digestive_fluids

	option = {
		name = DISGUSTING
		trigger = {
			explorer = {
				species = {
					is_archetype = BIOLOGICAL
				}
				is_gestalt = no
			}
		}
	}
	option = {
		name = FASCINATING
		trigger = {
			explorer = {
				OR = {
					species = {
						NOT = {
							is_archetype = BIOLOGICAL
						}
					}
					is_gestalt = yes
				}
			}
		}
	}

	after = {
		explorer = {
			if = {
				limit = {
					species = {
						is_archetype = BIOLOGICAL
					}
					is_gestalt = no
				}
				add_modifier = {
					modifier = revolutionary_medigel_modifier
				}
			}
			else = {
				custom_tooltip = astral_rift.2970.tt
				hidden_effect = {
					# Gives the first possible tech option
					add_tech_option_exclusive_effect = { TECH = tech_eco_simulation }
					add_tech_option_exclusive_effect = { TECH = tech_hydroponics }
					add_tech_option_exclusive_effect = { TECH = tech_gene_crops }
					add_tech_option_exclusive_effect = { TECH = tech_food_processing_1 }
					add_tech_option_exclusive_effect = { TECH = tech_nano_vitality_crops }
					add_tech_option_exclusive_effect = { TECH = tech_food_processing_2 }
					add_tech_option_exclusive_effect = { TECH = tech_repeatable_improved_tile_food_output }
					add_tech_option_exclusive_effect = { TECH = tech_nutrient_replication }
					if = {
						limit = {
							NOT = { has_country_flag = tech_option_already_given }
						}
						add_random_research_option = {
							add_progress = 1
							category = biology
							fail_effects = {
								add_monthly_resource_mult = {
									resource = society_research
									value = @tier3researchreward
									min = @tier3researchmin
									max = @tier3researchmax
								}
							}
						}
					}
					else = {
						remove_country_flag = tech_option_already_given
					}
				}
			}
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2975
	title = astral_rift.2975.name
	desc = astral_rift.2975.desc
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = FASCINATING
		custom_tooltip = astral_rift.2975.tt
		hidden_effect = {
			explorer = {
				# Gives the first possible tech option
				add_tech_option_exclusive_effect = { TECH = tech_integrated_cybernetics }
				add_tech_option_exclusive_effect = { TECH = tech_robotic_workers }
				add_tech_option_exclusive_effect = { TECH = tech_droid_workers }
				add_tech_option_exclusive_effect = { TECH = tech_robomodding }
				add_tech_option_exclusive_effect = { TECH = tech_synthetic_workers }
				add_tech_option_exclusive_effect = { TECH = tech_robomodding_points_1 }
				add_tech_option_exclusive_effect = { TECH = tech_binary_motivators }
				add_tech_option_exclusive_effect = { TECH = tech_nanite_assemblers }
				add_tech_option_exclusive_effect = { TECH = tech_synthetic_leaders }
				add_tech_option_exclusive_effect = { TECH = tech_robomodding_points_2 }
				if = {
					limit = {
						NOT = { has_country_flag = tech_option_already_given }
					}
					add_random_research_option = {
						add_progress = 0.1
						category = industry
						fail_effects = {
							add_monthly_resource_mult = {
								resource = engineering_research
								value = @tier3researchreward
								min = @tier3researchmin
								max = @tier3researchmax
							}
						}
					}
				}
				else = {
					remove_country_flag = tech_option_already_given
				}
			}
		}
		explorer = {
			astral_thread_large_reward = yes
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2980
	title = astral_rift.2980.name
	desc = astral_rift.2980.desc
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus
	difficulty = @astral_rift_hard_difficulty
	astral_rift = yes

	is_triggered_only = yes

	specimen = golem_contortionist_dna

	option = {
		name = FASCINATING
		custom_tooltip = astral_rift.2980.tt
		explorer = {
			astral_thread_large_reward = yes
			hidden_effect = {
				set_country_flag = has_spontaneous_crystallization
			}
		}
		finish_astral_rift = yes
	}
}

astral_rift_event = {
	id = astral_rift.2985
	title = astral_rift.2985.name
	desc = astral_rift.2985.desc
	picture = GFX_evt_astral_rift_interdimensional_circus_2
	show_sound = ap_rift_event_29_dimensional_circus
	difficulty = @astral_rift_easy_difficulty
	astral_rift = yes

	is_triggered_only = yes

	option = {
		name = FASCINATING
		explorer = {
			astral_thread_large_reward = yes
			add_monthly_resource_mult = {
				resource = physics_research
				value = @tier3researchreward
				min = @tier3researchmin
				max = @tier3researchmax
			}
		}
		finish_astral_rift = yes
	}
}
