# sp_nuclear_scientist_xp_generic_reward
# sp_nuclear_minor_progress_generic_reward
# sp_nuclear_generic_electronics_tech_reward
# sp_nuclear_war_support_generic_reward
# sp_nuclear_generic_industry_tech_reward

# sp_nuclear_reactor_radioactive_leak_stabilized_reward
# sp_nuclear_reactor_minor_explosion_reward

sp_nuclear_generic_industry_tech_reward = {
	fire_only_once = no
	
	threshold = { 
		min = 0
		max = 100
	}
	
	option = {
		token = sp_nuclear_generic_reward_option_industryr_tech
		
		iteration_output = {
			country_effects = { 
				add_tech_bonus = {
					name = sp_nuclear_generic_reward_option_industry_tech_name
					bonus = 0.1
					uses = 1
					category = industry
				}
					
			}
		}
	}
}

sp_nuclear_scientist_xp_generic_reward = {
	fire_only_once = no
	
	threshold = { 
		min = 0
		max = 100
	}
	
	weight = {
		factor = 1.0
	}
	
	option = {
		token = sp_nuclear_scientist_xp_generic_reward_option
				
		iteration_output = {
			scientist_effects = {
				add_scientist_xp = {
					experience = constant:sp_scientist_xp_gain.low
					specialization = specialization_nuclear
				}
			}
		}
	}
}

sp_nuclear_minor_progress_generic_reward = {
	fire_only_once = no
	
	threshold = { 
		min = 0
		max = 80
	}
	
	weight = {
		factor = 1.0
	}
	
	option = {
		token = sp_nuclear_minor_progress_generic_reward_option
				
		iteration_output = {
			country_effects = {
				FROM = { add_project_progress_ratio = constant:sp_progress.gain.low }
			}
		}
	}
}

sp_nuclear_generic_electronics_tech_reward = {
	fire_only_once = no
	
	threshold = { 
		min = 0
		max = 100
	}
	
	option = {
		token = sp_nuclear_generic_reward_option_electronics_tech
		
		iteration_output = {
			country_effects = { 
				random_list = {
					#Low Bonus
					20 = {
						add_tech_bonus = {
							name = sp_nuclear_generic_reward_option_electronics_tech_bonus_name
							bonus = 0.1
							uses = 1
							category = electronics
						}
					}
					#Mid Bonus
					70 = {
						add_tech_bonus = {
							name = sp_nuclear_generic_reward_option_electronics_tech_bonus_name
							bonus = 0.2
							uses = 1
							category = electronics
						}
					}
					#High Bonus
					10 = {
						add_tech_bonus = {
							name = sp_nuclear_generic_reward_option_electronics_tech_bonus_name
							bonus = 0.35
							uses = 1
							category = electronics
						}
					}
				}
			}
		}
	}
}

sp_nuclear_war_support_generic_reward = {
	fire_only_once = yes
	
	threshold = { 
		min = 50
		max = 100
	}
	
	weight = {
		factor = 1.0
	}
	
	option = {
		token = sp_nuclear_war_support_generic_reward_option
				
		iteration_output = {
			country_effects = {
				add_war_support = 0.02
			}
		}
	}
}

sp_nuclear_major_political_interference_generic_reward = {
	fire_only_once = yes

	threshold = { 
		min = 15
		max = 85
	}

	weight = {
		base = 1
		modifier = {
			factor = 0.25
			FROM = {
				NOT = { has_government = fascism }
			}
		}
	}
	
	option = {
		token = sp_nuclear_major_political_interference_generic_reward_option_keep
		
		iteration_output = {
			country_effects = {
				add_political_power = -50
				FROM = { add_project_progress_ratio = constant:sp_progress.loss.medium	 }

			}
			scientist_effects = {
				add_scientist_xp = {
					experience = constant:sp_scientist_xp_gain.medium
					specialization = specialization_nuclear
				}
			}
		}
	}

	option = {
		token = sp_nuclear_major_political_interference_generic_reward_option_fire
		
		iteration_output = {
			country_effects = {
				add_political_power = 50
				FROM = { add_project_progress_ratio = constant:sp_progress.loss.low	 }

			}
			scientist_effects = {
				remove_scientist_role = yes 
			}
		}
	}
}

