namespace = WL_lv_Zinara_tribute_events

##HIDDEN TRIBUTE
country_event = { #organic 25
	id = WL_lv_Zinara_tribute_events.5000
	hide_window = yes
	is_triggered_only = yes
	immediate = {
		random_owned_planet = {
			limit = {
				is_colony = yes
				count_owned_pop_amount = {
					limit = {
						is_enslaved = no
						is_being_purged = no
						NOR = {
							has_trait = trait_machine_unit
							has_trait = trait_mechanical
							is_robot_pop = yes
						}
					}
					count > 34
				}
			}
			random_owned_pop_group = {
				limit = {
					is_enslaved = no
					is_being_purged = no
					NOR = {
						has_trait = trait_machine_unit
						has_trait = trait_mechanical
					}
				}
				kill_pop_group = {
					pop_group = this
					amount = 2500
				}
			}
			add_modifier = {
				modifier = "WL_lv_zinara_pop_unhappiness_relic_planet02" 
				days = 3600
			}
		}
	}
}

country_event = { #organic 10
	id = WL_lv_Zinara_tribute_events.5100
	hide_window = yes
	is_triggered_only = yes
	immediate = {
		random_owned_planet = {
			limit = {
				is_colony = yes
				num_pops > 4
				count_owned_pop_amount = {
					limit = {
						is_enslaved = no
						is_being_purged = no
						NOR = {
							has_trait = trait_machine_unit
							has_trait = trait_mechanical
						}
					}
					count > 24
				}
			}
			random_owned_pop_group = {
				limit = {
					is_enslaved = no
					is_being_purged = no
					NOR = {
						has_trait = trait_machine_unit
						has_trait = trait_mechanical
					}
				}
				kill_pop_group = {
					pop_group = this
					amount = 1000
				}
			}
			}
			add_modifier = {
				modifier = "WL_lv_zinara_pop_unhappiness_relic_planet01" 
				days = 3600
			}
		}
	}
}

country_event = { #organic 120
	id = WL_lv_Zinara_tribute_events.5101
	hide_window = yes
	is_triggered_only = yes
	immediate = {
		random_owned_planet = {
			limit = {
				is_colony = yes
				count_owned_pop_amount = {
					limit = {
						is_enslaved = no
						is_being_purged = no
						NOR = {
							has_trait = trait_machine_unit
							has_trait = trait_mechanical
							is_robot_pop = yes
						} 
					}
					count > 129
				}
			}
			random_owned_pop_group = {
				limit = {
					is_enslaved = no
					is_being_purged = no
					NOR = {
						has_trait = trait_machine_unit
						has_trait = trait_mechanical
					}
				}
				kill_pop_group = {
					pop_group = this
					amount = 12000
				}
			}
			add_modifier = {
				modifier = "WL_lv_zinara_pop_unhappiness_relic_planet03" 
				days = 3600
			}
		}
	}
}
##HIDDEN TRIBUTE ALL

country_event = { #ALL 25
	id = WL_lv_Zinara_tribute_events.5300
	hide_window = yes
	is_triggered_only = yes
	immediate = {
		random_owned_planet = {
			limit = {
				is_colony = yes
				num_pops > 34
			}
			random_owned_pop_group = {
				kill_pop_group = {
					pop_group = this
					amount = 2500
				}
			}
			add_modifier = {
				modifier = "WL_lv_zinara_pop_unhappiness_relic_planet02" 
				days = 3600
			}
		}
	}
}

country_event = { #ALL 50
	id = WL_lv_Zinara_tribute_events.5301
	hide_window = yes
	is_triggered_only = yes
	immediate = {
		random_owned_planet = {
			limit = {
				is_colony = yes
				num_pops > 64
			}
			random_owned_pop_group = {
				kill_pop_group = {
					pop_group = this
					amount = 5000
				}
			}
			add_modifier = {
				modifier = "WL_lv_zinara_pop_unhappiness_relic_planet02" 
				days = 3600
			}
		}
	}
}
##HIDDEN TRIBUTE MACHINE
country_event = { #machine
	id = WL_lv_Zinara_tribute_events.5200
	hide_window = yes
	is_triggered_only = yes
	immediate = {
		random_owned_planet = {
			limit = {
				is_colony = yes
				num_pops > 34
				count_owned_pop_amount = {
					limit = {
						is_enslaved = no
						is_being_purged = no
						OR = {
							has_trait = trait_machine_unit
							has_trait = trait_mechanical
							is_robot_pop = yes
						} 
					} 
					count > 34
				}
			}
			random_owned_pop_group = {
				limit = {
					is_enslaved = no
					is_being_purged = no
					OR = {
						has_trait = trait_machine_unit
						has_trait = trait_mechanical
						is_robot_pop = yes
					}
				}
				kill_pop_group = {
					pop_group = this
					amount = 2500
				}
			}
		}
	}
}

country_event = { #machine 10
	id = WL_lv_Zinara_tribute_events.5201
	hide_window = yes
	is_triggered_only = yes
	immediate = {
		random_owned_planet = {
			limit = {
				is_colony = yes
				num_pops > 24
				count_owned_pop_amount = { 
					limit = {
						is_enslaved = no
						is_being_purged = no
						OR = {
							has_trait = trait_machine_unit
							has_trait = trait_mechanical
							is_robot_pop = yes
						} 
					} 
					count > 24
				}
			}
			random_owned_pop_group = {
				limit = {
					is_enslaved = no
					is_being_purged = no
					OR = {
						has_trait = trait_machine_unit
						has_trait = trait_mechanical
						is_robot_pop = yes
					}
				}
				kill_pop_group = {
					pop_group = this
					amount = 1000
				}
			}
		}
	}
}