add_namespace = russia2_bulgaria

# Check if File is Loaded
country_event = {
	id = russia2_bulgaria.2092066524

	hidden = yes

	is_triggered_only = yes

	immediate = {
		set_global_flag = russia_reworked_events_loaded_bulgarias
	}
}

#Bulgaria Accepts Alliance for Claims
country_event = {
	id = russia2_bulgaria.1
	title = russia2_bulgaria.1.t
	desc = russia2_bulgaria.1.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = { #Sure
		ai_chance = {
			base = 75
		}	
		name = russia2_bulgaria.1.a
        add_to_faction = BUL
		BUL = {
			country_event = { id = russia2_bulgaria.2 days = 1 }
		}
	}

	option = { # No
		ai_chance = {
			base = 25
		}	
		name = russia2_bulgaria.1.b
		BUL = {
			country_event = { id = russia2_bulgaria.3 days = 1 }
		}
	}
}

#SOV Accepts
country_event = {
	id = russia2_bulgaria.2
	title = russia2_bulgaria.2.t
	desc = russia2_bulgaria.2.d
	picture = GFX_handshake_russia2
	
	is_triggered_only = yes
	
	option = { #Yay
		ai_chance = {
			base = 100
		}
		name = russia2_bulgaria.2.a
        if = {
            limit = {
                NOT = {
                    106 = {
                        is_claimed_by = ROOT
                    }
                }
            }
            add_state_claim = 106
        }
        if = {
            limit = {
                NOT = {
                    803 = {
                        is_claimed_by = ROOT
                    }
                }
            }
            add_state_claim = 803
        }
        if = {
            limit = {
                NOT = {
                    731 = {
                        is_claimed_by = ROOT
                    }
                }
            }
            add_state_claim = 731
        }
        if = {
            limit = {
                NOT = {
                    184 = {
                        is_claimed_by = ROOT
                    }
                }
            }
            add_state_claim = 184
        }
        set_country_flag = sov_invited_focus_tsar
        hidden_effect = {
            106 = { set_state_flag = state_claimed_bulgaria_slavic_alliance }
            803 = { set_state_flag = state_claimed_bulgaria_slavic_alliance }
            731 = { set_state_flag = state_claimed_bulgaria_slavic_alliance }
            184 = { set_state_flag = state_claimed_bulgaria_slavic_alliance }
            BUL = {
                add_ai_strategy = {
                    type = alliance
                    id = FROM
                    value = 200
                }
                add_ai_strategy = {
                    type = befriend
                    id = FROM
                    value = 200
                }  
            }
            SOV = {
                add_ai_strategy = {
                    type = alliance
                    id = BUL
                    value = 200
                }
                add_ai_strategy = {
                    type = befriend
                    id = BUL
                    value = 200
                } 
            }
        }
        set_country_flag = SOV_BUL_accepted_claim
	}
}

#SOV Refuses
country_event = {
	id = russia2_bulgaria.3
	title = russia2_bulgaria.3.t
	desc = russia2_bulgaria.3.d
	picture = GFX_report_event_poland_rejects
	
	is_triggered_only = yes
	
	option = { #Okay
		ai_chance = {
			base = 100
		}	
        name = russia2_bulgaria.3.a
        BUL = {
            add_ai_strategy = {
                type = antagonize
                id = FROM
                value = 200
            } 
        }
        SOV = {
            add_ai_strategy = {
                type = antagonize
                id = BUL
                value = 200
            }
        }
	}
}

#Country Gets Event to Give Back Bulgarian Claim
country_event = {
	id = russia2_bulgaria.4
	title = russia2_bulgaria.4.t
	desc = russia2_bulgaria.4.d
	picture = GFX_report_event_stalin_02
	
	is_triggered_only = yes

    immediate = {
        set_country_flag = receive_event_bulgaria
    }
	
	option = { #Okay
		ai_chance = {
			base = 100
            modifier = {
                add = -55
                OR = {
                    tag = YUG
                    tag = GRE
                    tag = MAC
                }
            }
		}
		name = russia2_bulgaria.4.a
        every_state = {
            limit = {
                is_controlled_by = ROOT
                has_state_flag = state_claimed_bulgaria_slavic_alliance
            }
            clr_state_flag = state_claimed_bulgaria_slavic_alliance
            BUL = {
                transfer_state = PREV
            }
        }
        if = {
            limit = {
                all_owned_state = {
                    has_state_flag = state_claimed_bulgaria_slavic_alliance
                }
            }
            custom_effect_tooltip = SOV_game_totally_over_TT
        }
        BUL = {
            country_event = { id = russia2_bulgaria.5 days = 1 }
        }
        clr_country_flag = receive_event_bulgaria
	}

    option = { #No
		ai_chance = {
			base = 0
            modifier = {
                add = 55
                OR = {
                    tag = YUG
                    tag = GRE
                    tag = MAC
                }
            }
		}	
		name = russia2_bulgaria.4.b
        BUL = {
            country_event = { id = russia2_bulgaria.6 days = 1 }
        }
        custom_effect_tooltip = BUL_leave_faction_refuse_claim_tt
	}
}

#FROM Transfers States!
country_event = {
	id = russia2_bulgaria.5
	title = russia2_bulgaria.5.t
	desc = russia2_bulgaria.5.d
	picture = GFX_report_event_stalin_02
	
	is_triggered_only = yes
	
	option = { #Okay
		ai_chance = {
			base = 100
		}	
		name = russia2_bulgaria.5.a
	}
}

#FROM Refuses
country_event = {
	id = russia2_bulgaria.6
	title = russia2_bulgaria.6.t
	desc = russia2_bulgaria.6.d
	picture = GFX_report_event_stalin_02
	
	is_triggered_only = yes
	
	option = { #Okay, give up our claim...
		ai_chance = {
			base = 20
		}	
		name = russia2_bulgaria.6.a
        every_state = {
            limit = {
                is_controlled_by = FROM
                has_state_flag = state_claimed_bulgaria_slavic_alliance
            }
            clr_state_flag = state_claimed_bulgaria_slavic_alliance
            BUL = {
                remove_state_claim = PREV
            }
        }
        FROM = {
            country_event = { id = russia2_bulgaria.8 days = 1 }
        }
	}

    option = { #Leave the faction
		ai_chance = {
			base = 80
		}
		name = russia2_bulgaria.6.b
        leave_faction = yes
        set_country_flag = SOV_BUL_betrayed_claims
        SOV = {
            country_event = { id = russia2_bulgaria.7 days = 1 }
        }
        BUL = {
            add_ai_strategy = {
                type = antagonize
                id = FROM
                value = 200
            } 
        }
        FROM = {
            add_ai_strategy = {
                type = antagonize
                id = BUL
                value = 200
            }
        }
	}
}

#BUL Leaves the Faction
country_event = {
	id = russia2_bulgaria.7
	title = russia2_bulgaria.7.t
	desc = russia2_bulgaria.7.d
	picture = GFX_report_event_stalin_02
	
	is_triggered_only = yes
	
	option = { #Wtf...
		name = russia2_bulgaria.7.a
        BUL = {
            add_ai_strategy = {
                type = antagonize
                id = SOV
                value = 200
            } 
        }
        SOV = {
            add_ai_strategy = {
                type = antagonize
                id = BUL
                value = 200
            }
        }
	}
}

#BUL Renounces Claim!
country_event = {
	id = russia2_bulgaria.8
	title = russia2_bulgaria.8.t
	desc = russia2_bulgaria.8.d
	picture = GFX_report_event_stalin_02
	
	is_triggered_only = yes
	
	option = { #Yay
		name = russia2_bulgaria.8.a
	}
}