﻿# Hunt activities
# You could try to seduce your relative during the hunt

# hunt_familyromance.1001 Your relative suggests to look on stars together
# hunt_familyromance.1002 You found your relative somewhere near an altar in wildness
# hunt_familyromance.1003 Your relative is about to fall from horse.
# hunt_familyromance.1004 You amazed by your relative soon after laying together

# Continuation events:
# hunt_familyromance.1100 Your relative gifts you an artifact
# hunt_familyromance.1101 Your relative gives you a modifier



namespace = hunt_familyromance

scripted_trigger familyromance_hunt_relative_1001_trigger =
{
	# From can_hunt_trigger , but without "has_cultural_parameter = cannot_hunt"
    NOR = {
		has_trait = wounded_2
		has_trait = wounded_3
		has_trait = infirm
		has_trait = maimed
		has_trait = blind
	}
	has_contagious_deadly_disease_trigger = no
	#	

	AND = {
		familyromance_hunt_seduce_valid_relative = yes
		is_sibling_of = root
	}
}


# Your relative suggests to look on stars together
hunt_familyromance.1001 = {
	type = activity_event
	title = fr_hunt_familyromance.1001.t
	desc = fr_hunt_familyromance.1001.desc

	theme = hunt_activity
    
    override_background = {		
		reference = bp1_bonfire
	}

	left_portrait = {
		character = root
		animation = personality_rational
	}
	right_portrait = {
		character = scope:familiromance_hunt_possible_lover
		animation = love
	}
	#cooldown = { years = 1 }

	trigger = {
		familyromance_hunt_player_suitable_to_attraction = yes
        is_ai = no

        OR = {
			scope:activity = {
				any_attending_character = {
					familyromance_hunt_relative_1001_trigger = yes
				}
			}

			any_sibling = {
				familyromance_hunt_seduce_valid_relative = yes
			}
		}
		
		NOT = { has_character_flag = had_random_family_love_event }
		NOT = { has_character_flag = block_family_relation_seduce_attempts }

	}


	immediate = {
		scope:activity = {
			random_attending_character = {
				#is_ai = yes
				limit = {
					familyromance_hunt_relative_1001_trigger = yes
				}
				save_scope_as = familiromance_hunt_possible_lover
			}
		}
		if = {
			limit = {
				NOT = { exists = scope:familiromance_hunt_possible_lover }
			}

			random_sibling = {
				limit = {
					familyromance_hunt_seduce_valid_relative = yes
				}
				save_scope_as = familiromance_hunt_possible_lover
			}				
		}
	}

	option = { # Stargazing together 
		name = fr_hunt_familyromance.1001.a
		
		add_character_flag = {
			flag = had_recent_family_relation_seduce_hunt
			days = 30
		}
		        
        # Continue
		trigger_event = {
			id = hunt_familyromance.1004
		}

    }


    option = { # No
		name = fr_hunt_familyromance.1001.b
		custom_tooltip = fr_hunt_familyromance.1001.b.tt
		
		reverse_add_opinion = {
			target = scope:familiromance_hunt_possible_lover
			modifier = refusal_opinion
			opinion = -20
		}
	
		scope:familiromance_hunt_possible_lover = {
			add_character_flag = {
				flag = block_relative_seduce_attempts
				years = 20
			}
		}
		
		if = {
			limit = { exists = scope:familiromance_hunt_possible_lover }
			clear_saved_scope = familiromance_hunt_possible_lover
		}		
	}
	
	option = { # No to all attempts for 10 years
		name = fr_hunt_familyromance.1001.c
		custom_tooltip = fr_random_familymember_love.0001.d.tt
		
		reverse_add_opinion = {
			target = scope:familiromance_hunt_possible_lover
			modifier = refusal_opinion
			opinion = -20
		}
		
		add_character_flag = {
			flag = block_family_relation_seduce_attempts
			years = 10
		}
		
		if = {
			limit = { exists = scope:familiromance_hunt_possible_lover }
			clear_saved_scope = familiromance_hunt_possible_lover
		}
	}
	
}






