namespace = invasion

# Planetary Invasion events (i.e., new siege events)
# You just won a siege in which you used an orbital bombardment
character_event = {
	id = invasion.100
	desc = "EVTDESCINVASION100"
	picture = GFX_evt_invasion
	is_triggered_only = yes
	border = GFX_evt_frame_character_frame_war
	
	trigger = { has_character_flag = flag_used_orbital_bombardment }
	
	option = {
		name = "EVTOPTCONFIRM"
		clr_character_flag = flag_used_orbital_bombardment
		# Inform all the relevant people
		any_liege = {
			limit = { has_character_flag = flag_authorized_orbital_bombardment }
			character_event = { id = invasion.104 }
		}
		if = {
			limit = { top_liege = { NOT = { has_character_flag = flag_authorized_orbital_bombardment } } }
			top_liege = {
				opinion = { who = ROOT modifier = opinion_war_crimes }
				character_event = { id = invasion.106 }
			}
		}
		FROM = {
			holder_scope = {
				character_event = { id = invasion.105 }
				any_courtier = {
					limit = {
						at_location = ROOT
						in_command = no
					}
					random_list = {
						10 = { character_event = { id = invasion.101 tooltip = "EVTTOOLTIPINVASION101" } }
						40 = { character_event = { id = invasion.102 tooltip = "EVTTOOLTIPINVASION102" } }
						50 = { character_event = { id = invasion.103 tooltip = "EVTTOOLTIPINVASION103" } }
					}
				}
			}
			# 25% chance to destroy any "special" buildings
			random = {
				chance = 25
				if = {
					limit = { has_building = ct_homeworld_1 }
					remove_building = ct_homeworld_1
					# Ya dun goofed
					ROOT = {
						give_nickname = nick_the_worldbreaker
						add_trait = saoshyant
						any_child = { add_trait = saoshyant_descendant }
						narrative_event = { id = invasion.110 tooltip = "EVTTOOLTIPINVASION110" }
					}
				}
				if = {
					limit = { has_building = ca_olympus_shipyards }
					remove_building = ca_olympus_shipyards
				}
				# Unique City Buildings
				if = {
					limit = { has_building = ct_trade_forum_q_1 }
					remove_building = ct_trade_forum_q_1
				}
				if = {
					limit = { has_building = ct_government_citadel_q_1 }
					remove_building = ct_government_citadel_q_1
				}
				if = {
					limit = { has_building = ct_palace_of_justice_q_1 }
					remove_building = ct_palace_of_justice_q_1
				}
				# Top-level primary building
				if = {
					limit = {
						has_building = ca_primary_q_1
						NOT = { has_building = ca_primary_q_2 }
					}
					remove_building = ca_primary_q_1
				}
				if = {
					limit = {
						has_building = ca_primary_q_2
						NOT = { has_building = ca_primary_q_3 }
					}
					remove_building = ca_primary_q_2
				}
				if = {
					limit = {
						has_building = ca_primary_q_3
						NOT = { has_building = ca_primary_q_4 }
					}
					remove_building = ca_primary_q_3
				}
				if = {
					limit = {
						has_building = ca_primary_q_4
						NOT = { has_building = ca_primary_q_5 }
					}
					remove_building = ca_primary_q_4
				}
				if = {
					limit = { has_building = ca_primary_q_5 }
					remove_building = ca_primary_q_5
				}
				if = {
					limit = {
						has_building = ct_primary_q_1
						NOT = { has_building = ct_primary_q_2 }
					}
					remove_building = ct_primary_q_1
				}
				if = {
					limit = {
						has_building = ct_primary_q_2
						NOT = { has_building = ct_primary_q_3 }
					}
					remove_building = ct_primary_q_2
				}
				if = {
					limit = {
						has_building = ct_primary_q_3
						NOT = { has_building = ct_primary_q_4 }
					}
					remove_building = ct_primary_q_3
				}
				if = {
					limit = {
						has_building = ct_primary_q_4
						NOT = { has_building = ct_primary_q_5 }
					}
					remove_building = ct_primary_q_4
				}
				if = {
					limit = { has_building = ct_primary_q_5 }
					remove_building = ct_primary_q_5
				}
				if = {
					limit = {
						has_building = tp_primary_q_1
						NOT = { has_building = tp_primary_q_2 }
					}
					remove_building = tp_primary_q_1
				}
				if = {
					limit = {
						has_building = tp_primary_q_2
						NOT = { has_building = tp_primary_q_3 }
					}
					remove_building = tp_primary_q_2
				}
				if = {
					limit = {
						has_building = tp_primary_q_3
						NOT = { has_building = tp_primary_q_4 }
					}
					remove_building = tp_primary_q_3
				}
				if = {
					limit = {
						has_building = tp_primary_q_4
						NOT = { has_building = tp_primary_q_5 }
					}
					remove_building = tp_primary_q_4
				}
				if = {
					limit = { has_building = tp_primary_q_5 }
					remove_building = tp_primary_q_5
				}
			}
			# Guaranteed destruction of all top-level secondary buildings
			# CASTLE BUILDINGS
			# Fighter Hangar
			if = {
				limit = {
					has_building = ca_fighter_hanger_q_1
					NOT = { has_building = ca_fighter_hanger_q_2 }
				}
				remove_building = ca_fighter_hanger_q_1
			}
			if = {
				limit = {
					has_building = ca_fighter_hanger_q_2
					NOT = { has_building = ca_fighter_hanger_q_3 }
				}
				remove_building = ca_fighter_hanger_q_2
			}
			if = {
				limit = {
					has_building = ca_fighter_hanger_q_3
					NOT = { has_building = ca_fighter_hanger_q_4 }
				}
				remove_building = ca_fighter_hanger_q_3
			}
			if = {
				limit = {
					has_building = ca_fighter_hanger_q_4
					NOT = { has_building = ca_fighter_hanger_q_5 }
				}
				remove_building = ca_fighter_hanger_q_4
			}
			if = {
				limit = {
					has_building = ca_fighter_hanger_q_5
					NOT = { has_building = ca_fighter_hanger_q_6 }
				}
				remove_building = ca_fighter_hanger_q_5
			}
			if = {
				limit = { has_building = ca_fighter_hanger_q_6 }
				remove_building = ca_fighter_hanger_q_6
			}
			# Bomber Hangar
			if = {
				limit = {
					has_building = ca_bomber_hanger_q_1
					NOT = { has_building = ca_bomber_hanger_q_2 }
				}
				remove_building = ca_bomber_hanger_q_1
			}
			if = {
				limit = {
					has_building = ca_bomber_hanger_q_2
					NOT = { has_building = ca_bomber_hanger_q_3 }
				}
				remove_building = ca_bomber_hanger_q_2
			}
			if = {
				limit = {
					has_building = ca_bomber_hanger_q_3
					NOT = { has_building = ca_bomber_hanger_q_4 }
				}
				remove_building = ca_bomber_hanger_q_3
			}
			if = {
				limit = {
					has_building = ca_bomber_hanger_q_4
					NOT = { has_building = ca_bomber_hanger_q_5 }
				}
				remove_building = ca_bomber_hanger_q_4
			}
			if = {
				limit = { has_building = ca_bomber_hanger_q_5 }
				remove_building = ca_bomber_hanger_q_5
			}
			# Destroyer Hangar
			if = {
				limit = {
					has_building = ca_destroyer_hanger_q_1
					NOT = { has_building = ca_destroyer_hanger_q_2 }
				}
				remove_building = ca_destroyer_hanger_q_1
			}
			if = {
				limit = {
					has_building = ca_destroyer_hanger_q_2
					NOT = { has_building = ca_destroyer_hanger_q_3 }
				}
				remove_building = ca_destroyer_hanger_q_2
			}
			if = {
				limit = {
					has_building = ca_destroyer_hanger_q_3
					NOT = { has_building = ca_destroyer_hanger_q_4 }
				}
				remove_building = ca_destroyer_hanger_q_3
			}
			if = {
				limit = {
					has_building = ca_destroyer_hanger_q_4
					NOT = { has_building = ca_destroyer_hanger_q_5 }
				}
				remove_building = ca_destroyer_hanger_q_4
			}
			if = {
				limit = { has_building = ca_destroyer_hanger_q_5 }
				remove_building = ca_destroyer_hanger_q_5
			}
			# Capital Factory
			if = {
				limit = {
					has_building = ca_capital_factory_q_1
					NOT = { has_building = ca_capital_factory_q_2 }
				}
				remove_building = ca_capital_factory_q_1
			}
			if = {
				limit = { has_building = ca_capital_factory_q_2 }
				remove_building = ca_capital_factory_q_2
			}
			# Mining Drones
			if = {
				limit = {
					has_building = ca_mining_drones_q_1
					NOT = { has_building = ca_mining_drones_q_2 }
				}
				remove_building = ca_mining_drones_q_1
			}
			if = {
				limit = {
					has_building = ca_mining_drones_q_2
					NOT = { has_building = ca_mining_drones_q_3 }
				}
				remove_building = ca_mining_drones_q_2
			}
			if = {
				limit = {
					has_building = ca_mining_drones_q_3
					NOT = { has_building = ca_mining_drones_q_4 }
				}
				remove_building = ca_mining_drones_q_3
			}
			if = {
				limit = {
					has_building = ca_mining_drones_q_4
					NOT = { has_building = ca_mining_drones_q_5 }
				}
				remove_building = ca_mining_drones_q_4
			}
			if = {
				limit = {
					has_building = ca_mining_drones_q_5
					NOT = { has_building = ca_mining_drones_q_6 }
				}
				remove_building = ca_mining_drones_q_5
			}
			if = {
				limit = { has_building = ca_mining_drones_q_6 }
				remove_building = ca_mining_drones_q_6
			}
			# Turrets
			if = {
				limit = {
					has_building = ca_turrets_q_1
					NOT = { has_building = ca_turrets_q_2 }
				}
				remove_building = ca_turrets_q_1
			}
			if = {
				limit = {
					has_building = ca_turrets_q_2
					NOT = { has_building = ca_turrets_q_3 }
				}
				remove_building = ca_turrets_q_2
			}
			if = {
				limit = {
					has_building = ca_turrets_q_3
					NOT = { has_building = ca_turrets_q_4 }
				}
				remove_building = ca_turrets_q_3
			}
			if = {
				limit = {
					has_building = ca_turrets_q_4
					NOT = { has_building = ca_turrets_q_5 }
				}
				remove_building = ca_turrets_q_4
			}
			if = {
				limit = { has_building = ca_turrets_q_5 }
				remove_building = ca_turrets_q_5
			}
			# Scout Patrols
			if = {
				limit = {
					has_building = ca_scout_patrols_q_1
					NOT = { has_building = ca_scout_patrols_q_2 }
				}
				remove_building = ca_scout_patrols_q_1
			}
			if = {
				limit = {
					has_building = ca_scout_patrols_q_2
					NOT = { has_building = ca_scout_patrols_q_3 }
				}
				remove_building = ca_scout_patrols_q_2
			}
			if = {
				limit = {
					has_building = ca_scout_patrols_q_3
					NOT = { has_building = ca_scout_patrols_q_4 }
				}
				remove_building = ca_scout_patrols_q_3
			}
			if = {
				limit = {
					has_building = ca_scout_patrols_q_4
					NOT = { has_building = ca_scout_patrols_q_5 }
				}
				remove_building = ca_scout_patrols_q_4
			}
			if = {
				limit = { has_building = ca_scout_patrols_q_5 }
				remove_building = ca_scout_patrols_q_5
			}
			# Marine Quarters
			if = {
				limit = {
					has_building = ca_marine_quarters_q_1
					NOT = { has_building = ca_marine_quarters_q_2 }
				}
				remove_building = ca_marine_quarters_q_1
			}
			if = {
				limit = {
					has_building = ca_marine_quarters_q_2
					NOT = { has_building = ca_marine_quarters_q_3 }
				}
				remove_building = ca_marine_quarters_q_2
			}
			if = {
				limit = {
					has_building = ca_marine_quarters_q_3
					NOT = { has_building = ca_marine_quarters_q_4 }
				}
				remove_building = ca_marine_quarters_q_3
			}
			if = {
				limit = {
					has_building = ca_marine_quarters_q_4
					NOT = { has_building = ca_marine_quarters_q_5 }
				}
				remove_building = ca_marine_quarters_q_4
			}
			if = {
				limit = {
					has_building = ca_marine_quarters_q_5
					NOT = { has_building = ca_marine_quarters_q_6 }
				}
				remove_building = ca_marine_quarters_q_5
			}
			if = {
				limit = { has_building = ca_marine_quarters_q_6 }
				remove_building = ca_marine_quarters_q_6
			}
			# Tunneler Factories
			if = {
				limit = {
					has_building = ca_tunneler_factory_q_1
					NOT = { has_building = ca_tunneler_factory_q_2 }
				}
				remove_building = ca_tunneler_factory_q_1
			}
			if = {
				limit = {
					has_building = ca_tunneler_factory_q_2
					NOT = { has_building = ca_tunneler_factory_q_3 }
				}
				remove_building = ca_tunneler_factory_q_2
			}
			if = {
				limit = {
					has_building = ca_tunneler_factory_q_3
					NOT = { has_building = ca_tunneler_factory_q_4 }
				}
				remove_building = ca_tunneler_factory_q_3
			}
			if = {
				limit = {
					has_building = ca_tunneler_factory_q_4
					NOT = { has_building = ca_tunneler_factory_q_5 }
				}
				remove_building = ca_tunneler_factory_q_4
			}
			if = {
				limit = {
					has_building = ca_tunneler_factory_q_5
					NOT = { has_building = ca_tunneler_factory_q_6 }
				}
				remove_building = ca_tunneler_factory_q_5
			}
			if = {
				limit = {
					has_building = ca_tunneler_factory_q_6
					NOT = { has_building = ca_tunneler_factory_q_7 }
				}
				remove_building = ca_tunneler_factory_q_6
			}
			if = {
				limit = {
					has_building = ca_tunneler_factory_q_7
					NOT = { has_building = ca_tunneler_factory_q_8 }
				}
				remove_building = ca_tunneler_factory_q_7
			}
			if = {
				limit = { has_building = ca_tunneler_factory_q_8 }
				remove_building = ca_tunneler_factory_q_8
			}
			# Spaceyards
			if = {
				limit = {
					has_building = ca_spaceyard_q_1
					NOT = { has_building = ca_spaceyard_q_2 }
				}
				remove_building = ca_spaceyard_q_1
			}
			if = {
				limit = {
					has_building = ca_spaceyard_q_2
					NOT = { has_building = ca_spaceyard_q_3 }
				}
				remove_building = ca_spaceyard_q_2
			}
			if = {
				limit = {
					has_building = ca_spaceyard_q_3
					NOT = { has_building = ca_spaceyard_q_4 }
				}
				remove_building = ca_spaceyard_q_3
			}
			if = {
				limit = {
					has_building = ca_spaceyard_q_4
					NOT = { has_building = ca_spaceyard_q_5 }
				}
				remove_building = ca_spaceyard_q_4
			}
			if = {
				limit = { has_building = ca_spaceyard_q_5 }
				remove_building = ca_spaceyard_q_5
			}
			# Command Centers
			if = {
				limit = {
					has_building = ca_command_center_q_1
					NOT = { has_building = ca_command_center_q_2 }
				}
				remove_building = ca_command_center_q_1
			}
			if = {
				limit = {
					has_building = ca_command_center_q_2
					NOT = { has_building = ca_command_center_q_3 }
				}
				remove_building = ca_command_center_q_2
			}
			if = {
				limit = {
					has_building = ca_command_center_q_3
					NOT = { has_building = ca_command_center_q_4 }
				}
				remove_building = ca_command_center_q_3
			}
			if = {
				limit = {
					has_building = ca_command_center_q_4
					NOT = { has_building = ca_command_center_q_5 }
				}
				remove_building = ca_command_center_q_4
			}
			if = {
				limit = { has_building = ca_command_center_q_5 }
				remove_building = ca_command_center_q_5
			}
			# AI Cores
			if = {
				limit = {
					has_building = ca_ai_core_q_1
					NOT = { has_building = ca_ai_core_q_2 }
				}
				remove_building = ca_ai_core_q_1
			}
			if = {
				limit = {
					has_building = ca_ai_core_q_2
					NOT = { has_building = ca_ai_core_q_3 }
				}
				remove_building = ca_ai_core_q_2
			}
			if = {
				limit = {
					has_building = ca_ai_core_q_3
					NOT = { has_building = ca_ai_core_q_4 }
				}
				remove_building = ca_ai_core_q_3
			}
			if = {
				limit = {
					has_building = ca_ai_core_q_4
					NOT = { has_building = ca_ai_core_q_5 }
				}
				remove_building = ca_ai_core_q_4
			}
			if = {
				limit = { has_building = ca_ai_core_q_5 }
				remove_building = ca_ai_core_q_5
			}
			# Fleet Support
			if = {
				limit = {
					has_building = ca_fleet_support_q_1
					NOT = { has_building = ca_fleet_support_q_2 }
				}
				remove_building = ca_fleet_support_q_1
			}
			if = {
				limit = {
					has_building = ca_fleet_support_q_2
					NOT = { has_building = ca_fleet_support_q_3 }
				}
				remove_building = ca_fleet_support_q_2
			}
			if = {
				limit = {
					has_building = ca_fleet_support_q_3
					NOT = { has_building = ca_fleet_support_q_4 }
				}
				remove_building = ca_fleet_support_q_3
			}
			if = {
				limit = {
					has_building = ca_fleet_support_q_4
					NOT = { has_building = ca_fleet_support_q_5 }
				}
				remove_building = ca_fleet_support_q_4
			}
			if = {
				limit = {
					has_building = ca_fleet_support_q_5
					NOT = { has_building = ca_fleet_support_q_6 }
				}
				remove_building = ca_fleet_support_q_5
			}
			if = {
				limit = {
					has_building = ca_fleet_support_q_6
					NOT = { has_building = ca_fleet_support_q_7 }
				}
				remove_building = ca_fleet_support_q_6
			}
			if = {
				limit = {
					has_building = ca_fleet_support_q_7
					NOT = { has_building = ca_fleet_support_q_8 }
				}
				remove_building = ca_fleet_support_q_7
			}
			if = {
				limit = { has_building = ca_fleet_support_q_8 }
				remove_building = ca_fleet_support_q_8
			}
			# Pilot Academies
			if = {
				limit = {
					has_building = ca_pilot_academy_q_1
					NOT = { has_building = ca_pilot_academy_q_2 }
				}
				remove_building = ca_pilot_academy_q_1
			}
			if = {
				limit = {
					has_building = ca_pilot_academy_q_2
					NOT = { has_building = ca_pilot_academy_q_3 }
				}
				remove_building = ca_pilot_academy_q_2
			}
			if = {
				limit = {
					has_building = ca_pilot_academy_q_3
					NOT = { has_building = ca_pilot_academy_q_4 }
				}
				remove_building = ca_pilot_academy_q_3
			}
			if = {
				limit = {
					has_building = ca_pilot_academy_q_4
					NOT = { has_building = ca_pilot_academy_q_5 }
				}
				remove_building = ca_pilot_academy_q_4
			}
			if = {
				limit = { has_building = ca_pilot_academy_q_5 }
				remove_building = ca_pilot_academy_q_5
			}
			# CITY BUILDINGS
			# Police Patrols
			if = {
				limit = {
					has_building = ct_police_patrols_q_1
					NOT = { has_building = ct_police_patrols_q_2 }
				}
				remove_building = ct_police_patrols_q_1
			}
			if = {
				limit = {
					has_building = ct_police_patrols_q_2
					NOT = { has_building = ct_police_patrols_q_3 }
				}
				remove_building = ct_police_patrols_q_2
			}
			if = {
				limit = {
					has_building = ct_police_patrols_q_3
					NOT = { has_building = ct_police_patrols_q_4 }
				}
				remove_building = ct_police_patrols_q_3
			}
			if = {
				limit = {
					has_building = ct_police_patrols_q_4
					NOT = { has_building = ct_police_patrols_q_5 }
				}
				remove_building = ct_police_patrols_q_4
			}
			if = {
				limit = { has_building = ct_police_patrols_q_5 }
				remove_building = ct_police_patrols_q_5
			}
			# Bomb Shelters
			if = {
				limit = {
					has_building = ct_bomb_shelters_q_1
					NOT = { has_building = ct_bomb_shelters_q_2 }
				}
				remove_building = ct_bomb_shelters_q_1
			}
			if = {
				limit = {
					has_building = ct_bomb_shelters_q_2
					NOT = { has_building = ct_bomb_shelters_q_3 }
				}
				remove_building = ct_bomb_shelters_q_2
			}
			if = {
				limit = {
					has_building = ct_bomb_shelters_q_3
					NOT = { has_building = ct_bomb_shelters_q_4 }
				}
				remove_building = ct_bomb_shelters_q_3
			}
			if = {
				limit = {
					has_building = ct_bomb_shelters_q_4
					NOT = { has_building = ct_bomb_shelters_q_5 }
				}
				remove_building = ct_bomb_shelters_q_4
			}
			if = {
				limit = { has_building = ct_bomb_shelters_q_5 }
				remove_building = ct_bomb_shelters_q_5
			}
			# Recruitment Center
			if = {
				limit = {
					has_building = ct_recruitment_center_q_1
					NOT = { has_building = ct_recruitment_center_q_2 }
				}
				remove_building = ct_recruitment_center_q_1
			}
			if = {
				limit = {
					has_building = ct_recruitment_center_q_2
					NOT = { has_building = ct_recruitment_center_q_3 }
				}
				remove_building = ct_recruitment_center_q_2
			}
			if = {
				limit = {
					has_building = ct_recruitment_center_q_3
					NOT = { has_building = ct_recruitment_center_q_4 }
				}
				remove_building = ct_recruitment_center_q_3
			}
			if = {
				limit = {
					has_building = ct_recruitment_center_q_4
					NOT = { has_building = ct_recruitment_center_q_5 }
				}
				remove_building = ct_recruitment_center_q_4
			}
			if = {
				limit = {
					has_building = ct_recruitment_center_q_5
					NOT = { has_building = ct_recruitment_center_q_6 }
				}
				remove_building = ct_recruitment_center_q_5
			}
			if = {
				limit = { has_building = ct_recruitment_center_q_6 }
				remove_building = ct_recruitment_center_q_6
			}
			# Emergency Reserves
			if = {
				limit = {
					has_building = ct_emergency_reserve_q_1
					NOT = { has_building = ct_emergency_reserve_q_2 }
				}
				remove_building = ct_emergency_reserve_q_1
			}
			if = {
				limit = {
					has_building = ct_emergency_reserve_q_2
					NOT = { has_building = ct_emergency_reserve_q_3 }
				}
				remove_building = ct_emergency_reserve_q_2
			}
			if = {
				limit = {
					has_building = ct_emergency_reserve_q_3
					NOT = { has_building = ct_emergency_reserve_q_4 }
				}
				remove_building = ct_emergency_reserve_q_3
			}
			if = {
				limit = {
					has_building = ct_emergency_reserve_q_4
					NOT = { has_building = ct_emergency_reserve_q_5 }
				}
				remove_building = ct_emergency_reserve_q_4
			}
			if = {
				limit = { has_building = ct_emergency_reserve_q_5 }
				remove_building = ct_emergency_reserve_q_5
			}
			# Robotics Infrastructure
			if = {
				limit = {
					has_building = ct_robotics_infrastructure_q_1
					NOT = { has_building = ct_robotics_infrastructure_q_2 }
				}
				remove_building = ct_robotics_infrastructure_q_1
			}
			if = {
				limit = {
					has_building = ct_robotics_infrastructure_q_2
					NOT = { has_building = ct_robotics_infrastructure_q_3 }
				}
				remove_building = ct_robotics_infrastructure_q_2
			}
			if = {
				limit = {
					has_building = ct_robotics_infrastructure_q_3
					NOT = { has_building = ct_robotics_infrastructure_q_4 }
				}
				remove_building = ct_robotics_infrastructure_q_3
			}
			if = {
				limit = {
					has_building = ct_robotics_infrastructure_q_4
					NOT = { has_building = ct_robotics_infrastructure_q_5 }
				}
				remove_building = ct_robotics_infrastructure_q_4
			}
			if = {
				limit = { has_building = ct_robotics_infrastructure_q_5 }
				remove_building = ct_robotics_infrastructure_q_5
			}
			# Factories
			if = {
				limit = {
					has_building = ct_factories_q_1
					NOT = { has_building = ct_factories_q_2 }
				}
				remove_building = ct_factories_q_1
			}
			if = {
				limit = {
					has_building = ct_factories_q_2
					NOT = { has_building = ct_factories_q_3 }
				}
				remove_building = ct_factories_q_2
			}
			if = {
				limit = {
					has_building = ct_factories_q_3
					NOT = { has_building = ct_factories_q_4 }
				}
				remove_building = ct_factories_q_3
			}
			if = {
				limit = {
					has_building = ct_factories_q_4
					NOT = { has_building = ct_factories_q_5 }
				}
				remove_building = ct_factories_q_4
			}
			if = {
				limit = {
					has_building = ct_factories_q_5
					NOT = { has_building = ct_factories_q_6 }
				}
				remove_building = ct_factories_q_5
			}
			if = {
				limit = {
					has_building = ct_factories_q_6
					NOT = { has_building = ct_factories_q_7 }
				}
				remove_building = ct_factories_q_6
			}
			if = {
				limit = {
					has_building = ct_factories_q_7
					NOT = { has_building = ct_factories_q_8 }
				}
				remove_building = ct_factories_q_7
			}
			if = {
				limit = { has_building = ct_factories_q_8 }
				remove_building = ct_factories_q_8
			}
			# Trade Centers
			if = {
				limit = {
					has_building = ct_trade_center_q_1
					NOT = { has_building = ct_trade_center_q_2 }
				}
				remove_building = ct_trade_center_q_1
			}
			if = {
				limit = {
					has_building = ct_trade_center_q_2
					NOT = { has_building = ct_trade_center_q_3 }
				}
				remove_building = ct_trade_center_q_2
			}
			if = {
				limit = {
					has_building = ct_trade_center_q_3
					NOT = { has_building = ct_trade_center_q_4 }
				}
				remove_building = ct_trade_center_q_3
			}
			if = {
				limit = {
					has_building = ct_trade_center_q_4
					NOT = { has_building = ct_trade_center_q_5 }
				}
				remove_building = ct_trade_center_q_4
			}
			if = {
				limit = { has_building = ct_trade_center_q_5 }
				remove_building = ct_trade_center_q_5
			}
			# Virtual Reality
			if = {
				limit = {
					has_building = ct_virtual_reality_q_1
					NOT = { has_building = ct_virtual_reality_q_2 }
				}
				remove_building = ct_virtual_reality_q_1
			}
			if = {
				limit = {
					has_building = ct_virtual_reality_q_2
					NOT = { has_building = ct_virtual_reality_q_3 }
				}
				remove_building = ct_virtual_reality_q_2
			}
			if = {
				limit = {
					has_building = ct_virtual_reality_q_3
					NOT = { has_building = ct_virtual_reality_q_4 }
				}
				remove_building = ct_virtual_reality_q_3
			}
			if = {
				limit = {
					has_building = ct_virtual_reality_q_4
					NOT = { has_building = ct_virtual_reality_q_5 }
				}
				remove_building = ct_virtual_reality_q_4
			}
			if = {
				limit = { has_building = ct_virtual_reality_q_5 }
				remove_building = ct_virtual_reality_q_5
			}
			# Public Schools
			if = {
				limit = {
					has_building = ct_public_schools_q_1
					NOT = { has_building = ct_public_schools_q_2 }
				}
				remove_building = ct_public_schools_q_1
			}
			if = {
				limit = {
					has_building = ct_public_schools_q_2
					NOT = { has_building = ct_public_schools_q_3 }
				}
				remove_building = ct_public_schools_q_2
			}
			if = {
				limit = {
					has_building = ct_public_schools_q_3
					NOT = { has_building = ct_public_schools_q_4 }
				}
				remove_building = ct_public_schools_q_3
			}
			if = {
				limit = {
					has_building = ct_public_schools_q_4
					NOT = { has_building = ct_public_schools_q_5 }
				}
				remove_building = ct_public_schools_q_4
			}
			if = {
				limit = { has_building = ct_public_schools_q_5 }
				remove_building = ct_public_schools_q_5
			}
			# Fine Arts Academies
			if = {
				limit = {
					has_building = ct_fine_arts_academy_q_1
					NOT = { has_building = ct_fine_arts_academy_q_2 }
				}
				remove_building = ct_fine_arts_academy_q_1
			}
			if = {
				limit = {
					has_building = ct_fine_arts_academy_q_2
					NOT = { has_building = ct_fine_arts_academy_q_3 }
				}
				remove_building = ct_fine_arts_academy_q_2
			}
			if = {
				limit = {
					has_building = ct_fine_arts_academy_q_3
					NOT = { has_building = ct_fine_arts_academy_q_4 }
				}
				remove_building = ct_fine_arts_academy_q_3
			}
			if = {
				limit = {
					has_building = ct_fine_arts_academy_q_4
					NOT = { has_building = ct_fine_arts_academy_q_5 }
				}
				remove_building = ct_fine_arts_academy_q_4
			}
			if = {
				limit = {
					has_building = ct_fine_arts_academy_q_5
					NOT = { has_building = ct_fine_arts_academy_q_6 }
				}
				remove_building = ct_fine_arts_academy_q_5
			}
			if = {
				limit = {
					has_building = ct_fine_arts_academy_q_6
					NOT = { has_building = ct_fine_arts_academy_q_7 }
				}
				remove_building = ct_fine_arts_academy_q_6
			}
			if = {
				limit = {
					has_building = ct_fine_arts_academy_q_7
					NOT = { has_building = ct_fine_arts_academy_q_8 }
				}
				remove_building = ct_fine_arts_academy_q_7
			}
			if = {
				limit = { has_building = ct_fine_arts_academy_q_8 }
				remove_building = ct_fine_arts_academy_q_8
			}
			# TEMPLE BUILDINGS
			# Hospitals
			if = {
				limit = {
					has_building = tp_hospital_q_1
					NOT = { has_building = tp_hospital_q_1 }
				}
				remove_building = tp_hospital_q_1
			}
			if = {
				limit = {
					has_building = tp_hospital_q_2
					NOT = { has_building = tp_hospital_q_3 }
				}
				remove_building = tp_hospital_q_2
			}
			if = {
				limit = { has_building = tp_hospital_q_3 }
				remove_building = tp_hospital_q_3
			}
			# Cybernetics Labs
			if = {
				limit = {
					has_building = tp_cybernetics_lab_q_1
					NOT = { has_building = tp_cybernetics_lab_q_1 }
				}
				remove_building = tp_cybernetics_lab_q_1
			}
			if = {
				limit = {
					has_building = tp_cybernetics_lab_q_2
					NOT = { has_building = tp_cybernetics_lab_q_3 }
				}
				remove_building = tp_cybernetics_lab_q_2
			}
			if = {
				limit = { has_building = tp_cybernetics_lab_q_3 }
				remove_building = tp_cybernetics_lab_q_3
			}
			# Biogenetics Labs
			if = {
				limit = {
					has_building = tp_biogenetics_lab_q_1
					NOT = { has_building = tp_biogenetics_lab_q_1 }
				}
				remove_building = tp_biogenetics_lab_q_1
			}
			if = {
				limit = {
					has_building = tp_biogenetics_lab_q_2
					NOT = { has_building = tp_biogenetics_lab_q_3 }
				}
				remove_building = tp_biogenetics_lab_q_2
			}
			if = {
				limit = { has_building = tp_biogenetics_lab_q_3 }
				remove_building = tp_biogenetics_lab_q_3
			}
			# Social Sciences Labs
			if = {
				limit = {
					has_building = tp_social_sciences_lab_q_1
					NOT = { has_building = tp_social_sciences_lab_q_1 }
				}
				remove_building = tp_social_sciences_lab_q_1
			}
			if = {
				limit = {
					has_building = tp_social_sciences_lab_q_2
					NOT = { has_building = tp_social_sciences_lab_q_3 }
				}
				remove_building = tp_social_sciences_lab_q_2
			}
			if = {
				limit = { has_building = tp_social_sciences_lab_q_3 }
				remove_building = tp_social_sciences_lab_q_3
			}
			# Theological Schools
			if = {
				limit = {
					has_building = tp_theological_school_q_1
					NOT = { has_building = tp_theological_school_q_1 }
				}
				remove_building = tp_theological_school_q_1
			}
			if = {
				limit = {
					has_building = tp_theological_school_q_2
					NOT = { has_building = tp_theological_school_q_3 }
				}
				remove_building = tp_theological_school_q_2
			}
			if = {
				limit = { has_building = tp_theological_school_q_3 }
				remove_building = tp_theological_school_q_3
			}
			# Robotics Labs
			if = {
				limit = {
					has_building = tp_robotics_lab_q_1
					NOT = { has_building = tp_robotics_lab_q_2 }
				}
				remove_building = tp_robotics_lab_q_1
			}
			if = {
				limit = {
					has_building = tp_robotics_lab_q_2
					NOT = { has_building = tp_robotics_lab_q_3 }
				}
				remove_building = tp_robotics_lab_q_2
			}
			if = {
				limit = {
					has_building = tp_robotics_lab_q_3
					NOT = { has_building = tp_robotics_lab_q_4 }
				}
				remove_building = tp_robotics_lab_q_3
			}
			if = {
				limit = {
					has_building = tp_robotics_lab_q_4
					NOT = { has_building = tp_robotics_lab_q_5 }
				}
				remove_building = tp_robotics_lab_q_4
			}
			if = {
				limit = { has_building = tp_robotics_lab_q_5 }
				remove_building = tp_robotics_lab_q_5
			}
			# Security
			if = {
				limit = {
					has_building = tp_security_q_1
					NOT = { has_building = tp_security_q_2 }
				}
				remove_building = tp_security_q_1
			}
			if = {
				limit = {
					has_building = tp_security_q_2
					NOT = { has_building = tp_security_q_3 }
				}
				remove_building = tp_security_q_2
			}
			if = {
				limit = {
					has_building = tp_security_q_3
					NOT = { has_building = tp_security_q_4 }
				}
				remove_building = tp_security_q_3
			}
			if = {
				limit = {
					has_building = tp_security_q_4
					NOT = { has_building = tp_security_q_5 }
				}
				remove_building = tp_security_q_4
			}
			if = {
				limit = { has_building = tp_security_q_5 }
				remove_building = tp_security_q_5
			}
			# Digital Economics
			if = {
				limit = {
					has_building = tp_digital_economics_q_1
					NOT = { has_building = tp_digital_economics_q_2 }
				}
				remove_building = tp_digital_economics_q_1
			}
			if = {
				limit = {
					has_building = tp_digital_economics_q_2
					NOT = { has_building = tp_digital_economics_q_3 }
				}
				remove_building = tp_digital_economics_q_2
			}
			if = {
				limit = {
					has_building = tp_digital_economics_q_3
					NOT = { has_building = tp_digital_economics_q_4 }
				}
				remove_building = tp_digital_economics_q_3
			}
			if = {
				limit = {
					has_building = tp_digital_economics_q_4
					NOT = { has_building = tp_digital_economics_q_5 }
				}
				remove_building = tp_digital_economics_q_4
			}
			if = {
				limit = {
					has_building = tp_digital_economics_q_5
					NOT = { has_building = tp_digital_economics_q_6 }
				}
				remove_building = tp_digital_economics_q_5
			}
			if = {
				limit = { has_building = tp_digital_economics_q_6 }
				remove_building = tp_digital_economics_q_6
			}
			# Theoretical Physics
			if = {
				limit = {
					has_building = tp_theoretical_physics_q_1
					NOT = { has_building = tp_theoretical_physics_q_2 }
				}
				remove_building = tp_theoretical_physics_q_1
			}
			if = {
				limit = {
					has_building = tp_theoretical_physics_q_2
					NOT = { has_building = tp_theoretical_physics_q_3 }
				}
				remove_building = tp_theoretical_physics_q_2
			}
			if = {
				limit = {
					has_building = tp_theoretical_physics_q_3
					NOT = { has_building = tp_theoretical_physics_q_4 }
				}
				remove_building = tp_theoretical_physics_q_3
			}
			if = {
				limit = {
					has_building = tp_theoretical_physics_q_4
					NOT = { has_building = tp_theoretical_physics_q_5 }
				}
				remove_building = tp_theoretical_physics_q_4
			}
			if = {
				limit = {
					has_building = tp_theoretical_physics_q_5
					NOT = { has_building = tp_theoretical_physics_q_6 }
				}
				remove_building = tp_theoretical_physics_q_5
			}
			if = {
				limit = { has_building = tp_theoretical_physics_q_6 }
				remove_building = tp_theoretical_physics_q_6
			}
			# Military Mathematics
			if = {
				limit = {
					has_building = tp_military_mathematics_q_1
					NOT = { has_building = tp_military_mathematics_q_2 }
				}
				remove_building = tp_military_mathematics_q_1
			}
			if = {
				limit = {
					has_building = tp_military_mathematics_q_2
					NOT = { has_building = tp_military_mathematics_q_3 }
				}
				remove_building = tp_military_mathematics_q_2
			}
			if = {
				limit = {
					has_building = tp_military_mathematics_q_3
					NOT = { has_building = tp_military_mathematics_q_4 }
				}
				remove_building = tp_military_mathematics_q_3
			}
			if = {
				limit = {
					has_building = tp_military_mathematics_q_4
					NOT = { has_building = tp_military_mathematics_q_5 }
				}
				remove_building = tp_military_mathematics_q_4
			}
			if = {
				limit = {
					has_building = tp_military_mathematics_q_5
					NOT = { has_building = tp_military_mathematics_q_6 }
				}
				remove_building = tp_military_mathematics_q_5
			}
			if = {
				limit = { has_building = tp_military_mathematics_q_6 }
				remove_building = tp_military_mathematics_q_6
			}
			# Archives
			if = {
				limit = {
					has_building = tp_archive_q_1
					NOT = { has_building = tp_archive_q_2 }
				}
				remove_building = tp_archive_q_1
			}
			if = {
				limit = {
					has_building = tp_archive_q_2
					NOT = { has_building = tp_archive_q_3 }
				}
				remove_building = tp_archive_q_2
			}
			if = {
				limit = {
					has_building = tp_archive_q_3
					NOT = { has_building = tp_archive_q_4 }
				}
				remove_building = tp_archive_q_3
			}
			if = {
				limit = {
					has_building = tp_archive_q_4
					NOT = { has_building = tp_archive_q_5 }
				}
				remove_building = tp_archive_q_4
			}
			if = {
				limit = {
					has_building = tp_archive_q_5
					NOT = { has_building = tp_archive_q_6 }
				}
				remove_building = tp_archive_q_5
			}
			if = {
				limit = {
					has_building = tp_archive_q_6
					NOT = { has_building = tp_archive_q_7 }
				}
				remove_building = tp_archive_q_6
			}
			if = {
				limit = {
					has_building = tp_archive_q_7
					NOT = { has_building = tp_archive_q_8 }
				}
				remove_building = tp_archive_q_7
			}
			if = {
				limit = { has_building = tp_archive_q_8 }
				remove_building = tp_archive_q_8
			}
			# Administrative Sectors
			if = {
				limit = {
					has_building = tp_administrative_sector_q_1
					NOT = { has_building = tp_administrative_sector_q_2 }
				}
				remove_building = tp_administrative_sector_q_1
			}
			if = {
				limit = {
					has_building = tp_administrative_sector_q_2
					NOT = { has_building = tp_administrative_sector_q_3 }
				}
				remove_building = tp_administrative_sector_q_2
			}
			if = {
				limit = {
					has_building = tp_administrative_sector_q_3
					NOT = { has_building = tp_administrative_sector_q_4 }
				}
				remove_building = tp_administrative_sector_q_3
			}
			if = {
				limit = {
					has_building = tp_administrative_sector_q_4
					NOT = { has_building = tp_administrative_sector_q_5 }
				}
				remove_building = tp_administrative_sector_q_4
			}
			if = {
				limit = {
					has_building = tp_administrative_sector_q_5
					NOT = { has_building = tp_administrative_sector_q_6 }
				}
				remove_building = tp_administrative_sector_q_5
			}
			if = {
				limit = {
					has_building = tp_administrative_sector_q_6
					NOT = { has_building = tp_administrative_sector_q_7 }
				}
				remove_building = tp_administrative_sector_q_6
			}
			if = {
				limit = {
					has_building = tp_administrative_sector_q_7
					NOT = { has_building = tp_administrative_sector_q_8 }
				}
				remove_building = tp_administrative_sector_q_7
			}
			if = {
				limit = { has_building = tp_administrative_sector_q_8 }
				remove_building = tp_administrative_sector_q_8
			}
			# Classrooms
			if = {
				limit = {
					has_building = tp_classrooms_q_1
					NOT = { has_building = tp_classrooms_q_2 }
				}
				remove_building = tp_classrooms_q_1
			}
			if = {
				limit = {
					has_building = tp_classrooms_q_2
					NOT = { has_building = tp_classrooms_q_3 }
				}
				remove_building = tp_classrooms_q_2
			}
			if = {
				limit = {
					has_building = tp_classrooms_q_3
					NOT = { has_building = tp_classrooms_q_4 }
				}
				remove_building = tp_classrooms_q_3
			}
			if = {
				limit = {
					has_building = tp_classrooms_q_4
					NOT = { has_building = tp_classrooms_q_5 }
				}
				remove_building = tp_classrooms_q_4
			}
			if = {
				limit = {
					has_building = tp_classrooms_q_5
					NOT = { has_building = tp_classrooms_q_6 }
				}
				remove_building = tp_classrooms_q_5
			}
			if = {
				limit = { has_building = tp_classrooms_q_6 }
				remove_building = tp_classrooms_q_6
			}
			# Exotic Research
			if = {
				limit = {
					has_building = tp_exotic_research_q_1
					NOT = { has_building = tp_exotic_research_q_2 }
				}
				remove_building = tp_exotic_research_q_1
			}
			if = {
				limit = {
					has_building = tp_exotic_research_q_2
					NOT = { has_building = tp_exotic_research_q_3 }
				}
				remove_building = tp_exotic_research_q_2
			}
			if = {
				limit = {
					has_building = tp_exotic_research_q_3
					NOT = { has_building = tp_exotic_research_q_4 }
				}
				remove_building = tp_exotic_research_q_3
			}
			if = {
				limit = {
					has_building = tp_exotic_research_q_4
					NOT = { has_building = tp_exotic_research_q_5 }
				}
				remove_building = tp_exotic_research_q_4
			}
			if = {
				limit = { has_building = tp_exotic_research_q_5 }
				remove_building = tp_exotic_research_q_5
			}
			# Super Computers
			if = {
				limit = {
					has_building = tp_super_computer_q_1
					NOT = { has_building = tp_super_computer_q_2 }
				}
				remove_building = tp_super_computer_q_1
			}
			if = {
				limit = {
					has_building = tp_super_computer_q_2
					NOT = { has_building = tp_super_computer_q_3 }
				}
				remove_building = tp_super_computer_q_2
			}
			if = {
				limit = {
					has_building = tp_super_computer_q_3
					NOT = { has_building = tp_super_computer_q_4 }
				}
				remove_building = tp_super_computer_q_3
			}
			if = {
				limit = { has_building = tp_super_computer_q_4 }
				remove_building = tp_super_computer_q_4
			}
		}
		if = {
			limit = { has_nickname = no }
			random = {
				chance = 25
				give_nickname = nick_the_butcher_of_location
			}
		}
	}
}

