﻿namespace = feast_default_axel

feast_default_axel.1001 = {
	type = activity_event
	title = feast_default_axel.1001.t
	desc = feast_default_axel.1001.desc
	theme = feast_activity
	override_background = { reference = bp1_wine_cellar }
	right_portrait = {
		character = scope:youngster_1
		animation = wedding_drunk
		camera = camera_event_very_right
	}
	center_portrait = {
		character = scope:youngster_2
		animation = interested
		camera = camera_event_very_left
	}
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				root = {
					OR = {
						has_trait = drunkard
						has_trait = lifestyle_reveler
					}
				}
			}
			animation = eyeroll
		}
		animation = disapproval
	}
	cooldown = { years = 10 }
	
	trigger = {
		faith = { trait_is_sin = drunkard }
		this = scope:host
		scope:activity = {
			any_attending_character = { 
				NOT = {
					this = scope:host
					is_spouse_of = root
				}
				age = { 16 25 }
				is_physically_able_ai_adult = yes
				num_of_relation_friend < 2
				location = scope:host.location
				save_temporary_scope_as = temp_first
			}
			any_attending_character = {
				NOR = {
					this = scope:host
					is_spouse_of = root
					this = scope:temp_first
				}
				age = { 16 25 }
				is_physically_able_ai_adult = yes
				num_of_relation_friend < 2
				location = scope:host.location
				number_of_traits_in_common = {
					target = scope:temp_first
					value >= 1
				}
			}
		}
		#serious stuff only
		NOT = {
			primary_title ?= title:h_china
		}
	}

	immediate = {
		involved_activity = { save_scope_as = activity }
		save_scope_as = host
		scope:activity = {
			random_attending_character = {
				limit = {
					NOT = {
						this = scope:host
					}
					age = { 16 25 }
					is_physically_able_ai_adult = yes
					num_of_relation_friend < 2
					location = scope:host.location
				}
				weight = {
					base = 1
					modifier = {
						age < 19
						add = 3
					}
				}
				save_scope_as = youngster_1
			}
			random_attending_character = {
				limit = {
					NOR = {
						this = scope:host
						this = scope:youngster_1
					}
					age = { 16 25 }
					is_physically_able_ai_adult = yes
					num_of_relation_friend < 2
					location = scope:host.location
					number_of_traits_in_common = {
						target = scope:youngster_1
						value >= 1
					}
				}
				weight = {
					base = 1
					modifier = {
						age < 19
						add = 3
					}
				}
				save_scope_as = youngster_2
			}
		}
		scope:youngster_1 = {
			progress_towards_friend_effect = {
				REASON = friend_feast_talking_and_laughing
				CHARACTER = scope:youngster_2
				OPINION = default_friend_opinion
			}
		}
	}

	option = { # As if I would ever...
		name = feast_default_axel.1001.a
		trigger = { has_trait = drunkard }
		add_character_modifier = {
			modifier = drunk_high_spirits
			years = 10
		}
		stress_impact = {
			greedy = minor_stress_impact_loss
			base = medium_stress_impact_loss
		}
		ai_chance = {
			ai_value_modifier = {
				# Doesn't like sharing
				ai_greed = 1
			}
			modifier = {
				has_trait = greedy
				add = 20
			}
		}
	}

	option = { # Let the kids drink!
		name = feast_default_axel.1001.b
		scope:activity = {
			every_attending_character = {
				limit = { has_trait = gregarious }
				custom = custom.every_activity_guest_with_gregarious_trait
				add_opinion = {
					modifier = amused_opinion
					opinion = 15
					target = root
				}
			}		
		}
		if = {
			limit = {
				has_trait = lifestyle_reveler
			}
			add_trait_xp = {
				trait = lifestyle_reveler
				value = 5
			}
		}
		add_character_modifier = {
			modifier = bad_influence_modifier
			years = 10
		}
		stress_impact = {
			gregarious = medium_stress_impact_loss
		}
		ai_chance = {
			ai_value_modifier = {
				ai_sociability = 1
			}
			modifier = {
				has_trait = lifestyle_reveler
				add = 20
			}
		}
	}

	option = { # Shame on both of you!
		name = feast_default_axel.1001.c
		trigger = {	
			NOR = {
				# Not allowed to judge others for drinking and/or revelling
				has_trait = gregarious
				has_trait = drunkard
			}
		}
		add_prestige = medium_prestige_gain
		add_dread = minor_dread_gain
		reverse_add_opinion = {
			modifier = unfriendly_opinion
			target = scope:youngster_1
		}
		reverse_add_opinion = {
			modifier = unfriendly_opinion
			target = scope:youngster_2
		}
		stress_impact = {
			compassionate = medium_stress_impact_gain
			vengeful = minor_stress_impact_loss
		}
		ai_chance = {
			ai_value_modifier = {
				ai_boldness = 1
				ai_vengefulness = 1
			}
			modifier = {	
				has_trait = compassionate
				add = -40
			}
		}
	}
}
