ggsm_order_member_trigger = {
    society_member_of = ggsm_order_sacred_magdalene
}

ggsm_adult_catholic_woman_trigger = {
    is_female = yes
    is_adult = yes
    religion = catholic
    NOT = { trait = incapable }
    NOT = { trait = harelip }
}

ggsm_available_adult_trigger = {
    is_adult = yes
    NOT = { trait = incapable }
    is_inaccessible_trigger = no
    prisoner = no
    in_command = no
}

ggsm_has_rank_trait_trigger = {
    OR = {
        trait = ggsm_penitent_of_magdalene
        trait = ggsm_carnal_confessor
        trait = ggsm_sacred_minister
        trait = ggsm_courtesan_of_jesus
    }
}

ggsm_can_work_as_prostitute_trigger = {
    is_female = yes
    is_adult = yes
    religion = catholic
    society_member_of = ggsm_order_sacred_magdalene
    has_character_flag = ggsm_sacred_prostitute
    NOT = { practical_age >= 50 }

    NOR = {
        trait = incapable
        trait = chaste
        trait = celibate
        trait = excommunicated
        is_inaccessible_trigger = yes
        prisoner = yes
        in_command = yes
    }

    # The House has only two availability states:
    # ggsm_house_shift = occupied right now.
    # ggsm_house_rest  = sixty-day balance lockout.
    NOT = { has_character_flag = ggsm_house_shift }
    NOT = { has_character_modifier = ggsm_house_rest }

    # She must physically be at one of the Order's
    # own House of Mercy buildings.
    location = {
        any_province_holding = {
            OR = {
                has_building = tb_ggsm_magdalene_house_1
                has_building = tb_ggsm_magdalene_house_2
                has_building = tb_ggsm_magdalene_house_3
                has_building = tb_ggsm_magdalene_house_4
                has_building = tb_ggsm_magdalene_house_5
                has_building = ca_ggsm_magdalene_house_1
                has_building = ca_ggsm_magdalene_house_2
                has_building = ca_ggsm_magdalene_house_3
                has_building = ca_ggsm_magdalene_house_4
                has_building = ca_ggsm_magdalene_house_5
                has_building = ct_ggsm_magdalene_house_1
                has_building = ct_ggsm_magdalene_house_2
                has_building = ct_ggsm_magdalene_house_3
                has_building = ct_ggsm_magdalene_house_4
                has_building = ct_ggsm_magdalene_house_5
            }
        }
    }
}


ggsm_house_sister_available_trigger = {
    society_member_of = ggsm_order_sacred_magdalene
    has_character_flag = ggsm_sacred_prostitute
    is_female = yes
    is_adult = yes
    religion = catholic
    prisoner = no
    in_command = no
    is_inaccessible_trigger = no

    NOR = {
        trait = incapable
        trait = excommunicated
        practical_age >= 50
    }

    NOT = { has_character_flag = ggsm_house_shift }
    NOT = { has_character_modifier = ggsm_house_rest }
}