eoanb_category_choshu_army_reforms = {

	CHO_decision_recall_masujiro = {
		
		icon = generic_construction

		available = {
		    NOT = { 
				OR = { 
					has_country_flag = CHO_army_reform_ongoing
				}
			}
		}

		visible = {
			TAG = CHO
		}
		#allowed = { TAG = CHO }

		fire_only_once = yes
		#is_good = yes

		cost = 10
		custom_cost_trigger = { command_power > 9.9 }
		custom_cost_text = command_power_more_than_9
		days_remove = 20

		modifier = {
		    political_power_gain = -0.05
		}

		remove_effect = { 
            hidden_effect = {
				set_country_flag = { flag = CHO_army_reform_ongoing value = 1 days = 40 }
			}		
            TSH = {
					every_unit_leader = {
						limit = {
								has_id = 3008
							}
						set_nationality = CHO
					}			
		        }
			set_country_flag = CHO_masujiro_army_reforms
			}

		ai_will_do = {
			base = 1000
		    }
        }

    CHO_decision_purchase_french_rifles = {
		
		icon = generic_construction

		available = {
		    NOT = { 
				OR = { 
					has_country_flag = CHO_army_reform_ongoing
				}
			}
			has_country_flag = CHO_masujiro_army_reforms
			has_completed_focus = CHO_Chassepot_Rifles
		}

		visible = {
			TAG = CHO
		}
		#allowed = { TAG = CHO }

		fire_only_once = no
		#is_good = yes

		cost = 75
		days_remove = 60
		
		days_re_enable = 360

		modifier = {
		    political_power_gain = -0.1
			consumer_goods_expected_value = 0.01
		}

		remove_effect = { 
		    hidden_effect = {
				set_country_flag = { flag = CHO_army_reform_ongoing value = 1 days = 80 }
			}
            CHO = { add_equipment_to_stockpile = { type = infantry_equipment_rifle_1 amount = 1000 producer = FRA } }
		}

		ai_will_do = {
			base = 1000
		    }
        }
		
	CHO_decision_purchase_prussian_rifles = {
		
		icon = generic_construction

		available = {
		    NOT = { 
				OR = { 
					has_country_flag = CHO_army_reform_ongoing
				}
			}
			has_country_flag = CHO_masujiro_army_reforms
			has_completed_focus = CHO_Dreyse_Needle_Guns
		}

		visible = {
			TAG = CHO
		}
		#allowed = { TAG = CHO }

		fire_only_once = no
		#is_good = yes

		cost = 75
		days_remove = 60
		
		days_re_enable = 360

		modifier = {
		    political_power_gain = -0.1
			consumer_goods_expected_value = 0.01
		}

		remove_effect = { 
		    hidden_effect = {
				set_country_flag = { flag = CHO_army_reform_ongoing value = 1 days = 80 }
			}
            CHO = { add_equipment_to_stockpile = { type = infantry_equipment_rifle_1 amount = 1000 producer = PRS } }
		}

		ai_will_do = {
			base = 1000
		    }
        }
		
	CHO_decision_purchase_british_rifles = {
		
		icon = generic_construction

		available = {
		    NOT = { 
				OR = { 
					has_country_flag = CHO_army_reform_ongoing
				}
			}
			has_country_flag = CHO_masujiro_army_reforms
			has_completed_focus = CHO_Pattern_1861_Enfield
		}

		visible = {
			TAG = CHO
		}
		#allowed = { TAG = CHO }

		fire_only_once = no
		#is_good = yes

		cost = 75
		days_remove = 60
		
		days_re_enable = 360

		modifier = {
		    political_power_gain = -0.1
			consumer_goods_expected_value = 0.01
		}

		remove_effect = { 
		    hidden_effect = {
				set_country_flag = { flag = CHO_army_reform_ongoing value = 1 days = 80 }
			}
            CHO = { add_equipment_to_stockpile = { type = infantry_equipment_rifle_1 amount = 1000 producer = ENG } }
		}

		ai_will_do = {
			base = 1000
		    }
        }
		
	CHO_decision_foreign_strategy_books = {
		
		icon = generic_construction

		available = {
			NOT = { 
				OR = { 
					has_country_flag = CHO_army_reform_ongoing
				}
			}
			has_country_flag = CHO_masujiro_army_reforms
			has_completed_focus = CHO_Military_Lessons_From_the_Dutch
		}

		#allowed = { TAG = CHO }

		fire_only_once = yes
		#is_good = yes

		cost = 50
		days_remove = 180

		modifier = {
		    political_power_gain = -0.05
		}

		remove_effect = { 
            add_doctrine_cost_reduction = { cost_reduction = 0.2 uses = 1 category = land_doctrine }
			custom_effect_tooltip = EDC_afr.5.t
			hidden_effect = {
				country_event = { id = EDC_afr.5 hours = 1 } 
				set_country_flag = { flag = CHO_army_reform_ongoing value = 1 days = 200 }
			}
		}

		ai_will_do = {
			base = 1000
		    }
        }
	CHO_decision_rise_kihetai = {
		
		icon = generic_construction

		available = {
		    NOT = { 
				OR = { 
					has_country_flag = CHO_army_reform_ongoing
				}
			}
			has_country_flag = CHO_masujiro_army_reforms
		}

		visible = {
			TAG = CHO
		}
		#allowed = { TAG = CHO }

		fire_only_once = yes
		#is_good = yes

		cost = 75
		days_remove = 60

		modifier = {
		    political_power_gain = -0.1
			war_support_weekly = -0.005
		}

		remove_effect = { 
		    hidden_effect = {
				set_country_flag = { flag = CHO_army_reform_ongoing value = 1 days = 80 }
			}
            division_template = {
                name = "Kihetai"
                is_locked = yes
                    regiments = {
                        light_infantry = { x = 0 y = 0 }
                        light_infantry = { x = 0 y = 1 }
                        light_infantry = { x = 0 y = 2 }
                } 
            }
			1210 = {
					create_unit = {
						division = "name = \"Kihetai\" division_template = \"Kihetai\"  start_experience_factor = 0.1"
						owner = CHO
					}
					create_unit = {
						division = "name = \"Kihetai\" division_template = \"Kihetai\"  start_experience_factor = 0.1"
						owner = CHO
					}
					create_unit = {
						division = "name = \"Kihetai\" division_template = \"Kihetai\"  start_experience_factor = 0.1"
						owner = CHO
					}
				}
		    }

		ai_will_do = {
			base = 1000
		    }
        }
		
	CHO_decision_shotai_forces = {
		
		icon = generic_construction

		available = {
		    NOT = { 
				OR = { 
					has_country_flag = CHO_army_reform_ongoing
				}
			}
			has_country_flag = CHO_masujiro_army_reforms
			has_completed_focus = CHO_Shotai_Recruitment
		}

		visible = {
			TAG = CHO
		}
		#allowed = { TAG = CHO }
		fire_only_once = yes
		#is_good = yes

		cost = 75
		days_remove = 60

		modifier = {
		    political_power_gain = -0.1
			war_support_weekly = -0.005
		}

		remove_effect = { 
		    hidden_effect = {
				set_country_flag = { flag = CHO_army_reform_ongoing value = 1 days = 80 }
			}
            division_template = {
                name = "Shotai"
                is_locked = yes
                    regiments = {
                        irregular_infantry = { x = 0 y = 0 }
                } 
            }
			1210 = {
					create_unit = {
						division = "name = \"Giyutai\" division_template = \"Shotai\"  start_experience_factor = 0.1 start_equipment_factor = 0.4"
						owner = CHO
					}
					create_unit = {
						division = "name = \"Rikishitai\" division_template = \"Shotai\"  start_experience_factor = 0.1 start_equipment_factor = 0.4"
						owner = CHO
					}
					create_unit = {
						division = "name = \"Shugitai\" division_template = \"Shotai\"  start_experience_factor = 0.1 start_equipment_factor = 0.4"
						owner = CHO
					}
					create_unit = {
						division = "name = \"Hachimantai\" division_template = \"Shotai\"  start_experience_factor = 0.1 start_equipment_factor = 0.4"
						owner = CHO
					}
					create_unit = {
						division = "name = \"Yochotai\" division_template = \"Shotai\"  start_experience_factor = 0.1 start_equipment_factor = 0.4"
						owner = CHO
					}
					create_unit = {
						division = "name = \"Yugekitai\" division_template = \"Shotai\"  start_experience_factor = 0.1 start_equipment_factor = 0.4"
						owner = CHO
					}
				}
		    }

		ai_will_do = {
			base = 1000
		    }
        }
		
	CHO_decision_sempotai_forces = {
		
		icon = generic_construction

		available = {
		    NOT = { 
				OR = { 
					has_country_flag = CHO_army_reform_ongoing
				}
			}
			has_country_flag = CHO_masujiro_army_reforms
			has_completed_focus = CHO_Form_the_Sempotai
		}

		visible = {
			TAG = CHO
		}
		#allowed = { TAG = CHO }

		fire_only_once = yes
		#is_good = yes

		cost = 75
		days_remove = 60

		modifier = {
		    political_power_gain = -0.1
			war_support_weekly = -0.005
		}

		remove_effect = { 
		    hidden_effect = {
				set_country_flag = { flag = CHO_army_reform_ongoing value = 1 days = 80 }
			}
            division_template = {
                name = "Sempotai"
                is_locked = yes
                    regiments = {
                        irregular_infantry = { x = 0 y = 0 }
                } 
            }
			1210 = {
					create_unit = {
						division = "name = \"Sempotai\" division_template = \"Sempotai\"  start_experience_factor = 0.1 start_equipment_factor = 0.4"
						owner = CHO
					}
				}
		    }

		ai_will_do = {
			base = 1000
		    }
        }
		
	CHO_students_reform_naval = {
	
		allowed = { always = no }

		available = { always = no }
		
		cancel_trigger = {
			NOT = { is_subject_of = TSH }
		}

		activation = { always = no }
		
		fire_only_once = yes

		is_good = yes

		days_mission_timeout = 720

		timeout_effect = {
		    country_event = { id = japan_daimyo_choshu.9 }
		}
	}
	
	CHO_decision_gunji_foundry = { 

        icon = generic_construction

		available = {
		 NOT = { 
				OR = { 
					has_country_flag = CHO_army_reform_ongoing
				}
			}
			num_of_civilian_factories_available_for_projects > 1
			1210 = { is_controlled_by = CHO }
			has_completed_focus = CHO_Gunji_Foundry
			has_country_flag = CHO_masujiro_army_reforms
		}

		#allowed = { TAG = CHO }

		fire_only_once = yes
		#is_good = yes

		cost = 50
		days_remove = 120

		modifier = {
		    consumer_goods_expected_value = 0.01
		}

		remove_effect = {
            hidden_effect = {
				set_country_flag = { flag = CHO_army_reform_ongoing value = 1 days = 180 }
			}		
			capital_scope = {
			        add_building_construction = {
				    type = arms_factory
				    level = 1
				    instant_build = yes
				}
				add_extra_state_shared_building_slots = 1 
				}   
		    }

		ai_will_do = {
			base = 1000
		    }
        }
		
	CHO_decision_hagi_arsenal = { 

        icon = generic_construction

		available = {
		 NOT = { 
				OR = { 
					has_country_flag = CHO_army_reform_ongoing
				}
			}
			num_of_civilian_factories_available_for_projects > 1
			1210 = { is_controlled_by = CHO }
			has_completed_focus = CHO_Hagi_Military_factories
			has_country_flag = CHO_masujiro_army_reforms
		}

		#allowed = { TAG = CHO }

		fire_only_once = yes
		#is_good = yes

		cost = 50
		days_remove = 120

		modifier = {
		    consumer_goods_expected_value = 0.01
		}

		remove_effect = {
            hidden_effect = {
				set_country_flag = { flag = CHO_army_reform_ongoing value = 1 days = 180 }
			}		
			1210 = {
			        add_building_construction = {
				    type = arms_factory
				    level = 1
				    instant_build = yes
				}
				add_extra_state_shared_building_slots = 1 
				}   
		    }

		ai_will_do = {
			base = 1000
		    }
        }
    }