# You found your relative somewhere near an altar in wildness
# Praying for love with you
hunt_familyromance.1002 = {
	type = activity_event
	title = fr_hunt_familyromance.1002.t
	desc = fr_hunt_familyromance.1002.desc

	theme = hunt_activity
    
    override_background = {		
		reference = temple
	}

	left_portrait = {
		character = root
		animation = idle
	}
	right_portrait = {
		character = scope:familiromance_hunt_possible_lover
		animation = beg
	}
	#cooldown = { years = 1 }

	trigger = {
		familyromance_hunt_player_suitable_to_attraction = yes
        is_ai = no

        OR = {
			scope:activity = {
				any_attending_character = {
					familyromance_hunt_relative_1001_trigger = yes
				}
			}

			any_sibling = {
				familyromance_hunt_seduce_valid_relative = yes
			}
		}
		
		NOT = { has_character_flag = had_random_family_love_event }
		NOT = { has_character_flag = block_family_relation_seduce_attempts }

	}


	immediate = {
		scope:activity = {
			random_attending_character = {
				#is_ai = yes
				limit = {
					familyromance_hunt_relative_1001_trigger = yes
				}
				save_scope_as = familiromance_hunt_possible_lover
			}
		}
		if = {
			limit = {
				NOT = { exists = scope:familiromance_hunt_possible_lover }
			}

			random_sibling = {
				limit = {
					familyromance_hunt_seduce_valid_relative = yes
				}
				save_scope_as = familiromance_hunt_possible_lover
			}				
		}
	}

	option = { # Accept your relative's feelings
		name = fr_hunt_familyromance.1002.a
		
		add_character_flag = {
			flag = had_recent_family_relation_seduce_hunt
			days = 30
		}
		        
        # Continue
		trigger_event = {
			id = hunt_familyromance.1004
		}

    }


    option = { # I should go
		name = fr_hunt_familyromance.1002.b
		custom_tooltip = fr_hunt_familyromance.1001.b.tt
		
		scope:familiromance_hunt_possible_lover = {
			add_character_flag = {
				flag = block_relative_seduce_attempts
				years = 20
			}
		}
		
		if = {
			limit = { exists = scope:familiromance_hunt_possible_lover }
			clear_saved_scope = familiromance_hunt_possible_lover
		}		
	}
	
	option = { # No to all attempts for 10 years
		name = fr_hunt_familyromance.1002.c
		custom_tooltip = fr_random_familymember_love.0001.d.tt
		
		add_character_flag = {
			flag = block_family_relation_seduce_attempts
			years = 10
		}
		
		if = {
			limit = { exists = scope:familiromance_hunt_possible_lover }
			clear_saved_scope = familiromance_hunt_possible_lover
		}
	}
	
}


