
Country Interaction
Cede Province
We will give them one of our provinces.
TǔsīSubject Typeselect trigger 1Definitionin_game/common/country_interactions/give_province_to_subject.txt:1
2type = subject
3category = CATEGORY_SUBJECT_ACTIONS
5use_enroute = no
7ai_prerequisite = {
8wants_to_give_away_any_province = yes
}
11potential = {
12scope:actor = {
13num_locations > 1
14at_war = no
}
}
18allow = {
}
21select_trigger = {
22looking_for_a = country
23interaction_source_list = {
24scope:actor = {
25every_subject = {
26add_to_list = source
}
}
}
30target_flag = recipient
31name = "choose_country" Choose the Country:
32column = {
33data = name
}
35visible = {
36NOR = {
37country_type = building
38country_type = pop
}
}
}
52select_trigger = {
53looking_for_a = province
54source = actor
55target_flag = target
56source_flags = border_or_recipients_capital_area
57source_flags_ai_override = provinces_ai_wants_to_give_away
58name = "select_a_province_to_give" Click to select a province that we should cede to our subject.
59none_available_msg_key = "give_province_to_subject_no_provinces"
60column = {
61data = name
}
63column = {
64data = population
}
66visible = {
67not = {
68any_location_in_province = {
69is_capital = yes
}
}
74OR = {
75any_location_in_province = {
76any_coast_border_location = {
77owner ?= scope:recipient
}
}
80area = scope:recipient.capital.area
}
}
}
86effect = {
87if = {
88limit = {
89exists = scope:target
}
91scope:target = {
92random_location_in_province = {
93save_scope_as = random_location
}
95change_province_owner = scope:recipient
}
98scope:random_location = {
99province = {
100save_scope_as = new_province
}
}
}
104else = {
105custom_tooltip = select_a_province_to_give Click to select a province that we should cede to our subject.
}
}
111ai_will_do = {
112add = -1
113if = {
114limit = {
115scope:target = {
116does_owner_want_to_give_away = yes
117area = scope:recipient.capital.area
118any_location_in_province = {
119any_neighbor_location = {
120owner ?= scope:recipient
}
}
}
}
125add = 1000
}
}