﻿
action_can_spend_perk_point = {
	type = alert
	check_create_action = {
		
		if = {
			limit = { # Future-proofing
				has_any_focus = yes
				NOR = {
					has_focus_intrigue = yes
					has_focus_diplomacy = yes
					has_focus_learning = yes
					has_focus_martial = yes
					has_focus_stewardship = yes
					has_focus_wanderer = yes
				}
				vts_lifestyle_perk_points_amount > 0
				is_adult = yes
			}
			try_create_important_action = {
				important_action_type = action_can_spend_perk_point
				actor = root
			}
		}
		
	}

	effect = {
		scope:actor = {
			open_view_data = {
				view = lifestyle
			}
		}
	}
}

action_lifestyle_diplo = {
	type = alert
	check_create_action = {
		
		if = {
			limit = {
				has_focus_diplomacy = yes
				vts_lifestyle_perk_points_amount > 0
				is_adult = yes
				diplomacy > 4
			}
			try_create_important_action = {
				important_action_type = action_lifestyle_diplo
				actor = root
			}
		}
		
	}

	effect = {
		scope:actor = {
			open_view_data = {
				view = lifestyle
			}
		}
	}
}

action_lifestyle_intrigue = {
	type = alert
	check_create_action = {
		
		if = {
			limit = {
				has_focus_intrigue = yes
				vts_lifestyle_perk_points_amount > 0
				is_adult = yes
				intrigue > 4
			}
			try_create_important_action = {
				important_action_type = action_lifestyle_intrigue
				actor = root
			}
		}
		
	}

	effect = {
		scope:actor = {
			open_view_data = {
				view = lifestyle
			}
		}
	}
}

action_lifestyle_learning = {
	type = alert
	check_create_action = {
		
		if = {
			limit = {
				has_focus_learning = yes
				vts_lifestyle_perk_points_amount > 0
				is_adult = yes
				learning > 4
			}
			try_create_important_action = {
				important_action_type = action_lifestyle_learning
				actor = root
			}
		}
		
	}

	effect = {
		scope:actor = {
			open_view_data = {
				view = lifestyle
			}
		}
	}
}

action_lifestyle_martial = {
	type = alert
	check_create_action = {
		
		if = {
			limit = {
				has_focus_martial = yes
				vts_lifestyle_perk_points_amount > 0
				is_adult = yes
				martial > 4
			}
			try_create_important_action = {
				important_action_type = action_lifestyle_martial
				actor = root
			}
		}
		
	}

	effect = {
		scope:actor = {
			open_view_data = {
				view = lifestyle
			}
		}
	}
}

action_lifestyle_stewarship = {
	type = alert
	check_create_action = {
		
		if = {
			limit = {
				has_focus_stewardship = yes
				vts_lifestyle_perk_points_amount > 0
				is_adult = yes
				stewardship > 4
			}
			try_create_important_action = {
				important_action_type = action_lifestyle_stewarship
				actor = root
			}
		}
		
	}

	effect = {
		scope:actor = {
			open_view_data = {
				view = lifestyle
			}
		}
	}
}

action_lifestyle_wanderer = {
	type = alert
	check_create_action = {
		
		if = {
			limit = {
				has_focus_wanderer = yes
				vts_lifestyle_perk_points_amount > 0
				is_adult = yes
				has_variable = poi_visited
				var:poi_visited > 4
			}
			try_create_important_action = {
				important_action_type = action_lifestyle_wanderer
				actor = root
			}
		}
		
	}

	effect = {
		scope:actor = {
			open_view_data = {
				view = lifestyle
			}
		}
	}
}
