# -*- ck2.events -*-

namespace = swmh_holy

# Formation of the Livonian Brothers of the Sword
#narrative_event = {
character_event = {
    id = swmh_holy.0
    #title = swmh_holy.0.title
    #desc = swmh_holy.0.desc
    #picture = "GFX_evt_crusaders"
    #border = "GFX_event_narrative_frame_religion"
    
    #major = yes
    hide_window = yes

    only_playable = yes
    only_men = yes
    religion_group = christian
    
    trigger = {
        OR = {
            religion = catholic
            religion = cathar
            religion = fraticelli
            religion = waldensian
            religion = lollard
        }
        is_heretic = no
        
        NOT = { year = 1236 }
        NOT = { is_title_active = d_livonian_brothers_of_the_sword }
    
        has_global_flag = christian_crusades_unlocked

        k_terra = {
            any_direct_de_jure_vassal_title = {
                any_direct_de_jure_vassal_title = {
                    holder_scope = {
                        religion = ROOT
                    }
                }
            }
        }
    }
    
    mean_time_to_happen = {
        months = 4
    }
    
    immediate = {
        activate_title = { title = d_livonian_brothers_of_the_sword status = yes }
        create_random_soldier = {
            dynasty = none
            random_traits = yes
            religion = ROOT
        }
        new_character = {
            d_livonian_brothers_of_the_sword = {
                grant_title = PREV
            }
            set_defacto_liege = THIS
            wealth = 200
        }
        
        religion_authority = {
            modifier = religious_order_formed
            years = 10
        }
    }
    #option = {
    #    name = swmh_holy.0.opt.a
    #    trigger = {
    #        religion = ROOT
    #    }
    #}
    #option = {
    #    name = swmh_holy.0.opt.b
    #    trigger = {
    #        NOT = { religion_group = christian }
    #    }
    #}
    #option = {
    #    name = swmh_holy.0.opt.c
    #    trigger = {
    #        religion_group = christian
    #        NOT = { religion = ROOT }
    #    }
    #}
}