eoanb_category_japan_daimyo_choshu_reform = {

	CHO_decision_ohitayama_tatara_iron_works = { 

        icon = steel
		
		available = {
		    set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes 
		    has_completed_focus = CHO_Ohitayama_Tatara_Iron_Works 
			controls_state = 1210
			NOT = { has_country_flag = CHO_industry_development_ongoing_flag }
		}

		visible = {
		}
		
		#allowed = { TAG = CHO }
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.5 }
		}
		custom_cost_text = eoanb_money_cost_text

		fire_only_once = yes
		#is_good = yes

		#cost = 50
		days_remove = 80

		modifier = {
			civilian_factory_use = 1
			political_power_gain = -0.1
		}
		
		complete_effect = {
		    hidden_effect = {
			    set_country_flag = CHO_industry_development_ongoing_flag 
			}
		}

		remove_effect = { 
			capital_scope = {
				add_resource = {
					type = iron
					amount = 5
				}
			}
			hidden_effect = {
				set_temp_variable = { money_to_gain = -0.7 }
				add_money_with_tooltip_effect = yes	
				clr_country_flag = CHO_industry_development_ongoing_flag 
			}
		}

		ai_will_do = {
			base = 1
		}
    }
	
	CHO_decision_hagi_reverbatory_furnances = { 

        icon = generic_operation
		
		available = {
		    set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes 
		    has_completed_focus = CHO_Hagi_Reverbatory_Furnaces 
			controls_state = 1210
			NOT = { has_country_flag = CHO_industry_development_ongoing_flag }
		}

		visible = {
		}
		
		#allowed = { TAG = CHO }
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.5 }
		}
		custom_cost_text = eoanb_money_cost_text


		fire_only_once = yes
		#is_good = yes

		#cost = 50
		days_remove = 80

		modifier = {
			civilian_factory_use = 1
			political_power_gain = -0.1
		}
		
		complete_effect = {
		    hidden_effect = {
			    set_country_flag = CHO_industry_development_ongoing_flag 
			}
		}

		remove_effect = { 
			capital_scope = {
				add_resource = {
					type = iron
					amount = 5
				}
			}
			hidden_effect = {
				set_temp_variable = { money_to_gain = -0.7 }
				add_money_with_tooltip_effect = yes	
				clr_country_flag = CHO_industry_development_ongoing_flag
			}
		}

		ai_will_do = {
			base = 1
		}
    }
	
	CHO_decision_steel_mill = { 

        icon = generic_operation
		
		available = {
		    set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		    has_completed_focus = CHO_Choshus_Expanded_Metalworks 
			controls_state = 1210
			NOT = { has_country_flag = CHO_industry_development_ongoing_flag }
		}

		visible = {
		}
		
		#allowed = { TAG = CHO }
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.5 }
		}
		custom_cost_text = eoanb_money_cost_text
		fire_only_once = yes
		#is_good = yes

		#cost = 50
		days_remove = 80

		modifier = {
			civilian_factory_use = 1
			political_power_gain = -0.1
		}
		
		complete_effect = {
		    hidden_effect = {
			    set_country_flag = CHO_industry_development_ongoing_flag 
			}
		}

		remove_effect = { 
			capital_scope = {
				add_building_construction = {
					type = steel_mill
					level = 1
					instant_build = yes
				}
		    }
			hidden_effect = {
				set_temp_variable = { money_to_gain = -0.7 }
				add_money_with_tooltip_effect = yes	
				clr_country_flag = CHO_industry_development_ongoing_flag
			}
		}

		ai_will_do = {
			base = 1
		    }
        }
		
	CHO_decision_wood_industry = { 

        icon = generic_operation
		
		available = {
		    set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		    has_completed_focus = CHO_Washi_Paper_making 
			controls_state = 1210
			NOT = { has_country_flag = CHO_industry_development_ongoing_flag }
		}

		visible = {
		}
		
		#allowed = { TAG = CHO }
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.5 }
		}
		custom_cost_text = eoanb_money_cost_text

		fire_only_once = yes
		#is_good = yes

		#cost = 50
		days_remove = 80

		modifier = {
			civilian_factory_use = 1
			political_power_gain = -0.1
		}
		
		complete_effect = {
		    hidden_effect = {
			    set_country_flag = CHO_industry_development_ongoing_flag 
			}
		}

		remove_effect = { 
			capital_scope = {
				add_building_construction = {
					type = logging_camp
					level = 1
					instant_build = yes
				}
		    }
			hidden_effect = {
				set_temp_variable = { money_to_gain = -0.7 }
				add_money_with_tooltip_effect = yes	
				clr_country_flag = CHO_industry_development_ongoing_flag
			}
		}

		ai_will_do = {
			base = 1
		    }
        }
		
	CHO_decision_salt_deposits = { 

        icon = generic_operation
		
		available = {
		    set_temp_variable = { loan_size_to_check = 200}
			has_less_than_specific_loan_size = yes
		    has_completed_focus = CHO_Salt_Deposits 
			controls_state = 1210
			NOT = { has_country_flag = CHO_industry_development_ongoing_flag }
		}

		visible = {
		}
		
		#allowed = { TAG = CHO }
		custom_cost_trigger = {
			set_temp_variable = { amount_of_money_to_check = 0.5 }
		}
		custom_cost_text = eoanb_money_cost_text

		fire_only_once = yes
		#is_good = yes

		#cost = 50
		days_remove = 720

		modifier = {
			civilian_factory_use = 1
			political_power_gain = -0.1
		}
		
		complete_effect = {
		    hidden_effect = {
			    set_country_flag = CHO_industry_development_ongoing_flag 
			}
		}

		remove_effect = { 
			add_offsite_building = { type = industrial_complex level = 2 }
			hidden_effect = {
				set_temp_variable = { money_to_gain = -0.7 }
				add_money_with_tooltip_effect = yes	
				clr_country_flag = CHO_industry_development_ongoing_flag
			}
		}

		ai_will_do = {
			base = 1
		    }
	}
}

