
Country InteractionChanged this version
Intervene in War
We should intervene in this War and sort it out once and for all.
Definitionin_game/common/country_interactions/intervene_in_subject_war.txt:1
2type = diplomacy
3category = CATEGORY_SUBJECT_ACTIONS
7ai_prerequisite = {
8any_subject = {
8at_war = yes
}
9at_war = no
}
12potential = {
}
15allow = {
16scope:actor = {
17is_during_bankruptcy = no
18has_regent = no
}
}
22select_trigger = {
23looking_for_a = country
24interaction_source_list = {
25scope:actor = {
26every_subject = {
27add_to_list = source
}
}
}
31target_flag = recipient
32name = "choose_country" Choose the Country:
33column = {
34data = name
}
36visible = {
37at_war = yes
38is_subject_of = scope:actor
}
40enabled = {
}
}
44select_trigger = {
45looking_for_a = war
46source = recipient
47target_flag = target
48interaction_source_list = {
49scope:recipient = {
50every_current_war = {
51add_to_list = source
}
}
}
55cache_interaction_source_list = yes
56name = "choose_war_to_join" Choose the War to ask them to join:
57column = {
58data = name
}
60visible = {
}
62enabled = {
63trigger_if = {
64limit = {
65attacker_leader = scope:recipient
}
67can_join_as_attacker = scope:actor
68NOT = {
69defender_leader = {
70is_subject_or_below_of = scope:actor
}
}
73scope:actor = {
74can_join_offensive_war_with = scope:recipient
75NOT = {
76has_truce_with = root.defender_leader
}
}
}
80trigger_else_if = {
81limit = {
82defender_leader = scope:recipient
}
84can_join_as_defender = scope:actor
85NOT = {
86attacker_leader = {
87is_subject_or_below_of = scope:actor
}
}
90scope:actor = {
91can_join_defensive_war_with = scope:recipient
92NOT = {
93has_truce_with = root.attacker_leader
}
}
}
97trigger_else = {
98always = no
}
}
}
103effect = {
104scope:target = {
105if = {
106limit = {
107attacker_leader = scope:recipient
}
109scope:actor = {
110join_war_as_attacker = {
111war = prev
112reason = intervene
}
}
}
116else = {
117scope:actor = {
118join_war_as_defender = {
119war = prev
120reason = intervene
}
}
}
}
}
127ai_will_do = {
128add = {
129desc = "game_concept_opinion"
130scope:actor = {
131value = "opinion(scope:recipient)"
132divide = 5
}
}
135add = {
136desc = "game_concept_trust"
137scope:actor = {
138value = "trust(scope:recipient)"
139divide = 5
}
}
142add = {
143desc = "game_concept_war_exhaustion"
144scope:actor = {
145value = war_exhaustion
146divide = -2
}
}
149add = {
150desc = "LENGTH_OF_WAR_TOOLTIP"
151scope:target = {
152value = war_length_in_years
153add = -4
154multiply = 10
}
}
}