namespace = OPB

# Narrative Event - Grand March of Brandenburg
narrative_event = {
    id = OPB.1
    desc = EVTDESC_OPB_1
    title = EVTTITLE_OPB_1
    picture = GFX_evt_magnificent_castle
    is_triggered_only = yes

    option = {
        name = EVTOPTA_OPB_1
        trigger = {
            NOT = {
                FROM = {
                    character = ROOT
                }
            }
        }
    }
    option = {
        name = EVTOPTB_OPB_1
        trigger = {
            FROM = {
                character = ROOT
            }
        }
        prestige = 500
    }
}
#Destroys HRE titles
character_event = {
    id = OPB.2
    desc = EVTDESC_OPB_2
	
	trigger = {
		OR = {
			AND = {
				has_landed_title = e_istria
				has_landed_title = e_swabia
			}
			AND = {
				has_landed_title = e_istria
				has_landed_title = e_franconia
			}
			AND = {
				has_landed_title = e_istria
				has_landed_title = e_brandenburg
			}
			AND = {
				has_landed_title = e_swabia
				has_landed_title = e_franconia
			}
			AND = {
				has_landed_title = e_swabia
				has_landed_title = e_brandenburg
			}
			AND = {
				has_landed_title = e_franconia
				has_landed_title = e_brandenburg
			}
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}

    option = {
        name = EVTOPTA_OPB_2
        #trigger = {
		#	AND = {
		#	primary_title = e_istria
		#	has_landed_title = e_franconia
		#	}
        #}
		#destroy_title = e_franconia
		#prestige = 500
		
		if = {
			limit = {
				AND = {
					primary_title = {
						title = e_istria
					}
					has_landed_title = e_franconia
				}
			}
			destroy_landed_title = e_franconia
			set_global_flag = franconia_destroyed
			prestige = 500
		}
		if = {
			limit = {
				AND = {
					primary_title = {
						title = e_istria
					}
					has_landed_title = e_swabia
				}
			}
			destroy_landed_title = e_swabia
			set_global_flag = swabia_destroyed
			prestige = 500
		}
		if = {
			limit = {
				AND = {
					primary_title = {
						title = e_istria
					}
					has_landed_title = e_brandenburg
				}
			}
			destroy_landed_title = e_brandenburg
			set_global_flag = brandenburg_destroyed
			prestige = 500
		}
		if = {
			limit = {
				AND = {
					primary_title = {
						title = e_franconia
					}
					has_landed_title = e_swabia
				}
			}
			destroy_landed_title = e_swabia
			set_global_flag = swabia_destroyed
			prestige = 500
		}
		if = {
			limit = {
				AND = {
					primary_title = {
						title = e_franconia
					}
					has_landed_title = e_brandenburg
				}
			}
			destroy_landed_title = e_brandenburg
			set_global_flag = brandenburg_destroyed
			prestige = 500
		}
		if = {
			limit = {
				AND = {
					primary_title = {
						title = e_franconia
					}
					has_landed_title = e_istria
				}
			}
			destroy_landed_title = e_istria
			set_global_flag = istria_destroyed
			prestige = 500
		}
		if = {
			limit = {
				AND = {
					primary_title = {
						title = e_swabia
					}
					has_landed_title = e_istria
				}
			}
			destroy_landed_title = e_istria
			set_global_flag = istria_destroyed
			prestige = 500
		}
		if = {
			limit = {
				AND = {
					primary_title = {
						title = e_swabia
					}
					has_landed_title = e_franconia
				}
			}
			destroy_landed_title = e_franconia
			set_global_flag = franconia_destroyed
			prestige = 500
		}
		if = {
			limit = {
				AND = {
					primary_title = {
						title = e_swabia
					}
					has_landed_title = e_brandenburg
				}
			}
			destroy_landed_title = e_brandenburg
			set_global_flag = brandenburg_destroyed
			prestige = 500
		}
		if = {
			limit = {
				AND = {
					primary_title = {
						title = e_brandenburg
					}
					has_landed_title = e_istria
				}
			}
			destroy_landed_title = e_istria
			set_global_flag = istria_destroyed
			prestige = 500
		}
		if = {
			limit = {
				AND = {
					primary_title = {
						title = e_brandenburg
					}
					has_landed_title = e_swabia
				}
			}
			destroy_landed_title = e_swabia
			prestige = 500
			set_global_flag = swabia_destroyed
		}
		if = {
			limit = {
				AND = {
					primary_title = {
						title = e_brandenburg
					}
					has_landed_title = e_franconia
				}
			}
			destroy_landed_title = e_franconia
			set_global_flag = franconia_destroyed
			prestige = 500
		}
    }
}
