# Comprehensive Sandbox Control - government & politics one-shot effects
#
# Narrow, idempotent wrappers called by the government decisions. All tokens are
# validated against the installed generated documentation (docs/cheat-catalog.md).

# set_politics switches the ruling ideology immediately. Democratic keeps
# elections; the others disable them, matching vanilla behavior for those parties.
csc_gov_set_democratic  = { set_politics = { ruling_party = democratic  elections_allowed = yes } }
csc_gov_set_communism   = { set_politics = { ruling_party = communism   elections_allowed = no  } }
csc_gov_set_fascism     = { set_politics = { ruling_party = fascism     elections_allowed = no  } }
csc_gov_set_neutrality  = { set_politics = { ruling_party = neutrality  elections_allowed = no  } }

# Boost the CURRENT ruling ideology's popularity to ~100% (clamped by the engine).
# Branches on has_government so it needs no literal target ideology argument.
csc_gov_boost_popularity = {
	if = { limit = { has_government = democratic } add_popularity = { ideology = democratic popularity = 1 } }
	if = { limit = { has_government = communism }  add_popularity = { ideology = communism  popularity = 1 } }
	if = { limit = { has_government = fascism }    add_popularity = { ideology = fascism    popularity = 1 } }
	if = { limit = { has_government = neutrality } add_popularity = { ideology = neutrality popularity = 1 } }
}
