﻿NEOW_religion_is_broadly_christian_trigger = {
	OR = {
		NEOW_is_broadly_catholic_trigger = yes
		NEOW_is_broadly_protestant_trigger = yes
		NEOW_is_broadly_orthodox_trigger = yes
		NEOW_is_broadly_mia_trigger = yes
	}
}

NEOW_is_broadly_catholic_trigger = {
	OR = {
		faith.religion = religion:catholic_religion
	}
}

NEOW_is_broadly_protestant_trigger = {
	OR = {
		faith.religion = religion:protestant_religion
	}
}
NEOW_is_broadly_orthodox_trigger = {
	faith.religion = religion:eastern_orthodox_religion
}
NEOW_is_broadly_mia_trigger = {
	faith.religion = religion:oriental_orthodox_religion 
}

NEOW_is_broadly_muslim_trigger  = {
	OR = {
		faith = faith:simurghi
		faith.religion = religion:islam_religion
	}
}

NEOW_has_not_restored_ecumenical_patriarchate = { # forgive me i dont know where else to put this
	title:k_orthodox = {
		NOT = {
			has_variable = ecumenical_patriarchate_restored
		}
	}
}
NEOW_has_not_restored_r_patriarchate = {
	title:k_russian_orthodox = {
		NOT = {
			has_variable = moscow_patriarchate_restored
		}
	}
}

# Character scope: West-European and historically Western-Christian cultural heritages.
# Catholic vassals remain eligible regardless of culture or heritage.
neow_western_orthodox_vassal_heritage_trigger = {
	culture = {
		OR = {
			has_cultural_pillar = heritage_french
			has_cultural_pillar = heritage_anglo_frisian
			has_cultural_pillar = heritage_scottish
			has_cultural_pillar = heritage_italian
			has_cultural_pillar = heritage_cisalpine
			has_cultural_pillar = heritage_sardic
			has_cultural_pillar = heritage_mosellic
			has_cultural_pillar = heritage_rhaeto_helvetic
			has_cultural_pillar = heritage_lusotanian
			has_cultural_pillar = heritage_hispanic
			has_cultural_pillar = heritage_brythonic
			has_cultural_pillar = heritage_goidelic
			has_cultural_pillar = heritage_west_germanic
			has_cultural_pillar = heritage_central_germanic
			has_cultural_pillar = heritage_north_germanic
			has_cultural_pillar = heritage_west_slavic
			has_cultural_pillar = heritage_baltic
			has_cultural_pillar = heritage_balto_finnic
			has_cultural_pillar = heritage_magyar
			has_cultural_pillar = heritage_anglo_american
			has_cultural_pillar = heritage_brazilian
		}
	}
}

neow_orthodox_schism_already_mended_trigger = {
    is_target_in_global_variable_list = {
        name = unavailable_unique_decisions
        target = flag:flag_mended_orthodox_schism
    }
}

neow_russian_orthodox_reunion_won_trigger = {
    OR = {
        has_global_variable = neow_russian_orthodox_reunion_won
        rite:georgian_rite = { faith = faith:russian_orthodox }
    }
}

neow_reunited_orthodox_faith_trigger = {
    neow_orthodox_schism_already_mended_trigger = yes
    OR = {
        AND = {
            faith = faith:orthodox
            neow_russian_orthodox_reunion_won_trigger = no
        }
        AND = {
            faith = faith:russian_orthodox
            neow_russian_orthodox_reunion_won_trigger = yes
        }
    }
}

neow_can_establish_western_orthodox_rite_trigger = {
    OR = {
        AND = {
            faith = faith:orthodox
            neow_orthodox_schism_already_mended_trigger = no
        }
        neow_reunited_orthodox_faith_trigger = yes
    }
}