# Only bomb Projects
sp_nuclear_bomb_theoretical_breakthrough_generic_reward = {
	fire_only_once = yes
	
	threshold = { 
		min = 0
		max = 70
	}
	
	weight = {
		base = 0.5
	}
	
	option = {
		token = sp_nuclear_bomb_theoretical_breakthrough_generic_reward_option
		
		
		iteration_output = {
			country_effects = {
				FROM = { add_project_progress_ratio = constant:sp_progress.gain.medium }
			}
			scientist_effects = {
				add_scientist_xp = {
					experience = constant:sp_scientist_xp_gain.medium
					specialization = specialization_nuclear
				}
			}
		}
	}
}

sp_nuclear_bomb_critical_mass_generic_reward = {
	fire_only_once = yes
	
	threshold = { 
		min = 0
		max = 60
	}
	
	weight = {
		base = 0.5
	}
	
	option = {
		token = sp_nuclear_bomb_theoretical_breakthrough_generic_reward_option
		
		
		iteration_output = {
			country_effects = {
				FROM = { add_project_progress_ratio = constant:sp_progress.loss.low }
			}
			scientist_effects = {
				add_scientist_xp = {
					experience = constant:sp_scientist_xp_gain.low
					specialization = specialization_nuclear
				}
			}
			facility_state_effects = {
				damage_building = {
					tags = facility
					damage = 0.25
					province = var:facility_province_id
				}
			}
		}
	}
}

sp_nuclear_bomb_accident_generic_reward = {
	fire_only_once = yes
	
	threshold = { 
		min = 0
		max = 100
	}
	
	weight = {
		base = 1
		modifier = {
			factor = 0.1
			FROM = { has_country_flag = nuclear_bomb_high_security_flag }
		}
		modifier = {
			factor = 1.5
			FROM = { has_country_flag = nuclear_bomb_low_security_flag }
		}
		modifier = {
			factor = 0.2
			FROM = { has_war = no }
		}
		modifier = {
			factor = 2
			FROM = {has_country_flag = no_filters_for_reactors_flag }
		}
	}
	
	option = {
		token = sp_nuclear_bomb_accident_generic_reward_option
		
		
		iteration_output = {
			facility_state_effects = {
				damage_building = {
					tags = facility
					damage = 0.1
					province = var:facility_province_id
				}
			}
		}
	}
}

# Only Reactor Projects
sp_nuclear_reactor_radioactive_leak_stabilized_reward = {
	fire_only_once = yes
	
	threshold = { 
		min = 40
		max = 60
	}
	
	weight = {
		base = 0.75
		modifier = {
			factor = 5
			FROM = {has_country_flag = no_filters_for_reactors_flag }
		}
	}
	
	option = {
		token = sp_nuclear_reactor_radioactive_leak_stabilized_reward_option
		
		
		iteration_output = {
			country_effects = {
				FROM = { add_project_progress_ratio = constant:sp_progress.gain.low }
			}
			scientist_effects = {
				add_scientist_xp = {
					experience = constant:sp_scientist_xp_gain.medium
					specialization = specialization_nuclear
				}
			}

			facility_state_effects = { 
				damage_building = {
					tags = facility
					damage = 0.1
					province = var:facility_province_id
				}
			}
		}
	}
}

sp_nuclear_reactor_minor_explosion_reward = {
	fire_only_once = yes
	
	threshold = { 
		min = 20
		max = 40
	}
	
	weight = {
		base = 0.75
	}
	
	option = {
		token = sp_nuclear_reactor_minor_explosion_reward_option
		
		
		iteration_output = {
			scientist_effects = {
				add_scientist_xp = {
					experience = constant:sp_scientist_xp_gain.low
					specialization = specialization_nuclear
				}
			}

			facility_state_effects = { 
				damage_building = {
					tags = facility
					damage = 0.1
					province = var:facility_province_id
				}
			}
		}
	}
}

