namespace = esap_hive

# The Great Swarm, bonus to new ships.
ship_event = {
	id = esap_hive.1
	hide_window = yes
	is_triggered_only = yes
	
	trigger = {
		owner = {
			has_ascension_perk = ap_esap_hive_swarm
		}	
	}
	
	immediate = {
		if = {
			limit = { is_ship_size = corvette }
			add_modifier = {
				modifier = "mod_esap_hive_swarm_beneficial"
				days = -1
			}
		}
		else = {
			add_modifier = {
				modifier = "mod_esap_hive_swarm_determental"
				days = -1
			}
		}
	}
}


# The Hungering Swarm, more resources from purges.
planet_event = {
	id = esap_hive.2
	hide_window = yes
	is_triggered_only = yes
	
	trigger = {
		FROM = {
			has_valid_civic = civic_hive_devouring_swarm
		}
		FROMFROM = {
			is_robot_pop = no
			NOT = {
				is_same_species = owner_species
			}
		}
		is_controlled_by = FROM
	}
	
	immediate = {
		FROM = {
			add_monthly_resource_mult = {
				resource = society_research
				value = 1
				min = 1
				max = 100
			}
		}
		FROM = {
			add_monthly_resource_mult = {
				resource = society_research
				value = 2
				min = 1
				max = 200
			}
		}
	}
}