﻿je_imperialism_of_promise = {
	icon = "gfx/interface/icons/invention_icons/central_planning.dds"

	group = je_group_internal_affairs

	is_shown_when_inactive = {
		has_dlc_feature = ip2_content
		c:BIC ?= this
	}

	possible = {
		country_has_primary_culture = cu:british
		custom_tooltip ={
			text = utilitarian_character_trigger
			any_scope_character = {
				OR = { # John Stuart Mill satisfies this trigger.
					has_role = agitator
					has_role = politician
				}
				has_ideology = ideology:ideology_utilitarian_leader
			}
		}
	}

	immediate = {
		c:BIC = {
			save_scope_as = BIC_scope
		}
		trigger_event = { id = utilitarian.9 popup = yes }
	}

	complete = {
		root.average_sol >= 10
		bureaucracy >= 0 
		approaching_bureaucracy_shortage = no
		NOT = {
			has_law = law_type:law_no_womens_rights
		}
		has_law = law_type:law_compulsory_primary_school
		has_law = law_type:law_public_schools
		has_law = law_type:law_slavery_banned
		OR = {
			has_law = law_type:law_proportional_taxation
			has_law = law_type:law_graduated_taxation
		}
	}

	fail = {
		OR = {
			scope:BIC_scope ?= {
				has_journal_entry = je_sepoy_mutiny
			}
			any_civil_war = {
				civil_war_progress >= 0.75
			}
			custom_tooltip = {
				text = bic_collapse_var_tt
				has_variable = bic_collapse_var
			}
		}
	}

	invalid = {
		OR = {
			NOT = {
				exists = c:BIC
			}
			NOT = {
				country_has_primary_culture = cu:british
			}
		}
	}
	on_complete = {
		trigger_event = { id = utilitarian.1 popup = yes }
	}

	on_fail = {
		trigger_event = { id = utilitarian.2 popup = yes }
	}

	on_timeout = {
		trigger_event = { id = utilitarian.3 popup = yes }
	}

	on_yearly_pulse = {
		effect = {
			
		}
		random_events = {
			100 = 0
			10 = utilitarian.4
			10 = utilitarian.5
			10 = utilitarian.6
			10 = utilitarian.7
			# utilitarian.8 is fired by the enactment pulse
			10 = utilitarian.10
		}
	}

	timeout = 10950

	weight = 100

	should_be_pinned_by_default = yes

}