ggsm_set_rank_trait_effect = {
	ggsm_remove_rank_traits_effect = yes
	if = {
		limit = { society_rank = 1 }
		add_trait = ggsm_penitent_of_magdalene
	}
	if = {
		limit = { society_rank = 2 }
		add_trait = ggsm_carnal_confessor
		remove_trait = ggsm_penitent_of_magdalene
	}
	if = {
		limit = { society_rank = 3 }
		add_trait = ggsm_sacred_minister
		remove_trait = ggsm_carnal_confessor
	}
	if = {
		limit = { society_rank >= 4 }
		add_trait = ggsm_courtesan_of_jesus
		remove_trait = ggsm_sacred_minister
	}
}

ggsm_progress_sacred_prostitution_effect = {
	set_character_flag = ai_whore
	if = {
		limit = { trait = chaste }
		remove_trait = chaste
	}
	if = {
		limit = { trait = celibate }
		remove_trait = celibate
	}
	if = {
		limit = { trait = experienced_whore }
		remove_trait = experienced_whore
		add_trait = exclusive_whore
		hidden_tooltip = { character_event = { id = christ.15 } }
	}
	if = {
		limit = {
			trait = cheap_whore
			NOT = { trait = experienced_whore }
			NOT = { trait = exclusive_whore }
		}
		remove_trait = cheap_whore
		add_trait = experienced_whore
	}
	if = {
		limit = {
			NOR = {
				trait = cheap_whore
				trait = experienced_whore
				trait = exclusive_whore
			}
		}
		add_trait = cheap_whore
	}
}

ggsm_teach_lust_effect = {
	if = {
		limit = { trait = chaste }
		remove_trait = chaste
	}
	if = {
		limit = { trait = celibate }
		remove_trait = celibate
	}
	if = {
		limit = { NOT = { trait = lustful } }
		add_trait = lustful
		hidden_tooltip = { character_event = { id = christ.15 } }
	}
}

ggsm_cleanse_lovers_pox_effect = {
	if = {
		limit = { trait = lovers_pox }
		remove_trait = lovers_pox
	}
	add_character_modifier = {
		name = ggsm_cleansed_by_magdalene
		months = 24
	}
}
