﻿points_of_interest_tracker_effect = {
	if = {
		limit = {
			#government_has_flag = government_is_landless_adventurer
			location = {
				save_temporary_scope_as = province_temp
				OR = {
					# Building flags
					has_any_point_of_interest_flag = yes
					# Capitals
					AND = {
						province_owner.top_liege.capital_province ?= this
						province_owner.top_liege ?= { highest_held_title_tier >= tier_kingdom }
					}
					# Grand Cities
					this = province:4828 #Baghdad
					this = province:2575 #Rome
					this = province:496 #Constantinople
					# Points of interest
					this = province:747 # Halikarnassos
					this = province:6053 # Alexandria
					# Legend stuff
					any_legend = {
						legend_owner.capital_province ?= scope:province_temp
						OR = {
							legend_quality = illustrious
							legend_quality = mythical
						}
					}
				}
			}
		}
		if = {
			limit = {
				NOT = {
					has_variable = poi_visited
				}
			}
			set_variable = {
				name = poi_visited
				value = 1
			}
		}
		else = {
			change_variable = {
				name = poi_visited
				add = 1
			}
		}
	}
}