﻿je_prohibition = {	
	icon = "gfx/interface/icons/event_icons/event_trade.dds"

	group = je_group_internal_affairs

	is_shown_when_inactive = {
		is_player = yes
		OR = {
			has_technology_researched = anarchism
			has_technology_researched = socialism
			has_technology_researched = corporatism
		}
		has_distillery = yes
		is_junior_in_customs_union = no
	}

	possible = {
		has_technology_researched = political_agitation
		any_primary_culture = {
			has_cultural_obsession = liquor
		}
		OR = {
			ig:ig_devout = {
				is_powerful = yes 
			}
			ig:ig_intelligentsia = {
				is_powerful = yes
			}
		}
		any_scope_building = {
			is_building_type = building_food_industry
			is_distillery = yes
			level >= 5
		}
	}
	
	immediate = {
		trigger_event = { id = prohibition.1 }
		ig:ig_devout = {
			save_scope_as = devout_ig
		}
		ig:ig_intelligentsia = {
			save_scope_as = intelligentsia_ig
		}
		set_variable = {
			name = prohibition_laws_var
			value = 0
		}
	}
	
	on_monthly_pulse = {
		random_events = {
			200 = 0
			10 = crime_events.2
			10 = pm_events.3
			10 = prohibition.2
			10 = prohibition.3
			10 = prohibition.4
			10 = prohibition.5
			5 = prohibition.6
			2 = prohibition.7
			5 = election_contextual_events.8
		}
		effect = {
			if = {
				limit = {
					is_banning_goods = liquor
				}
				change_variable = {
					name = prohibition_laws_var
					add = 1
				}
			}
		}
	}

	invalid = { # event prohibition.1.b ends the JE and applies these modifiers
		OR = {
			ig:ig_devout = {
				has_modifier = rejected_prohibition_modifier
			}
			ig:ig_intelligentsia = {
				has_modifier = rejected_prohibition_modifier
			}
		}
	}
	
	complete = {
		scope:journal_entry = { is_goal_complete = yes }
		custom_tooltip = {
			text = liquor_ban_tt
			is_banning_goods = liquor
		}
	}
	

	on_complete = {
		custom_tooltip = prohibition_success.tt
		trigger_event = { id = prohibition.8 }
	}
	
	timeout = 5475
	
	current_value = {
		value = root.var:prohibition_laws_var
	}

	goal_add_value = {
		add = 120 #10 years
	}

	progressbar = yes

	transferable = no
	weight = 100
	should_be_pinned_by_default = yes
}