# Your relative is about to fall from horse.
# You could try to save or not
hunt_familyromance.1003 = {
	type = activity_event
	title = fr_hunt_familyromance.1003.t
	desc = fr_hunt_familyromance.1003.desc

	theme = hunt_activity
    
    override_background = {		
		reference = wilderness_activity
	}

	left_portrait = {
		character = root
		animation = shock
	}
	
	lower_right_portrait = {
		character = scope:familiromance_hunt_possible_lover
	}
	
	#cooldown = { years = 1 }

	trigger = {
		familyromance_hunt_player_suitable_to_attraction = yes
        is_ai = no

        OR = {
			scope:activity = {
				any_attending_character = {
					familyromance_hunt_relative_1001_trigger = yes
				}
			}

			any_sibling = {
				familyromance_hunt_seduce_valid_relative = yes
			}
		}
		
		NOT = { has_character_flag = had_random_family_love_event }
		NOT = { has_character_flag = block_family_relation_seduce_attempts }
	}

	immediate = {
		scope:activity = {
			random_attending_character = {
				#is_ai = yes
				limit = {
					familyromance_hunt_relative_1001_trigger = yes
				}
				save_scope_as = familiromance_hunt_possible_lover
			}
		}
		if = {
			limit = {
				NOT = { exists = scope:familiromance_hunt_possible_lover }
			}

			random_sibling = {
				limit = {
					familyromance_hunt_seduce_valid_relative = yes
				}
				save_scope_as = familiromance_hunt_possible_lover
			}				
		}
	}

	option = { # Save your relative
		name = fr_hunt_familyromance.1003.a
		
		stress_impact = {
			brave = minor_stress_impact_loss
			craven = minor_stress_impact_gain
		}
		
		add_character_flag = {
			flag = had_recent_family_relation_seduce_hunt
			days = 30
		}
		        
        # Continue
		trigger_event = {
			id = hunt_familyromance.1004
		}

    }


    option = { # Let your relative be, it should be fine
		name = fr_hunt_familyromance.1003.b
		custom_tooltip = fr_hunt_familyromance.1001.b.tt
		
		reverse_add_opinion = {
			target = scope:familiromance_hunt_possible_lover
			modifier = cruelty_opinion
			opinion = -20
		}
		
		stress_impact = {
			brave = minor_stress_impact_gain
			compassionate = medium_stress_impact_gain
			sadistic = minor_stress_impact_loss
			callous = minor_stress_impact_loss
			craven = minor_stress_impact_loss
		}
		
		scope:familiromance_hunt_possible_lover = {
			add_character_flag = {
				flag = block_relative_seduce_attempts
				years = 20
			}
		}
		
		if = {
			limit = { exists = scope:familiromance_hunt_possible_lover }
			clear_saved_scope = familiromance_hunt_possible_lover
		}		
	}
	
	option = { # No to all attempts for 10 years
		name = fr_hunt_familyromance.1003.c
		custom_tooltip = fr_random_familymember_love.0001.d.tt
		
		stress_impact = {
			brave = minor_stress_impact_gain
			compassionate = medium_stress_impact_gain
			sadistic = minor_stress_impact_loss
			callous = minor_stress_impact_loss
			craven = minor_stress_impact_loss
		}
		
		reverse_add_opinion = {
			target = scope:familiromance_hunt_possible_lover
			modifier = cruelty_opinion
			opinion = -20
		}
		
		add_character_flag = {
			flag = block_family_relation_seduce_attempts
			years = 10
		}
		
		if = {
			limit = { exists = scope:familiromance_hunt_possible_lover }
			clear_saved_scope = familiromance_hunt_possible_lover
		}
	}
	
}





# You amazed by your relative soon after laying together
# You could become lovers
hunt_familyromance.1004 = {
	type = activity_event
	title = fr_hunt_familyromance.1004.t
	desc = fr_hunt_familyromance.1004.desc
	theme = hunt_activity
    
    override_background = {		
		reference = wilderness_activity
	}

	left_portrait = {
		character = root
		animation = idle
	}

	right_portrait = {
		character = scope:familiromance_hunt_possible_lover
		animation = flirtation_left
	}
		
	trigger = {
		
        is_ai = no
				
		NOT = { has_character_flag = had_random_family_love_event }
		NOT = { has_character_flag = block_family_relation_seduce_attempts }
	}
	
	immediate = {
		had_sex_with_effect = {
			CHARACTER = scope:familiromance_hunt_possible_lover
			PREGNANCY_CHANCE = pregnancy_chance		
	    }

		play_music_cue = "mx_cue_seduction"
	}

	option = {
		# Become lovers
		trigger = {
			can_set_relation_lover_trigger = { CHARACTER = scope:familiromance_hunt_possible_lover }
		}
		set_relation_lover = scope:familiromance_hunt_possible_lover
		
		name = fr_hunt_familyromance.1004.a

		hidden_effect = {
			random_list = {
					80 = {
						trigger_event = {
							id = hunt_familyromance.1100
						}
					}
					20 = {
						trigger_event = {
							id = hunt_familyromance.1101
						}					
					}
			}
		}
	}
		 
	option = {
		# Abandon the idea
		name = fr_hunt_familyromance.1004.b
		
		scope:familiromance_hunt_possible_lover = {
			add_character_flag = {
				flag = block_relative_seduce_attempts
				years = 20
			}			
		}
		
		if = {
			limit = { exists = scope:familiromance_feast_possible_lover }
			clear_saved_scope = familiromance_hunt_possible_lover
		}
		
	}
}




# -----------------------------

