﻿############################################################################################################
#	AC mod - events
############################################################################################################

add_namespace = AC_event

country_event = {
	id = AC_event.1
	title = AC_event.1.t
	desc = AC_event.1.d
	picture = GFX_united_states_dollar

	is_triggered_only = yes

	option = { name = AC_event.1.o1
		log = "[GetDateText]: [This.GetName]: AC_event.1.o1 executed"
		ai_chance = {
			base = 10

			modifier = { add = 1 NOT = { has_opinion = { target = CONTROLLER value < 0 } } }
		}

		hidden_effect = {
			FROM = {
				### activate project
				if = {
					limit = {
						check_variable = { AC_building_type_selected = 1 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_INF_target_state1_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_INF_decision1 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_INF_decision1 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_INF_target_state2_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_INF_decision2 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_INF_decision2 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_INF_target_state3_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_INF_decision3 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_INF_decision3 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_INF_target_state4_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_INF_decision4 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_INF_decision4 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_INF_target_state5_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_INF_decision5 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_INF_decision5 } }
						
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 2 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AB_target_state1_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_AB_decision1 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_AB_decision1 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AB_target_state2_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_AB_decision2 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_AB_decision2 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AB_target_state3_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_AB_decision3 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_AB_decision3 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AB_target_state4_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_AB_decision4 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_AB_decision4 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AB_target_state5_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_AB_decision5 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_AB_decision5 } }
						
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 3 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AA_target_state1_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_AA_decision1 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_AA_decision1 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AA_target_state2_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_AA_decision2 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_AA_decision2 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AA_target_state3_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_AA_decision3 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_AA_decision3 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AA_target_state4_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_AA_decision4 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_AA_decision4 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AA_target_state5_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_AA_decision5 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_AA_decision5 } }
						
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 4 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_RAD_target_state1_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_RAD_decision1 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_RAD_decision1 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_RAD_target_state2_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_RAD_decision2 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_RAD_decision2 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_RAD_target_state3_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_RAD_decision3 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_RAD_decision3 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_RAD_target_state4_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_RAD_decision4 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_RAD_decision4 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_RAD_target_state5_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_RAD_decision5 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_RAD_decision5 } }
						
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 5 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_MIC_target_state1_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_MIC_decision1 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_MIC_decision1 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_MIC_target_state2_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_MIC_decision2 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_MIC_decision2 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_MIC_target_state3_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_MIC_decision3 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_MIC_decision3 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_MIC_target_state4_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_MIC_decision4 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_MIC_decision4 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_MIC_target_state5_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_MIC_decision5 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_MIC_decision5 } }
						
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 6 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_CIC_target_state1_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_CIC_decision1 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_CIC_decision1 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_CIC_target_state2_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_CIC_decision2 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_CIC_decision2 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_CIC_target_state3_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_CIC_decision3 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_CIC_decision3 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_CIC_target_state4_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_CIC_decision4 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_CIC_decision4 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_CIC_target_state5_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_CIC_decision5 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_CIC_decision5 } }
						
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 7 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_NIC_target_state1_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_NIC_decision1 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_NIC_decision1 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_NIC_target_state2_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_NIC_decision2 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_NIC_decision2 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_NIC_target_state3_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_NIC_decision3 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_NIC_decision3 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_NIC_target_state4_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_NIC_decision4 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_NIC_decision4 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_NIC_target_state5_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_NIC_decision5 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_NIC_decision5 } }
						
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 8 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_REF_target_state1_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_REF_decision1 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_REF_decision1 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_REF_target_state2_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_REF_decision2 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_REF_decision2 } }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_REF_target_state3_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_REF_decision3 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_REF_decision3 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_REF_target_state4_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_REF_decision4 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_REF_decision4 } }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_REF_target_state5_@FROM }
						}
						activate_targeted_decision = { target = PREV decision = AC_construction_REF_decision5 }
						PREV = { activate_targeted_decision = { target = FROM decision = AC_construction_target_REF_decision5 } }
						
					}
					
					
				}
				
				event_target:AC_state_event_target = { clr_state_flag = Investment_pause_@FROM }
				### reset selected build ammount
				set_variable = { AC_build_amount = 1 }
			}
			for_loop_effect = {
				end = influence_array^num
				value = v
				if = {
					limit = {
						check_variable = { influence_array^v = FROM }
					}
					add_to_variable = { influence_array_val^v = FROM.AC_build_cost }
					set_country_flag = found
				}
			}
			if = {
				limit = { NOT = { has_country_flag = found } }
					add_to_array = { influence_array = FROM.id }
					add_to_array = { influence_array_val = FROM.AC_build_cost }
			}
			clr_country_flag = found
			recalculate_influence = yes
			
			#take 25% of the cost
			custom_effect_tooltip = AC_event.1.o1_TT
			set_temp_variable = { temp_investment = FROM.AC_build_cost }
			divide_temp_variable = { temp_investment = 4 }
			subtract_from_variable = { treasury = temp_investment }
		}
	}

	option = { name = AC_event.1.o2 # refuse
		log = "[GetDateText]: [This.GetName]: AC_event.1.o2 executed"
		ai_chance = {
			base = 0

			modifier = { add = 1 has_opinion = { target = CONTROLLER value < 0 } }
		}

		hidden_effect = {
			FROM = {
				### activate project
				if = {
					limit = { 
						check_variable = { AC_building_type_selected = 1 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_INF_target_state1_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_INF_target_state1_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_INF_target_state2_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_INF_target_state2_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_INF_target_state3_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_INF_target_state3_@FROM }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_INF_target_state4_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_INF_target_state4_@FROM }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_INF_target_state5_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_INF_target_state5_@FROM }
						
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 2 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AB_target_state1_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_AB_target_state1_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AB_target_state2_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_AB_target_state2_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AB_target_state3_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_AB_target_state3_@FROM }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AB_target_state4_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_AB_target_state4_@FROM }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AB_target_state5_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_AB_target_state5_@FROM }
						
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 3 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AA_target_state1_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_AA_target_state1_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AA_target_state2_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_AA_target_state2_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AA_target_state3_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_AA_target_state3_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AA_target_state4_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_AA_target_state4_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_AA_target_state5_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_AA_target_state5_@FROM }
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 4 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_RAD_target_state1_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_RAD_target_state1_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_RAD_target_state2_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_RAD_target_state2_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_RAD_target_state3_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_RAD_target_state3_@FROM }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_RAD_target_state4_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_RAD_target_state4_@FROM }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_RAD_target_state5_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_RAD_target_state5_@FROM }
						
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 5 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_MIC_target_state1_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_MIC_target_state1_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_MIC_target_state2_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_MIC_target_state2_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_MIC_target_state3_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_MIC_target_state3_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_MIC_target_state4_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_MIC_target_state4_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_MIC_target_state5_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_MIC_target_state5_@FROM }
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 6 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_CIC_target_state1_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_CIC_target_state1_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_CIC_target_state2_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_CIC_target_state2_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_CIC_target_state3_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_CIC_target_state3_@FROM }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_CIC_target_state4_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_CIC_target_state4_@FROM }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_CIC_target_state5_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_CIC_target_state5_@FROM }
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 7 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_NIC_target_state1_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_NIC_target_state1_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_NIC_target_state2_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_NIC_target_state2_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_NIC_target_state3_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_NIC_target_state3_@FROM }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_NIC_target_state4_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_NIC_target_state4_@FROM }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_NIC_target_state5_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_NIC_target_state5_@FROM }
					}
					
					
				}
				else_if = {
					limit = { 
						check_variable = { AC_building_type_selected = 8 } 
					}
					if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_REF_target_state1_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_REF_target_state1_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_REF_target_state2_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_REF_target_state2_@FROM }
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_REF_target_state3_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_REF_target_state3_@FROM }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_REF_target_state4_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_REF_target_state4_@FROM }
						
					}
					else_if = {
						limit = {
							event_target:AC_state_event_target = { has_state_flag = AC_construction_REF_target_state5_@FROM }
						}
						event_target:AC_state_event_target = { clr_state_flag = AC_construction_REF_target_state5_@FROM }
					}
					
					
				}
				
				event_target:AC_state_event_target = { clr_state_flag = Investment_pause_@FROM }
				### reset selected build ammount
				set_variable = { AC_build_amount = 1 }
			}
			
			#event_target:AC_state_event_target = { AC_clear_state_flag = yes clr_state_flag = Investment_pause_@FROM }
			FROM = {
				set_variable = { AC_build_amount = 1 }
				#clear_variable = AC_build_amount
				country_event = AC_event.2
			}
		}
	}
}

country_event = {
	id = AC_event.2
	title = AC_event.2.t
	desc = AC_event.2.d
	picture = GFX_united_states_dollar

	is_triggered_only = yes

	option = { 
		name = AC_event.2.o1 
		log = "[GetDateText]: [This.GetName]: AC_event.2.o1 executed" 
		
		add_to_variable = { treasury = AC_build_cost }
		subtract_from_variable = { int_investments = AC_build_cost }
		calculate_int_investments_rate = yes	
	}
}

country_event = {
	id = AC_event.3
	title = AC_event.3.t
	desc = AC_event.3.d
	picture = GFX_united_states_dollar

	is_triggered_only = yes

	option = { name = AC_event.3.o1 log = "[GetDateText]: [This.GetName]: AC_event.3.o1 executed" }
}