# You were killed in an orbital bombardment
character_event = {
	id = invasion.101
	desc = "EVTDESCINVASION101"
	picture = GFX_evt_battle
	border = GFX_evt_frame_character_frame_war
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTCONFIRM"
		death = { death_reason = death_battle killer = FROM }
	}
}
# You were maimed in an orbital bombardment
character_event = {
	id = invasion.102
	desc = "EVTDESCINVASION102"
	picture = GFX_evt_battle
	border = GFX_evt_frame_character_frame_war
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTAINVASION105"
		FROM = {
			reverse_opinion = { who = ROOT modifier = opinion_war_crimes }
			any_liege = {
				limit = { has_character_flag = flag_authorized_orbital_bombardment }
				reverse_opinion = { who = ROOT modifier = opinion_war_crimes }
			}
		}
		if = {
			limit = { NOT = { trait = maimed } }
			add_trait = maimed
		}
	}
}

# You narrowly escaped an orbital bombardment!
character_event = {
	id = invasion.103
	desc = "EVTDESCINVASION103"
	picture = GFX_evt_battle
	border = GFX_evt_frame_character_frame_war
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTAINVASION105"
		FROM = {
			reverse_opinion = { who = ROOT modifier = opinion_war_crimes }
			any_liege = {
				limit = { has_character_flag = flag_authorized_orbital_bombardment }
				reverse_opinion = { who = ROOT modifier = opinion_war_crimes }
			}
		}
	}
}
# WMDs used on your authorization
character_event = {
	id = invasion.104
	desc = "EVTDESCINVASION104"
	notification = yes
	is_triggered_only = yes
	
	option = { name = "EVTOPTCONFIRM" }
}
# Your planet's gone
character_event = {
	id = invasion.105
	desc = "EVTDESCINVASION105"
	picture = GFX_evt_battle
	border = GFX_evt_frame_character_frame_war
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTAINVASION105"
		FROM = {
			reverse_opinion = { who = ROOT modifier = opinion_war_crimes }
			any_liege = {
				limit = { has_character_flag = flag_authorized_orbital_bombardment }
				reverse_opinion = { who = ROOT modifier = opinion_war_crimes }
			}
		}
	}
}
# WMDs used WITHOUT your authorization
character_event = {
	id = invasion.106
	desc = "EVTDESCINVASION106"
	notification = yes
	is_triggered_only = yes
	
	option = { name = "EVTOPTCONFIRM" }
}

