

add_namespace = rebonus

## Media Praise
country_event = {
	id = rebonus.1
	title = rebonus.1.t
	desc = rebonus.1.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	mean_time_to_happen = {
		days = 3000 }

	option = {
		name = greatjob_option.1.a
		add_political_power = 80
		add_stability = 0.01
		add_war_support = 0.01
		add_to_variable = { approvalr = 5 }
		custom_effect_tooltip = GAIN5AP_EVENT_TT
		}
	}

#Stock Market Boom
country_event = {
	id = rebonus.2
	title = rebonus.2.t
	desc = rebonus.2.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	mean_time_to_happen = {
		days = 3530 }
	option = {
		name = good_option.1.a
		set_temp_variable = { temp_boom_1 = max_manpower_k }
		divide_temp_variable = { temp_boom_1 = 250 }
		add_to_variable = { money_view = temp_boom_1 } 
		set_country_flag = constock
		add_to_variable = { approvalr = 5 }
		custom_effect_tooltip = STCKMKTBM_EVENT_TT
		custom_effect_tooltip = GAIN5AP_EVENT_TT
		add_to_variable = { depression_clock = 1 }
		custom_effect_tooltip = INCREASERECESSION_EVENT_TT
	}
}

#Rising Crime
country_event = {
	id = rebonus.3
	title = rebonus.3.t
	desc = rebonus.3.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no }
	mean_time_to_happen = {
		days = 7230 }
	option = {
		name = wemd_option.1.a
		set_country_flag = proac
		add_stability = -0.01
	}
}

# Earthquake
country_event = {
	id = rebonus.4
	title = rebonus.4.t
	desc = rebonus.4.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no }
	mean_time_to_happen = {
		days = 3030 }
	option = {
		name = wella_option.1.a
		set_country_flag = natac
		add_stability = -0.01
		set_temp_variable = { temp_disas_1 = max_manpower_k }
		divide_temp_variable = { temp_disas_1 = 425 }
		subtract_from_variable = { money_view = temp_disas_1 } 
	}
}

#Famine 
#country_event = {
#	id = rebonus.5
#	title = rebonus.5.t
#	desc = rebonus.5.d
#	picture = GFX_report_event_generic_factory
#
#	is_triggered_only = no
#	trigger = { check_variable = { resource@food < 0 } }
#	mean_time_to_happen = { days = 2530 }
#	option = {
#		name = thngod_option.1.a
#		set_country_flag = fami
#		add_stability -0.02
#		add_ideas = { deadlyfamine_idea }
#	}
#}

# Hurricane or Storm
country_event = {
	id = rebonus.6
	title = rebonus.6.t
	desc = rebonus.6.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no
		     }
	mean_time_to_happen = {
		days = 12530 }
	option = {
		name = wella_option.1.a
		set_country_flag = natac
		random_list = {
			25 = {
				random_owned_state = {
					limit = {
						is_fully_controlled_by = ROOT
						industrial_complex > 0
					}
					damage_building = {
						type = industrial_complex
						damage = 0.6
					}
				}
			}
			25 = {
				random_owned_state = {
					limit = {
						is_fully_controlled_by = ROOT
						dockyard > 0
					}
					damage_building = {
						type = dockyard
						damage = 0.6
					}
				}	
			}
			25 = {
				random_owned_state = {
					limit = {
						is_fully_controlled_by = ROOT
						infrastructure > 0
					}
					damage_building = {
						type = infrastructure
						damage = 1
					}
				}
			}
			25 = {
				random_owned_state = {
					limit = {
						is_fully_controlled_by = ROOT
						arms_factory > 0
					}
					damage_building = {
						type = arms_factory
						damage = 0.6
					}
				}
			}
		}
		set_temp_variable = { temp_disas_1 = max_manpower_k }
		divide_temp_variable = { temp_disas_1 = 495 }
		if = { limit { has_country_flag = dsrlfp_active } 
		divide_temp_variable = { temp_disas_1 = 2 }
		}
		subtract_from_variable = { money_view = temp_disas_1 } 
	}
}

# Tornado Outbreak
country_event = {
	id = rebonus.7
	title = rebonus.7.t
	desc = rebonus.7.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no }
	mean_time_to_happen = {
		days = 9830 }
	option = {
		name = wella_option.1.a
		set_country_flag = natac
		random_list = {
			25 = {
				random_owned_state = {
					limit = {
						is_fully_controlled_by = ROOT
						industrial_complex > 0
					}
					damage_building = {
						type = industrial_complex
						damage = 0.6
					}
				}
			}
			25 = {
				random_owned_state = {
					limit = {
						is_fully_controlled_by = ROOT
						dockyard > 0
					}
					damage_building = {
						type = dockyard
						damage = 0.6
					}
				}	
			}
			25 = {
				random_owned_state = {
					limit = {
						is_fully_controlled_by = ROOT
						infrastructure > 0
					}
					damage_building = {
						type = infrastructure
						damage = 1
					}
				}
			}
			25 = {
				random_owned_state = {
					limit = {
						is_fully_controlled_by = ROOT
						arms_factory > 0
					}
					damage_building = {
						type = arms_factory
						damage = 0.6
					}
				}
			}
		}
		set_temp_variable = { temp_disas_1 = max_manpower_k }
		divide_temp_variable = { temp_disas_1 = 495 }
		if = { limit { has_country_flag = dsrlfp_active } 
		divide_temp_variable = { temp_disas_1 = 2 }
		}
		subtract_from_variable = { money_view = temp_disas_1 } 
	}
}
