﻿#beyond earth - purity #https://gall.dcinside.com/mgallery/board/view/?id=stellaris&no=8326
ASP_site_beyond_earth_purity = {
	desc = "ASP_site_beyond_earth_purity_desc"
	picture = GFX_evt_l-gateway
	max_instances = 1
	stages = 4
	weight = {
		base = 0 #check solar_system_initializers
	}
	allow = {
		exists = leader
		leader = { leader_class = scientist }
		owner = { is_ai = no }
	}

	visible = {
		aspmod_dig_site_visible_trigger = yes
	}

	on_visible = {
		country_event = { id = story.5 days = 30 }
	}

	stage = {
		difficulty = 1
		icon = GFX_archaeology_runes_C1
		event = asp.70
	}
	stage = {
		difficulty = 2
		icon = GFX_archaeology_runes_C2
		event = asp.71
	}
	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_C3
		event = asp.72
	}
	stage = {
		difficulty = 4
		icon = GFX_archaeology_runes_C4
		event = asp.73
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = all_random_events }
		}
	}
}
ASP_site_beyond_earth_purity_2 = {
	desc = "ASP_site_beyond_earth_purity_2_desc"
	picture = GFX_evt_shielded_planet
	max_instances = 1
	stages = 2
	weight = {
		base = 0 #change this if you need
	}
	allow = {
		hidden_trigger = {
			exists = leader
			leader = { leader_class = scientist }
		}
		custom_tooltip_fail = {
			text = ASP_site_beyond_earth_purity_2_fail
			owner = { NOT = { has_special_project = ASP_BEYOND_EARTH_PURITY_PROJECT } } #prevent further excavation before special project done
		}
		custom_tooltip_fail = {
			text = ASP_site_beyond_earth_purity_2_fail_b
			owner = { NOT = { has_special_project = ASP_BEYOND_EARTH_PURITY_PROJECT_2 } } #prevent further excavation before special project done
		}
		custom_tooltip_fail = {
			text = ASP_site_beyond_earth_purity_2_fail_c
			from.planet = { NOT = { has_planet_flag = ASP_site_beyond_earth_purity_2_dig_stopped } } #story-state pause gate; the site intentionally survives while its Special Project is unresolved
		}
	}

	visible = {
		aspmod_dig_site_visible_trigger = yes
	}


	on_visible = {
		country_event = { id = story.5 days = 30 }
	}

	stage = {
		difficulty = 5
		icon = GFX_archaeology_runes_D1
		event = asp.74
	}
	stage = {
		difficulty = 6
		icon = GFX_archaeology_runes_D2
		event = asp.77
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = all_random_events }
		}
	}
}