
PolicyChanged this version
Establish Seniority
The Union can only hold together from a single throne. Designating the senior partner of the Union shall also determine which throne shall represent the Union as a whole.
Definitionin_game/common/laws/40_personal_unions.txt:17
21has_parliament = yes
22propose_effect = {
23scope:recipient ?= {
24ordered_international_organization_member = {
25order_by = country_economical_base
26max = 1
27check_range_bounds = no
28save_scope_as = best_senior_partner_candidate
}
30if = {
31limit = {
31exists = scope:best_senior_partner_candidate
}
32set_variable = {
34value = scope:best_senior_partner_candidate
}
}
}
}
39on_activate = {
40custom_tooltip = union_senior_partner_policy_at Enables the Senior Partner and Junior Partner special statuses
42if = {
44custom_tooltip = union_senior_partner_policy_tt Country With Highest Great Power becomes the Senior Partner (country is selected due to them having the highest Great Power Score in the Union)
}
46else = {
47custom_tooltip = union_senior_partner_policy_specific_tt Pre Selected Senior Partner Country becomes the Senior Partner
}
50custom_tooltip = union_unlocks_independence_casus_belli_tt Unlocks the Union Independence Casus Belli for every Junior Partner who is weaker than the Senior Partner
51custom_tooltip = union_unlocks_war_for_seniority_casus_belli_tt Unlocks the War for Seniority Casus Belli for every Junior Partner who is equal or stronger than the Senior Partner
}
53wants_propose_policy = {
54if = {
58add = {
59desc = "POLICY_WOULD_BECOME_LEADER_OF_ORGANIZATION" Would become leader of the organization
60value = 1000
}
}
63else = {
64add = {
65desc = "VOTE_BASE_VALUE" Base Value
66value = -50
}
}
}
70wants_this_policy_bias = {
71add = {
72desc = "VOTE_BASE_VALUE" Base Value
73value = -50
}
75if = {
77add = {
78desc = "POLICY_WOULD_BECOME_LEADER_OF_ORGANIZATION" Would become leader of the organization
79value = 1000
}
}
82else_if = {
83limit = {
85exists = scope:likely_senior_partner
}
87add = {
88desc = "POLICY_DIP_REP_OF_FUTURE_LEADER" Diplomatic Reputation of Likely Senior Partner
89value = scope:likely_senior_partner.modifier:diplomatic_reputation
90multiply = 3
}
92add = {
93desc = "POLICY_OPINION_OF_FUTURE_LEADER" Opinion of Likely Senior Partner
94value = "root.opinion(scope:likely_senior_partner)"
}
96if = {
97limit = {
97scope:recipient.total_members > 1
}
98add = {
99desc = "POLICY_POWER_COMPARISON_OF_FUTURE_LEADER" Great Power Score of Likely Senior Partner compared against the Average
100value = {
101value = 0
102scope:recipient = {
103every_international_organization_member = {
104limit = {
104NOT = {
104this = scope:likely_senior_partner
}
}
105add = country_economical_base
}
}
108divide = {
109value = scope:recipient.total_members
110subtract = 1
}
112subtract = scope:likely_senior_partner.country_economical_base
113multiply = -1
}
}
}
}
}
119wants_keep_policy = {
120if = {
126add = {
127desc = "VOTE_IS_SENIOR_PARTNER" Is Senior Partner of Recipient
128value = 1000
}
}
131else = {
132subtract = {
133desc = "VOTE_IS_JUNIOR_PARTNER" Is Junior Partner of Recipient
134value = 25
}
}
}