﻿je_land_reclamation = {
	icon = "gfx/interface/icons/event_icons/event_map.dds"
	
	group = je_group_internal_affairs

	on_yearly_pulse = {
		random_events = {
			4 = 0
			1 = land_reclamation.1
		}
	}

	complete = {
		scope:journal_entry = {
			is_goal_complete = yes
		}
	}

	on_complete = {
		remove_modifier = modifier_reclaiming_land
		show_as_tooltip = {
			add_modifier = { # prestige
				name = land_reclamation_complete
				months = long_modifier_time
			}
		}
	}

	fail = {
		OR = {
			NOT = { owns_entire_state_region = STATE_FRIESLAND }
			NOT = { owns_entire_state_region = STATE_HOLLAND }
		}
	}

	on_fail = {
		remove_modifier = modifier_reclaiming_land
		remove_variable = dutch_land_reclaimer
	}

	current_value = {
		value = global_var:land_reclamation_global
	}

	goal_add_value = { # if you change this, update the thresholds in the event
		add = 10
	}

	progressbar = yes

	status_desc = {
		first_valid = {
			triggered_desc = {
				desc = land_reclamation_no_tech
				trigger = {
					NOT = { has_technology_researched = concrete_dockyards }
				}
			}
			triggered_desc = {
				desc = land_reclamation_tech
				trigger = {
					has_technology_researched = concrete_dockyards
				}
			}
		}
	}

	weight = 10
	should_be_pinned_by_default = yes
}