
##################################################
# Winter Triggers
county_has_winter_trigger = {
	title_province = {
		has_winter_trigger = yes
	}
}

character_capital_has_winter_trigger = {
	capital_county = { county_has_winter_trigger = yes }
}

culture_uses_frequent_winter_transportation_trigger = {
	culture = {
		OR = {
			has_cultural_pillar = heritage_balto_finnic
			has_cultural_pillar = heritage_north_germanic
			# We exclude Normans as being pretty distant from this part of their heritage.
			has_cultural_parameter = winter_trait_bonuses
		}
	}
}

location_has_harsh_winter_trigger = {
	location = { has_province_modifier = winter_harsh_modifier }
}

location_has_normal_or_worse_winter_trigger = {
	location = {
		OR = {
			has_province_modifier = winter_normal_modifier
			has_province_modifier = winter_harsh_modifier
		}
	}
}

location_has_winter_trigger = {
	location = {
		has_winter_trigger = yes
	}
}

has_winter_trigger = {
	OR = {
		has_province_modifier = winter_mild_modifier
		has_province_modifier = winter_normal_modifier
		has_province_modifier = winter_harsh_modifier
		AND = {
			exists = county
			county = { save_temporary_scope_as = winter_county }
			county.holder = { has_zud_season_in_county_trigger = { COUNTY = scope:winter_county } }
		}
	}
}

has_winter_combat_trigger = {
	OR = {
		has_province_modifier = winter_mild_modifier
		has_province_modifier = winter_normal_modifier
		has_province_modifier = winter_harsh_modifier
	}
}

##################################################
# Seasonal Triggers

middle_of_year_season_trigger = {
	current_month >= 4
	current_month <= 9
}

end_of_year_season_trigger = {
	OR = {
		current_month >= 10
		current_month <= 3
	}
}

temperate_seasons_trigger = {
	$LOCATION$ = {
		OR = {
			geographical_region = world_europe
			geographical_region = world_asia_minor
			geographical_region = world_middle_east
			geographical_region = world_india_rajastan
			geographical_region = world_india_bengal
			geographical_region = world_africa_north
			geographical_region = world_steppe
			geographical_region = world_tibet
			geographical_region = world_asia_china
			geographical_region = world_asia_japan
			geographical_region = world_asia_korea
		}
	}
}

tropical_seasons_trigger = {
	$LOCATION$ = {
		tropical_seasons_region_trigger = yes
	}
}

tropical_seasons_region_trigger = {
	OR = {
		geographical_region = world_africa_west
		geographical_region = world_africa_east
		geographical_region = world_india_deccan
		geographical_region = world_burma
		geographical_region = world_asia_china
		geographical_region = world_asia_southeast
	}
}

is_nice_season_to_be_outside_trigger = {
	OR = {
		# Temperate zones like to be out in summer.
		AND = {
			temperate_seasons_trigger = { LOCATION = $LOCATION$ }
			middle_of_year_season_trigger = yes
		}
		# Tropical zones like to be out in winter.
		AND = {
			tropical_seasons_trigger = { LOCATION = $LOCATION$ }
			end_of_year_season_trigger = yes
		}
	}
}

is_nice_season_to_be_inside_trigger = {
	OR = {
		# Temperate zones like to be inside in winter.
		AND = {
			temperate_seasons_trigger = { LOCATION = $LOCATION$ }
			end_of_year_season_trigger = yes
		}
		# Tropical zones like to be inside in summer.
		AND = {
			tropical_seasons_trigger = { LOCATION = $LOCATION$ }
			middle_of_year_season_trigger = yes
		}
	}
}



#Season scripted trigger tied into custom loc, can be used for backgrounds and VFX
#Format like current_season_winter = yes

current_season_trigger = {
	current_season_$SEASON$ = yes
}

current_season_winter = {
	#southern region with rainy/dry seasons
	trigger_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_deccan
			}
		}
		OR = {
			current_month >= 11
			current_month < 3
		}
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_rajasthan
			}
		}
		OR = {
			current_month >= 12
			current_month < 4
		}
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_bengal
			}
		}
		OR = {
			current_month >= 11
			current_month < 2
		}
	}
	trigger_else = {
		#Generic Northern Hemisphere
		OR = {
			current_month >= 12
			current_month < 3
		}
		#Not present/has different name in these regions
		location = {
			NOR = {
				geographical_region = seasonal_region_east_africa
				geographical_region = seasonal_region_west_africa
				geographical_region = seasonal_region_maritime_southeast_asia
				geographical_region = seasonal_region_peninsular_southeast_asia
			}
		}
	}
}

