@xit_seed_vector_diff_1 = 3
@xit_seed_vector_diff_2 = 4
@xit_seed_vector_diff_3 = 5

operation_xit_seed_ovomorph_vector = {
	target = none
	categories = { op_cat_infiltration op_cat_sabotage }
	picture = GFX_xit_event_dormant_ovomorph_signatures
	desc = operation_xit_seed_ovomorph_vector_desc
	stages = 3

	resources = {
		category = operations
		cost = {
			influence = 120
		}
		upkeep = {
			energy = 10
		}
	}

	spy_power_cost = 60

	potential = {
		has_nemesis = yes
		owner = {
			xit_is_xenomorph_safe_owner = yes
		}
		target = {
			is_country_type = default
			is_fallen_empire = no
			is_primitive = no
			NOT = { xit_is_xenomorph_safe_owner = yes }
			any_owned_planet = {
				is_colony = yes
				is_capital = no
				NOT = { has_deposit = d_xit_dormant_ovomorph_cluster }
				NOT = { has_modifier = xit_xenomorph_infestation }
				NOT = { has_modifier = xit_xenomorph_outbreak }
				NOT = { has_modifier = xit_xenomorph_overrun }
				NOT = { has_modifier = xit_xenomorph_terminal_collapse }
			}
		}
	}

	allow = {
		custom_tooltip = {
			is_running_espionage_operation = no
			fail_text = operation_one_at_a_time
		}
		custom_tooltip = {
			fail_text = operation_xit_seed_ovomorph_vector_too_recent
			target = {
				NOT = { has_country_flag = xit_seed_ovomorph_vector_recent@root.owner }
			}
		}
		custom_tooltip = {
			fail_text = operation_xit_seed_ovomorph_vector_no_colony
			target = {
				any_owned_planet = {
					is_colony = yes
					is_capital = no
					NOT = { has_deposit = d_xit_dormant_ovomorph_cluster }
					NOT = { has_modifier = xit_xenomorph_infestation }
					NOT = { has_modifier = xit_xenomorph_outbreak }
					NOT = { has_modifier = xit_xenomorph_overrun }
					NOT = { has_modifier = xit_xenomorph_terminal_collapse }
				}
			}
		}
	}

	stage = {
		difficulty = @xit_seed_vector_diff_1
		icon = GFX_espionage_chapter_icon_surveillance
		event = xit_operation.1
	}
	stage = {
		difficulty = @xit_seed_vector_diff_2
		icon = GFX_espionage_chapter_icon_target
		event = xit_operation.2
	}
	stage = {
		difficulty = @xit_seed_vector_diff_3
		icon = GFX_espionage_chapter_icon_motion
		event = xit_operation.3
	}

	on_roll_failed = {
		standard_espionage_operation_on_roll_failed = { RANDOM_EVENTS = operation_random_events_generic }
	}

	on_create = {
		target = {
			set_timed_country_flag = {
				flag = espionage_operation_targeted_by@root.owner
				days = @operationTargetedByTimer
			}
		}
	}
}