# Clerical-region title scope.
neow_western_clerical_region_merge_trigger = {
    has_clerical_region = yes
    NOR = {
        this = title:d_et_lazio
        this = title:d_et_cyprus
        this = title:d_et_constantinople
        this = title:d_et_georgia
        this = title:d_et_moscow
        this = title:d_et_montenegro
        this = title:d_et_crimea
        this = title:d_et_neow_uzrohod
        this = title:d_et_neow_komi
        this = title:d_et_coptic_alexandria
        this = title:d_et_coptic_cairo
        this = title:d_et_coptic_middle_egypt
        this = title:d_et_coptic_upper_egypt
        this = title:d_et_antioch
        this = title:d_et_jerusalem
        this = title:d_et_alexandria
        this = title:d_et_maronite_lebanon
    }
    NOT = {
        holder ?= {
            OR = {
                faith = { religion = religion:oriental_orthodox_religion }
                AND = {
                    faith = { religion = religion:eastern_orthodox_religion }
                    NOT = { rite = rite:western_orthodox_rite }
                }
            }
        }
    }
    OR = {
        holder ?= {
            OR = {
                faith = { religion = religion:catholic_religion }
                faith = { religion = religion:protestant_religion }
                rite = rite:western_orthodox_rite
            }
        }
        this = title:d_et_laquilla
        this = title:d_et_potenza-muro_lucano-marsico_nuovo
        this = title:d_et_bologna
        this = title:d_et_ravenna
        this = title:d_et_milan
        this = title:d_et_turin
        this = title:d_et_vercelli
        this = title:d_et_venezia
        this = title:d_et_liguria
        this = title:d_et_modena
        this = title:d_et_ancona
        this = title:d_et_bari
        this = title:d_et_lecce
        this = title:d_et_firenze
        this = title:d_et_siena
        this = title:d_et_neow_canterbury
        this = title:d_et_neow_wales
        this = title:d_et_neow_york
        this = title:d_et_neow_tuam
        this = title:d_et_neow_edinburgh
        this = title:d_et_neow_glasgow
        this = title:d_et_neow_highland_presbytery
        this = title:d_et_neow_armagh
        this = title:d_et_neow_dublin
        this = title:d_et_neow_cashel
        this = title:d_et_neow_clermont
        this = title:d_et_neow_santiago
        this = title:d_et_neow_braga
        this = title:d_et_neow_lisbon
        this = title:d_et_neow_evora
        this = title:d_et_neow_toledo
        this = title:d_et_neow_valladolid
        this = title:d_et_neow_merida
        this = title:d_et_neow_seville
        this = title:d_et_neow_granada
        this = title:d_et_neow_zaragoza
        this = title:d_et_neow_tarragona
        this = title:d_et_neow_valencia
        this = title:d_et_neow_pamplona
        this = title:d_et_neow_canarias
        this = title:d_et_neow_andorra
        this = title:d_et_neow_berlin
        this = title:d_et_neow_bremen
        this = title:d_et_neow_westphalia
        this = title:d_et_neow_cologne
        this = title:d_et_neow_utrecht
        this = title:d_et_neow_frisian_synod
        this = title:d_et_neow_freiburg
        this = title:d_et_neow_rottenburg
        this = title:d_et_neow_strasbourg
        this = title:d_et_neow_munich
        this = title:d_et_neow_regensburg
        this = title:d_et_neow_vienna
        this = title:d_et_neow_salzburg
        this = title:d_et_neow_graz
        this = title:d_et_neow_oslo
        this = title:d_et_neow_lund
        this = title:d_et_neow_copenhagen
        this = title:d_et_neow_aarhus
        this = title:d_et_neow_holstein
        this = title:d_et_neow_turku
        this = title:d_et_neow_lapland
        this = title:d_et_neow_vilnius
        this = title:d_et_neow_warmia
        this = title:d_et_neow_riga
        this = title:d_et_neow_tallinn
        this = title:d_et_neow_olomouc
        this = title:d_et_neow_gniezno
        this = title:d_et_neow_warsaw
        this = title:d_et_neow_gdansk
        this = title:d_et_neow_lublin
        this = title:d_et_neow_wroclaw
        this = title:d_et_neow_krakow
        this = title:d_et_neow_trnava
        this = title:d_et_neow_esztergom
        this = title:d_et_neow_kalocsa
        this = title:d_et_neow_zurich
        this = title:d_et_neow_lausanne
        this = title:d_et_neow_lyon
        this = title:d_et_neow_marseille
        this = title:d_et_neow_naples
        this = title:d_et_neow_reggio_calabria
        this = title:d_et_neow_palermo
        this = title:d_et_neow_cagliari
        this = title:d_et_neow_ajaccio
        this = title:d_et_neow_balearics
        this = title:d_et_neow_ulster_presbytery
        this = title:d_et_neow_isles
        this = title:d_et_neow_hungarian_synod
        this = title:d_et_neow_toulouse
        this = title:d_et_neow_dresden
        this = title:d_et_neow_trier
        this = title:d_et_neow_kuopio
        this = title:d_et_neow_samogitia
        this = title:d_et_neow_prague
        this = title:d_et_neow_croatia
        this = title:d_et_neow_ljubljana
    }
}

# Bulgarian Orthodox rising (county and ruler scopes respectively).
neow_bulgarian_orthodox_county_trigger = {
    culture = culture:NEOW_bulgarian
    NEOW_is_broadly_orthodox_trigger = yes
}
neow_bulgarian_unhappy_orthodox_county_trigger = {
    neow_bulgarian_orthodox_county_trigger = yes
    popular_opinion < 0
}
neow_bulgarian_uprising_eligible_trigger = {
    # Only the actual King of Bulgaria receives the yearly uprising roll.
    has_title = title:k_bulgaria
    is_landed = yes
    is_ruler = yes
    culture = culture:NEOW_bulgarian
    NEOW_is_broadly_orthodox_trigger = no
    NOT = { has_global_variable = neow_bulgarian_uprising_active }
    NOT = { has_global_variable = neow_bulgarian_uprising_has_occurred }
    any_held_title = { tier >= tier_county is_landless_type_title = no }
    any_sub_realm_county = { neow_bulgarian_unhappy_orthodox_county_trigger = yes }
}
neow_bulgarian_uprising_join_trigger = {
    exists = scope:neow_uprising_war
    scope:neow_uprising_war = {
        NOR = { is_attacker = root is_defender = root }
        NOT = { any_war_participant = { is_at_war_with = root } }
    }
    NOT = { is_at_war_with = scope:neow_uprising_leader }
    is_landed = yes
}