# Earth-That-Was
narrative_event = {
	title = "EVTTITLEINVASION110"
	id = invasion.110
	desc = "EVTDESCINVASION110"
	picture = GFX_evt_burning_house
	border = GFX_event_narrative_frame_war
	major = yes
	is_triggered_only = yes
	
	option = {
		trigger = {
			NOT = { character = FROM }
			NOT = { is_liege_or_above = FROM }
		}
		name = "EVTOPTAINVASION110"
		FROM = {
			add_trait = saoshyant
			any_child = { add_trait = saoshyant_descendant }
		}
		b_earth = { set_name = "Earth-That-Was" }
	}
	
	option = {
		trigger = {
			OR = {
				character = FROM
				is_liege_or_above = FROM
			}
			OR = {
				NOT = { religion_group = transhumanist_group }
				religion = machine_cultist
			}
		}
		name = "EVTOPTBINVASION110"
		prestige = 1000
		if = {
			limit = { NOT = { religion = xenoterran } }
			piety = -500
		}
		FROM = {
			add_trait = saoshyant
			any_child = { add_trait = saoshyant_descendant }
		}
		b_earth = { set_name = "Earth-That-Was" }
	}
	
	option = {
		trigger = {
			OR = {
				character = FROM
				is_liege_or_above = FROM
			}
			religion_group = transhumanist_group
			NOT = { religion = machine_cultist }
		}
		name = "EVTOPTCINVASION110"
		prestige = 1000
		piety = -500
		FROM = {
			add_trait = saoshyant
			any_child = { add_trait = saoshyant_descendant }
		}
		b_earth = { set_name = "Earth-That-Was" }
	}
}

