﻿mi_make_love_for_male = {

	on_other_nation = no
	on_own_nation = yes
	
	sound = "event:/SFX/UI/Character/sfx_ui_character_arrange_marriage"
	
	potential_trigger = {
		hidden:scope:actor = {
			is_ai = no
		}
		hidden:scope:actor.current_ruler = {
			is_female = no
			is_married = yes
		}
		hidden:scope:target = {
			NOT = {
				is_pregnant = yes
			}
			is_female = yes
			is_married = yes
			age >= 16
			age <= 45
		}
	}
	
	allowed_trigger = {
		scope:target = {
			NOT = {
				this = scope:actor.current_ruler
			}
			NOT = {
				is_rival = scope:actor.current_ruler
			}
			is_spouse_of = scope:actor.current_ruler
		}
		scope:actor.current_ruler = {
			num_of_children <= 5
		}
		custom_tooltip = {
			text = make_love_once_a_month
			scope:actor.current_ruler = {
				NOT = {
					has_variable = mi_make_love_with_female
				}
			}
		}
	}
	
	effect = {
		scope:actor.current_ruler = {
			set_variable = {
				name = mi_make_love_with_female
				days = 30
			}
		}
		custom_tooltip = ruler_make_love_with_female
		scope:actor = {
			trigger_event = {
				on_action = custom_on_action_mi_ml_male
				days = { 10 20 }
			}
		}
	}
	
}	

mi_make_love_for_female = {

	on_other_nation = no
	on_own_nation = yes
	
	sound = "event:/SFX/UI/Character/sfx_ui_character_arrange_marriage"
	
	potential_trigger = {
		hidden:scope:actor = {
			is_ai = no
		}
		hidden:scope:actor.current_ruler = {
			NOT = {
				is_pregnant = yes
			}
			is_female = yes
			is_married = yes
			age >= 16
			age <= 45
		}
		hidden:scope:target = {
			is_female = no
			is_married = yes
		}
	}
	
	allowed_trigger = {
		scope:target = {
			NOT = {
				this = scope:actor.current_ruler
			}
			NOT = {
				is_rival = scope:actor.current_ruler
			}
			is_spouse_of = scope:actor.current_ruler
		}
		scope:actor.current_ruler = {
			num_of_children <= 5
		}
		custom_tooltip = {
			text = make_love_once_a_month
			scope:actor.current_ruler = {
				NOT = {
					has_variable = mi_make_love_with_male
				}
			}
		}
	}
	
	effect = {
		scope:actor.current_ruler = {
			set_variable = {
				name = mi_make_love_with_male
				days = 30
			}
		}
		custom_tooltip = ruler_make_love_with_male
		scope:actor = {
			trigger_event = {
				on_action = custom_on_action_mi_ml_female
				days = { 10 20 }
			}
		}
	}
	
}	