﻿on_travel_plan_movement = {
	on_actions = {
		tgw_xp
	}
}

tgw_xp = {
	trigger = {
		is_playable_character = yes
		NAND = {
			has_trait = lifestyle_wayfarer
			has_trait = lifestyle_voyager
			has_trait = lifestyle_surveyor
		}
	}
	effect = {
		# Check if the current character is the human player
		if = {
			limit = { is_ai = no } # This correctly identifies the human player
			add_wanderer_lifestyle_xp = 5 # Player gets 5 XP
		}
		# Else, if it's an AI character
		else_if = {
			limit = { is_ai = yes } # This correctly identifies an AI character
			add_wanderer_lifestyle_xp = 2 # AI gets 2 XP
		}
	}
}