﻿#Activity Pulse Actions for Pilgrimages
#
#Adult education means guests are always AI and unlanded, some of these are therefore only for the host
#There won't always be an entourage of more than a caravan master
#There will be other students, and teachers. These are identified with flags and are generated/picked out by the activity.
#APAs marked with * involve or can happen to characters other than the host

#Study Hard Intent:
#apa_leveraging_language_skills

#Revelry Intent:
#

#Stress - University life requires work
#apa_procrastination

##Lifestyles, etc
#apa_studying_scripture - Shared/From other File
#apa_visited_markets - Shared/From other File
#apa_foreign_custom - Shared/From other File

##Random Education APAs
#apa_sight_seeing_group - Shared/From other File
#apa_university_discussions - Pick up lifestyle xp from teacher

#Character knows liturgical language of the religion of the university
#We are using the location here - rather than the religion of the teachers - which could differ


apa_university_discussions = {
	#No real triggers
	icon = learning
	is_valid = {
		is_current_phase_active = yes
		any_attending_character = {
			this != scope:host
			is_available_healthy_ai_adult = yes
			OR = {
				has_character_flag = teacher_1
				has_character_flag = teacher_2
			}
		}
	}

	weight = {
		value = 1
	}

	effect = {
		scope:host = {
			save_scope_as = first
		}
		random_attending_character = {
			limit = {
				this != scope:host
				is_available_healthy_ai_adult = yes
				OR = {
					has_character_flag = teacher_1
					has_character_flag = teacher_2
				}
			}
			save_scope_as = second
		}
		add_activity_log_entry = {
			key = apa_university_discussions
			tags = { pulse_action }
			character = scope:first
			target = scope:second

			scope:second = {
				if = {
					limit = {
						has_education_martial_trigger = yes
					}
					scope:first = {
						add_martial_lifestyle_xp = medium_lifestyle_xp
					}
				}
				else_if = {
					limit = {
						has_education_diplomacy_trigger = yes
					}
					scope:first = {
						add_diplomacy_lifestyle_xp = medium_lifestyle_xp
					}
				}
				else_if = {
					limit = {
						has_education_learning_trigger = yes
					}
					scope:first = {
						add_learning_lifestyle_xp = medium_lifestyle_xp
					}
				}
				else_if = {
					limit = {
						has_education_stewardship_trigger = yes
					}
					scope:first = {
						add_stewardship_lifestyle_xp = medium_lifestyle_xp
					}
				}
				else_if = {
					limit = {
						has_education_intrigue_trigger = yes
					}
					scope:first = {
						add_intrigue_lifestyle_xp = medium_lifestyle_xp
					}
				}
				########## Start More Lifestyles Submod Education Modifications
				else_if = {
					limit = {
						has_education_nht_prowess_trigger = yes
					}
					scope:first = {
						add_nht_prowess_lifestyle_xp = medium_lifestyle_xp
					}
				}
				else_if = {
					limit = {
						has_education_nht_leadership_trigger = yes
					}
					scope:first = {
						add_nht_leadership_lifestyle_xp = medium_lifestyle_xp
					}
				}
				########## End More Lifestyles Submod Education Modifications				
			}
		}
	}
}