1use std::sync::LazyLock;
2
3use crate::effect::Effect;
4use crate::effect_validation::*;
5use crate::everything::Everything;
6use crate::helpers::TigerHashMap;
7use crate::item::Item;
8use crate::scopes::*;
9use crate::token::Token;
10use crate::vic3::effect_validation::*;
11use crate::vic3::tables::misc::STATE_TYPES;
12
13use Effect::*;
14
15pub fn scope_effect(name: &Token, _data: &Everything) -> Option<(Scopes, Effect)> {
16 let name_lc = name.as_str().to_ascii_lowercase();
17 SCOPE_EFFECT_MAP.get(&*name_lc).copied()
18}
19
20static SCOPE_EFFECT_MAP: LazyLock<TigerHashMap<&'static str, (Scopes, Effect)>> =
22 LazyLock::new(|| {
23 let mut hash = TigerHashMap::default();
24 for (from, s, effect) in SCOPE_EFFECT.iter().copied() {
25 hash.insert(s, (from, effect));
26 }
27 hash
28 });
29
30const SCOPE_EFFECT: &[(Scopes, &str, Effect)] = &[
33 (Scopes::InterestGroup, "abandon_revolution", Boolean),
34 (Scopes::State, "activate_building", Vb(validate_activate_building)),
35 (Scopes::Country, "activate_law", Scope(Scopes::LawType)),
36 (
37 Scopes::Country.union(Scopes::State),
38 "activate_production_method",
39 Vb(validate_activate_production_method),
40 ),
41 (Scopes::State, "add_acceptance", TargetValue("target", Scopes::Culture, "value")),
42 (Scopes::Law, "add_amendment", Vb(validate_add_amendment)),
43 (Scopes::StateRegion, "add_arable_land", ScriptValue),
44 (Scopes::Country, "add_banned_goods", Scope(Scopes::Goods)),
45 (Scopes::Country, "add_change_relations_progress", Vb(validate_country_value)), (Scopes::PoliticalMovement, "add_character_ideology", Item(Item::Ideology)),
47 (Scopes::Character, "add_character_role", Item(Item::CharacterRole)),
48 (Scopes::CivilWar, "add_civil_war_progress", ScriptValue),
49 (Scopes::StateRegion, "add_claim", Scope(Scopes::Country)),
50 (Scopes::PowerBloc, "add_cohesion_number", ScriptValue),
51 (Scopes::PowerBloc, "add_cohesion_percent", ScriptValue),
52 (Scopes::Character, "add_commander_rank", Integer),
53 (Scopes::Country, "add_company", Scope(Scopes::CompanyType)),
54 (Scopes::Company, "add_company_monopoly", Scope(Scopes::BuildingType)),
55 (Scopes::None, "add_contextless_journal_entry", Item(Item::JournalEntry)),
56 (Scopes::Country, "add_country_monopoly", Scope(Scopes::BuildingType)),
57 (Scopes::State, "add_cultural_community", Scope(Scopes::Culture)),
58 (Scopes::Culture, "add_cultural_community_in_state", Scope(Scopes::State)),
59 (Scopes::Culture, "add_cultural_obsession", Item(Item::Goods)),
60 (Scopes::Country, "add_culture_acceptance_modifier", Vb(validate_add_culture_modifier)),
61 (Scopes::State, "add_culture_standard_of_living_modifier", Vb(validate_add_culture_modifier)),
62 (Scopes::Country, "add_declared_interest", Item(Item::StrategicRegion)),
63 (Scopes::StateRegion.union(Scopes::State), "add_devastation", ScriptValue),
64 (
65 Scopes::DiplomaticPlay,
66 "add_diplomatic_play_war_support",
67 TargetValue("target", Scopes::Country, "value"),
68 ),
69 (Scopes::Country, "add_electoral_confidence", ScriptValue),
70 (Scopes::Country, "add_enactment_modifier", Vb(validate_add_enactment_modifier)),
71 (Scopes::Country, "add_enactment_phase", ScriptValue),
72 (Scopes::Country, "add_enactment_setback", ScriptValue),
73 (Scopes::Country, "add_era_researched", Item(Item::TechnologyEra)),
74 (Scopes::DiplomaticPlay, "add_escalation", Integer),
75 (Scopes::Character, "add_experience", ScriptValue),
76 (Scopes::StateGoods, "add_exports", ScriptValue),
77 (Scopes::Culture, "add_fervor", ScriptValue),
78 (Scopes::Country, "add_fervor_target_modifier", Vb(validate_add_culture_modifier)),
79 (Scopes::StateRegion, "add_homeland", ScopeOrItem(Scopes::Culture, Item::Culture)),
80 (Scopes::InterestGroup, "add_ideology", Item(Item::Ideology)),
81 (Scopes::Party, "add_ig_to_party", Scope(Scopes::InterestGroup)),
82 (Scopes::StateGoods, "add_imports", ScriptValue),
83 (Scopes::DiplomaticPlay, "add_initiator_backers", Vb(validate_addremove_backers)),
84 (Scopes::Country, "add_investment_pool", ScriptValue),
85 (Scopes::JournalEntry, "add_involved_country", Scope(Scopes::Country)),
86 (Scopes::None, "add_journal_entry", Vb(validate_add_journalentry)),
87 (Scopes::Country, "add_law_progress", ScriptValue),
88 (Scopes::PowerBloc, "add_leverage", TargetValue("target", Scopes::Country, "value")),
89 (Scopes::Country, "add_liberty_desire", ScriptValue),
90 (Scopes::PoliticalLobby, "add_lobby_member", Scope(Scopes::InterestGroup)),
91 (Scopes::Country, "add_loyalists", Vb(validate_add_loyalists)),
92 (Scopes::State, "add_loyalists_in_state", Vb(validate_add_loyalists)),
93 (
94 Scopes::Country
95 .union(Scopes::Building)
96 .union(Scopes::Character)
97 .union(Scopes::Institution)
98 .union(Scopes::InterestGroup)
99 .union(Scopes::JournalEntry)
100 .union(Scopes::PoliticalMovement)
101 .union(Scopes::PowerBloc)
102 .union(Scopes::State),
103 "add_modifier",
104 Vbv(validate_add_modifier),
105 ),
106 (Scopes::Party, "add_momentum", ScriptValue),
107 (Scopes::NewCombatUnit, "add_morale", ScriptValue),
108 (Scopes::MilitaryFormation, "add_organization", ScriptValue), (Scopes::Company, "add_owned_country", Scope(Scopes::Country)),
110 (Scopes::StateRegion, "add_pollution", ScriptValue),
111 (Scopes::Pop, "add_pop_wealth", Vb(validate_pop_wealth)),
112 (Scopes::Country, "add_primary_culture", Scope(Scopes::Culture)),
113 (Scopes::PowerBloc, "add_principle", Item(Item::Principle)),
114 (Scopes::JournalEntry, "add_progress", Vb(validate_progress)),
115 (Scopes::Country, "add_radicals", Vb(validate_add_loyalists)),
116 (Scopes::State, "add_radicals_in_state", Vb(validate_add_loyalists)),
117 (Scopes::Character, "add_random_trait", Choice(&["personality", "skill", "condition"])),
118 (
119 Scopes::State,
120 "add_religion_standard_of_living_modifier",
121 Vb(validate_add_religion_sol_modifier),
122 ),
123 (Scopes::InterestGroup, "add_ruling_interest_group", Boolean),
124 (Scopes::StateRegion, "add_state_trait", Item(Item::StateTrait)),
125 (Scopes::DiplomaticPlay, "add_target_backers", Vb(validate_addremove_backers)),
126 (Scopes::Country, "add_taxed_goods", Scope(Scopes::Goods)),
127 (Scopes::Country, "add_technology_progress", Vb(validate_add_technology_progress)),
128 (Scopes::Country, "add_technology_researched", Item(Item::Technology)),
129 (Scopes::None, "add_to_global_variable_list", Vb(validate_add_to_variable_list)),
130 (Scopes::all(), "add_to_list", Vbv(validate_add_to_list)),
131 (Scopes::None, "add_to_local_variable_list", Vb(validate_add_to_variable_list)),
132 (Scopes::all(), "add_to_temporary_list", Vbv(validate_add_to_list)),
133 (Scopes::None, "add_to_variable_list", Vb(validate_add_to_variable_list)),
134 (Scopes::Culture, "add_tradition_trait", Item(Item::TraditionTrait)),
135 (Scopes::Character, "add_trait", Item(Item::CharacterTrait)),
136 (Scopes::Country, "add_treasury", ScriptValue),
137 (Scopes::War, "add_war_exhaustion", TargetValue("target", Scopes::Country, "value")),
138 (Scopes::DiplomaticPlay, "add_war_goal", Vb(validate_add_war_goal)),
139 (Scopes::War, "add_war_war_support", TargetValue("target", Scopes::Country, "value")),
140 (Scopes::Country, "annex", Scope(Scopes::Country)),
141 (Scopes::Country, "annex_as_civil_war", Scope(Scopes::Country)),
142 (Scopes::Country, "annex_with_incorporation", Scope(Scopes::Country)),
143 (Scopes::None, "assert_if", Unchecked),
144 (Scopes::None, "assert_read", Unchecked),
145 (Scopes::Country, "call_election", Vb(validate_call_election)),
146 (Scopes::Country, "cancel_enactment", Yes),
147 (Scopes::Law, "cancel_imposition", Yes),
149 (Scopes::State, "cede_treaty_port", Scope(Scopes::Country)),
150 (Scopes::PoliticalLobby, "change_appeasement", Vb(validate_change_appeasement)),
151 (Scopes::Character, "change_character_culture", Scope(Scopes::Culture)),
152 (Scopes::Character, "change_character_religion", Scope(Scopes::Religion)),
153 (Scopes::None, "change_global_variable", Vb(validate_change_variable)),
154 (Scopes::None, "change_infamy", ScriptValue),
155 (
156 Scopes::Country,
157 "change_institution_investment_level",
158 Vb(validate_change_institution_investment_level),
159 ),
160 (Scopes::None, "change_local_variable", Vb(validate_change_variable)),
161 (Scopes::Pop, "change_pop_culture", TargetValue("target", Scopes::Culture, "value")),
162 (Scopes::Pop, "change_pop_religion", TargetValue("target", Scopes::Religion, "value")),
163 (Scopes::Pop, "change_poptype", Scope(Scopes::PopType)),
164 (Scopes::Country, "change_relations", Vb(validate_country_value)),
165 (Scopes::Country, "change_subject_type", Item(Item::SubjectType)),
166 (Scopes::Country, "change_tag", Item(Item::Country)),
167 (Scopes::Country, "change_tension", Vb(validate_country_value)),
168 (Scopes::None, "change_variable", Vb(validate_change_variable)),
169 (Scopes::None, "clamp_global_variable", Vb(validate_clamp_variable)),
170 (Scopes::None, "clamp_local_variable", Vb(validate_clamp_variable)),
171 (Scopes::None, "clamp_variable", Vb(validate_clamp_variable)),
172 (Scopes::Country, "clear_debt", Boolean),
173 (Scopes::Country, "clear_enactment_modifier", Yes),
174 (Scopes::None, "clear_global_variable_list", Identifier("list name")),
175 (Scopes::None, "clear_local_variable_list", Identifier("list name")),
176 (Scopes::None, "clear_saved_scope", Identifier("scope name")),
177 (Scopes::Country, "clear_scaled_debt", ScriptValue),
178 (Scopes::None, "clear_variable_list", Identifier("list name")),
179 (Scopes::Country, "complete_objective_subgoal", Item(Item::ObjectiveSubgoal)),
180 (Scopes::State, "convert_population", TargetValue("target", Scopes::Religion, "value")),
181 (Scopes::Country, "copy_laws", Scope(Scopes::Country)),
182 (Scopes::Country, "create_bidirectional_truce", Vb(validate_create_truce)),
183 (Scopes::State, "create_building", Vb(validate_create_building)),
184 (Scopes::Country, "create_character", Vb(validate_create_character)),
185 (Scopes::None, "create_country", Vb(validate_create_country)),
186 (Scopes::Country, "create_diplomatic_catalyst", Vb(validate_create_catalyst)),
187 (Scopes::Country, "create_diplomatic_pact", Vb(validate_diplomatic_pact)),
188 (Scopes::Country, "create_diplomatic_play", Vb(validate_create_diplomatic_play)),
189 (Scopes::None, "create_dynamic_country", Vb(validate_create_dynamic_country)),
190 (Scopes::Country, "create_incident", Vb(validate_country_value)),
191 (Scopes::State, "create_mass_migration", Vb(validate_create_mass_migration)),
192 (Scopes::Country, "create_military_formation", Vb(validate_create_military_formation)),
193 (Scopes::Country, "create_political_lobby", Vb(validate_create_lobby)),
194 (Scopes::Country, "create_political_movement", Vb(validate_create_movement)),
195 (Scopes::State, "create_pop", Vb(validate_create_pop)),
196 (Scopes::Country, "create_power_bloc", Vb(validate_create_power_bloc)),
197 (Scopes::StateRegion, "create_state", Vb(validate_create_state)),
198 (Scopes::Country, "create_trade_route", Removed("1.9", "replaced with world trade system")),
199 (Scopes::None, "create_treaty", Vb(validate_create_treaty)),
200 (
201 Scopes::Country,
202 "create_truce",
203 Removed("1.7", "replaced with create_bidirectional_truce and create_unidirectional_truce"),
204 ),
205 (Scopes::Country, "create_unidirectional_truce", Vb(validate_create_truce)),
206 (Scopes::None, "custom_description", Control),
207 (Scopes::None, "custom_description_no_bullet", Control),
208 (Scopes::None, "custom_label", ControlOrLabel),
209 (Scopes::None, "custom_tooltip", ControlOrLabel),
210 (Scopes::State, "deactivate_building", Vb(validate_activate_building)),
211 (Scopes::Country, "deactivate_law", Scope(Scopes::LawType)),
212 (Scopes::Country, "deactivate_parties", Yes),
213 (Scopes::None, "debug_log", UncheckedTodo),
214 (Scopes::None, "debug_log_scopes", Boolean),
215 (Scopes::Country, "decrease_autonomy", Yes),
216 (Scopes::Character, "demobilize", Removed("1.6", "")),
217 (Scopes::MilitaryFormation, "deploy_to_front", Vbv(validate_teleport_to_front)),
218 (Scopes::Party, "disband_party", Yes),
219 (Scopes::PoliticalLobby, "disband_political_lobby", Yes),
220 (Scopes::Character, "disinherit_character", Yes),
221 (Scopes::None, "else", Control),
222 (Scopes::None, "else_if", Control),
223 (Scopes::Country, "end_national_awakening", Scope(Scopes::Culture)),
224 (Scopes::DiplomaticPlay, "end_play", Boolean),
225 (Scopes::Country, "end_truce", Scope(Scopes::Country)),
226 (Scopes::None, "error_log", UncheckedTodo),
227 (Scopes::None, "execute_event_option", Vb(validate_execute_event_option)),
228 (Scopes::Character, "exile_character", Yes),
229 (Scopes::StateRegion, "finish_harvest_condition", Item(Item::HarvestConditionType)),
230 (Scopes::InterestGroup, "finish_negotiation", Item(Item::Localization)),
232 (Scopes::State, "force_resource_depletion", Item(Item::BuildingType)),
233 (Scopes::State, "force_resource_discovery", Item(Item::BuildingType)),
234 (Scopes::Character, "free_character_from_void", Boolean),
235 (Scopes::MilitaryFormation, "fully_mobilize_army", Yes),
236 (Scopes::None, "hidden_effect", Control),
237 (Scopes::None, "if", Control),
238 (Scopes::InterestGroup, "improve_stance", Integer),
239 (Scopes::Country, "increase_autonomy", Yes),
240 (Scopes::Country, "join_power_bloc", Scope(Scopes::Country)),
241 (Scopes::InterestGroup, "join_revolution", Boolean),
242 (Scopes::War, "join_war", Vb(validate_join_war)),
243 (Scopes::Character, "kill_character", Vbv(validate_kill_character)),
244 (Scopes::Country, "kill_population", Vb(validate_kill_population)),
245 (Scopes::State, "kill_population_in_state", Vb(validate_kill_population)),
246 (Scopes::Country, "kill_population_percent", Vb(validate_kill_population)),
247 (Scopes::State, "kill_population_percent_in_state", Vb(validate_kill_population)),
248 (Scopes::Country.union(Scopes::State), "liberate_slaves", Yes),
249 (Scopes::Country, "liberate_slaves_in_incorporated_states", Yes),
250 (Scopes::Country, "liberate_slaves_in_unincorporated_states", Yes),
251 (Scopes::None, "lock_trade_route", Removed("1.9", "replaced with world trade system")),
252 (Scopes::Country, "make_independent", Boolean),
253 (Scopes::MilitaryFormation, "mobilize_army", Yes),
254 (Scopes::Pop, "move_partial_pop", Vb(validate_move_partial_pop)),
255 (Scopes::Pop, "move_pop", Scope(Scopes::State)),
256 (Scopes::Character, "place_character_in_void", ScriptValue),
257 (Scopes::Country, "play_as", Scope(Scopes::Country)),
258 (Scopes::None, "post_audio_event", Vb(validate_audio_event)),
259 (Scopes::None, "post_notification", Vv(validate_post_notification)),
260 (Scopes::None, "post_proposal", Item(Item::ProposalType)),
261 (Scopes::None, "random", Control),
262 (Scopes::None, "random_list", Vbc(validate_random_list)),
263 (Scopes::None, "random_log_scopes", Boolean),
264 (Scopes::Country, "recalculate_pop_ig_support", Boolean),
265 (Scopes::Country, "regime_change", Scope(Scopes::Country)),
266 (Scopes::Country, "remove_active_objective_subgoal", Item(Item::ObjectiveSubgoal)),
267 (Scopes::Amendment, "remove_amendment", Boolean),
268 (Scopes::Character, "remove_as_interest_group_leader", Yes),
269 (Scopes::Country, "remove_banned_goods", Scope(Scopes::Goods)),
270 (Scopes::State, "remove_building", Item(Item::BuildingType)),
271 (Scopes::PoliticalMovement, "remove_character_ideology", Item(Item::Ideology)),
272 (Scopes::Character, "remove_character_role", Item(Item::CharacterRole)),
273 (Scopes::StateRegion, "remove_claim", Scope(Scopes::Country)),
274 (Scopes::Country, "remove_company", Scope(Scopes::CompanyType)),
275 (Scopes::Culture, "remove_cultural_obsession", Item(Item::Goods)),
276 (Scopes::Country, "remove_diplomatic_pact", Vb(validate_diplomatic_pact)),
277 (Scopes::Country, "remove_enactment_modifier", UncheckedTodo), (Scopes::StateGoods, "remove_exports", ScriptValue),
279 (Scopes::all_but_none(), "remove_from_list", Vv(validate_remove_from_list)),
280 (Scopes::None, "remove_global_variable", Identifier("variable name")),
281 (Scopes::StateRegion, "remove_homeland", Scope(Scopes::Culture)),
282 (Scopes::InterestGroup, "remove_ideology", Item(Item::Ideology)),
283 (Scopes::Party, "remove_ig_from_party", Scope(Scopes::InterestGroup)),
284 (Scopes::StateGoods, "remove_imports", ScriptValue),
285 (Scopes::DiplomaticPlay, "remove_initiator_backers", Vb(validate_addremove_backers)),
286 (Scopes::JournalEntry, "remove_involved_country", Scope(Scopes::Country)),
287 (Scopes::None, "remove_list_global_variable", Vb(validate_add_to_variable_list)),
288 (Scopes::None, "remove_list_local_variable", Vb(validate_add_to_variable_list)),
289 (Scopes::None, "remove_list_variable", Vb(validate_add_to_variable_list)),
290 (Scopes::PoliticalLobby, "remove_lobby_member", Scope(Scopes::InterestGroup)),
291 (Scopes::None, "remove_local_variable", Identifier("variable name")),
292 (
293 Scopes::Country
294 .union(Scopes::Building)
295 .union(Scopes::Character)
296 .union(Scopes::Institution)
297 .union(Scopes::InterestGroup)
298 .union(Scopes::JournalEntry)
299 .union(Scopes::PoliticalMovement)
300 .union(Scopes::PowerBloc)
301 .union(Scopes::State),
302 "remove_modifier",
303 Item(Item::Modifier),
304 ),
305 (Scopes::Country, "remove_monopoly", Scope(Scopes::BuildingType)),
306 (Scopes::Company, "remove_owned_country", Scope(Scopes::Country)),
307 (Scopes::Country, "remove_primary_culture", Scope(Scopes::Culture)),
308 (Scopes::PowerBloc, "remove_principle", Item(Item::Principle)),
309 (Scopes::InterestGroup, "remove_ruling_interest_group", Boolean),
310 (Scopes::StateRegion, "remove_state_trait", Item(Item::StateTrait)),
311 (Scopes::DiplomaticPlay, "remove_target_backers", Vb(validate_addremove_backers)),
312 (Scopes::Country, "remove_taxed_goods", Scope(Scopes::Goods)),
313 (Scopes::Culture, "remove_tradition_trait", Item(Item::TraditionTrait)),
314 (Scopes::Character, "remove_trait", Item(Item::CharacterTrait)),
315 (Scopes::None, "remove_variable", Identifier("variable name")),
316 (Scopes::DiplomaticPlay, "remove_war_goal", Vb(validate_remove_war_goal)),
317 (Scopes::State, "reset_hub_names", Yes),
318 (Scopes::State, "reset_state_name", Yes),
319 (Scopes::DiplomaticPlay, "resolve_play_for", Scope(Scopes::Country)),
320 (Scopes::Character, "retire_character", Vbv(validate_kill_character)),
321 (Scopes::None, "round_global_variable", Vb(validate_round_variable)),
322 (Scopes::None, "round_local_variable", Vb(validate_round_variable)),
323 (Scopes::None, "round_variable", Vb(validate_round_variable)),
324 (Scopes::all_but_none(), "save_scope_as", Vv(validate_save_scope)),
325 (Scopes::None, "save_scope_value_as", Vb(validate_save_scope_value)),
326 (Scopes::all_but_none(), "save_temporary_scope_as", Vv(validate_save_scope)),
327 (Scopes::None, "save_temporary_scope_value_as", Vb(validate_save_scope_value)),
328 (Scopes::Country, "seize_investment_pool", Boolean),
329 (Scopes::Character, "set_as_interest_group_leader", Boolean),
330 (Scopes::State, "set_available_for_autonomous_investment", Scope(Scopes::BuildingType)),
331 (Scopes::JournalEntry, "set_bar_progress", Vb(validate_progress)),
332 (Scopes::PoliticalMovement, "set_bolstering", Boolean),
333 (Scopes::Country, "set_capital", Item(Item::StateRegion)),
334 (Scopes::Character, "set_character_as_executive", Scope(Scopes::Company)),
335 (Scopes::Character, "set_character_as_ruler", Yes),
336 (
337 Scopes::Character,
338 "set_character_busy",
339 Removed("1.11", "replaced with set_character_busy_and_immortal"),
340 ),
341 (Scopes::Character, "set_character_busy_and_immortal", Boolean),
342 (Scopes::Character, "set_character_immortal", Boolean),
343 (Scopes::Character, "set_commander_rank", Integer),
344 (Scopes::Company, "set_company_establishment_date", Date),
345 (Scopes::Company, "set_company_state_region", Scope(Scopes::StateRegion)),
346 (Scopes::PoliticalMovement, "set_core_ideology", Item(Item::Ideology)),
347 (Scopes::Country, "set_country_type", Item(Item::CountryType)),
348 (Scopes::StateRegion.union(Scopes::State), "set_devastation", ScriptValue),
349 (Scopes::Country, "set_diplomats_expelled", Scope(Scopes::Country)),
350 (Scopes::Country, "set_electoral_confidence", ScriptValue),
351 (Scopes::Country, "set_export_tariff_level", Vb(validate_tariff_level)),
352 (Scopes::StateGoods, "set_exports", ScriptValue),
353 (Scopes::Culture, "set_fervor", ScriptValue),
354 (Scopes::None, "set_global_variable", Vbv(validate_set_variable)),
355 (Scopes::Country, "set_government_wage_level", Item(Item::Level)),
356 (Scopes::InterestGroup, "set_has_negotiated", Boolean),
357 (Scopes::Country, "set_heir", Scope(Scopes::Character)),
358 (Scopes::Character, "set_home_country", Scope(Scopes::Country)),
359 (Scopes::Character, "set_home_country_definition", Scope(Scopes::CountryDefinition)),
360 (Scopes::State, "set_hub_name", Vb(validate_set_hub_name)),
361 (Scopes::State, "set_hub_names", UncheckedTodo),
363 (Scopes::Character, "set_ideology", Scope(Scopes::Ideology)),
364 (
365 Scopes::InterestGroup,
366 "set_ig_bolstering",
367 Removed("1.8", "see `set_bolstering` for political movements"),
368 ),
369 (
370 Scopes::InterestGroup,
371 "set_ig_suppression",
372 Removed("1.8", "see `set_suppression` for political movements"),
373 ),
374 (Scopes::InterestGroup, "set_ig_trait", Scope(Scopes::InterestGroupTrait)),
375 (Scopes::Country, "set_immune_to_revolutions", Boolean),
376 (Scopes::Country, "set_import_tariff_level", Vb(validate_tariff_level)),
377 (Scopes::StateGoods, "set_imports", ScriptValue),
378 (
379 Scopes::Country,
380 "set_institution_investment_level",
381 Vb(validate_set_institution_investment_level),
382 ),
383 (Scopes::Character, "set_interest_group", Scope(Scopes::InterestGroup)),
384 (Scopes::InterestGroup, "set_interest_group_name", Item(Item::Localization)),
385 (Scopes::DiplomaticPlay, "set_key", Item(Item::Localization)),
386 (Scopes::None, "set_local_variable", Vbv(validate_set_variable)),
387 (Scopes::Country, "set_market_capital", Item(Item::StateRegion)),
388 (Scopes::Country, "set_military_wage_level", Item(Item::Level)),
389 (Scopes::Country, "set_mutual_secret_goal", Vb(validate_set_secret_goal)),
390 (Scopes::Country, "set_next_election_date", Date),
391 (Scopes::Country, "set_only_legal_party_from_ig", Scope(Scopes::InterestGroup)),
392 (Scopes::Country, "set_owes_obligation_to", Vb(validate_owes_obligation)),
393 (Scopes::StateRegion, "set_owner_of_provinces", Vb(validate_owner_of_provinces)),
394 (Scopes::Pop, "set_pop_literacy", Vb(validate_pop_literacy)),
395 (Scopes::Pop, "set_pop_qualifications", UncheckedTodo), (Scopes::Pop, "set_pop_wealth", Vb(validate_pop_wealth)),
397 (Scopes::Country, "set_relations", Vb(validate_country_value)),
398 (Scopes::Country, "set_ruling_interest_groups", Vb(validate_ruling_ig)),
399 (Scopes::Party, "set_ruling_party", Yes),
400 (Scopes::Country, "set_secret_goal", Vb(validate_set_secret_goal)),
401 (Scopes::Country, "set_social_hierarchy", Item(Item::SocialHierarchy)),
402 (Scopes::State, "set_state_name", Item(Item::Localization)),
403 (Scopes::State, "set_state_owner", Scope(Scopes::Country)),
404 (Scopes::Country, "set_state_religion", Scope(Scopes::Religion)),
405 (Scopes::State, "set_state_type", Choice(STATE_TYPES)),
406 (Scopes::Country, "set_strategy", Item(Item::AiStrategy)),
407 (Scopes::Building, "set_subsidized", Boolean),
408 (Scopes::PoliticalMovement, "set_suppression", Boolean),
409 (Scopes::JournalEntry, "set_target_technology", Scope(Scopes::Technology)),
410 (
411 Scopes::Country,
412 "set_tariffs_export_priority",
413 Removed("1.9", "replaced by world market system"),
414 ),
415 (
416 Scopes::Country,
417 "set_tariffs_import_priority",
418 Removed("1.9", "replaced by world market system"),
419 ),
420 (Scopes::Country, "set_tariffs_no_priority", Removed("1.9", "replaced by world market system")),
421 (Scopes::Country, "set_tax_level", Item(Item::Level)),
422 (Scopes::Country, "set_tension", Vb(validate_country_value)),
423 (Scopes::None, "set_variable", Vbv(validate_set_variable)),
424 (Scopes::DiplomaticPlay, "set_war", Boolean),
425 (Scopes::None, "show_as_tooltip", Control),
426 (Scopes::StateRegion, "spawn_entity_effect", Vb(validate_spawn_entity_effect)),
427 (Scopes::None, "sort_global_variable_list", Vb(validate_sort)),
428 (Scopes::None, "sort_local_variable_list", Vb(validate_sort)),
429 (Scopes::None, "sort_variable_list", Vb(validate_sort)),
430 (Scopes::State, "start_building_construction", Item(Item::BuildingType)),
431 (Scopes::StateRegion, "start_earthquake_effect", Yes),
432 (Scopes::Country, "start_enactment", Scope(Scopes::LawType)),
433 (Scopes::StateRegion, "start_harvest_condition", Item(Item::HarvestConditionType)),
434 (Scopes::Country, "start_national_awakening", Vb(validate_national_awakening)),
435 (Scopes::State, "start_privately_funded_building_construction", Item(Item::BuildingType)),
436 (Scopes::Country, "start_research_random_technology", Yes),
437 (Scopes::None, "start_tutorial_lesson", Vb(validate_start_tutorial)),
438 (Scopes::None, "switch", Vb(validate_switch)),
439 (Scopes::Country, "take_on_scaled_debt", TargetValue("who", Scopes::Country, "value")),
440 (Scopes::MilitaryFormation, "teleport_to_front", Vbv(validate_teleport_to_front)),
441 (Scopes::Character, "transfer_character", Scope(Scopes::Country)),
442 (Scopes::Country, "transfer_subject", Scope(Scopes::Country)),
443 (Scopes::Character, "transfer_to_formation", Scope(Scopes::MilitaryFormation)),
444 (Scopes::None, "trigger_event", Vbv(validate_trigger_event)),
445 (Scopes::Country, "try_form_government_with", Vb(validate_form_government)),
446 (Scopes::State, "unset_available_for_autonomous_investment", Scope(Scopes::BuildingType)),
447 (Scopes::Country, "unset_only_legal_party", Yes),
448 (Scopes::Country, "update_party_support", Yes),
449 (Scopes::Country, "validate_subsidies", Boolean),
450 (Scopes::Country, "violate_sovereignty_join", Vb(validate_violate_sovereignty_join)),
451 (Scopes::None, "while", Control),
452 (Scopes::Treaty, "withdraw", Vb(validate_withdraw)),
453];