# Your lover gives an artifact
hunt_familyromance.1100 = {
	type = activity_event
	title = fr_hunt_familyromance.1100.t
	desc = fr_hunt_familyromance.1100.desc
	theme = hunt_activity
	override_background = {
		reference = ep2_hunt_forest_hut
	}
	override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_love" }
	
	#artifact = {
	#	target = scope:familyromance_romantic_trinket_feast
	#	position = lower_center_portrait
	#}

	left_portrait = {
		character = scope:familiromance_hunt_possible_lover
		animation = love
	}
	
	right_portrait = {
		character = root
		animation = happiness
	}
	
	artifact = {
		target = scope:newly_created_artifact 
		position = lower_right_portrait
	}
	
	cooldown = { years = 30 }
	
	trigger = {
		
		is_ai = no

		NOT = { has_character_flag = familyromance_got_artifact_during_hunt } #

		NOT = { has_character_flag = had_random_family_love_event }
		NOT = { has_character_flag = block_family_relation_seduce_attempts }
	}
	
	on_trigger_fail = {
		hidden_effect = {
			trigger_event = {
				id = hunt_familyromance.1101
			}			
		}
	}

	immediate = {
		#play_music_cue = "mx_cue_touching_moment"
		
		hidden_effect = {
			random_list = {
				40 = {
					scope:familiromance_hunt_possible_lover = {
						save_scope_as = flower_picker
						get_pressed_flower_species_effect = { LOCATION = scope:activity.activity_location }
						create_artifact_pressed_flower_effect = { OWNER = root }
					}
				}
				
				60 = {
					familyromance_generate_trinket_hunt_effect = { OWNER = root }
				}
			}		
		}
	}

	option = {
		# Take an artifact, thank you
		name = fr_hunt_familyromance.1100.a

		add_character_flag = {
			flag = familyromance_got_artifact_during_hunt
			years = 30
		}
	}
	
	after = {
		if = {
			limit = { exists = scope:familiromance_hunt_possible_lover }
			clear_saved_scope = familiromance_hunt_possible_lover
		}
		
		if = {
			limit = { exists = scope:newly_created_artifact }
			clear_saved_scope = newly_created_artifact
		}
	}
}





# Your lover gives you a modifier instead
hunt_familyromance.1101 = {
	type = activity_event
	title = fr_hunt_familyromance.1101.t
	desc = fr_hunt_familyromance.1101.desc
	theme = hunt_activity
	override_background = {
		reference = ep2_hunt_forest_hut
	}
	override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_love" }

	left_portrait = {
		character = scope:familiromance_hunt_possible_lover
		animation = flirtation_left
	}
		
	right_portrait = {
		character = root
		animation = happiness
	}	
	
	trigger = {
		
		is_ai = no

		NOT = { has_character_flag = had_random_family_love_event }
		NOT = { has_character_flag = block_family_relation_seduce_attempts }
	}

	immediate = {		
		play_music_cue = "mx_cue_touching_moment"
	}

	option = {
		# Positive modifier
		name = fr_hunt_familyromance.1101.a

		random_list = {
			20 = {				
				send_interface_toast = {
					title = seduce_bold_start_modifier
					right_icon = root

					add_character_modifier = {
						modifier = seduce_bold_start_modifier
						days = 3650
					}

				}
			}
			
			20 = {				
				send_interface_toast = {
					title = orchid_modifier
					right_icon = root

					add_character_modifier = {
						modifier = orchid_modifier
						days = 3650
					}

				}
			}		
	
			
			20 = {				
				send_interface_toast = {
						title = divine_guidance_modifier
						right_icon = root
						
						add_character_modifier = {
							modifier = divine_guidance_modifier
							days = 3650
						}
					}
			}

			20 = {				
				send_interface_toast = {
						title = intrigue_flirtatious_modifier
						right_icon = root
						
						add_character_modifier = {
							modifier = intrigue_flirtatious_modifier 
							days = 3650
					    }						
					}
			}
						
			20 = {				
				send_interface_toast = {
						title = scholarship_astrological_insights_modifier
						right_icon = root
						
						add_character_modifier = {
							modifier = scholarship_astrological_insights_modifier
							days = 3650
					    }
					}
			}
		}
	}
	
	after = {
		if = {
			limit = { exists = scope:familiromance_hunt_possible_lover }
			clear_saved_scope = familiromance_hunt_possible_lover
		}
	}

}