# Authorize orbital bombardment
character_event = {
	id = invasion.115
	desc = "EVTDESCINVASION115"
	picture = GFX_evt_council
	border = GFX_event_character_frame_war
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTAINVASION115"
		set_character_flag = flag_authorized_orbital_bombardment
		clr_character_flag = flag_authorizing_orbital_bombardment
		piety = -100
		hidden_tooltip = {
			any_realm_character = {
				limit = { is_liege_or_above = ROOT }
				character_event = { id = invasion.116 }
			}
		}
	}
	option = {
		name = "EVTOPTBINVASION115"
		clr_character_flag = flag_authorizing_orbital_bombardment
		ai_chance = { factor = 0 }
	}
}
# Weapons of mass destruction are authorized
character_event = {
	id = invasion.116
	desc = "EVTDESCINVASION116"
	picture = GFX_evt_council
	border = GFX_event_character_frame_war
	is_triggered_only = yes
	
	option = { name = "EVTOPTCONFIRM" }
}
# Remove authorization
character_event = {
	id = invasion.117
	hide_window = yes
	
	trigger = {
		has_character_flag = flag_authorized_orbital_bombardment
		OR = {
			NOT = { top_liege = { character = ROOT } } # No longer has the authority
			NOT = { any_current_enemy = { always = yes } } # No longer at war
		}
	}
	
	immediate = { clr_character_flag = flag_authorized_orbital_bombardment }
}
# Order orbital bombardment
character_event = {
	id = invasion.120
	desc = "EVTDESCINVASION120"
	picture = GFX_evt_siege
	border = GFX_evt_character_frame_war
	is_triggered_only = yes
	
	option = {
		trigger = {
			siege = {
				is_attacker = yes
				# Has sufficient capital ships to carry out the command
				OR = {
					knights = 0.1
					dreadnoughts = 0.1
				}
			}
		}
		name = "EVTOPTAINVASION120"
		set_character_flag = flag_used_orbital_bombardment
		clr_character_flag = flag_using_orbital_bombardment
		piety = -100
		siege = {
			enemy = {
				troops = -1
				morale = -1
			}
		}
	}
	option = {
		name = "EVTOPTBINVASION120"
		clr_character_flag = flag_using_orbital_bombardment
	}
}

character_event = {
	id = invasion.121
	hide_window = yes
	
	trigger = {
		has_character_flag = flag_used_orbital_bombardment
		NOT = {
			siege = { is_attacker = yes }
		}
	}
	immediate = { clr_character_flag = flag_used_orbital_bombardment }
}