###############################################
# Order of the Sacred Magdalene
# Exhibitionist Progression Entry
#
# This event provides GGSM members with a recurring
# GGSM-controlled exhibitionist progression chain.
###############################################

namespace = ggsm


long_character_event = {
    id = ggsm.740
    desc = ggsm.740.desc
    picture = GFX_evt_lovers
    border = GFX_event_normal_frame_religion

    only_women = yes
    min_age = 16
    capable_only = yes
    prisoner = no

    trigger = {
        society_member_of = ggsm_order_sacred_magdalene
        religion = catholic
        is_adult = yes
        NOT = { has_character_flag = ggsm_exhibitionist_event_cooldown }

        NOR = {
            trait = chaste
            trait = celibate
            trait = exhibitionist
        }

        is_inaccessible_trigger = no
        in_command = no
    }

    mean_time_to_happen = {
        months = 18

        # Grace makes the opportunity more likely.
        modifier = {
            factor = 0.80
            has_society_currency_minor_trigger = yes
        }
        modifier = {
            factor = 0.75
            has_society_currency_medium_trigger = yes
        }
        modifier = {
            factor = 0.70
            has_society_currency_major_trigger = yes
        }

        # Senior sisters encounter the practice more often.
        modifier = {
            factor = 0.85
            society_rank >= 2
        }
        modifier = {
            factor = 0.85
            society_rank >= 3
        }
        modifier = {
            factor = 0.85
            society_rank >= 4
        }

        # Sexual traits make participation more likely.
        modifier = {
            factor = 0.75
            trait = lustful
        }
        modifier = {
            factor = 0.65
            trait = nymphomaniac
        }
        modifier = {
            factor = 0.75
            trait = seductress
        }
        modifier = {
            factor = 0.75
            trait = cheap_whore
        }
        modifier = {
            factor = 0.65
            trait = experienced_whore
        }
        modifier = {
            factor = 0.50
            trait = exclusive_whore
        }

        # Existing experience should naturally progress faster.
        modifier = {
            factor = 0.60
            has_character_modifier = christ_exhibitionist_1
        }
        modifier = {
            factor = 0.45
            has_character_modifier = christ_exhibitionist_2
        }
    }

    option = {
        name = ggsm.740.a

        set_character_flag = ggsm_exhibitionist_event_cooldown
        hidden_tooltip = {
            long_character_event = { id = ggsm.741 days = 730 }
        }

        # GGSM owns the progression chain directly.
        # Christianity Mod's existing modifier and trait keys are retained
        # so its other events continue to recognize the character.
        if = {
            limit = {
                has_character_modifier = christ_exhibitionist_2
            }
            long_character_event = { id = ggsm.744 }
            break = yes
        }
        if = {
            limit = {
                has_character_modifier = christ_exhibitionist_1
            }
            long_character_event = { id = ggsm.743 }
            break = yes
        }
        if = {
            limit = {
                NOR = {
                    has_character_modifier = christ_exhibitionist_1
                    has_character_modifier = christ_exhibitionist_2
                    trait = exhibitionist
                }
            }
            long_character_event = { id = ggsm.742 }
        }

    }

    option = {
        name = ggsm.740.b

        set_character_flag = ggsm_exhibitionist_event_cooldown
        hidden_tooltip = {
            long_character_event = { id = ggsm.741 days = 730 }
        }

        ai_chance = {
            factor = 25

            modifier = {
                factor = 0
                trait = nymphomaniac
            }
            modifier = {
                factor = 0
                trait = exclusive_whore
            }
            modifier = {
                factor = 0.25
                trait = lustful
            }
            modifier = {
                factor = 0.25
                trait = seductress
            }
        }
    }
}


###############################################
# GGSM EXHIBITIONIST PROGRESSION
#
# These events deliberately use Christianity Mod's
# existing progression modifier keys and final trait:
#
#   christ_exhibitionist_1
#   christ_exhibitionist_2
#   exhibitionist
#
# No call to christ.96 is made.
###############################################

# First degree of exhibitionist experience
long_character_event = {
    id = ggsm.742
    desc = ggsm.742.desc
    picture = GFX_evt_lovers
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes

    trigger = {
        NOR = {
            has_character_modifier = christ_exhibitionist_1
            has_character_modifier = christ_exhibitionist_2
            trait = exhibitionist
        }
    }

    option = {
        name = ggsm.742.a

        add_character_modifier = {
            modifier = christ_exhibitionist_1
            duration = -1
        }
    }
}


# Second degree of exhibitionist experience
long_character_event = {
    id = ggsm.743
    desc = ggsm.743.desc
    picture = GFX_evt_lovers
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes

    trigger = {
        has_character_modifier = christ_exhibitionist_1
        NOT = { has_character_modifier = christ_exhibitionist_2 }
        NOT = { trait = exhibitionist }
    }

    option = {
        name = ggsm.743.a

        remove_character_modifier = christ_exhibitionist_1

        add_character_modifier = {
            modifier = christ_exhibitionist_2
            duration = -1
        }
    }
}


# Full Exhibitionist trait
long_character_event = {
    id = ggsm.744
    desc = ggsm.744.desc
    picture = GFX_evt_lovers
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes

    trigger = {
        has_character_modifier = christ_exhibitionist_2
        NOT = { trait = exhibitionist }
    }

    option = {
        name = ggsm.744.a

        remove_character_modifier = christ_exhibitionist_2

        # Christianity Mod's actual final trait key.
        add_trait = exhibitionist
    }
}


###############################################
# Exhibitionist event cooldown reset
###############################################

long_character_event = {
    id = ggsm.741
    hide_window = yes
    is_triggered_only = yes

    immediate = {
        clr_character_flag = ggsm_exhibitionist_event_cooldown
    }
}
