# Idempotently applies the mega_arkship_boost modifier to every arkship world the country owns.
# Invoked only for human empires: its sole caller, mega_arkship.1, gates on is_ai = no, so the
# boost stays player only without a redundant guard here. Safe to call repeatedly; the has_modifier
# guard prevents re-adding. Arkships build building_mega_arkship_mine for generic mining; no tech
# grant is used, since granting the is_nomadic = no tech_mechanized_mining does not stick on a
# nomadic empire. Scope: country
mega_arkship_apply_boost_effect = {
	every_owned_colony = {
		limit = {
			is_mega_arkship_planet = yes
			NOT = { has_modifier = mega_arkship_boost }
		}
		add_modifier = {
			modifier = mega_arkship_boost
			days = -1
		}
	}
}

# Removes the boost from any world a human empire owns that carries it but is no longer an arkship
# (e.g. a captured/converted hull or a future class reuse), so the modifier never lingers for the
# player. A boost on an arkship handed to an AI is intentionally not reconciled: the AI never runs
# mega_arkship.1, so the modifier simply rides along, which is cheaper than scanning every AI empire
# monthly to strip a cosmetic edge case. Scope: country
mega_arkship_cleanup_boost_effect = {
	every_owned_colony = {
		limit = {
			has_modifier = mega_arkship_boost
			NOT = { is_mega_arkship_planet = yes }
		}
		remove_modifier = mega_arkship_boost
	}
}
