﻿namespace = asp

#parasite machine #https://gall.dcinside.com/mgallery/board/view/?id=stellaris&no=28536 #https://gall.dcinside.com/mgallery/board/view/?id=stellaris&no=29375

#a world that killed itself
fleet_event = {
	id = asp.89
	title = "asp.89.name"
	desc = "asp.89.desc"
	picture = GFX_evt_animal_wildlife
	show_sound = event_alien_nature

	archaeology = yes
	is_triggered_only = yes

	immediate = {
		from = { set_site_progress_locked = yes }
	}

	after = {
		from = { set_site_progress_locked = no }
	}

	option = {
		name = asp.89.a
		medium_artifact_reward = yes
	}
}
#union of world socialist republics
fleet_event = {
	id = asp.90
	title = "asp.90.name"
	desc = "asp.90.desc"
	picture = GFX_evt_asp.90
	show_sound = event_asp_hell_march_part

	archaeology = yes
	is_triggered_only = yes

	immediate = {
		from = { set_site_progress_locked = yes }
	}

	after = {
		from = { set_site_progress_locked = no }
	}

	option = {
		name = asp.90.a
		owner = {
			add_modifier = { modifier = aspmod_union_of_world_socialist_republic days = 120 }
			add_resource = { society_research = 200 }
		}
		destroy_archaeological_site = from
	}
	option = {
		name = asp.90.b
		allow = {
			owner = {
				resource_stockpile_compare = {
					resource = energy
					value >= 200
				}
			}
		}
		owner = { add_resource = { energy = -200 } }
	}
	option = {
		name = asp.90.c
		custom_tooltip = asp.90.c.tooltip
		allow = {
			owner = {
				has_valid_civic = civic_shared_burden
				resource_stockpile_compare = {
					resource = energy
					value >= 500
				}
			}
		}
		owner = {
			add_resource = {
				energy = -500
				society_research = 2000
			}
			hidden_effect = {
				random_list = {
					50 = {}
					50 = { country_event = { id = asp.91 } }
				}
			}
		}
	}
}
#stage 2 event for sharded burden empire
country_event = {
	id = asp.91
	title = "asp.91.name"
	desc = "asp.91.desc"
	picture = GFX_evt_asp.91

	is_triggered_only = yes

	immediate = {
		set_country_flag = asp_site_parasite_machine_record_found
	}

	option = {
		name = asp.91.a
	}
}
#asgu #https://argonov.bandcamp.com/album/2032-legend-of-a-lost-future #https://youtu.be/BzR96Wtxryk (korean subtitled ver.) #https://www.youtube.com/watch?v=tBKTrVa20CQ (original ver.)
fleet_event = {
	id = asp.92
	title = "asp.92.name"
	desc = "asp.92.desc"
	picture = GFX_evt_asp.92
	show_sound = event_administrative_work

	archaeology = yes
	is_triggered_only = yes

	immediate = {
		from = { set_site_progress_locked = yes }
	}

	after = {
		from = { set_site_progress_locked = no }
	}

	option = {
		name = asp.92.a
		owner = { add_resource = { engineering_research = 500 } }
		destroy_archaeological_site = from
	}
	option = {
		name = asp.92.b
		allow = {
			owner = {
				resource_stockpile_compare = {
					resource = energy
					value >= 200
				}
				resource_stockpile_compare = {
					resource = minerals
					value >= 200
				}
				resource_stockpile_compare = {
					resource = alloys
					value >= 100
				}
			}
		}
		owner = {
			add_resource = {
				energy = -200
				minerals = -200
				alloys = -100
			}
		}
	}
	option = {
		name = asp.92.c
		custom_tooltip = asp.92.c.tooltip
		allow = {
			owner = {
				has_valid_civic = civic_shared_burden
				resource_stockpile_compare = {
					resource = energy
					value >= 500
				}
			}
		}
		owner = { add_resource = { energy = -500 } }
		hidden_effect = {
			owner = { set_country_flag = asp_92_c_country_flag }
		}
	}
}
#creepy ai
fleet_event = {
	id = asp.93
	title = "asp.93.name"
	desc = "asp.93.desc"
	picture = GFX_evt_organic_oppression
	show_sound = event_bad_omen

	archaeology = yes
	is_triggered_only = yes

	immediate = {
		from = { set_site_progress_locked = yes }
	}

	after = {
		from = { set_site_progress_locked = no }
	}

	option = {
		name = asp.93.a
		owner = {
			add_resource = { engineering_research = 2000 }
			add_modifier = { modifier = aspmod_automated_admin_system days = -1 }
		}
		destroy_archaeological_site = from
	}
	option = {
		name = asp.93.b
		allow = {
			owner = {
				resource_stockpile_compare = {
					resource = energy
					value >= 500
				}
			}
		}
		owner = { add_resource = { energy = -500 } }
	}
}
#road can not be taken
fleet_event = {
	id = asp.94
	title = "asp.94.name"
	desc = "asp.94.desc"
	picture = GFX_evt_asp.94
	show_sound = relic_activation_isolated_contingency_core

	archaeology = yes
	is_triggered_only = yes

	immediate = {
		from = { set_site_progress_locked = yes }
	}

	after = {
		from = { set_site_progress_locked = no }
		if = {
			limit = { owner = { has_policy_flag = aspmod_archaeology_cleanup_active } }
			destroy_archaeological_site = from
		}
	}

	option = {
		name = asp.94.a
		trigger = { owner = { has_ethic = ethic_fanatic_xenophobe } }
		owner = { country_event = { id = asp.95 } }
		kill_leader = { class = scientist }
	}
	option = {
		name = asp.94.b
		trigger = { owner = { has_ethic = ethic_fanatic_authoritarian } }
		owner = { country_event = { id = asp.95 } }
		kill_leader = { class = scientist }
	}
	option = {
		name = asp.94.c
		trigger = {
			owner = {
				NOR = {
					has_ethic = ethic_fanatic_xenophobe
					has_ethic = ethic_fanatic_authoritarian
				}
			}
		}
		owner = {
			add_resource = {
				influence = 200
				society_research = 1000
			}
			add_modifier = { modifier = aspmod_automated_admin_system }
			add_modifier = { modifier = aspmod_organic_admin_network }
		}
	}
	option = {
		name = asp.94.d
		trigger = {
			owner = {
				NOR = {
					has_ethic = ethic_fanatic_xenophobe
					has_ethic = ethic_fanatic_authoritarian
				}
			}
		}
		owner = {
			enable_special_project = {
				name = ASP_THROUGH_IRON_CURTAIN_PROJECT
				location = from.planet
			}
		}
	}
}
#stage 5 event for fanatic xenophobe / authoritarian empire
country_event = {
	id = asp.95
	title = "asp.95.name"
	desc = { trigger = { has_ethic = ethic_fanatic_xenophobe } text = "asp.95.desc.1" }
	desc = { trigger = { has_ethic = ethic_fanatic_authoritarian } text = "asp.95.desc.2" }
	picture = GFX_evt_archaeologists_escaping

	is_triggered_only = yes

	option = {
		name = asp.95.a
		add_modifier = { modifier = aspmod_organic_admin_network }
	}
}
# ASP_site_parasite_machine special project event
country_event = {
	id = asp.96
	title = "asp.96.name"
	desc = "asp.96.desc"
	picture = GFX_evt_ground_combat

	is_triggered_only = yes

	option = {
		name = asp.96.a
		trigger = { NOT = { has_country_flag = asp_site_parasite_machine_record_found } }
		allow = {
			resource_stockpile_compare = {
				resource = energy
				value >= 500
			}
			resource_stockpile_compare = {
				resource = minerals
				value >= 500
			}
		}
		add_resource = {
			energy = -500
			minerals = -500
		}
		add_relic = r_aspmod_parasite_machine
	}
	option = {
		name = asp.96.b
		trigger = { NOT = { has_country_flag = asp_site_parasite_machine_record_found } }
		country_event = { id = asp.97 }
	}
	option = {
		name = asp.96.c
		trigger = { has_country_flag = asp_site_parasite_machine_record_found }
		country_event = { id = asp.97 }
	}
}
country_event = {
	id = asp.97
	title = "asp.97.name"
	desc = { trigger = { NOT = { has_country_flag = asp_site_parasite_machine_record_found } } text = "asp.97.desc.1" }
	desc = { trigger = { has_country_flag = asp_site_parasite_machine_record_found } text = "asp.97.desc.2" }
	picture = GFX_evt_nuclear_explosion

	is_triggered_only = yes

	option = {
		name = asp.97.a
		country_event = { id = asp.98 }
	}
	option = {
		name = asp.97.b
		country_event = { id = asp.98 }
	}
}
country_event = {
	id = asp.98
	title = "asp.98.name"
	desc = "asp.98.desc"
	picture = GFX_evt_asp.98

	is_triggered_only = yes

	option = {
		name = asp.98.a
		add_relic = r_aspmod_parasite_machine_2
	}
}