current_season_autumn = {
	#southern region with rainy/dry seasons
	trigger_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_rajasthan
			}
		}
		current_month >= 10
		current_month < 12
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_bengal
			}
		}
		current_month >= 8
		current_month < 11
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_east_africa
			}
		}
		current_month >= 9
		current_month < 11
	}
	trigger_else = {
		#Generic Northern Hemisphere
		current_month >= 9
		current_month < 12
		#Not present/has different name in these regions
		location = {
			NOR = {
				geographical_region = seasonal_region_west_africa
				geographical_region = seasonal_region_deccan
				geographical_region = seasonal_region_peninsular_southeast_asia
				geographicaL_region = seasonal_region_maritime_southeast_asia
			}
		}
	}
}

current_season_summer = {
	#southern region with rainy/dry seasons
	trigger_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_deccan
			}
		}
		current_month >= 3
		current_month < 6
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_rajasthan
			}
		}
		current_month >= 4
		current_month < 7
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_bengal
			}
		}
		current_month >= 4
		current_month < 6
	}
	trigger_else = {
		#Generic Northern Hemisphere
		current_month >= 6
		current_month < 9
		#Not present/has different name in these regions
		location = {
			NOR = {
				geographical_region = seasonal_region_west_africa
				geographical_region = seasonal_region_east_africa
				geographical_region = seasonal_region_peninsular_southeast_asia
				geographical_region = seasonal_region_maritime_southeast_asia
			}
		}
	}
}

current_season_spring = {
	#southern region with rainy/dry seasons
	trigger_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_bengal
			}
		}
		current_month >= 2
		current_month < 4
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_east_africa
			}
		}
		current_month >= 3
		current_month < 6
	}
	trigger_else = {
		#Generic Northern Hemisphere
		current_month >= 3
		current_month < 6
		#Not present/has different name in these regions
		location = {
			NOR = {
				geographical_region = seasonal_region_west_africa
				geographical_region = seasonal_region_rajasthan
				geographical_region = seasonal_region_deccan
				geographical_region = seasonal_region_peninsular_southeast_asia
				geographical_region = seasonal_region_maritime_southeast_asia
			}
		}
	}
}

current_season_dry_season = {
	#southern region with rainy/dry seasons
	location = {
		OR = {
			geographical_region = seasonal_region_west_africa
			geographical_region = seasonal_region_east_africa
			geographical_region = seasonal_region_peninsular_southeast_asia
			geographical_region = seasonal_region_maritime_southeast_asia
			geographical_region = seasonal_region_bengal
			geographical_region = seasonal_region_deccan
		}
	}
	trigger_if = {
		limit = {
			location = { geographical_region = seasonal_region_west_africa }
		}
		OR = {
			current_month >= 11
			current_month < 5
		}
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_east_africa
			}
		}
		OR = {
			current_month >= 12
			current_month < 3
		}
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_maritime_southeast_asia
			}#April to September
		}
		current_month >= 4
		current_month < 10
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_peninsular_southeast_asia
			}
		}
		OR = { #November to May
			current_month >= 11
			current_month < 6
		}
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_bengal
			}
		}
		OR = {
			current_month >= 12
			current_month < 3
		}
	}
	trigger_else = {
		location = {
			geographical_region = seasonal_region_deccan
		}
		OR = {
			current_month >= 12
			current_month < 3
		}
	}
}

current_season_rainy_season = {
	#Jasons triggers here
	location = {
		OR = {
			geographical_region = seasonal_region_west_africa
			geographical_region = seasonal_region_east_africa
			geographical_region = seasonal_region_peninsular_southeast_asia
			geographical_region = seasonal_region_maritime_southeast_asia
			geographical_region = seasonal_region_bengal
			geographical_region = seasonal_region_deccan
			geographical_region = seasonal_region_rajasthan
		}
	}
	#southern region with rainy/dry seasons
	trigger_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_deccan
			}
		}
		current_month >= 6
		current_month < 11
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_rajasthan
			}
		}
		current_month >= 7
		current_month < 10
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_bengal
			}
		}
		current_month >= 6
		current_month < 8
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_peninsular_southeast_asia
			}
		} #June to October
		current_month >= 6
		current_month < 11
	}
	trigger_else_if = {
		limit = {
			location = {
				geographical_region = seasonal_region_maritime_southeast_asia
			}
		} #October to March
		OR = {
			current_month >= 10
			current_month < 4
		}
	}
	trigger_else = {
		location = {
			geographical_region = seasonal_region_east_africa
		}
		current_month >= 6
		current_month < 9
	}
}

current_season_hot_season = {
	OR = {
		AND = {
			location = {
				OR = {
					geographical_region = seasonal_region_east_africa
					geographical_region = seasonal_region_west_africa
				}
			}
			current_season_rainy_season = yes
		}
		current_season_summer = yes
	}
}
current_season_cold_season = {
	OR = {
		current_season_winter = yes
		current_season_dry_season = yes
	}
}
current_season_wet = {
	OR = {
		current_season_spring = yes
		current_season_rainy_season = yes
	}
}
current_season_dry = {
	OR = {
		current_season_summer = yes
		current_season_dry_season = yes
	}
}
