eoanb_category_diplomatic_actions={
    #HRZ_peace_treaty={		
    #    
    #    icon = generic_ignite_civil_war
    #    
    #    allowed = { tag = HRZ }
    #    
    #    available = {  
	#		has_war_with = OTO
    #        controls_province = 13876
    #        controls_province = 11572
    #        controls_province = 6983
    #        controls_province = 606
    #    }
#
    #    visible = {
    #        has_war_with = OTO
    #    }
#
    #    fire_only_once = yes
    #   
    #    cost = 25
#
    #    complete_effect = {
    #        transfer_state = 1208
    #        transfer_state = 1272
    #        transfer_state = 1207
    #        transfer_state = 104
    #        white_peace = OTO
    #    }
#
    #    ai_will_do = {
    #        factor = 100
    #    }
	#}

    BOS_HRZ_Bosnian_Uprising_Peace = {
		allowed = {
			always = no
		}
		activation = {
			always = no
		}
		is_good = yes
		days_mission_timeout = 200
		available = {
			OR = {
				custom_trigger_tooltip = {
					tooltip = BOS_HRZ_Bosnian_Uprising_Peace_Bosnian_Conditions_TT
					# Victory Condition for Bosnia
					tag = HRZ
					### What they need to control
                    controls_province = 13876
                    controls_province = 11572
                    controls_province = 6983
                    controls_province = 606
				}
				custom_trigger_tooltip = {
					tooltip = ITA_PAP_victory_conditions_PAP_tt2
					# Victory Condition for Ottomans
					tag = OTO
					HRZ = {
						surrender_progress > 0.9
					}
				}
			}
		}
		complete_effect = {
			if = {
				limit = {
					tag = HRZ
                    controls_province = 13876
                    controls_province = 11572
                    controls_province = 6983
                    controls_province = 606
				}
				# Peace Treaty Event for Bosnian Victory
				HRZ = {
					complete_national_focus = HRZ_focus_Tuzla_agreement
                    white_peace = OTO
				}
				if = {
					limit = {
						MNT = { has_idea = MNT_WAR }
					}
				MNT = {
				complete_national_focus = MNT_focus_negotiate_a_ceasefire
				}
			}
			}
			if = {
				limit = {
					tag = OTO
					HRZ = {
						surrender_progress > 0.9
					}
				}
                # Peace Treaty For Ottoman Victory
				OTO = {
					country_event = {
						id = montenegro.45
					}
				}
				if = {
					limit = {
					MNT = { has_idea = MNT_WAR }
					}
				MNT = {
					complete_national_focus = MNT_focus_negotiate_a_ceasefire
				}
			}
		}
	}
		timeout_effect = {
			if = {
				limit = {
					OR = {
						AND = {
							tag = HRZ
							has_war_with = OTO
						}
						AND = {
							tag = HRZ
							has_war_with = OTO
						}
					}
					date < 1859.12.31  # date the war should last until, will repeat if less than
				}
				activate_mission = BOS_HRZ_Bosnian_Uprising_Peace
			}
			else_if = {
				limit = {
					date > 1859.12.31  # date to end the war, will fire the peace
				}
				# whatever should happen if the war lasts too long
				HRZ = {
					complete_national_focus = HRZ_focus_Tuzla_agreement
                    white_peace = OTO
				}
				if = {
					limit = {
					MNT = { has_idea = MNT_WAR }
					}
				MNT = {
					complete_national_focus = MNT_focus_negotiate_a_ceasefire
					}
				}
			}
		}
	}
	
	HRZ_decision_contact_the_serbs_in_sarajevo = {

		icon = generic_political_discourse

		available = {
			controls_state = 1272
		}

		visible = {
			has_completed_focus = HRZ_focus_extend_the_uprising_to_bosnia
		}

		fire_only_once = yes
		cost = 10
        days_remove = 30
         
        modifier = {
			army_core_defence_factor = -0.2  
        }   
		
        complete_effect = {
		
		}
		
        remove_effect = {
			add_manpower = 300
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 50
				producer = HRZ
			}
        }
       
		ai_will_do = {
			base = 1000
		}
	}
	
	HRZ_decision_contact_the_serbs_in_romanija = {

		icon = generic_political_discourse

		available = {
			controls_state = 1208
		}

		visible = {
			has_completed_focus = HRZ_focus_extend_the_uprising_to_bosnia
		}

		fire_only_once = yes
		cost = 10
        days_remove = 30
         
        modifier = {
			army_core_defence_factor = -0.2  
        }   
		
        complete_effect = {
		
		}
		
        remove_effect = {
			add_manpower = 300
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 50
				producer = HRZ
			}
        }
       
		ai_will_do = {
			base = 1000
		}
	}
	
	HRZ_decision_contact_the_serbs_in_banja_luka = {

		icon = generic_political_discourse

		available = {
			controls_state = 1207
		}

		visible = {
			has_completed_focus = HRZ_focus_extend_the_uprising_to_bosnia
		}

		fire_only_once = yes
		cost = 10
        days_remove = 30
         
        modifier = {
        army_core_defence_factor = -0.2  
        }   
		
        complete_effect = {
		
		}
		
        remove_effect = {
			add_manpower = 300
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 50
				producer = HRZ
			}
        }
       
		ai_will_do = {
			base = 1000
		}
	}
	
	HRZ_decision_contact_the_serbs_in_west_bosnia = {

		icon = generic_political_discourse

		available = {
			controls_state = 104
		}

		visible = {
			has_completed_focus = HRZ_focus_extend_the_uprising_to_bosnia
		}

		fire_only_once = yes
		cost = 10
        days_remove = 30
         
        modifier = {
        army_core_defence_factor = -0.2  
        }   
		
        complete_effect = {
		
		}
		
        remove_effect = {
			add_manpower = 300
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 50
				producer = HRZ
			}
        }
       
		ai_will_do = {
			base = 1000
		}
	}
	
	HRZ_decision_invoke_terror = {

		icon = generic_political_discourse

		available = {
			
		}

		visible = {
			has_completed_focus = HRZ_focus_to_establish_a_national_revolutionary_dictatorship
		}

		fire_only_once = yes
		cost = 50
        days_remove = 30
         
        modifier = {
        
        }   
		
        complete_effect = {
			add_ideas = HRZ_invoked_terror
		}
		
        remove_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 100
				producer = HRZ
			}
        }
       
		ai_will_do = {
			base = 1000
		}
	}
}
