use std::sync::LazyLock;
use crate::ck3::tables::misc::{
AGENT_SLOT_CONTRIBUTION_TYPE, GOVERNMENT_RULES, LEGEND_QUALITY, OUTBREAK_INTENSITIES,
};
use crate::everything::Everything;
use crate::helpers::TigerHashMap;
use crate::item::Item;
use crate::report::{err, ErrorKey};
use crate::scopes::{ArgumentValue, Scopes};
use crate::token::Token;
use crate::trigger::Trigger;
use Trigger::*;
pub fn scope_trigger(name: &Token, data: &Everything) -> Option<(Scopes, Trigger)> {
let name_lc = name.as_str().to_ascii_lowercase();
if let result @ Some(_) = TRIGGER_MAP.get(&*name_lc).copied() {
return result;
}
if let Some(relation) = name_lc.strip_prefix("has_relation_") {
data.verify_exists_implied(Item::Relation, relation, name);
return Some((Scopes::Character, Trigger::Scope(Scopes::Character)));
}
if let Some(relation) = name_lc.strip_prefix("has_secret_relation_") {
data.verify_exists_implied(Item::Relation, relation, name);
return Some((Scopes::Character, Trigger::Scope(Scopes::Character)));
}
if let Some(relation) = name_lc.strip_prefix("num_of_relation_") {
data.verify_exists_implied(Item::Relation, relation, name);
return Some((Scopes::Character, Trigger::CompareValue));
}
if let Some(lifestyle) = name_lc.strip_prefix("perks_in_") {
data.verify_exists_implied(Item::Lifestyle, lifestyle, name);
return Some((Scopes::Character, Trigger::CompareValue));
}
if let Some(lifestyle) = name_lc.strip_suffix("_perk_points") {
data.verify_exists_implied(Item::Lifestyle, lifestyle, name);
return Some((Scopes::Character, Trigger::CompareValue));
}
if let Some(lifestyle) = name_lc.strip_suffix("_unlockable_perks") {
data.verify_exists_implied(Item::Lifestyle, lifestyle, name);
return Some((Scopes::Character, Trigger::CompareValue));
}
if let Some(part) = name_lc.strip_suffix("_perks") {
if data.item_exists(Item::DynastyLegacy, part) {
return Some((Scopes::Dynasty, Trigger::CompareValue));
}
if data.item_exists(Item::Lifestyle, part) {
return Some((Scopes::Character, Trigger::CompareValue));
}
let msg = format!("{part} not found as dynasty legacy or lifestyle");
err(ErrorKey::MissingItem).msg(msg).loc(name).push();
return if part.ends_with("_track") {
Some((Scopes::Dynasty, Trigger::CompareValue))
} else {
Some((Scopes::Character, Trigger::CompareValue))
};
}
if let Some(lifestyle) = name_lc.strip_suffix("_xp") {
data.verify_exists_implied(Item::Lifestyle, lifestyle, name);
return Some((Scopes::Character, Trigger::CompareValue));
}
std::option::Option::None
}
static TRIGGER_MAP: LazyLock<TigerHashMap<&'static str, (Scopes, Trigger)>> = LazyLock::new(|| {
let mut hash = TigerHashMap::default();
for (from, s, trigger) in TRIGGER.iter().copied() {
hash.insert(s, (from, trigger));
}
hash
});
const TRIGGER: &[(Scopes, &str, Trigger)] = &[
(Scopes::Accolade, "accolade_rank", CompareValue),
(Scopes::AccoladeType, "accolade_type_tier", Scope(Scopes::AccoladeType)),
(Scopes::LandedTitle, "active_de_jure_drift_progress", CompareValue),
(Scopes::all_but_none(), "add_to_temporary_list", Special),
(Scopes::Character, "age", CompareValue),
(Scopes::AgentSlot, "agent_slot_contribution", CompareValue),
(Scopes::AgentSlot, "agent_slot_has_contribution_type", Choice(AGENT_SLOT_CONTRIBUTION_TYPE)),
(Scopes::Character, "ai_boldness", CompareValue),
(Scopes::Character, "ai_compassion", CompareValue),
(
Scopes::Character,
"ai_diplomacy_stance",
Block(&[
("target", Scope(Scopes::Character)),
("stance", Choice(&["neutral", "threat", "enemy", "friend"])),
]),
),
(Scopes::Character, "ai_energy", CompareValue),
(Scopes::Character, "ai_greed", CompareValue),
(Scopes::Character, "ai_honor", CompareValue),
(Scopes::Character, "ai_rationality", CompareValue),
(Scopes::Character, "ai_sociability", CompareValue),
(
Scopes::Character,
"ai_values_divergence",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(Scopes::Character, "ai_vengefulness", CompareValue),
(Scopes::Character, "ai_zeal", CompareValue),
(Scopes::Character, "all_court_artifact_slots", Choice(&["empty", "full"])),
(Scopes::None, "all_false", Control),
(Scopes::Character, "all_inventory_artifact_slots", Choice(&["empty", "full"])),
(Scopes::Character, "allowed_concubines", Boolean),
(Scopes::Character, "allowed_more_concubines", Boolean),
(Scopes::Character, "allowed_more_spouses", Boolean),
(Scopes::None, "always", Boolean),
(
Scopes::Character,
"amenity_level",
Block(&[("type", Item(Item::Amenity)), ("+value", CompareValue)]),
),
(Scopes::None, "and", Control),
(Scopes::None, "any_false", Control),
(Scopes::Character, "appointment_candidate_accumulated_score", Block(&[("title", Scope(Scopes::LandedTitle)), ("+value", CompareValue)])),
(Scopes::Character, "appointment_candidate_score", Block(&[("title", Scope(Scopes::LandedTitle)), ("+value", CompareValue)])),
(
Scopes::Character,
"aptitude",
Block(&[("court_position", Item(Item::CourtPosition)), ("+value", CompareValue)]),
),
(Scopes::Army, "army_is_moving", Boolean),
(Scopes::Army, "army_max_size", CompareValue),
(Scopes::Army, "army_size", CompareValue),
(Scopes::Army, "army_supply", CompareValue),
(Scopes::Artifact, "artifact_durability", CompareValue),
(Scopes::Artifact, "artifact_max_durability", CompareValue),
(Scopes::Artifact, "artifact_slot_type", Item(Item::ArtifactSlotType)),
(Scopes::Artifact, "artifact_type", Item(Item::ArtifactType)),
(Scopes::None, "assert_if", Block(&[("limit", Control), ("?text", UncheckedValue)])),
(Scopes::None, "assert_read", UncheckedValue),
(Scopes::War, "attacker_war_score", CompareValue),
(Scopes::Character, "attraction", CompareValue),
(Scopes::Province, "available_loot", CompareValueWarnEq),
(Scopes::TaxSlot, "available_taxpayer_slots", CompareValue),
(Scopes::Character, "average_amenity_level", CompareValue),
(Scopes::Faction, "average_faction_opinion", CompareValue),
(Scopes::Faction, "average_faction_opinion_not_powerful_vassal", CompareValue),
(Scopes::Faction, "average_faction_opinion_powerful_vassal", CompareValue),
(Scopes::Inspiration, "base_inspiration_gold_cost", CompareValue),
(Scopes::Character, "base_weight", CompareValue),
(Scopes::LandedTitle.union(Scopes::Province), "building_levies", CompareValue),
(Scopes::LandedTitle.union(Scopes::Province), "building_max_garrison", CompareValue),
(Scopes::Province, "building_slots", CompareValue),
(Scopes::None, "calc_true_if", Control),
(Scopes::Character, "can_accept_task_contract", Scope(Scopes::TaskContract)),
(
Scopes::Character,
"can_add_hook",
Block(&[("target", Scope(Scopes::Character)), ("type", Item(Item::Hook))]),
),
(Scopes::Character, "can_appoint_for_title", Scope(Scopes::LandedTitle)),
(Scopes::Character, "can_arrive_in_time_to_activity_minimum", Scope(Scopes::Activity)),
(Scopes::Character, "can_assign_to_tax_slot", Scope(Scopes::TaxSlot)),
(Scopes::Character, "can_attack_in_hierarchy", Scope(Scopes::Character)),
(Scopes::Character, "can_be_acclaimed", Boolean),
(Scopes::Character, "can_be_child_of", Scope(Scopes::Character)),
(Scopes::Artifact, "can_be_claimed_by", Scope(Scopes::Character)),
(Scopes::Character, "can_be_employed_as", Item(Item::CourtPosition)),
(Scopes::Secret, "can_be_exposed_by", Scope(Scopes::Character)),
(Scopes::LandedTitle, "can_be_leased_out", Boolean),
(Scopes::Character, "can_be_parent_of", Scope(Scopes::Character)),
(Scopes::Character, "can_become_owner_of_legend", Scope(Scopes::Legend)),
(Scopes::Character, "can_benefit_from_artifact", Scope(Scopes::Artifact)),
(Scopes::TravelPlan, "can_cancel", Boolean),
(
Scopes::Character,
"can_create_faction",
Block(&[("type", Item(Item::Faction)), ("target", Scope(Scopes::Character))]),
),
(Scopes::Character, "can_create_maa", Item(Item::MenAtArms)),
(Scopes::Character, "can_create_task_contract", ItemOrBlock(Item::TaskContractType, &[("type_name", Item(Item::TaskContractType)), ("?employer", Scope(Scopes::Character))])),
(Scopes::LandedTitle, "can_create_title_maa", Item(Item::MenAtArms)),
(
Scopes::Character,
"can_declare_war",
Block(&[
("defender", Scope(Scopes::Character)),
("casus_belli", Item(Item::CasusBelli)),
("?target_titles", ScopeList(Scopes::LandedTitle)),
("?claimant", Scope(Scopes::Character)),
]),
),
(Scopes::Army, "can_disband_army", Boolean),
(Scopes::Character, "can_diverge", Boolean),
(Scopes::Character, "can_diverge_excluding_cost", Boolean),
(
Scopes::Character,
"can_embrace_tradition",
ScopeOrBlock(
Scopes::CultureTradition,
&[
("tradition", Scope(Scopes::CultureTradition)),
("?replace", Scope(Scopes::CultureTradition)),
],
),
),
(Scopes::Character, "can_employ_court_position_type", Item(Item::CourtPosition)),
(Scopes::Character, "can_equip_artifact", Scope(Scopes::Artifact)),
(Scopes::Character, "can_execute_decision", ScopeOrItem(Scopes::Decision, Item::Decision)),
(Scopes::CouncilTask, "can_fire_position", Boolean),
(Scopes::Culture, "can_get_innovation_from", Scope(Scopes::Culture)),
(Scopes::Character, "can_have_children", Boolean),
(Scopes::Character, "can_host_activity", ScopeOrItem(Scopes::ActivityType, Item::ActivityType)),
(Scopes::Character, "can_hybridize", Scope(Scopes::Culture)),
(Scopes::Character, "can_hybridize_excluding_cost", Scope(Scopes::Culture)),
(Scopes::Character, "can_join_activity", Scope(Scopes::Activity)),
(Scopes::Character, "can_join_faction", Scope(Scopes::Faction)),
(
Scopes::Character,
"can_join_or_create_faction_against",
ScopeOrBlock(
Scopes::Character,
&[
("who", Scope(Scopes::Character)),
("?faction", Item(Item::Faction)),
("?check_in_a_faction", Boolean),
],
),
),
(Scopes::Character, "can_sponsor_inspiration", Scope(Scopes::Inspiration)),
(
Scopes::Character,
"can_start_scheme",
Block(&[
("type", Item(Item::Scheme)),
("?target_character", Scope(Scopes::Character)),
("?target_title", Scope(Scopes::LandedTitle)),
("?target_culture", Scope(Scopes::Culture)),
("?target_faith", Scope(Scopes::Faith))
]),
),
(Scopes::None, "can_start_tutorial_lesson", UncheckedValue), (
Scopes::LandedTitle,
"can_title_create_faction",
Block(&[("type", Item(Item::Faction)), ("target", Scope(Scopes::Character))]),
),
(Scopes::LandedTitle, "can_title_join_faction", Scope(Scopes::Faction)),
(Scopes::Regiment, "can_upgrade_maa", Boolean),
(Scopes::Artifact, "category", Choice(&["inventory", "court"])),
(Scopes::Character, "character_has_commander_trait_scope_does_not", Scope(Scopes::Character)),
(Scopes::Character, "character_is_land_realm_neighbor", Scope(Scopes::Character)),
(Scopes::Character, "character_is_realm_neighbor", Scope(Scopes::Character)),
(Scopes::Character, "character_men_at_arms_expense_gold_relative", CompareValue),
(Scopes::Character, "character_men_at_arms_expense_prestige_relative", CompareValue),
(Scopes::Province, "combined_building_level", CompareValue),
(Scopes::Character, "completely_controls", Scope(Scopes::LandedTitle)),
(Scopes::Character, "completely_controls_region", ScopeOrItem(Scopes::GeographicalRegion, Item::Region)),
(Scopes::Faith, "controls_holy_site", Item(Item::HolySite)),
(Scopes::Faith, "controls_holy_site_with_flag", Item(Item::HolySiteFlag)),
(Scopes::Character, "council_task_monthly_progress", CompareValue),
(Scopes::LandedTitle, "county_control", CompareValue),
(Scopes::LandedTitle, "county_control_rate", Removed("1.12", "replaced by monthly_county_control_change")),
(Scopes::LandedTitle, "county_control_rate_modifier", Removed("1.12", "replaced by monthly_county_control_decline_factor and monthly_county_control_growth_factor")),
(Scopes::LandedTitle, "county_holder_opinion", CompareValue),
(Scopes::LandedTitle, "county_opinion", CompareValue),
(
Scopes::LandedTitle,
"county_opinion_target",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(Scopes::Character, "court_grandeur_base", CompareValue),
(Scopes::Character, "court_grandeur_current", CompareValue),
(Scopes::Character, "court_grandeur_current_level", CompareValue),
(Scopes::Character, "court_grandeur_minimum_expected", CompareValue),
(Scopes::Character, "court_grandeur_minimum_expected_level", CompareValue),
(Scopes::Character, "court_positions_currently_available", CompareValue),
(Scopes::Character, "court_positions_currently_filled", CompareValue),
(
Scopes::Character,
"create_faction_type_chance",
Block(&[
("type", Item(Item::Faction)),
("target", Scope(Scopes::Character)),
("+value", CompareValue),
]),
),
(
Scopes::Culture,
"cultural_acceptance",
Block(&[("target", Scope(Scopes::Culture)), ("+value", CompareValue)]),
),
(Scopes::Culture, "culture_age", CompareValueWarnEq),
(Scopes::Culture, "culture_number_of_counties", CompareValue),
(Scopes::Culture, "culture_overlaps_geographical_region", ScopeOrItem(Scopes::GeographicalRegion, Item::Region)),
(Scopes::None, "current_computer_date", CompareDate),
(Scopes::None, "current_computer_date_day", CompareValue),
(Scopes::None, "current_computer_date_month", CompareValue),
(Scopes::None, "current_computer_date_year", CompareValue),
(Scopes::TravelPlan, "current_danger_value", CompareValue),
(Scopes::None, "current_date", CompareDate),
(Scopes::None, "current_day", CompareValue),
(Scopes::Character, "current_military_strength", CompareValue),
(Scopes::None, "current_month", CompareValue),
(Scopes::None, "current_tooltip_depth", CompareValue),
(Scopes::Character, "current_weight", CompareValue),
(Scopes::Character, "current_weight_for_portrait", CompareValue),
(Scopes::None, "current_year", CompareValue),
(Scopes::None, "custom_description", Control),
(Scopes::None, "custom_tooltip", Special),
(Scopes::Character, "days_as_ruler", CompareValue),
(Scopes::Character, "days_in_prison", CompareValue),
(Scopes::Character, "days_of_continuous_peace", CompareValue),
(Scopes::Character, "days_of_continuous_war", CompareValue),
(Scopes::Inspiration, "days_since_creation", CompareValue),
(Scopes::Legend, "days_since_legend_completion", CompareValue),
(Scopes::Legend, "days_since_legend_start_date", CompareValue),
(Scopes::Character, "days_since_death", CompareValue),
(Scopes::Character, "days_since_joined_court", CompareValue),
(Scopes::War, "days_since_max_war_score", CompareValue),
(Scopes::Epidemic, "days_since_outbreak_start", CompareValue),
(Scopes::Province, "days_since_province_infection", Block(&[("epidemic", Scope(Scopes::Epidemic)), ("+value", CompareValue)])),
(Scopes::Inspiration, "days_since_sponsorship", CompareValue),
(Scopes::Character, "days_since_vassal_contract_liege_dynasty_reign_start", CompareValue),
(Scopes::TravelPlan, "days_travelled", CompareValue),
(Scopes::GreatHolyWar, "days_until_ghw_launch", CompareValue),
(
Scopes::LandedTitle,
"de_jure_drift_progress",
Block(&[("target", Scope(Scopes::LandedTitle)), ("+value", CompareValue)]),
),
(Scopes::LandedTitle, "de_jure_drifting_towards", Scope(Scopes::LandedTitle)),
(Scopes::Character, "death_reason", Item(Item::DeathReason)),
(Scopes::Character, "debt_level", CompareValue),
(Scopes::None, "debug_log", UncheckedValue),
(Scopes::None, "debug_log_details", UncheckedValue),
(Scopes::None, "debug_only", Boolean),
(Scopes::War, "defender_war_score", CompareValue),
(Scopes::TravelPlan, "departure_date", CompareValue),
(Scopes::LandedTitle, "development_level", CompareValue),
(Scopes::LandedTitle, "development_rate", CompareValue),
(Scopes::LandedTitle, "development_rate_modifier", CompareValue),
(Scopes::LandedTitle, "development_towards_level_increase", CompareValue),
(Scopes::Character, "diarch_aptitude", CompareValue),
(Scopes::Character, "diarch_loyalty", CompareValue),
(Scopes::Character, "diarchy_swing", CompareValue),
(Scopes::Character, "diplomacy", CompareValue),
(
Scopes::Character,
"diplomacy_diff",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue), ("?abs", Boolean)]),
),
(Scopes::Character, "diplomacy_for_portrait", CompareValue),
(Scopes::Faction, "discontent_per_month", CompareValue),
(Scopes::Character, "does_ai_liege_in_vassal_contract_desire_obligation_change", Boolean),
(Scopes::Character, "does_ai_vassal_in_vassal_contract_desire_obligation_change", Boolean),
(Scopes::Character, "domain_limit", CompareValue),
(Scopes::Character, "domain_limit_available", CompareValue),
(Scopes::Character, "domain_limit_percentage", CompareValue),
(Scopes::Character, "domain_size", CompareValue),
(Scopes::Character, "domain_size_excluding_grace_period", CompareValue),
(Scopes::Character, "dread", CompareValue),
(
Scopes::Character,
"dread_modified_ai_boldness",
Block(&[("dreaded_character", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(Scopes::Dynasty, "dynasty_can_unlock_relevant_perk", Boolean),
(Scopes::Dynasty, "dynasty_num_unlocked_perks", CompareValue),
(Scopes::Dynasty, "dynasty_prestige", CompareValueWarnEq),
(Scopes::Dynasty, "dynasty_prestige_level", CompareValue),
(Scopes::Character, "effective_age", CompareValue),
(Scopes::Character, "employs_court_position", Item(Item::CourtPosition)),
(Scopes::Character, "employs_tax_collector", Boolean),
(Scopes::Province, "epidemic_resistance", CompareValue),
(Scopes::Faith, "estimated_faith_strength", CompareValue),
(Scopes::None, "exists", Special),
(Scopes::Domicile, "external_domicile_building_slots", CompareValue),
(Scopes::Faction, "faction_can_press_demands", Boolean),
(Scopes::Faction, "faction_discontent", CompareValue),
(Scopes::Faction, "faction_is_at_war", Boolean),
(Scopes::Faction, "faction_is_type", Item(Item::Faction)),
(Scopes::Faction, "faction_power", CompareValue),
(Scopes::Faction, "faction_power_threshold", CompareValue),
(
Scopes::Faith,
"faith_hostility_level",
Block(&[("target", Scope(Scopes::Faith)), ("+value", CompareValue)]),
),
(Scopes::Faith, "faith_hostility_level_comparison", ScopeCompare(Scopes::Faith)),
(Scopes::Character, "fertility", CompareValue),
(Scopes::Faith, "fervor", CompareValue),
(Scopes::TravelPlan, "final_destination_arrival_date", CompareDate),
(Scopes::TravelPlan, "final_destination_arrival_days", CompareValue),
(Scopes::TravelPlan, "final_destination_progress", CompareValue),
(Scopes::Character, "focus_progress", CompareValue),
(Scopes::Province, "fort_level", CompareValue),
(Scopes::Province, "free_building_slots", CompareValue),
(Scopes::Domicile, "free_external_domicile_building_slots", CompareValue),
(Scopes::Culture, "free_tradition_slot", CompareValue),
(Scopes::None, "game_start_date", CompareDate),
(Scopes::Province, "geographical_region", ScopeOrItem(Scopes::GeographicalRegion, Item::Region)),
(Scopes::GreatHolyWar, "ghw_attackers_strength", CompareValue),
(Scopes::GreatHolyWar, "ghw_defenders_strength", CompareValue),
(Scopes::GreatHolyWar, "ghw_war_chest_gold", CompareValueWarnEq),
(Scopes::GreatHolyWar, "ghw_war_chest_piety", CompareValueWarnEq),
(Scopes::GreatHolyWar, "ghw_war_chest_prestige", CompareValueWarnEq),
(
Scopes::None,
"global_variable_list_size",
Block(&[("name", UncheckedValue), ("+value", CompareValue)]),
),
(Scopes::Character, "gold", CompareValueWarnEq),
(Scopes::Character, "government_allows", Choice(GOVERNMENT_RULES)),
(Scopes::Character, "government_disallows", Choice(GOVERNMENT_RULES)),
(Scopes::Character, "government_has_flag", Item(Item::GovernmentFlag)),
(Scopes::Accolade, "has_accolade_category", Item(Item::AccoladeCategory)),
(Scopes::Accolade, "has_accolade_parameter", Item(Item::AccoladeParameter)),
(Scopes::Accolade, "has_accolade_type", Item(Item::AccoladeType)),
(Scopes::Character, "has_active_diarchy", Boolean),
(Scopes::Activity, "has_active_locale", Item(Item::ActivityLocale)),
(Scopes::Character, "has_active_mandate", Item(Item::DiarchyMandate)),
(Scopes::Character, "has_activity_intent", Item(Item::ActivityIntent)),
(
Scopes::Activity,
"has_activity_option",
Block(&[
("category", Item(Item::ActivityOptionCategory)),
("option", Item(Item::ActivityOption)),
]),
),
(Scopes::Character, "has_activity_state", Item(Item::ActivityState)),
(Scopes::Activity, "has_activity_type", ScopeOrItem(Scopes::ActivityType, Item::ActivityType)),
(
Scopes::Culture,
"has_all_innovations",
Block(&[
("?with_flag", Item(Item::InnovationFlag)),
("?without_flag", Item(Item::InnovationFlag)),
("?culture_era", Item(Item::CultureEra)),
]),
),
(Scopes::Faith, "has_allowed_gender_for_clergy", Scope(Scopes::Character)),
(Scopes::Character, "has_any_artifact", Boolean),
(Scopes::Character, "has_any_artifact_claim", Boolean),
(Scopes::Character, "has_any_cb_on", Scope(Scopes::Character)),
(Scopes::Character, "has_any_court_position", Boolean),
(Scopes::Character, "has_any_display_cb_on", Scope(Scopes::Character)),
(Scopes::Character, "has_any_focus", Boolean),
(Scopes::Character, "has_any_nickname", Boolean),
(Scopes::Character, "has_any_scripted_relation", Scope(Scopes::Character)),
(Scopes::Character, "has_any_secret_relation", Scope(Scopes::Character)),
(Scopes::Character, "has_any_secrets", Boolean),
(Scopes::Character, "has_any_unequipped_artifact", Boolean),
(Scopes::Character, "has_appointment_invested_character", Scope(Scopes::Character)),
(Scopes::Character, "has_appointment_invested_title", Scope(Scopes::LandedTitle)),
(Scopes::Character, "has_artifact_claim", Scope(Scopes::Artifact)),
(Scopes::Artifact, "has_artifact_feature", Item(Item::ArtifactFeature)),
(Scopes::Artifact, "has_artifact_feature_group", Item(Item::ArtifactFeatureGroup)),
(Scopes::Artifact, "has_artifact_modifier", Item(Item::Modifier)),
(Scopes::Character, "has_away_hostages", Boolean),
(Scopes::Character, "has_bad_nickname", Boolean),
(Scopes::Character, "has_banish_reason", Scope(Scopes::Character)),
(Scopes::Province, "has_building", Item(Item::Building)),
(Scopes::Culture, "has_building_gfx", Item(Item::BuildingGfx)),
(Scopes::Province, "has_building_or_higher", Item(Item::Building)),
(
Scopes::Province,
"has_building_with_flag",
ItemOrBlock(
Item::BuildingFlag,
&[("flag", Item(Item::BuildingFlag)), ("?count", CompareValue)],
),
),
(
Scopes::Character,
"has_cb_on",
Block(&[("target", Scope(Scopes::Character)), ("?cb", Item(Item::CasusBelli)), ("?casus_belli", Item(Item::CasusBelli))]),
),
(Scopes::Character, "has_character_flag", UncheckedValue),
(Scopes::Character, "has_character_modifier", Item(Item::Modifier)),
(
Scopes::Character,
"has_character_modifier_duration_remaining",
Block(&[
("modifier", Item(Item::Modifier)),
("*days", CompareValue),
("*weeks", CompareValue),
("*months", CompareValue),
("*years", CompareValue),
]),
),
(Scopes::LandedTitle, "has_character_nominiated", Scope(Scopes::Character)), (Scopes::Character, "has_claim_on", Scope(Scopes::LandedTitle)),
(Scopes::Culture, "has_clothing_gfx", Item(Item::ClothingGfx)),
(Scopes::Culture, "has_coa_gfx", Item(Item::CoaGfx)),
(
Scopes::Character,
"has_completed_activity_intent",
ItemOrBlock(
Item::ActivityIntent,
&[("type", Item(Item::ActivityIntent)), ("?target", Scope(Scopes::Character))],
),
),
(Scopes::Character, "has_completed_inspiration", Boolean),
(Scopes::Province, "has_construction_with_flag", Item(Item::BuildingFlag)),
(Scopes::Character, "has_contact", Scope(Scopes::Character)),
(Scopes::Character, "has_council", Boolean),
(Scopes::Character, "has_council_position", Item(Item::CouncilPosition)),
(
Scopes::Character,
"has_councillor_for_skill",
Choice(&[
"diplomacy",
"intrigue",
"learning",
"martial",
"prowess",
"stewardship",
"general",
]),
),
(Scopes::LandedTitle, "has_county_modifier", Item(Item::Modifier)),
(
Scopes::LandedTitle,
"has_county_modifier_duration_remaining",
Block(&[
("modifier", Item(Item::Modifier)),
("*days", CompareValue),
("*weeks", CompareValue),
("*months", CompareValue),
("*years", CompareValue),
]),
),
(Scopes::Character, "has_court_language", Item(Item::Language)),
(Scopes::Character, "has_court_language_of_culture", Scope(Scopes::Culture)),
(Scopes::Character, "has_court_position", Item(Item::CourtPosition)),
(Scopes::Character, "has_court_type", Item(Item::CourtType)),
(Scopes::Culture, "has_cultural_era_or_later", Item(Item::CultureEra)),
(Scopes::Culture, "has_cultural_parameter", Item(Item::CultureParameter)),
(Scopes::Culture, "has_cultural_pillar", Item(Item::CulturePillar)),
(
Scopes::Culture,
"has_cultural_tradition",
ScopeOrItem(Scopes::CultureTradition, Item::CultureTradition),
),
(Scopes::Character, "has_culture", Scope(Scopes::Culture)),
(Scopes::Activity, "has_current_phase", Item(Item::ActivityPhase)),
(Scopes::Character, "has_de_jure_claim_on", Scope(Scopes::Character)),
(Scopes::Character, "has_dead_character_flag", UncheckedValue),
(Scopes::Character, "has_dead_character_variable", UncheckedValue),
(Scopes::Character, "has_diarchy_active_parameter", Item(Item::DiarchyParameter)),
(Scopes::Character, "has_diarchy_parameter", Item(Item::DiarchyParameter)),
(Scopes::Character, "has_diarchy_type", Item(Item::DiarchyType)),
(Scopes::LandedTitle, "has_disabled_building", Boolean),
(Scopes::Character, "has_divorce_reason", Scope(Scopes::Character)),
(Scopes::None, "has_dlc", Item(Item::DlcName)),
(Scopes::None, "has_dlc_feature", Item(Item::DlcFeature)),
(Scopes::Faith, "has_doctrine", ScopeOrItem(Scopes::Doctrine, Item::Doctrine)),
(Scopes::Faith, "has_doctrine_parameter", Item(Item::DoctrineParameter)),
(Scopes::Character, "has_domicile", Boolean),
(Scopes::Domicile, "has_domicile_building", Item(Item::DomicileBuilding)),
(Scopes::Domicile, "has_domicile_building_or_higher", Item(Item::DomicileBuilding)),
(Scopes::Domicile, "has_domicile_construction", Item(Item::DomicileBuilding)),
(Scopes::Domicile, "has_domicile_parameter", Item(Item::DomicileParameter)),
(Scopes::Character, "has_domicile_temperament_high", Boolean),
(Scopes::Character, "has_domicile_temperament_low", Boolean),
(Scopes::Character, "has_domicile_temperament_neutral", Boolean),
(Scopes::Faith, "has_dominant_ruling_gender", Scope(Scopes::Character)),
(
Scopes::Character,
"has_dread_level_towards",
Block(&[("target", Scope(Scopes::Character)), ("level", CompareValue)]),
),
(Scopes::Character, "has_dynasty", Boolean),
(Scopes::Dynasty, "has_dynasty_modifier", Item(Item::Modifier)),
(
Scopes::Dynasty,
"has_dynasty_modifier_duration_remaining",
Block(&[
("modifier", Item(Item::Modifier)),
("*days", CompareValue),
("*weeks", CompareValue),
("*months", CompareValue),
("*years", CompareValue),
]),
),
(Scopes::Dynasty, "has_dynasty_perk", Item(Item::DynastyPerk)),
(
Scopes::Character,
"has_election_vote_of",
Block(&[("who", Scope(Scopes::Character)), ("title", Scope(Scopes::LandedTitle))]),
),
(Scopes::Character, "has_employed_any_court_position", Boolean),
(Scopes::Character, "has_execute_reason", Scope(Scopes::Character)),
(Scopes::Character, "has_faith", Scope(Scopes::Faith)),
(Scopes::Character, "has_father", Boolean),
(Scopes::Character, "has_focus", Item(Item::Focus)),
(Scopes::GreatHolyWar, "has_forced_defender", Scope(Scopes::Character)),
(Scopes::Province, "has_free_building_slot", Boolean),
(Scopes::Character, "has_free_council_slot", Boolean),
(Scopes::None, "has_game_rule", Item(Item::GameRuleSetting)),
(Scopes::Character, "has_gene", Special),
(Scopes::None, "has_global_variable", UncheckedValue),
(Scopes::None, "has_global_variable_list", UncheckedValue),
(Scopes::Character, "has_government", Item(Item::GovernmentType)),
(Scopes::Faith, "has_graphical_faith", Item(Item::GraphicalFaith)),
(Scopes::Character, "has_had_focus_for_days", CompareValue),
(Scopes::Province, "has_holding", Boolean),
(Scopes::Province, "has_holding_type", Item(Item::HoldingType)),
(Scopes::LandedTitle, "has_holy_site_flag", Item(Item::HolySiteFlag)),
(Scopes::Character, "has_hook", Scope(Scopes::Character)),
(Scopes::Character, "has_hook_from_secret", Scope(Scopes::Secret)),
(
Scopes::Character,
"has_hook_of_type",
Block(&[("target", Scope(Scopes::Character)), ("type", Item(Item::Hook))]),
),
(Scopes::DynastyHouse, "has_house_artifact_claim", Scope(Scopes::Artifact)),
(Scopes::DynastyHouse, "has_house_modifier", Item(Item::Modifier)),
(
Scopes::DynastyHouse,
"has_house_modifier_duration_remaining",
Block(&[
("modifier", Item(Item::Modifier)),
("*days", CompareValue),
("*weeks", CompareValue),
("*months", CompareValue),
("*years", CompareValue),
]),
),
(Scopes::DynastyHouse, "has_house_unity", Boolean),
(Scopes::DynastyHouse, "has_house_unity_modifier", Item(Item::Modifier)),
(
Scopes::DynastyHouse,
"has_house_unity_modifier_duration_remaining",
Block(&[
("modifier", Item(Item::Modifier)),
("*days", CompareValue),
("*weeks", CompareValue),
("*months", CompareValue),
("*years", CompareValue),
]),
),
(Scopes::DynastyHouse, "has_house_unity_parameter", Item(Item::HouseUnityParameter)),
(Scopes::DynastyHouse, "has_house_unity_stage", Item(Item::HouseUnityStage)),
(Scopes::Faith, "has_icon", Item(Item::FaithIcon)),
(Scopes::Character, "has_imprisonment_reason", Scope(Scopes::Character)),
(Scopes::Character, "has_inactive_trait", Item(Item::Trait)),
(Scopes::Culture, "has_innovation", Item(Item::Innovation)),
(Scopes::Culture, "has_innovation_flag", Item(Item::InnovationFlag)),
(Scopes::Inspiration, "has_inspiration_type", Item(Item::Inspiration)),
(Scopes::Legend, "has_legend_chapter", ItemOrBlock(Item::LegendChapter, &[("name", Item(Item::LegendChapter)), ("?localization_key", UncheckedValue)])),
(Scopes::Legend, "has_legend_chronicle", Item(Item::LegendChronicle)),
(Scopes::Legend, "has_legend_county_modifier", Item(Item::Modifier)),
(Scopes::Legend, "has_legend_county_modifier_duration_remaining", UncheckedValue),
(Scopes::Legend, "has_legend_owner_modifier", Item(Item::Modifier)),
(Scopes::Legend, "has_legend_owner_modifier_duration_remaining", UncheckedValue),
(Scopes::Legend, "has_legend_province_modifier", Item(Item::Modifier)),
(Scopes::Legend, "has_legend_province_modifier_duration_remaining", UncheckedValue),
(Scopes::Character, "has_legitimacy", Boolean),
(Scopes::Character, "has_legitimacy_flag", Item(Item::LegitimacyFlag)),
(Scopes::Character, "has_lifestyle", Item(Item::Lifestyle)),
(Scopes::None, "has_local_player_open_court_event", Boolean),
(Scopes::None, "has_local_player_seen_unopened_court_event", Boolean),
(Scopes::None, "has_local_player_unopened_court_event", Boolean),
(Scopes::None, "has_local_variable", UncheckedValue),
(Scopes::None, "has_local_variable_list", UncheckedValue),
(Scopes::CombatSide, "has_maa_of_type", Item(Item::MenAtArms)),
(Scopes::None, "has_map_mode", Item(Item::MapMode)),
(Scopes::CharacterMemory, "has_memory_category", Item(Item::MemoryCategory)),
(Scopes::CharacterMemory, "has_memory_participant", Scope(Scopes::Character)),
(Scopes::CharacterMemory, "has_memory_type", Item(Item::MemoryType)),
(Scopes::Character, "has_mother", Boolean),
(Scopes::None, "has_multiple_players", Boolean),
(Scopes::Culture, "has_name_list", Item(Item::NameList)),
(Scopes::Character, "has_nickname", Item(Item::Nickname)),
(Scopes::Province, "has_ongoing_construction", Boolean),
(Scopes::Domicile, "has_ongoing_domicile_construction", Boolean),
(
Scopes::Character,
"has_opinion_modifier",
Block(&[
("target", Scope(Scopes::Character)),
("modifier", Item(Item::OpinionModifier)),
("*value", CompareValue),
]),
),
(Scopes::Character, "has_opposite_relation", Item(Item::Relation)),
(Scopes::LandedTitle, "has_order_of_succession", Choice(&["election", "appointment"])),
(Scopes::Character, "has_outstanding_artifact_claims", Boolean),
(Scopes::Character, "has_owned_scheme", Boolean),
(Scopes::Character, "has_pending_court_events", Boolean),
(Scopes::Character, "has_pending_interaction_of_type", Item(Item::CharacterInteraction)),
(Scopes::Character, "has_perk", Item(Item::Perk)),
(Scopes::Character, "has_personal_artifact_claim", Scope(Scopes::Artifact)),
(Scopes::Character, "has_personal_legend_seed", ScopeOrItem(Scopes::LegendType, Item::LegendType)),
(
Scopes::Activity,
"has_phase",
ItemOrBlock(
Item::ActivityPhase,
&[("?type", Item(Item::ActivityPhase)), ("?location", Scope(Scopes::Province))],
),
),
(
Scopes::Activity,
"has_phase_future",
ItemOrBlock(
Item::ActivityPhase,
&[("?type", Item(Item::ActivityPhase)), ("?location", Scope(Scopes::Province))],
),
),
(
Scopes::Activity,
"has_phase_past",
ItemOrBlock(
Item::ActivityPhase,
&[("?type", Item(Item::ActivityPhase)), ("?location", Scope(Scopes::Province))],
),
),
(Scopes::GreatHolyWar, "has_pledged_attacker", Scope(Scopes::Character)),
(Scopes::GreatHolyWar, "has_pledged_defender", Scope(Scopes::Character)),
(Scopes::Character, "has_potential_acclaimed_knights", Boolean),
(Scopes::Accolade, "has_potential_accolade_successors", Boolean),
(Scopes::Faith, "has_preferred_gender_for_clergy", Scope(Scopes::Character)),
(Scopes::Culture, "has_primary_name_list", Item(Item::NameList)),
(Scopes::Character, "has_primary_title", Scope(Scopes::LandedTitle)),
(Scopes::Character, "has_prisoners", Boolean),
(Scopes::Province, "has_province_modifier", Item(Item::Modifier)),
(
Scopes::Province,
"has_province_modifier_duration_remaining",
Block(&[
("modifier", Item(Item::Modifier)),
("*days", CompareValue),
("*weeks", CompareValue),
("*months", CompareValue),
("*years", CompareValue),
]),
),
(Scopes::Character, "has_raid_immunity_against", Scope(Scopes::Character)),
(Scopes::Character, "has_raised_armies", Boolean),
(Scopes::Character, "has_realm_law", Item(Item::Law)),
(Scopes::Character, "has_realm_law_flag", Item(Item::LawFlag)),
(
Scopes::Character,
"has_relation_flag",
Block(&[
("target", Scope(Scopes::Character)),
("relation", Item(Item::Relation)),
("flag", Item(Item::RelationFlag)),
]),
),
(Scopes::Character, "has_relation_to", Scope(Scopes::Character)),
(Scopes::Character, "has_religion", Scope(Scopes::Religion)),
(Scopes::LandedTitle, "has_revokable_lease", Boolean),
(Scopes::Character, "has_revoke_title_reason", Scope(Scopes::Character)),
(Scopes::None, "has_reward_item", Item(Item::RewardItem)),
(Scopes::Character, "has_royal_court", Boolean),
(Scopes::Character, "has_same_court_language", Scope(Scopes::Character)),
(Scopes::Character, "has_same_court_type_as", Scope(Scopes::Character)),
(Scopes::Character, "has_same_culture_as", Scope(Scopes::Character)),
(Scopes::Culture, "has_same_culture_ethos", Scope(Scopes::Culture)),
(Scopes::Culture, "has_same_culture_heritage", Scope(Scopes::Culture)),
(Scopes::Culture, "has_same_culture_language", Scope(Scopes::Culture)),
(Scopes::Culture, "has_same_culture_martial_tradition", Scope(Scopes::Culture)),
(Scopes::Character, "has_same_focus_as", Scope(Scopes::Character)),
(Scopes::Character, "has_same_government", Scope(Scopes::Character)),
(Scopes::Character, "has_same_sinful_trait", Scope(Scopes::Character)),
(Scopes::Character, "has_same_virtue_trait", Scope(Scopes::Character)),
(Scopes::Character, "has_scheme_countermeasure_parameter", Item(Item::CountermeasureParameter)),
(Scopes::Scheme, "has_scheme_modifier", Item(Item::Modifier)),
(Scopes::Character, "has_selected_mandate", Item(Item::DiarchyMandate)),
(Scopes::Character, "has_sexuality", Item(Item::Sexuality)),
(Scopes::Character, "has_spawned_court_events", Boolean),
(Scopes::Province, "has_special_building", Boolean),
(Scopes::Province, "has_special_building_slot", Boolean),
(Scopes::Faction, "has_special_character", Boolean),
(Scopes::Faction, "has_special_title", Boolean),
(Scopes::Province, "has_stationed_regiment", Boolean),
(Scopes::Province, "has_stationed_regiment_of_base_type", Item(Item::MenAtArmsBase)),
(Scopes::Character, "has_strong_claim_on", Scope(Scopes::LandedTitle)),
(Scopes::Character, "has_strong_hook", Scope(Scopes::Character)),
(Scopes::Character, "has_strong_implicit_claim_on", Scope(Scopes::LandedTitle)),
(Scopes::Character, "has_strong_usable_hook", Scope(Scopes::Character)),
(Scopes::Struggle, "has_struggle_phase_parameter", Item(Item::StrugglePhaseParameter)),
(Scopes::Character, "has_succession_appointment_investors", Scope(Scopes::LandedTitle)),
(Scopes::Character, "has_targeting_faction", Boolean),
(Scopes::TaskContract, "has_task_contract_group", Item(Item::TaskContractGroup)),
(Scopes::TaskContract, "has_task_contract_type", Item(Item::TaskContractType)),
(Scopes::Character, "has_tax_collector", Boolean),
(Scopes::Character, "has_title", Scope(Scopes::LandedTitle)),
(Scopes::LandedTitle, "has_title_law", Item(Item::Law)),
(Scopes::LandedTitle, "has_title_law_flag", Item(Item::LawFlag)),
(Scopes::CultureTradition, "has_tradition_category", Item(Item::CultureTraditionCategory)),
(Scopes::Character, "has_trait", ScopeOrItem(Scopes::Trait, Item::Trait)),
(Scopes::Trait, "has_trait_category", Item(Item::TraitCategory)),
(Scopes::Trait, "has_trait_flag", Item(Item::TraitFlag)),
(
Scopes::Character,
"has_trait_rank",
Block(&[
("trait", Item(Item::Trait)),
("*rank", CompareValue),
("*character", CompareToScope(Scopes::Character)),
]),
),
(Scopes::Character, "has_trait_with_flag", Item(Item::TraitFlag)),
(
Scopes::Character,
"has_trait_xp",
Block(&[
("trait", Item(Item::Trait)),
("?track", Item(Item::TraitTrack)),
("+value", CompareValue),
]),
),
(Scopes::TravelPlan, "has_travel_option", Item(Item::TravelOption)),
(Scopes::TravelPlan, "has_travel_plan_modifier", Item(Item::Modifier)),
(Scopes::TravelPlan, "has_travel_plan_modifier_duration_remaining", UncheckedValue),
(Scopes::Province, "has_travel_point_of_interest", Item(Item::PointOfInterest)),
(Scopes::Character, "has_triggered_legend_seed", Item(Item::LegendSeed)),
(Scopes::Character, "has_truce", Scope(Scopes::Character)),
(Scopes::Culture, "has_unit_gfx", Item(Item::UnitGfx)),
(Scopes::Character, "has_usable_hook", Scope(Scopes::Character)),
(Scopes::LandedTitle, "has_user_set_coa", Boolean),
(Scopes::War, "has_valid_casus_belli", Boolean),
(Scopes::None, "has_variable", UncheckedValue),
(Scopes::None, "has_variable_list", UncheckedValue),
(Scopes::Character, "has_vassal_stance", Item(Item::VassalStance)),
(
Scopes::None,
"has_war_result_message_with_outcome",
Choice(&["victory", "defeat", "white_peace", "invalidated", "any"]),
),
(Scopes::Character, "has_weak_claim_on", Scope(Scopes::LandedTitle)),
(Scopes::Character, "has_weak_hook", Scope(Scopes::Character)),
(Scopes::Character, "has_weak_implicit_claim_on", Scope(Scopes::LandedTitle)),
(Scopes::LandedTitle, "has_wrong_holding_type", Boolean),
(Scopes::Character, "health", CompareValue),
(Scopes::Character, "highest_held_title_tier", CompareValue),
(Scopes::Character, "highest_skill", Item(Item::Skill)),
(Scopes::Character, "highest_skill_including_prowess", Item(Item::Skill)),
(Scopes::Character, "holds_landed_title", Boolean),
(Scopes::Faith, "holy_sites_controlled", CompareValue),
(
Scopes::Character,
"hostage_duration",
Block(&[
("*days", CompareValue),
("*weeks", CompareValue),
("*months", CompareValue),
("*years", CompareValue),
]),
),
(Scopes::DynastyHouse, "house_land_share_in_realm", Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValueWarnEq)])),
(Scopes::DynastyHouse, "house_power", CompareValueWarnEq),
(Scopes::DynastyHouse, "house_unity_value", CompareValueWarnEq),
(Scopes::Character, "important_action_is_valid_but_invisible", Item(Item::ImportantAction)),
(Scopes::Character, "important_action_is_visible", Item(Item::ImportantAction)),
(Scopes::Character, "in_diplomatic_range", Scope(Scopes::Character)),
(Scopes::Character, "influence", CompareValueWarnEq),
(Scopes::Character, "influence_level", CompareValue),
(Scopes::Inspiration, "inspiration_gold_invested", CompareValueWarnEq),
(Scopes::Inspiration, "inspiration_progress", CompareValue),
(Scopes::Character, "intrigue", CompareValue),
(
Scopes::Character,
"intrigue_diff",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue), ("?abs", Boolean)]),
),
(Scopes::Character, "intrigue_for_portrait", CompareValue),
(Scopes::Character, "is_a_faction_leader", Boolean),
(Scopes::Character, "is_a_faction_member", Boolean),
(Scopes::TravelPlan, "is_aborted", Boolean),
(Scopes::Character, "is_acclaimed", Boolean),
(Scopes::Accolade, "is_accolade_active", Boolean),
(Scopes::Character, "is_accolade_successor", Boolean),
(Scopes::TaxSlot, "is_active_obligation", Item(Item::TaxSlotObligation)),
(Scopes::Activity, "is_activity_complete", Boolean),
(Scopes::Character, "is_activity_type_on_cooldown", Scope(Scopes::ActivityType)),
(Scopes::Character, "is_adult", Boolean),
(Scopes::Character, "is_agent_exposed_in_scheme", Scope(Scopes::Scheme)),
(Scopes::AgentSlot, "is_agent_slot_type", Item(Item::AgentType)),
(Scopes::Character, "is_ai", Boolean),
(Scopes::Character, "is_alive", Boolean),
(Scopes::Character, "is_allied_in_war", Scope(Scopes::Character)),
(Scopes::Character, "is_allied_to", Scope(Scopes::Character)),
(Scopes::Army, "is_army_in_combat", Boolean),
(Scopes::Army, "is_army_in_raid", Boolean),
(Scopes::Army, "is_army_in_siege", Boolean),
(Scopes::Army, "is_army_in_siege_relevant_for", Scope(Scopes::Character)),
(Scopes::Character, "is_at_home", Boolean),
(Scopes::Character, "is_at_location", Scope(Scopes::Province)),
(Scopes::Character, "is_at_same_location", Scope(Scopes::Character)),
(Scopes::Character, "is_at_war", Boolean),
(Scopes::Character, "is_at_war_as_attacker", Boolean),
(Scopes::Character, "is_at_war_as_defender", Boolean),
(Scopes::Character, "is_at_war_with", Scope(Scopes::Character)),
(Scopes::Character, "is_at_war_with_liege", Boolean),
(Scopes::War, "is_attacker", Scope(Scopes::Character)),
(Scopes::Character, "is_attacker_in_war", Scope(Scopes::War)),
(Scopes::Character, "is_attracted_to_gender_of", Scope(Scopes::Character)),
(Scopes::Character, "is_attracted_to_men", Boolean),
(Scopes::Character, "is_attracted_to_women", Boolean),
(Scopes::Character, "is_away_from_court", Boolean),
(Scopes::None, "is_bad_nickname", Item(Item::Nickname)),
(Scopes::Character, "is_betrothed", Boolean),
(Scopes::TravelPlan, "is_cancelled", Boolean),
(Scopes::LandedTitle, "is_capital_barony", Boolean),
(Scopes::Character, "is_causing_raid_hostility_towards", Scope(Scopes::Character)),
(
Scopes::Character,
"is_character_interaction_potentially_accepted",
Block(&[
("recipient", ScopeOkThis(Scopes::Character)),
("interaction", Item(Item::CharacterInteraction)),
("?secondary_actor", ScopeOkThis(Scopes::Character)),
("?secondary_recipient", ScopeOkThis(Scopes::Character)),
("?target_title", Scope(Scopes::LandedTitle)),
]),
),
(
Scopes::Character,
"is_character_interaction_shown",
Block(&[
("recipient", ScopeOkThis(Scopes::Character)),
("interaction", Item(Item::CharacterInteraction)),
]),
),
(
Scopes::Character,
"is_character_interaction_valid",
Block(&[
("recipient", ScopeOkThis(Scopes::Character)),
("interaction", Item(Item::CharacterInteraction)),
]),
),
(Scopes::Character, "is_character_window_main_character", Boolean),
(Scopes::Character, "is_child_of", Scope(Scopes::Character)),
(Scopes::War, "is_civil_war", Boolean),
(Scopes::Character, "is_claimant", Boolean),
(Scopes::Character, "is_clergy", Boolean),
(Scopes::Character, "is_close_family_of", Scope(Scopes::Character)),
(Scopes::Character, "is_close_or_extended_family_of", Scope(Scopes::Character)),
(Scopes::Province, "is_coastal", Boolean),
(Scopes::LandedTitle, "is_coastal_county", Boolean),
(Scopes::CombatSide, "is_combat_side_attacker", Boolean),
(Scopes::CombatSide, "is_combat_side_pursuing", Boolean),
(Scopes::CombatSide, "is_combat_side_retreating", Boolean),
(Scopes::Character, "is_commanding_army", Boolean),
(Scopes::TravelPlan, "is_completed", Boolean),
(Scopes::Character, "is_concubine", Boolean),
(Scopes::Character, "is_concubine_of", Scope(Scopes::Character)),
(
Scopes::LandedTitle,
"is_connected_to",
Block(&[
("?max_naval_distance", SetValue),
("?allow_one_county_land_gap", Boolean),
("target", Scope(Scopes::LandedTitle)),
]),
),
(Scopes::Character, "is_consort_of", Scope(Scopes::Character)),
(Scopes::Character, "is_contact_of", Scope(Scopes::Character)),
(Scopes::LandedTitle, "is_contested", Boolean),
(
Scopes::Character,
"is_council_task_valid",
Block(&[
("task_type", Item(Item::CouncilTask)),
("?target", Scope(Scopes::Character.union(Scopes::LandedTitle))),
]),
),
(Scopes::Character, "is_councillor", Boolean),
(Scopes::Character, "is_councillor_of", Scope(Scopes::Character)),
(Scopes::Province, "is_county_capital", Boolean),
(
Scopes::Character,
"is_court_position_employer",
Block(&[("court_position", Item(Item::CourtPosition)), ("who", Scope(Scopes::Character))]),
),
(Scopes::Character, "is_courtier", Boolean),
(Scopes::Character, "is_courtier_of", Scope(Scopes::Character)),
(Scopes::Character, "is_cousin_of", Scope(Scopes::Character)),
(Scopes::TaskContract, "is_criminal", Boolean),
(Scopes::Secret, "is_criminal_for", Scope(Scopes::Character)),
(Scopes::Struggle, "is_culture_involved_in_struggle", Scope(Scopes::Culture)),
(Scopes::Activity, "is_current_phase_active", Boolean),
(Scopes::LandedTitle, "is_de_facto_liege_or_above_target", Scope(Scopes::LandedTitle)),
(Scopes::LandedTitle, "is_de_jure_liege_or_above_target", Scope(Scopes::LandedTitle)),
(Scopes::Character, "is_decision_on_cooldown", ScopeOrItem(Scopes::Decision, Item::Decision)),
(Scopes::War, "is_defender", Scope(Scopes::Character)),
(Scopes::Character, "is_defender_in_war", Scope(Scopes::War)),
(Scopes::Character, "is_designated_diarch", Boolean),
(Scopes::Character, "is_diarch", Boolean),
(Scopes::Character, "is_diarch_of_target", Scope(Scopes::Character)),
(Scopes::Character, "is_diarchy_successor", Boolean),
(Scopes::GreatHolyWar, "is_directed_ghw", Boolean),
(Scopes::Culture, "is_divergent_culture", Boolean),
(Scopes::Domicile, "is_domicile_type", Item(Item::DomicileType)),
(Scopes::DynastyHouse, "is_dominant_family", Boolean),
(Scopes::DynastyHouse, "is_powerful_family", Boolean),
(Scopes::Character, "is_employer_of", Scope(Scopes::Character)),
(Scopes::Artifact, "is_equipped", Boolean),
(Scopes::Regiment, "is_event_maa_regiment", Boolean),
(Scopes::Character, "is_extended_family_of", Scope(Scopes::Character)),
(Scopes::Struggle, "is_faith_involved_in_struggle", Scope(Scopes::Faith)),
(Scopes::Character, "is_favorite_child", Boolean),
(Scopes::Character, "is_female", Boolean),
(Scopes::AgentSlot, "is_filled", Boolean),
(Scopes::Character, "is_forbidden_from_scheme", Scope(Scopes::Scheme)),
(Scopes::Character, "is_forced_into_faction", Boolean),
(Scopes::Character, "is_forced_into_scheme", Scope(Scopes::Scheme)),
(Scopes::Character, "is_foreign_court_guest", Boolean),
(Scopes::Character, "is_foreign_court_guest_of", Scope(Scopes::Character)),
(Scopes::Character, "is_foreign_court_or_pool_guest", Boolean),
(Scopes::Character, "is_foreign_court_or_pool_guest_of", Scope(Scopes::Character)),
(Scopes::Character, "is_from_ruler_designer", Boolean),
(Scopes::None, "is_game_view_open", UncheckedValue), (Scopes::None, "is_gamestate_tutorial_active", Boolean),
(Scopes::Character, "is_grandchild_of", Scope(Scopes::Character)),
(Scopes::Character, "is_grandparent_of", Scope(Scopes::Character)),
(Scopes::Character, "is_great_grandchild_of", Scope(Scopes::Character)),
(Scopes::Character, "is_great_grandparent_of", Scope(Scopes::Character)),
(Scopes::LandedTitle, "is_head_of_faith", Boolean),
(Scopes::Character, "is_heir_of", Scope(Scopes::Character)),
(Scopes::Regiment, "is_hired_maa_regiment", Boolean),
(Scopes::LandedTitle, "is_holy_order", Boolean),
(Scopes::LandedTitle, "is_holy_site", Boolean),
(Scopes::LandedTitle, "is_holy_site_controlled_by", Scope(Scopes::Character)),
(Scopes::LandedTitle, "is_holy_site_of", Scope(Scopes::Faith)),
(Scopes::Character, "is_hostage", Boolean),
(Scopes::Character, "is_hostage_from", Scope(Scopes::Character)),
(Scopes::Character, "is_hostage_of", Scope(Scopes::Character)),
(Scopes::Character, "is_hostage_warden", Boolean),
(Scopes::Scheme, "is_hostile", Boolean),
(Scopes::Culture, "is_hybrid_culture", Boolean),
(Scopes::Character, "is_immortal", Boolean),
(Scopes::Character, "is_important_decision", Scope(Scopes::Decision)),
(Scopes::LandedTitle, "is_important_location", Scope(Scopes::LandedTitle)),
(Scopes::Character, "is_imprisoned", Boolean),
(Scopes::Character, "is_imprisoned_by", Scope(Scopes::Character)),
(Scopes::Character, "is_in_army", Boolean),
(Scopes::Character, "is_in_civil_war", Boolean),
(Scopes::Religion, "is_in_family", Item(Item::ReligionFamily)),
(
Scopes::Character,
"is_in_guest_subset",
Block(&[("name", Item(Item::GuestSubset)), ("?phase", Item(Item::ActivityPhase))]),
),
(Scopes::None, "is_in_list", Special),
(Scopes::Character, "is_in_ongoing_great_holy_war", Boolean),
(Scopes::Character, "is_in_pool_at", Scope(Scopes::Province)),
(Scopes::Character, "is_in_prison_type", Item(Item::PrisonType)),
(Scopes::Character, "is_in_the_same_court_as", Scope(Scopes::Character)),
(Scopes::Character, "is_in_the_same_court_as_or_guest", Scope(Scopes::Character)),
(Scopes::Character, "is_incapable", Boolean),
(Scopes::Character, "is_independent_ruler", Boolean),
(Scopes::Character, "is_knight", Boolean),
(Scopes::Character, "is_knight_of", Scope(Scopes::Character)),
(Scopes::Secret, "is_known_by", Scope(Scopes::Character)),
(Scopes::Character, "is_landed", Boolean),
(Scopes::Character, "is_landless_ruler", Boolean),
(Scopes::LandedTitle, "is_landless_type_title", Boolean),
(Scopes::Character, "is_leader_in_war", Scope(Scopes::War)),
(Scopes::Character, "is_leading_faction_type", Item(Item::Faction)),
(Scopes::LandedTitle, "is_leased_out", Boolean),
(Scopes::Legend, "is_legend_completed", Boolean),
(Scopes::Character, "is_liege_or_above_of", Scope(Scopes::Character)),
(Scopes::Character, "is_local_player", Boolean),
(Scopes::Character, "is_lowborn", Boolean),
(Scopes::Regiment, "is_maa_in_combat", Boolean),
(Scopes::Regiment, "is_maa_type", Item(Item::MenAtArms)),
(Scopes::Character, "is_male", Boolean),
(Scopes::Character, "is_married", Boolean),
(Scopes::CharacterMemory, "is_memory_of_travel", Scope(Scopes::TravelPlan)),
(Scopes::LandedTitle, "is_mercenary_company", Boolean),
(Scopes::None, "is_mercenary_in_hire_range", Scope(Scopes::Character)),
(Scopes::LandedTitle, "is_neighbor_to_realm", Scope(Scopes::Character)),
(Scopes::Character, "is_nibling_of", Scope(Scopes::Character)),
(Scopes::LandedTitle, "is_noble_family_title", Boolean),
(Scopes::Character, "is_normal_councillor", Boolean),
(Scopes::Province, "is_occupied", Boolean),
(Scopes::Activity, "is_open_invite_activity", Boolean),
(Scopes::Trait, "is_opposite_of_trait", Scope(Scopes::Trait)),
(Scopes::Character, "is_overriding_designated_winner", Boolean),
(Scopes::Character, "is_parent_of", Scope(Scopes::Character)),
(Scopes::War, "is_participant", Scope(Scopes::Character)),
(Scopes::Character, "is_participant_in_activity", Scope(Scopes::Activity)),
(Scopes::Character, "is_participant_in_war", Scope(Scopes::War)),
(Scopes::TravelPlan, "is_paused", Boolean),
(Scopes::Character, "is_performing_council_task", Item(Item::CouncilTask)),
(Scopes::Regiment, "is_personal_maa_regiment", Boolean),
(Scopes::Character, "is_player_heir_of", Scope(Scopes::Character)),
(Scopes::None, "is_player_selected", Boolean),
(Scopes::Character, "is_pledged_ghw_attacker", Boolean),
(Scopes::Character, "is_pool_character", Boolean),
(Scopes::Character, "is_pool_guest", Boolean),
(Scopes::Character, "is_pool_guest_of", Scope(Scopes::Character)),
(Scopes::Character, "is_potential_knight", Boolean),
(Scopes::Character, "is_powerful_vassal", Boolean),
(Scopes::Character, "is_powerful_vassal_of", Scope(Scopes::Character)),
(Scopes::Character, "is_pregnant", Boolean),
(Scopes::Character, "is_primary_heir_of", Scope(Scopes::Character)),
(Scopes::Army, "is_raid_army", Boolean),
(Scopes::Province, "is_raided", Boolean),
(Scopes::Regiment, "is_raised", Boolean),
(Scopes::Regiment, "is_regular_maa_regiment", Boolean),
(Scopes::Activity, "is_required_special_guest", Scope(Scopes::Character)),
(Scopes::Character, "is_rightful_liege_of", Scope(Scopes::Character)),
(Scopes::Province, "is_river_province", Boolean),
(Scopes::LandedTitle, "is_riverside_county", Boolean),
(Scopes::Province, "is_riverside_province", Boolean),
(Scopes::Character, "is_ruler", Boolean),
(Scopes::Scheme, "is_scheme_agent_exposed", Scope(Scopes::Character)),
(Scopes::Scheme, "is_scheme_category", Choice(&["hostile", "contract", "personal", "political"])),
(Scopes::Scheme, "is_scheme_exposed", Boolean),
(Scopes::Scheme, "is_scheme_target_type", Choice(&["character", "title", "faith", "culture"])),
(
Scopes::Character,
"is_scheming_against",
Block(&[
("target", Scope(Scopes::Character)),
("?type", Item(Item::Scheme)),
("?scheme_skill", Item(Item::Skill)),
]),
),
(Scopes::Province, "is_sea_province", Boolean),
(Scopes::None, "is_set", Scope(Scopes::all_but_none())),
(Scopes::Secret, "is_shunned_for", Scope(Scopes::Character)),
(Scopes::Secret, "is_shunned_or_criminal_for", Scope(Scopes::Character)),
(Scopes::Character, "is_sibling_of", Scope(Scopes::Character)),
(
Scopes::Activity,
"is_special_guest",
ScopeOrBlock(
Scopes::Character,
&[("target", Scope(Scopes::Character)), ("type", Item(Item::GuestSubset))],
),
),
(Scopes::Secret, "is_spent_by", Scope(Scopes::Character)),
(Scopes::Character, "is_spouse_of", Scope(Scopes::Character)),
(Scopes::Character, "is_spouse_of_even_if_dead", Scope(Scopes::Character)),
(Scopes::Struggle, "is_struggle_phase", Item(Item::StrugglePhase)),
(Scopes::Struggle, "is_struggle_type", Item(Item::Struggle)),
(Scopes::Character, "is_successor_of_accolade", Scope(Scopes::Accolade)),
(
Scopes::None,
"is_target_in_global_variable_list",
Block(&[("name", UncheckedValue), ("*target", ScopeOkThis(Scopes::all_but_none()))]),
),
(
Scopes::None,
"is_target_in_local_variable_list",
Block(&[("name", UncheckedValue), ("*target", ScopeOkThis(Scopes::all_but_none()))]),
),
(
Scopes::None,
"is_target_in_variable_list",
Block(&[("name", UncheckedValue), ("*target", ScopeOkThis(Scopes::all_but_none()))]),
),
(Scopes::LandedTitle, "is_target_of_council_task", Item(Item::CouncilTask)),
(Scopes::Character, "is_tax_collector", Boolean),
(Scopes::Character, "is_tax_collector_of", Scope(Scopes::Character)),
(Scopes::Character, "is_theocratic_lessee", Boolean),
(Scopes::LandedTitle, "is_title_created", Boolean),
(Scopes::Regiment, "is_title_maa_regiment", Boolean),
(Scopes::LandedTitle, "is_titular", Boolean),
(Scopes::None, "is_tooltip_with_name_open", UncheckedValue), (Scopes::Character, "is_travel_entourage_character", Boolean),
(Scopes::Character, "is_travel_leader", Boolean),
(Scopes::TravelPlan, "is_travel_with_domicile", Boolean),
(Scopes::Character, "is_travelling", Boolean),
(Scopes::None, "is_tutorial_active", Boolean),
(Scopes::None, "is_tutorial_lesson_active", UncheckedValue), (Scopes::None, "is_tutorial_lesson_chain_completed", UncheckedValue), (Scopes::None, "is_tutorial_lesson_completed", UncheckedValue), (Scopes::None, "is_tutorial_lesson_step_completed", UncheckedValue), (Scopes::Character, "is_twin_of", Scope(Scopes::Character)),
(Scopes::Scheme, "is_type_basic", Boolean),
(Scopes::Scheme, "is_type_secret", Boolean),
(Scopes::Character, "is_unborn_child_of_concubine", Boolean),
(Scopes::Character, "is_unborn_known_bastard", Boolean),
(Scopes::Character, "is_uncle_or_aunt_of", Scope(Scopes::Character)),
(Scopes::LandedTitle, "is_under_holy_order_lease", Boolean),
(Scopes::Artifact, "is_unique", Boolean),
(Scopes::Regiment, "is_unit_type", Item(Item::MenAtArmsBase)),
(Scopes::Character, "is_valid_as_agent_in_any_slot", Scope(Scopes::Scheme)),
(Scopes::Character, "is_valid_as_agent_in_scheme", Removed("1.13", "replaced by is_valid_as_agent_in_any_slot")),
(Scopes::Character, "is_valid_as_agent_in_slot", Scope(Scopes::AgentSlot)),
(Scopes::Character, "is_valid_designated_heir", Scope(Scopes::Character)),
(Scopes::Character, "is_valid_for_event_debug", Item(Item::Event)), (Scopes::Character, "is_valid_for_event_debug_cooldown", Item(Item::Event)), (Scopes::Character, "is_valid_successor_for_accolade", Scope(Scopes::Accolade)),
(Scopes::TaskContract, "is_valid_to_keep", Boolean),
(Scopes::Character, "is_valid_to_hire_court_position_type", Item(Item::CourtPosition)),
(Scopes::Character, "is_vassal_of", Scope(Scopes::Character)),
(Scopes::Character, "is_vassal_or_below_of", Scope(Scopes::Character)),
(Scopes::Character, "is_visibly_fertile", Boolean),
(Scopes::War, "is_war_leader", Scope(Scopes::Character)),
(Scopes::None, "is_war_overview_tab_open", UncheckedValue), (Scopes::War, "is_white_peace_possible", Boolean),
(Scopes::None, "is_widget_open", Removed("1.13", "replaced by is_widgetid_open")),
(Scopes::None, "is_widgetid_open", UncheckedValue), (
Scopes::Character,
"join_faction_chance",
Block(&[("target", Scope(Scopes::Faction)), ("+value", CompareValue)]),
),
(
Scopes::Character,
"join_scheme_chance",
Block(&[("scheme", Scope(Scopes::Scheme)), ("max", SetValue), ("min", SetValue)]),
),
(Scopes::Character, "knows_court_language_of", ScopeOkThis(Scopes::Character)),
(Scopes::Character, "knows_language", Item(Item::Language)),
(Scopes::Character, "knows_language_of_culture", Scope(Scopes::Culture)),
(Scopes::Character, "learning", CompareValue),
(
Scopes::Character,
"learning_diff",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue), ("?abs", Boolean)]),
),
(Scopes::Character, "learning_for_portrait", CompareValue),
(Scopes::Character, "levies_to_liege", CompareValueWarnEq),
(Scopes::None, "list_size", Block(&[("name", UncheckedValue), ("+value", CompareValue)])),
(Scopes::Legend, "legend_completion_date", CompareDate),
(Scopes::Legend, "legend_quality", Choice(LEGEND_QUALITY)),
(Scopes::Legend, "legend_start_date", CompareDate),
(Scopes::Character, "legitimacy", CompareValueWarnEq),
(Scopes::Character, "legitimacy_level", CompareValue),
(Scopes::Character, "levies_to_liege", CompareValue),
(Scopes::Secret, "local_player_knows_this_secret", Boolean),
(
Scopes::None,
"local_variable_list_size",
Block(&[("name", UncheckedValue), ("+value", CompareValue)]),
),
(Scopes::Character, "long_term_gold", CompareValueWarnEq),
(Scopes::Character, "long_term_gold_maximum", CompareValueWarnEq),
(Scopes::Regiment, "maa_current_troops_count", CompareValue),
(Scopes::Character, "maa_regiments_count", CompareValue),
(Scopes::Character, "maa_regiments_max_count", CompareValue),
(Scopes::Regiment, "maa_max_troops_count", CompareValue),
(Scopes::Regiment, "maa_size", CompareValue),
(Scopes::Character, "martial", CompareValue),
(
Scopes::Character,
"martial_diff",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue), ("?abs", Boolean)]),
),
(Scopes::Character, "martial_for_portrait", CompareValue),
(Scopes::Character, "matrilinear_betrothal", Boolean),
(Scopes::Character, "matrilinear_marriage", Boolean),
(Scopes::Character, "max_active_accolades", CompareValue),
(Scopes::Character, "max_military_strength", CompareValue),
(
Scopes::Character,
"max_number_maa_soldiers_of_base_type",
Block(&[("type", Item(Item::MenAtArmsBase)), ("+value", CompareValue)]),
),
(
Scopes::Character,
"max_number_maa_soldiers_of_type",
Block(&[("type", Item(Item::MenAtArms)), ("+value", CompareValue)]),
),
(Scopes::Character, "max_number_of_concubines", CompareValue),
(Scopes::Character, "max_number_of_knights", CompareValue),
(Scopes::Domicile, "max_provisions", CompareValue),
(Scopes::Scheme, "max_scheme_success_chance", CompareValue),
(Scopes::Scheme, "maximum_scheme_breaches", CompareValue),
(Scopes::Character, "meets_legitimacy_expectation_of", Scope(Scopes::Character)),
(Scopes::CharacterMemory, "memory_age_years", CompareValueWarnEq),
(Scopes::CharacterMemory, "memory_creation_date", CompareDate),
(Scopes::CharacterMemory, "memory_end_date", CompareDate),
(Scopes::MercenaryCompany, "mercenary_company_expiration_days", CompareValue),
(Scopes::Character, "missing_unique_ancestors", Removed("1.14", "replaced with parent_relatedness")),
(Scopes::Character, "monthly_character_balance", CompareValueWarnEq),
(Scopes::Character, "monthly_character_expenses", CompareValueWarnEq),
(Scopes::Character, "monthly_character_income", CompareValueWarnEq),
(Scopes::Character, "monthly_character_income_long_term", CompareValueWarnEq),
(Scopes::Character, "monthly_character_income_reserved", CompareValueWarnEq),
(Scopes::Character, "monthly_character_income_short_term", CompareValueWarnEq),
(Scopes::Character, "monthly_character_income_war_chest", CompareValueWarnEq),
(Scopes::Character, "monthly_character_men_at_arms_expense_gold", CompareValueWarnEq),
(Scopes::Character, "monthly_character_men_at_arms_expense_prestige", CompareValueWarnEq),
(Scopes::LandedTitle, "monthly_county_control_change", CompareValue),
(Scopes::LandedTitle, "monthly_county_control_decline", CompareValue),
(Scopes::LandedTitle, "monthly_county_control_decline_factor", CompareValue),
(Scopes::LandedTitle, "monthly_county_control_growth", CompareValue),
(Scopes::LandedTitle, "monthly_county_control_growth_factor", CompareValue),
(Scopes::Province, "monthly_income", CompareValueWarnEq),
(Scopes::Character, "months_as_ruler", CompareValueWarnEq),
(Scopes::Faction, "months_until_max_discontent", CompareValueWarnEq),
(
Scopes::Character,
"morph_gene_attribute",
Block(&[
("category", Item(Item::GeneCategory)),
("attribute", Item(Item::GeneAttribute)),
("+value", CompareValue),
]),
),
(
Scopes::Character,
"morph_gene_value",
Block(&[("category", Item(Item::GeneCategory)), ("+value", CompareValue)]),
),
(Scopes::None, "nand", Control),
(Scopes::TravelPlan, "next_destination_arrival_date", CompareDate),
(Scopes::TravelPlan, "next_destination_arrival_days", CompareValueWarnEq),
(Scopes::TravelPlan, "next_destination_progress", CompareValue),
(Scopes::None, "nor", Control),
(Scopes::None, "not", Control), (Scopes::Character, "num_active_accolades", CompareValue),
(Scopes::Artifact, "num_artifact_kills", CompareValue),
(Scopes::Province, "num_buildings", CompareValue),
(Scopes::Faith, "num_character_followers", CompareValue),
(Scopes::Faith, "num_county_followers", CompareValue),
(Scopes::LandedTitle, "num_county_holdings", CompareValue),
(Scopes::Culture, "num_discovered_innovations", CompareValue),
(
Scopes::Culture,
"num_discovered_innovations_in_era",
Block(&[("era", Item(Item::CultureEra)), ("+value", CompareValue)]),
),
(Scopes::Domicile, "num_domicile_buildings", CompareValue),
(Scopes::CombatSide, "num_enemies_killed", CompareValue),
(Scopes::TravelPlan, "num_entourage_characters", CompareValue),
(Scopes::Activity, "num_future_phases", CompareValue),
(Scopes::Character, "num_inactive_accolades", CompareValue),
(Scopes::HolyOrder, "num_leased_titles", CompareValue),
(Scopes::Character, "num_of_bad_genetic_traits", CompareValue),
(Scopes::Character, "num_of_good_genetic_traits", CompareValue),
(Scopes::Character, "num_of_known_languages", CompareValue),
(Scopes::Character, "num_offered_task_contracts", CompareValue),
(Scopes::TravelPlan, "num_options", CompareValue),
(Scopes::Activity, "num_past_phases", CompareValue),
(Scopes::Character, "num_personal_legend_seeds", CompareValue),
(Scopes::Activity, "num_phases", CompareValue),
(
Scopes::Character,
"num_sinful_traits",
CompareValueOrBlock(&[("+value", CompareValue), ("faith", Scope(Scopes::Faith))]),
),
(Scopes::Character, "num_taken_task_contracts", CompareValue),
(Scopes::Character, "num_task_contracts", CompareValue),
(Scopes::Combat, "num_total_troops", CompareValueWarnEq),
(Scopes::Character, "num_triggered_legend_seeds", CompareValue),
(
Scopes::Character,
"num_virtuous_traits",
CompareValueOrBlock(&[("+value", CompareValue), ("faith", Scope(Scopes::Faith))]),
),
(
Scopes::Character,
"number_maa_regiments_of_base_type",
Block(&[("type", Item(Item::MenAtArmsBase)), ("+value", CompareValue)]),
),
(
Scopes::Character,
"number_maa_regiments_of_type",
Block(&[("type", Item(Item::MenAtArms)), ("+value", CompareValue)]),
),
(
Scopes::Character,
"number_maa_soldiers_of_base_type",
Block(&[("type", Item(Item::MenAtArmsBase)), ("+value", CompareValue)]),
),
(
Scopes::Character,
"number_maa_soldiers_of_type",
Block(&[("type", Item(Item::MenAtArms)), ("+value", CompareValue)]),
),
(Scopes::Province, "number_of_characters_in_pool", CompareValue),
(Scopes::Character, "number_of_commander_traits", CompareValue),
(
Scopes::Character,
"number_of_commander_traits_in_common",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(Scopes::Character, "number_of_concubines", CompareValue),
(Scopes::Character, "number_of_desired_concubines", CompareValue),
(
Scopes::Character,
"number_of_election_votes",
Block(&[("title", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(Scopes::Faction, "number_of_faction_members_in_council", CompareValue),
(Scopes::Character, "number_of_fertile_concubines", CompareValue),
(Scopes::Character, "number_of_knights", CompareValue),
(Scopes::Character, "number_of_lifestyle_traits", CompareValue),
(Scopes::Character, "number_of_maa_regiments", CompareValue),
(
Scopes::Character,
"number_of_opposing_personality_traits",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(
Scopes::Character,
"number_of_opposing_traits",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(Scopes::Character, "number_of_personality_traits", CompareValue),
(
Scopes::Character,
"number_of_personality_traits_in_common",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(Scopes::Character, "number_of_powerful_vassals", CompareValue),
(
Scopes::Character,
"number_of_sinful_traits_in_common",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(Scopes::Character, "number_of_stationed_maa_regiments", CompareValue),
(Scopes::Character, "number_of_traits", CompareValue),
(
Scopes::Character,
"number_of_traits_in_common",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(
Scopes::Character,
"number_of_virtue_traits_in_common",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(
Scopes::Character,
"number_title_maa_regiments_of_type",
Block(&[("type", Item(Item::MenAtArms)), ("+value", CompareValue)]),
),
(Scopes::VassalObligationLevel, "obligation_level_score", CompareValue),
(
Scopes::Character,
"opinion",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(Scopes::None, "or", Control),
(Scopes::Epidemic, "outbreak_intensity", CompareChoice(OUTBREAK_INTENSITIES)),
(Scopes::Epidemic, "outbreak_start_date", CompareDate),
(Scopes::Character, "owns_a_story", Boolean),
(Scopes::Character, "owns_story_of_type", Item(Item::Story)),
(Scopes::Character, "parent_relatedness", CompareValue),
(Scopes::Character, "patrilinear_betrothal", Boolean),
(Scopes::Character, "patrilinear_marriage", Boolean),
(Scopes::CombatSide, "percent_enemies_killed", CompareValue),
(Scopes::Character, "perk_points", CompareValue),
(Scopes::Character, "perk_points_assigned", CompareValue),
(
Scopes::Character,
"perks_in_tree",
Block(&[("tree", Item(Item::PerkTree)), ("+value", CompareValue)]),
),
(Scopes::Struggle, "phase_has_catalyst", Item(Item::Catalyst)),
(Scopes::Character, "piety", CompareValueWarnEq),
(Scopes::Character, "piety_level", CompareValue),
(
Scopes::LandedTitle,
"place_in_line_of_succession",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(
Scopes::Character,
"player_heir_position",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(Scopes::Character, "pregnancy_days", CompareValue),
(Scopes::Character, "prestige", CompareValueWarnEq),
(Scopes::Character, "prestige_level", CompareValue),
(Scopes::Accolade, "primary_tier", CompareValue),
(Scopes::Province, "province_infection_date", Block(&[("epidemic", Scope(Scopes::Epidemic)), ("+value", CompareDate)])),
(Scopes::Province, "province_infection_rate", Block(&[("epidemic", Scope(Scopes::Epidemic)), ("+value", CompareValueWarnEq)])),
(Scopes::Character, "provision_cost_to_domicile", CompareValueWarnEq),
(Scopes::Domicile, "provision_cost_to_owner", CompareValueWarnEq),
(Scopes::Domicile, "provisions", CompareValueWarnEq),
(Scopes::Character, "prowess", CompareValue),
(
Scopes::Character,
"prowess_diff",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue), ("?abs", Boolean)]),
),
(Scopes::Character, "prowess_for_portrait", CompareValue),
(Scopes::Character, "prowess_no_portrait", CompareValue),
(Scopes::Army, "raid_loot", CompareValue),
(Scopes::Character, "ransom_cost", CompareValue),
(Scopes::Artifact, "rarity", Item(Item::ArtifactRarity)),
(Scopes::Character, "realm_size", CompareValue),
(
Scopes::Character,
"realm_to_title_distance_squared",
Block(&[("title", Scope(Scopes::LandedTitle)), ("+value", CompareValue)]),
),
(
Scopes::LandedTitle,
"recent_history",
Block(&[
("?type", Item(Item::TitleHistoryType)),
("?days", SetValue),
("?months", SetValue),
("?years", SetValue),
]),
),
(Scopes::None, "release_only", Boolean),
(Scopes::Faith, "religion_tag", Item(Item::Religion)),
(Scopes::Character, "reserved_gold", CompareValueWarnEq),
(Scopes::Character, "reserved_gold_maximum", CompareValueWarnEq),
(
Scopes::Character,
"reverse_has_opinion_modifier",
Block(&[
("target", Scope(Scopes::Character)),
("modifier", Item(Item::OpinionModifier)),
("*value", CompareValue),
]),
),
(
Scopes::Character,
"reverse_opinion",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(Scopes::Secret, "same_secret_type_as", Scope(Scopes::Secret)),
(Scopes::Character, "save_temporary_opinion_value_as", Special),
(Scopes::all_but_none(), "save_temporary_scope_as", Special),
(Scopes::None, "save_temporary_scope_value_as", Special),
(Scopes::Scheme, "scheme_agent_charges", CompareValue),
(Scopes::Scheme, "scheme_breaches", CompareValue),
(Scopes::Scheme, "scheme_duration_days", CompareValue),
(Scopes::Scheme, "scheme_is_character_agent", Scope(Scopes::Character)),
(Scopes::Scheme, "scheme_monthly_progress", Removed("1.13", "")),
(Scopes::Scheme, "scheme_number_of_agents", Removed("1.13", "")),
(Scopes::Scheme, "scheme_number_of_exposed_agents", CompareValue),
(Scopes::Scheme, "scheme_number_of_filled_agent_slots", CompareValue),
(Scopes::Scheme, "scheme_phase_duration", CompareValue),
(Scopes::Scheme, "scheme_power", Removed("1.13", "")),
(Scopes::Scheme, "scheme_power_resistance_difference", Removed("1.13", "")),
(Scopes::Scheme, "scheme_power_resistance_ratio", Removed("1.13", "")),
(Scopes::Scheme, "scheme_progress", CompareValue),
(Scopes::Scheme, "scheme_resistance", Removed("1.13", "")),
(Scopes::Scheme, "scheme_secrecy", CompareValue),
(Scopes::Scheme, "scheme_skill", Item(Item::Skill)),
(Scopes::Scheme, "scheme_success_chance", CompareValue),
(Scopes::Scheme, "scheme_type", Item(Item::Scheme)),
(Scopes::None, "scripted_tests", Boolean),
(Scopes::Character, "scriptedtests_can_marry_character", Scope(Scopes::Character)),
(Scopes::Character, "scriptedtests_dread_base", CompareValue),
(Scopes::Character, "scriptedtests_gold_income_no_theocracy", CompareValue),
(Scopes::Character, "scriptedtests_piety_income", CompareValue),
(Scopes::Accolade, "secondary_tier", CompareValue),
(Scopes::Secret, "secret_type", Item(Item::Secret)),
(Scopes::Character, "sex_opposite_of", Scope(Scopes::Character)),
(Scopes::Character, "sex_same_as", Scope(Scopes::Character)),
(Scopes::Character, "short_term_gold", CompareValueWarnEq),
(Scopes::Character, "short_term_gold_maximum", CompareValueWarnEq),
(Scopes::Artifact, "should_decay", Boolean),
(
Scopes::Character,
"should_decision_create_alert",
ScopeOrItem(Scopes::Decision, Item::Decision),
),
(
Scopes::Character,
"should_notify_can_host_activity",
ScopeOrItem(Scopes::ActivityType, Item::ActivityType),
),
(
Scopes::Character,
"should_notify_can_join_open_activity",
ScopeOrItem(Scopes::ActivityType, Item::ActivityType),
),
(Scopes::None, "should_show_disturbing_portrait_modifiers", Boolean),
(Scopes::None, "should_show_nudity", Boolean),
(Scopes::CombatSide, "side_army_size", CompareValue),
(Scopes::CombatSide, "side_max_army_size", CompareValue),
(Scopes::CombatSide, "side_soldiers", CompareValue),
(Scopes::CombatSide, "side_strength", CompareValue),
(
Scopes::LandedTitle.union(Scopes::Province),
"squared_distance",
Block(&[
("target", Scope(Scopes::LandedTitle.union(Scopes::Province))),
("+value", CompareValue),
]),
),
(
Scopes::Character,
"static_group_filter",
Block(&[
("?group", UncheckedValue),
("?scope", Scope(Scopes::all_but_none())),
("match", SetValue) ]),
),
(Scopes::Character, "stewardship", CompareValue),
(
Scopes::Character,
"stewardship_diff",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue), ("?abs", Boolean)]),
),
(Scopes::Character, "stewardship_for_portrait", CompareValue),
(Scopes::StoryCycle, "story_type", Item(Item::Story)),
(Scopes::Character, "stress", CompareValue),
(Scopes::Character, "stress_level", CompareValue),
(Scopes::Character, "strife_opinion", CompareValue),
(Scopes::Character, "sub_realm_size", CompareValue),
(Scopes::Character, "succession_appointment_score_invested", Block(&[("title", Scope(Scopes::LandedTitle)), ("candidate", Scope(Scopes::Character)), ("+value", CompareValue)])),
(Scopes::None, "switch", Special),
(Scopes::LandedTitle, "target_is_de_facto_liege_or_above", Scope(Scopes::LandedTitle)),
(Scopes::LandedTitle, "target_is_de_jure_liege_or_above", Scope(Scopes::LandedTitle)),
(Scopes::Character, "target_is_liege_or_above", Scope(Scopes::Character)),
(Scopes::Character, "target_is_same_character_or_above", Scope(Scopes::Character)),
(Scopes::Character, "target_is_vassal_or_below", Scope(Scopes::Character)),
(Scopes::Character, "target_weight", CompareValue),
(Scopes::TaskContract, "task_contract_tier", CompareValue),
(
Scopes::Character,
"tax_collector_aptitude",
Block(&[("tax_slot_type", Item(Item::TaxSlotType)), ("+value", CompareValue)]),
),
(Scopes::Character, "tax_to_liege", CompareValueWarnEq),
(Scopes::Province, "terrain", Item(Item::Terrain)),
(Scopes::LandedTitle, "tier", CompareValue), (
Scopes::Character,
"tier_difference",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(
Scopes::Character,
"time_after_diarch_designated",
Block(&[("?days", CompareValue), ("?months", CompareValue), ("?years", CompareValue)]),
),
(
Scopes::Character,
"time_in_prison",
Block(&[
("?days", CompareValue),
("?weeks", CompareValue),
("?months", CompareValue),
("?years", CompareValue),
]),
),
(
Scopes::Character,
"time_in_prison_type",
Block(&[
("?days", CompareValue),
("?weeks", CompareValue),
("?months", CompareValue),
("?years", CompareValue),
]),
),
(Scopes::None, "time_of_year", Special),
(Scopes::TaskContract, "time_since_contract_taken", CompareValue),
(
Scopes::Character,
"time_since_death",
Block(&[("?days", CompareValue), ("?months", CompareValue), ("?years", CompareValue)]),
),
(
Scopes::Character,
"time_to_hook_expiry",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(
Scopes::LandedTitle,
"title_create_faction_type_chance",
Block(&[
("type", Item(Item::Faction)),
("target", Scope(Scopes::Character)),
("+value", CompareValue),
]),
),
(Scopes::LandedTitle, "title_held_years", CompareValueWarnEq),
(Scopes::LandedTitle, "title_is_a_faction_member", Boolean),
(
Scopes::LandedTitle,
"title_join_faction_chance",
Block(&[("target", Scope(Scopes::Faction)), ("+value", CompareValue)]),
),
(Scopes::LandedTitle, "title_will_leave_sub_realm_on_succession", Scope(Scopes::Character)),
(Scopes::Army, "total_army_damage", CompareValue),
(Scopes::Army, "total_army_pursuit", CompareValue),
(Scopes::Army, "total_army_screen", CompareValue),
(Scopes::Army, "total_army_siege_value", CompareValue),
(Scopes::Army, "total_army_toughness", CompareValue),
(Scopes::Epidemic, "total_infected_provinces", CompareValueWarnEq),
(
Scopes::Character,
"trait_compatibility",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(Scopes::Faith, "trait_is_sin", ScopeOrItem(Scopes::Trait, Item::Trait)),
(Scopes::Faith, "trait_is_virtue", ScopeOrItem(Scopes::Trait, Item::Trait)),
(
Scopes::Province,
"travel_danger_type",
Block(&[
("travel_plan", Scope(Scopes::TravelPlan)),
("?type", Item(Item::DangerType)),
("?terrain", Item(Item::Terrain)),
]),
),
(
Scopes::Province,
"travel_danger_value",
Block(&[("target", Scope(Scopes::TravelPlan)), ("+value", CompareValue)]),
),
(Scopes::Character, "travel_leader_cost", CompareValue),
(Scopes::Character, "travel_leader_safety", CompareValue),
(Scopes::Character, "travel_leader_speed", CompareValue),
(Scopes::TravelPlan, "travel_safety", CompareValue),
(Scopes::TravelPlan, "travel_speed", CompareValue),
(Scopes::None, "trigger_else", Control),
(Scopes::None, "trigger_else_if", Control),
(Scopes::None, "trigger_if", Control),
(Scopes::CombatSide, "troops_ratio", CompareValue),
(Scopes::AccoladeType, "type_has_accolade_category", Item(Item::AccoladeCategory)),
(Scopes::Character, "tyranny", CompareValue),
(Scopes::War, "using_cb", Item(Item::CasusBelli)),
(
Scopes::None,
"variable_list_size",
Block(&[("name", UncheckedValue), ("+value", CompareValue)]),
),
(Scopes::Character, "vassal_contract_has_flag", Item(Item::VassalContractFlag)),
(Scopes::Character, "vassal_contract_has_modifiable_obligations", Boolean),
(Scopes::Character, "vassal_contract_is_blocked_from_modification", Boolean),
(Scopes::Character, "vassal_contract_liege_dynasty_reign_start_date", CompareDate),
(
Scopes::Character,
"vassal_contract_obligation_level_can_be_decreased",
Item(Item::VassalContract),
),
(
Scopes::Character,
"vassal_contract_obligation_level_can_be_increased",
Item(Item::VassalContract),
),
(Scopes::Character, "vassal_count", CompareValue),
(Scopes::Character, "vassal_limit", CompareValue),
(Scopes::Character, "vassal_limit_available", CompareValue),
(Scopes::Character, "vassal_limit_percentage", CompareValue),
(Scopes::Character, "war_chest_gold", CompareValueWarnEq),
(Scopes::Character, "war_chest_gold_maximum", CompareValueWarnEq),
(
Scopes::War,
"war_contribution",
Block(&[("target", Scope(Scopes::Character)), ("+value", CompareValue)]),
),
(Scopes::War, "war_days", CompareValueWarnEq),
(Scopes::Combat, "warscore_value", CompareValue),
(Scopes::TravelPlan, "was_activity_completed", Boolean),
(Scopes::TravelPlan, "was_activity_invalidated", Boolean),
(Scopes::War, "was_called", Scope(Scopes::Character)),
(Scopes::Character, "was_hostage_child", Boolean),
(Scopes::Character, "was_preferred_heir", Scope(Scopes::Character)),
(Scopes::None, "weighted_calc_true_if", Special),
(Scopes::Character, "would_be_valid_for_court_position", Block(&[("employer", Scope(Scopes::Character)), ("court_position", Item(Item::CourtPosition))])),
(Scopes::Character, "year_of_birth", CompareValue),
(Scopes::Character, "yearly_character_balance", CompareValueWarnEq),
(Scopes::Character, "yearly_character_expenses", CompareValueWarnEq),
(Scopes::Character, "yearly_character_income", CompareValueWarnEq),
(Scopes::Character, "yearly_character_men_at_arms_expense_gold", CompareValueWarnEq),
(Scopes::Character, "yearly_character_men_at_arms_expense_prestige", CompareValueWarnEq),
(Scopes::Character, "years_as_diarch", CompareValueWarnEq),
(Scopes::Character, "years_as_ruler", CompareValueWarnEq),
(Scopes::None, "years_from_game_start", CompareValueWarnEq),
(Scopes::Character, "years_in_diarchy", CompareValueWarnEq),
(
Scopes::Character,
"yields_alliance",
Block(&[
("candidate", Scope(Scopes::Character)),
("target", Scope(Scopes::Character)),
("target_candidate", Scope(Scopes::Character)),
]),
),
];
#[inline]
pub fn scope_trigger_complex(name: &str) -> Option<(Scopes, ArgumentValue, Scopes)> {
TRIGGER_COMPLEX_MAP.get(name).copied()
}
static TRIGGER_COMPLEX_MAP: LazyLock<TigerHashMap<&'static str, (Scopes, ArgumentValue, Scopes)>> =
LazyLock::new(|| {
let mut hash = TigerHashMap::default();
for (from, s, trigger, outscopes) in TRIGGER_COMPLEX.iter().copied() {
hash.insert(s, (from, trigger, outscopes));
}
hash
});
const TRIGGER_COMPLEX: &[(Scopes, &str, ArgumentValue, Scopes)] = {
use crate::item::Item;
use ArgumentValue::*;
&[
(Scopes::Character, "ai_values_divergence", Scope(Scopes::Character), Scopes::Value),
(
Scopes::Character,
"appointment_candidate_accumulated_score",
Scope(Scopes::LandedTitle),
Scopes::Value,
),
(
Scopes::Character,
"appointment_candidate_score",
Scope(Scopes::LandedTitle),
Scopes::Value,
),
(Scopes::LandedTitle, "county_opinion_target", Scope(Scopes::Character), Scopes::Value),
(Scopes::Culture, "cultural_acceptance", Scope(Scopes::Culture), Scopes::Value),
(Scopes::Province, "days_since_province_infection", Scope(Scopes::Epidemic), Scopes::Value),
(Scopes::Faith, "faith_hostility_level", Scope(Scopes::Faith), Scopes::Value),
(
Scopes::DynastyHouse,
"house_land_share_in_realm",
Scope(Scopes::Character),
Scopes::Value,
),
(Scopes::None, "list_size", UncheckedValue, Scopes::Value),
(Scopes::Character, "morph_gene_value", Item(Item::GeneCategory), Scopes::Value),
(Scopes::Character, "opinion", Scope(Scopes::Character), Scopes::Value),
(Scopes::Character, "reverse_opinion", Scope(Scopes::Character), Scopes::Value),
(Scopes::Character, "trait_compatibility", Scope(Scopes::Character), Scopes::Value),
(Scopes::Province, "travel_danger_value", Scope(Scopes::TravelPlan), Scopes::Value),
(Scopes::Character, "amenity_level", Item(Item::Amenity), Scopes::Value),
(Scopes::Character, "diplomacy_diff", Scope(Scopes::Character), Scopes::Value),
(Scopes::Character, "has_trait_xp", TraitTrack, Scopes::Value),
(Scopes::Character, "intrigue_diff", Scope(Scopes::Character), Scopes::Value),
(Scopes::Character, "join_faction_chance", Scope(Scopes::Faction), Scopes::Value),
(Scopes::Character, "learning_diff", Scope(Scopes::Character), Scopes::Value),
(Scopes::Character, "martial_diff", Scope(Scopes::Character), Scopes::Value),
(
Scopes::Character,
"max_number_maa_soldiers_of_base_type",
Item(Item::MenAtArmsBase),
Scopes::Value,
),
(
Scopes::Character,
"max_number_maa_soldiers_of_type",
Item(Item::MenAtArms),
Scopes::Value,
),
(Scopes::Character, "morph_gene_value", Item(Item::GeneCategory), Scopes::Value),
(Scopes::Character, "num_sinful_traits", Scope(Scopes::Faith), Scopes::Value),
(Scopes::Character, "num_virtuous_traits", Scope(Scopes::Faith), Scopes::Value),
(
Scopes::Character,
"number_maa_regiments_of_base_type",
Item(Item::MenAtArmsBase),
Scopes::Value,
),
(Scopes::Character, "number_maa_regiments_of_type", Item(Item::MenAtArms), Scopes::Value),
(
Scopes::Character,
"number_maa_soldiers_of_base_type",
Item(Item::MenAtArmsBase),
Scopes::Value,
),
(Scopes::Character, "number_maa_soldiers_of_type", Item(Item::MenAtArms), Scopes::Value),
(Scopes::Character, "number_of_election_votes", Scope(Scopes::LandedTitle), Scopes::Value),
(
Scopes::Character,
"number_of_sinful_traits_in_common",
Scope(Scopes::Character),
Scopes::Value,
),
(Scopes::Character, "number_of_traits_in_common", Scope(Scopes::Character), Scopes::Value),
(
Scopes::Character,
"number_of_virtue_traits_in_common",
Scope(Scopes::Character),
Scopes::Value,
),
(Scopes::Character, "perks_in_tree", Item(Item::PerkTree), Scopes::Value),
(
Scopes::LandedTitle,
"place_in_line_of_succession",
Scope(Scopes::Character),
Scopes::Value,
),
(Scopes::Character, "player_heir_position", Scope(Scopes::Character), Scopes::Value),
(Scopes::Province, "province_infection_date", Scope(Scopes::Epidemic), Scopes::Value),
(Scopes::Province, "province_infection_rate", Scope(Scopes::Epidemic), Scopes::Value),
(Scopes::Character, "prowess_diff", Scope(Scopes::Character), Scopes::Value),
(
Scopes::Character,
"realm_to_title_distance_squared",
Scope(Scopes::LandedTitle),
Scopes::Value,
),
(Scopes::Character, "stewardship_diff", Scope(Scopes::Character), Scopes::Value),
(Scopes::Character, "tax_collector_aptitude", Item(Item::TaxSlotType), Scopes::Value),
(Scopes::Character, "time_to_hook_expiry", Scope(Scopes::Character), Scopes::Value),
(
Scopes::Character,
"vassal_contract_obligation_level",
Item(Item::VassalContract),
Scopes::Value,
),
(
Scopes::Character,
"vassal_contract_obligation_level_score",
ScopeOrItem(Scopes::VassalObligationLevel, Item::VassalContract),
Scopes::Value,
),
(Scopes::LandedTitle, "title_join_faction_chance", Scope(Scopes::Faction), Scopes::Value),
(
Scopes::LandedTitle.union(Scopes::Province),
"squared_distance",
Scope(Scopes::Province),
Scopes::Value,
),
(Scopes::War, "war_contribution", Scope(Scopes::Character), Scopes::Value),
]
};