eoanb_category_choshu_trade_relations = {

    CHO_decision_trade_satsuma = {
	    available = {
		    has_completed_focus = CHO_Establish_Trade_Routes_With_Other_Domains 
			SAT = { 
			    has_opinion = {
                    target = CHO
                    value > 29
                }
		    }
			country_exists =  SAT
        }
		fire_only_once = yes

		cost = 75
		
		days_remove = 80
		
		modifier = {
            political_power_gain = -0.05
        }
		
		remove_effect = {
		    country_event = { days = 60 id = japan_daimyo_choshu.1 }
		}
	}
	
	CHO_decision_trade_saga = {
	    available = {
		    has_completed_focus = CHO_Establish_Trade_Routes_With_Other_Domains 
			SAG = { 
			    has_opinion = {
                    target = CHO
                    value > 29
                }
		    }
			country_exists =  SAG
		}
		fire_only_once = yes

		cost = 75
		
		remove_effect = {
		    country_event = { days = 60 id = japan_daimyo_choshu.2 }
		}
    }
	
	CHO_decision_trade_tosa = {
	    available = {
		    has_completed_focus = CHO_Establish_Trade_Routes_With_Other_Domains 
			TOS = { 
			    has_opinion = {
                    target = CHO
                    value > 29
                }
		    }
			country_exists =  TOS
		}
		fire_only_once = yes

		cost = 75
		
		days_remove = 80
		
		modifier = {
            political_power_gain = -0.05
        }
		
		remove_effect = {
		    country_event = { days = 60 id = japan_daimyo_choshu.3 }
		}
    }
	
	CHO_decision_trade_tsu = {
	    available = {
		    has_completed_focus = CHO_Establish_Trade_Routes_With_Other_Domains 
			TSU = { 
			    has_opinion = {
                    target = CHO
                    value > 29
                }
		    }
			country_exists =  TSU
		}
		fire_only_once = yes

		cost = 75
		
		days_remove = 80
		
		modifier = {
            political_power_gain = -0.05
        }
		
		remove_effect = {
		    country_event = { days = 60 id = japan_daimyo_choshu.4 }
		}
    }
	
	CHO_decision_trade_mito = {
	    available = {
		    has_completed_focus = CHO_Establish_Trade_Routes_With_Other_Domains 
			MIT = { 
			    has_opinion = {
                    target = CHO
                    value > 29
                }
		    }
			country_exists = MIT
		}
		fire_only_once = yes

		cost = 75
		
		days_remove = 80
		
		modifier = {
            political_power_gain = -0.05
        }
		
		remove_effect = {
		    country_event = { days = 60 id = japan_daimyo_choshu.5 }
		}
    }
	
	CHO_decision_trade_date = {
	    available = {
		    has_completed_focus = CHO_Establish_Trade_Routes_With_Other_Domains 
			DTE = { 
			    has_opinion = {
                    target = CHO
                    value > 29
                }
		    }
			country_exists =  DTE
		}
		fire_only_once = yes

		cost = 75
		
		days_remove = 80
		
		modifier = {
            political_power_gain = -0.05
        }
		
		remove_effect = {
		    country_event = { days = 60 id = japan_daimyo_choshu.6 }
		}
    }

	CHO_decision_trade_shonai = {
		available = {
			has_completed_focus = CHO_Establish_Trade_Routes_With_Other_Domains 
			SHI = { 
				has_opinion = {
									target = CHO
									value > 29
							}
			}
		country_exists =  SHI
	}
		fire_only_once = yes

	cost = 75
	
	days_remove = 80
	
		modifier = {
			political_power_gain = -0.05
		}
	
		remove_effect = {
				country_event = { days = 60 id = japan_daimyo_choshu.7 }
		}
	}
}

eoanb_category_choshu_politics = {
	CHO_Yearly_New_Year_Event_mission = {
	
		allowed = { tag = CHO }

		available = {
			always = no
		}
		
		cancel_trigger = {
			NOT = { is_subject_of = TSH }
		}

		activation = { always = no }
		
		fire_only_once = yes

		days_mission_timeout = 365

		timeout_effect = {
		    country_event = { id = japan_daimyo_choshu.8 }
		}
	}
	
	CHO_choshu_five = {
	
		allowed = { tag = CHO }

		available = {
			always = no
		}
		
		cancel_trigger = {
			NOT = { is_subject_of = TSH }
		}

		activation = { has_completed_focus = CHO_The_Nanban_Powers has_completed_focus = CHO_Glover_Co } #Change to if statements as effects in the focus, otherwise laggy!
		
		fire_only_once = yes

		days_mission_timeout = 720

		timeout_effect = {
		    country_event = { id = japan_daimyo_choshu.10 }
		}
	}
}