Diff to HTML by rtfpessoa

Files changed (5) hide show
  1. common/estate_agendas/00_generic_agendas.txt +2406 -0
  2. common/estate_agendas/02_noble_agendas.txt +480 -0
  3. common/estate_agendas/09_eunuchs_agendas.txt +4 -5
  4. common/estate_agendas/10_qizilbash_agendas.txt +1967 -0
  5. common/estate_agendas/11_ghulams_agendas.txt +1774 -0
common/estate_agendas/00_generic_agendas.txt CHANGED
@@ -1736,6 +1736,804 @@ estate_maratha_build_army_building_in_y = {
1736
1736
  }
1737
1737
  }
1738
1738
 
1739
+ estate_qizilbash_build_army_building_in_y = {
1740
+ can_select = {
1741
+ mil_tech = 6
1742
+ any_owned_province = {
1743
+ NOT = { religion_group = ROOT }
1744
+ is_state_core = root
1745
+ OR = {
1746
+ NOT = { has_building = training_fields }
1747
+ NOT = { has_building = conscription_center }
1748
+ }
1749
+ OR = {
1750
+ AND = {
1751
+ NOT = { has_building = barracks }
1752
+ num_free_building_slots = 1
1753
+ }
1754
+ AND = {
1755
+ ROOT = { mil_tech = 8 }
1756
+ NOT = { has_building = regimental_camp }
1757
+ num_free_building_slots = 1
1758
+ }
1759
+ AND = {
1760
+ NOT = { has_building = training_fields }
1761
+ ROOT = { mil_tech = 16 }
1762
+ OR = {
1763
+ has_building = barracks
1764
+ num_free_building_slots = 1
1765
+ }
1766
+ }
1767
+ AND = {
1768
+ NOT = { has_building = conscription_center }
1769
+ ROOT = { mil_tech = 22 }
1770
+ OR = {
1771
+ has_building = regimental_camp
1772
+ num_free_building_slots = 1
1773
+ }
1774
+ }
1775
+ }
1776
+ }
1777
+ }
1778
+ selection_weight = {
1779
+ factor = 1
1780
+ modifier = {
1781
+ factor = 0.65
1782
+ NOT = {
1783
+ any_owned_province = {
1784
+ NOT = { religion_group = ROOT }
1785
+ is_state_core = root
1786
+ base_manpower = 3
1787
+ OR = {
1788
+ NOT = { has_building = training_fields }
1789
+ NOT = { has_building = conscription_center }
1790
+ }
1791
+ OR = {
1792
+ AND = {
1793
+ NOT = { has_building = barracks }
1794
+ num_free_building_slots = 1
1795
+ }
1796
+ AND = {
1797
+ ROOT = { mil_tech = 8 }
1798
+ NOT = { has_building = regimental_camp }
1799
+ num_free_building_slots = 1
1800
+ }
1801
+ AND = {
1802
+ NOT = { has_building = training_fields }
1803
+ ROOT = { mil_tech = 16 }
1804
+ OR = {
1805
+ has_building = barracks
1806
+ num_free_building_slots = 1
1807
+ }
1808
+ }
1809
+ AND = {
1810
+ NOT = { has_building = conscription_center }
1811
+ ROOT = { mil_tech = 22 }
1812
+ OR = {
1813
+ has_building = regimental_camp
1814
+ num_free_building_slots = 1
1815
+ }
1816
+ }
1817
+ }
1818
+ }
1819
+ }
1820
+ }
1821
+ modifier = {
1822
+ factor = 1.2
1823
+ any_owned_province = {
1824
+ NOT = { religion_group = ROOT }
1825
+ is_state_core = root
1826
+ base_manpower = 6
1827
+ OR = {
1828
+ NOT = { has_building = training_fields }
1829
+ NOT = { has_building = conscription_center }
1830
+ }
1831
+ OR = {
1832
+ AND = {
1833
+ NOT = { has_building = barracks }
1834
+ num_free_building_slots = 1
1835
+ }
1836
+ AND = {
1837
+ ROOT = { mil_tech = 8 }
1838
+ NOT = { has_building = regimental_camp }
1839
+ num_free_building_slots = 1
1840
+ }
1841
+ AND = {
1842
+ NOT = { has_building = training_fields }
1843
+ ROOT = { mil_tech = 16 }
1844
+ OR = {
1845
+ has_building = barracks
1846
+ num_free_building_slots = 1
1847
+ }
1848
+ }
1849
+ AND = {
1850
+ NOT = { has_building = conscription_center }
1851
+ ROOT = { mil_tech = 22 }
1852
+ OR = {
1853
+ has_building = regimental_camp
1854
+ num_free_building_slots = 1
1855
+ }
1856
+ }
1857
+ }
1858
+ }
1859
+ }
1860
+ modifier = {
1861
+ factor = 2
1862
+ NOT = {
1863
+ crown_land_share = 15
1864
+ }
1865
+ }
1866
+ modifier = {
1867
+ factor = 0
1868
+ has_estate_privilege = estate_janissary_allow_other_professions
1869
+ }
1870
+ }
1871
+ pre_effect = {
1872
+ set_variable = {
1873
+ which = estate_qizilbash_build_army_building_in_y_var
1874
+ value = 0
1875
+ }
1876
+ random_owned_province = {
1877
+ limit = {
1878
+ NOT = { religion_group = ROOT }
1879
+ is_state_core = root
1880
+ OR = {
1881
+ NOT = { has_building = training_fields }
1882
+ NOT = { has_building = conscription_center }
1883
+ }
1884
+ OR = {
1885
+ AND = {
1886
+ NOT = { has_building = barracks }
1887
+ num_free_building_slots = 1
1888
+ }
1889
+ AND = {
1890
+ ROOT = { mil_tech = 8 }
1891
+ NOT = { has_building = regimental_camp }
1892
+ num_free_building_slots = 1
1893
+ }
1894
+ AND = {
1895
+ NOT = { has_building = training_fields }
1896
+ ROOT = { mil_tech = 16 }
1897
+ OR = {
1898
+ has_building = barracks
1899
+ num_free_building_slots = 1
1900
+ }
1901
+ }
1902
+ AND = {
1903
+ NOT = { has_building = conscription_center }
1904
+ ROOT = { mil_tech = 22 }
1905
+ OR = {
1906
+ has_building = regimental_camp
1907
+ num_free_building_slots = 1
1908
+ }
1909
+ }
1910
+ }
1911
+ }
1912
+ save_event_target_as = agenda_province
1913
+ }
1914
+ random_owned_province = {
1915
+ limit = {
1916
+ NOT = { religion_group = ROOT }
1917
+ is_state_core = root
1918
+ base_manpower = 3
1919
+ OR = {
1920
+ NOT = { has_building = training_fields }
1921
+ NOT = { has_building = conscription_center }
1922
+ }
1923
+ OR = {
1924
+ AND = {
1925
+ NOT = { has_building = barracks }
1926
+ num_free_building_slots = 1
1927
+ }
1928
+ AND = {
1929
+ ROOT = { mil_tech = 8 }
1930
+ NOT = { has_building = regimental_camp }
1931
+ num_free_building_slots = 1
1932
+ }
1933
+ AND = {
1934
+ NOT = { has_building = training_fields }
1935
+ ROOT = { mil_tech = 16 }
1936
+ OR = {
1937
+ has_building = barracks
1938
+ num_free_building_slots = 1
1939
+ }
1940
+ }
1941
+ AND = {
1942
+ NOT = { has_building = conscription_center }
1943
+ ROOT = { mil_tech = 22 }
1944
+ OR = {
1945
+ has_building = regimental_camp
1946
+ num_free_building_slots = 1
1947
+ }
1948
+ }
1949
+ }
1950
+ }
1951
+ save_event_target_as = agenda_province
1952
+ }
1953
+ random_owned_province = {
1954
+ limit = {
1955
+ NOT = { religion_group = ROOT }
1956
+ is_state_core = root
1957
+ base_manpower = 6
1958
+ OR = {
1959
+ NOT = { has_building = training_fields }
1960
+ NOT = { has_building = conscription_center }
1961
+ }
1962
+ OR = {
1963
+ AND = {
1964
+ NOT = { has_building = barracks }
1965
+ num_free_building_slots = 1
1966
+ }
1967
+ AND = {
1968
+ ROOT = { mil_tech = 8 }
1969
+ NOT = { has_building = regimental_camp }
1970
+ num_free_building_slots = 1
1971
+ }
1972
+ AND = {
1973
+ NOT = { has_building = training_fields }
1974
+ ROOT = { mil_tech = 16 }
1975
+ OR = {
1976
+ has_building = barracks
1977
+ num_free_building_slots = 1
1978
+ }
1979
+ }
1980
+ AND = {
1981
+ NOT = { has_building = conscription_center }
1982
+ ROOT = { mil_tech = 22 }
1983
+ OR = {
1984
+ has_building = regimental_camp
1985
+ num_free_building_slots = 1
1986
+ }
1987
+ }
1988
+ }
1989
+ }
1990
+ save_event_target_as = agenda_province
1991
+ }
1992
+ event_target:agenda_province = {
1993
+ if = {
1994
+ limit = {
1995
+ NOT = { has_building = training_fields }
1996
+ ROOT = { mil_tech = 16 }
1997
+ OR = {
1998
+ num_free_building_slots = 1
1999
+ has_building = barracks
2000
+ }
2001
+ }
2002
+ ROOT = {
2003
+ set_variable = {
2004
+ which = estate_qizilbash_build_army_building_in_y_var
2005
+ value = 4
2006
+ }
2007
+ }
2008
+ }
2009
+ else_if = {
2010
+ limit = {
2011
+ NOT = { has_building = barracks }
2012
+ NOT = { has_building = training_fields }
2013
+ num_free_building_slots = 1
2014
+ }
2015
+ ROOT = {
2016
+ set_variable = {
2017
+ which = estate_qizilbash_build_army_building_in_y_var
2018
+ value = 3
2019
+ }
2020
+ }
2021
+ }
2022
+ else_if = {
2023
+ limit = {
2024
+ has_building = regimental_camp
2025
+ ROOT = { mil_tech = 22 }
2026
+ }
2027
+ ROOT = {
2028
+ set_variable = {
2029
+ which = estate_qizilbash_build_army_building_in_y_var
2030
+ value = 2
2031
+ }
2032
+ }
2033
+ }
2034
+ else = {
2035
+ ROOT = {
2036
+ set_variable = {
2037
+ which = estate_qizilbash_build_army_building_in_y_var
2038
+ value = 1
2039
+ }
2040
+ }
2041
+ }
2042
+ }
2043
+ }
2044
+ provinces_to_highlight = {
2045
+ province_id = event_target:agenda_province
2046
+ }
2047
+ fail_if = {
2048
+ event_target:agenda_province = {
2049
+ NOT = { owned_by = root }
2050
+ }
2051
+ }
2052
+ task_requirements = {
2053
+ if = {
2054
+ limit = {
2055
+ check_variable = {
2056
+ which = estate_qizilbash_build_army_building_in_y_var
2057
+ value = 4
2058
+ }
2059
+ }
2060
+ event_target:agenda_province = {
2061
+ has_building = training_fields
2062
+ }
2063
+ }
2064
+ else_if = {
2065
+ limit = {
2066
+ check_variable = {
2067
+ which = estate_qizilbash_build_army_building_in_y_var
2068
+ value = 3
2069
+ }
2070
+ }
2071
+ event_target:agenda_province = {
2072
+ OR = {
2073
+ has_building = barracks
2074
+ has_building = training_fields
2075
+ }
2076
+ }
2077
+ }
2078
+ else_if = {
2079
+ limit = {
2080
+ check_variable = {
2081
+ which = estate_qizilbash_build_army_building_in_y_var
2082
+ value = 2
2083
+ }
2084
+ }
2085
+ event_target:agenda_province = {
2086
+ has_building = conscription_center
2087
+ }
2088
+ }
2089
+ else = {
2090
+ event_target:agenda_province = {
2091
+ OR = {
2092
+ has_building = regimental_camp
2093
+ has_building = conscription_center
2094
+ }
2095
+ }
2096
+ }
2097
+ }
2098
+ task_completed_effect = {
2099
+ add_estate_loyalty = {
2100
+ estate = estate_qizilbash
2101
+ loyalty = 10
2102
+ }
2103
+ if = {
2104
+ limit = {
2105
+ NOT = { crown_land_share = 15 }
2106
+ estate_territory = {
2107
+ estate = estate_qizilbash
2108
+ territory = 10
2109
+ }
2110
+ }
2111
+ take_estate_land_share_small = { estate = estate_qizilbash }
2112
+ }
2113
+ else = {
2114
+ event_target:agenda_province = {
2115
+ add_base_manpower = 1
2116
+ }
2117
+ }
2118
+ }
2119
+ failing_effect = {
2120
+ event_target:agenda_province = {
2121
+ if = {
2122
+ limit = { owned_by = root }
2123
+ add_named_unrest = {
2124
+ name = local_qizilbash_displeased
2125
+ value = 5
2126
+ }
2127
+ }
2128
+ }
2129
+ add_estate_loyalty_modifier = {
2130
+ estate = estate_qizilbash
2131
+ desc = EST_VAL_AGENDA_DENIED
2132
+ loyalty = -5
2133
+ duration = 7300
2134
+ }
2135
+ }
2136
+ }
2137
+
2138
+ estate_ghulams_build_army_building_in_y = {
2139
+ can_select = {
2140
+ mil_tech = 6
2141
+ any_owned_province = {
2142
+ NOT = { religion_group = ROOT }
2143
+ is_state_core = root
2144
+ OR = {
2145
+ NOT = { has_building = training_fields }
2146
+ NOT = { has_building = conscription_center }
2147
+ }
2148
+ OR = {
2149
+ AND = {
2150
+ NOT = { has_building = barracks }
2151
+ num_free_building_slots = 1
2152
+ }
2153
+ AND = {
2154
+ ROOT = { mil_tech = 8 }
2155
+ NOT = { has_building = regimental_camp }
2156
+ num_free_building_slots = 1
2157
+ }
2158
+ AND = {
2159
+ NOT = { has_building = training_fields }
2160
+ ROOT = { mil_tech = 16 }
2161
+ OR = {
2162
+ has_building = barracks
2163
+ num_free_building_slots = 1
2164
+ }
2165
+ }
2166
+ AND = {
2167
+ NOT = { has_building = conscription_center }
2168
+ ROOT = { mil_tech = 22 }
2169
+ OR = {
2170
+ has_building = regimental_camp
2171
+ num_free_building_slots = 1
2172
+ }
2173
+ }
2174
+ }
2175
+ }
2176
+ }
2177
+ selection_weight = {
2178
+ factor = 1
2179
+ modifier = {
2180
+ factor = 0.65
2181
+ NOT = {
2182
+ any_owned_province = {
2183
+ NOT = { religion_group = ROOT }
2184
+ is_state_core = root
2185
+ base_manpower = 3
2186
+ OR = {
2187
+ NOT = { has_building = training_fields }
2188
+ NOT = { has_building = conscription_center }
2189
+ }
2190
+ OR = {
2191
+ AND = {
2192
+ NOT = { has_building = barracks }
2193
+ num_free_building_slots = 1
2194
+ }
2195
+ AND = {
2196
+ ROOT = { mil_tech = 8 }
2197
+ NOT = { has_building = regimental_camp }
2198
+ num_free_building_slots = 1
2199
+ }
2200
+ AND = {
2201
+ NOT = { has_building = training_fields }
2202
+ ROOT = { mil_tech = 16 }
2203
+ OR = {
2204
+ has_building = barracks
2205
+ num_free_building_slots = 1
2206
+ }
2207
+ }
2208
+ AND = {
2209
+ NOT = { has_building = conscription_center }
2210
+ ROOT = { mil_tech = 22 }
2211
+ OR = {
2212
+ has_building = regimental_camp
2213
+ num_free_building_slots = 1
2214
+ }
2215
+ }
2216
+ }
2217
+ }
2218
+ }
2219
+ }
2220
+ modifier = {
2221
+ factor = 1.2
2222
+ any_owned_province = {
2223
+ NOT = { religion_group = ROOT }
2224
+ is_state_core = root
2225
+ base_manpower = 6
2226
+ OR = {
2227
+ NOT = { has_building = training_fields }
2228
+ NOT = { has_building = conscription_center }
2229
+ }
2230
+ OR = {
2231
+ AND = {
2232
+ NOT = { has_building = barracks }
2233
+ num_free_building_slots = 1
2234
+ }
2235
+ AND = {
2236
+ ROOT = { mil_tech = 8 }
2237
+ NOT = { has_building = regimental_camp }
2238
+ num_free_building_slots = 1
2239
+ }
2240
+ AND = {
2241
+ NOT = { has_building = training_fields }
2242
+ ROOT = { mil_tech = 16 }
2243
+ OR = {
2244
+ has_building = barracks
2245
+ num_free_building_slots = 1
2246
+ }
2247
+ }
2248
+ AND = {
2249
+ NOT = { has_building = conscription_center }
2250
+ ROOT = { mil_tech = 22 }
2251
+ OR = {
2252
+ has_building = regimental_camp
2253
+ num_free_building_slots = 1
2254
+ }
2255
+ }
2256
+ }
2257
+ }
2258
+ }
2259
+ modifier = {
2260
+ factor = 2
2261
+ NOT = {
2262
+ crown_land_share = 15
2263
+ }
2264
+ }
2265
+ modifier = {
2266
+ factor = 0
2267
+ has_estate_privilege = estate_janissary_allow_other_professions
2268
+ }
2269
+ }
2270
+ pre_effect = {
2271
+ set_variable = {
2272
+ which = estate_ghulams_build_army_building_in_y_var
2273
+ value = 0
2274
+ }
2275
+ random_owned_province = {
2276
+ limit = {
2277
+ NOT = { religion_group = ROOT }
2278
+ is_state_core = root
2279
+ OR = {
2280
+ NOT = { has_building = training_fields }
2281
+ NOT = { has_building = conscription_center }
2282
+ }
2283
+ OR = {
2284
+ AND = {
2285
+ NOT = { has_building = barracks }
2286
+ num_free_building_slots = 1
2287
+ }
2288
+ AND = {
2289
+ ROOT = { mil_tech = 8 }
2290
+ NOT = { has_building = regimental_camp }
2291
+ num_free_building_slots = 1
2292
+ }
2293
+ AND = {
2294
+ NOT = { has_building = training_fields }
2295
+ ROOT = { mil_tech = 16 }
2296
+ OR = {
2297
+ has_building = barracks
2298
+ num_free_building_slots = 1
2299
+ }
2300
+ }
2301
+ AND = {
2302
+ NOT = { has_building = conscription_center }
2303
+ ROOT = { mil_tech = 22 }
2304
+ OR = {
2305
+ has_building = regimental_camp
2306
+ num_free_building_slots = 1
2307
+ }
2308
+ }
2309
+ }
2310
+ }
2311
+ save_event_target_as = agenda_province
2312
+ }
2313
+ random_owned_province = {
2314
+ limit = {
2315
+ NOT = { religion_group = ROOT }
2316
+ is_state_core = root
2317
+ base_manpower = 3
2318
+ OR = {
2319
+ NOT = { has_building = training_fields }
2320
+ NOT = { has_building = conscription_center }
2321
+ }
2322
+ OR = {
2323
+ AND = {
2324
+ NOT = { has_building = barracks }
2325
+ num_free_building_slots = 1
2326
+ }
2327
+ AND = {
2328
+ ROOT = { mil_tech = 8 }
2329
+ NOT = { has_building = regimental_camp }
2330
+ num_free_building_slots = 1
2331
+ }
2332
+ AND = {
2333
+ NOT = { has_building = training_fields }
2334
+ ROOT = { mil_tech = 16 }
2335
+ OR = {
2336
+ has_building = barracks
2337
+ num_free_building_slots = 1
2338
+ }
2339
+ }
2340
+ AND = {
2341
+ NOT = { has_building = conscription_center }
2342
+ ROOT = { mil_tech = 22 }
2343
+ OR = {
2344
+ has_building = regimental_camp
2345
+ num_free_building_slots = 1
2346
+ }
2347
+ }
2348
+ }
2349
+ }
2350
+ save_event_target_as = agenda_province
2351
+ }
2352
+ random_owned_province = {
2353
+ limit = {
2354
+ NOT = { religion_group = ROOT }
2355
+ is_state_core = root
2356
+ base_manpower = 6
2357
+ OR = {
2358
+ NOT = { has_building = training_fields }
2359
+ NOT = { has_building = conscription_center }
2360
+ }
2361
+ OR = {
2362
+ AND = {
2363
+ NOT = { has_building = barracks }
2364
+ num_free_building_slots = 1
2365
+ }
2366
+ AND = {
2367
+ ROOT = { mil_tech = 8 }
2368
+ NOT = { has_building = regimental_camp }
2369
+ num_free_building_slots = 1
2370
+ }
2371
+ AND = {
2372
+ NOT = { has_building = training_fields }
2373
+ ROOT = { mil_tech = 16 }
2374
+ OR = {
2375
+ has_building = barracks
2376
+ num_free_building_slots = 1
2377
+ }
2378
+ }
2379
+ AND = {
2380
+ NOT = { has_building = conscription_center }
2381
+ ROOT = { mil_tech = 22 }
2382
+ OR = {
2383
+ has_building = regimental_camp
2384
+ num_free_building_slots = 1
2385
+ }
2386
+ }
2387
+ }
2388
+ }
2389
+ save_event_target_as = agenda_province
2390
+ }
2391
+ event_target:agenda_province = {
2392
+ if = {
2393
+ limit = {
2394
+ NOT = { has_building = training_fields }
2395
+ ROOT = { mil_tech = 16 }
2396
+ OR = {
2397
+ num_free_building_slots = 1
2398
+ has_building = barracks
2399
+ }
2400
+ }
2401
+ ROOT = {
2402
+ set_variable = {
2403
+ which = estate_ghulams_build_army_building_in_y_var
2404
+ value = 4
2405
+ }
2406
+ }
2407
+ }
2408
+ else_if = {
2409
+ limit = {
2410
+ NOT = { has_building = barracks }
2411
+ NOT = { has_building = training_fields }
2412
+ num_free_building_slots = 1
2413
+ }
2414
+ ROOT = {
2415
+ set_variable = {
2416
+ which = estate_ghulams_build_army_building_in_y_var
2417
+ value = 3
2418
+ }
2419
+ }
2420
+ }
2421
+ else_if = {
2422
+ limit = {
2423
+ has_building = regimental_camp
2424
+ ROOT = { mil_tech = 22 }
2425
+ }
2426
+ ROOT = {
2427
+ set_variable = {
2428
+ which = estate_ghulams_build_army_building_in_y_var
2429
+ value = 2
2430
+ }
2431
+ }
2432
+ }
2433
+ else = {
2434
+ ROOT = {
2435
+ set_variable = {
2436
+ which = estate_ghulams_build_army_building_in_y_var
2437
+ value = 1
2438
+ }
2439
+ }
2440
+ }
2441
+ }
2442
+ }
2443
+ provinces_to_highlight = {
2444
+ province_id = event_target:agenda_province
2445
+ }
2446
+ fail_if = {
2447
+ event_target:agenda_province = {
2448
+ NOT = { owned_by = root }
2449
+ }
2450
+ }
2451
+ task_requirements = {
2452
+ if = {
2453
+ limit = {
2454
+ check_variable = {
2455
+ which = estate_ghulams_build_army_building_in_y_var
2456
+ value = 4
2457
+ }
2458
+ }
2459
+ event_target:agenda_province = {
2460
+ has_building = training_fields
2461
+ }
2462
+ }
2463
+ else_if = {
2464
+ limit = {
2465
+ check_variable = {
2466
+ which = estate_ghulams_build_army_building_in_y_var
2467
+ value = 3
2468
+ }
2469
+ }
2470
+ event_target:agenda_province = {
2471
+ OR = {
2472
+ has_building = barracks
2473
+ has_building = training_fields
2474
+ }
2475
+ }
2476
+ }
2477
+ else_if = {
2478
+ limit = {
2479
+ check_variable = {
2480
+ which = estate_ghulams_build_army_building_in_y_var
2481
+ value = 2
2482
+ }
2483
+ }
2484
+ event_target:agenda_province = {
2485
+ has_building = conscription_center
2486
+ }
2487
+ }
2488
+ else = {
2489
+ event_target:agenda_province = {
2490
+ OR = {
2491
+ has_building = regimental_camp
2492
+ has_building = conscription_center
2493
+ }
2494
+ }
2495
+ }
2496
+ }
2497
+ task_completed_effect = {
2498
+ add_estate_loyalty = {
2499
+ estate = estate_ghulams
2500
+ loyalty = 10
2501
+ }
2502
+ if = {
2503
+ limit = {
2504
+ NOT = { crown_land_share = 15 }
2505
+ estate_territory = {
2506
+ estate = estate_ghulams
2507
+ territory = 10
2508
+ }
2509
+ }
2510
+ take_estate_land_share_small = { estate = estate_ghulams }
2511
+ }
2512
+ else = {
2513
+ event_target:agenda_province = {
2514
+ add_base_manpower = 1
2515
+ }
2516
+ }
2517
+ }
2518
+ failing_effect = {
2519
+ event_target:agenda_province = {
2520
+ if = {
2521
+ limit = { owned_by = root }
2522
+ add_named_unrest = {
2523
+ name = local_ghulams_displeased
2524
+ value = 5
2525
+ }
2526
+ }
2527
+ }
2528
+ add_estate_loyalty_modifier = {
2529
+ estate = estate_ghulams
2530
+ desc = EST_VAL_AGENDA_DENIED
2531
+ loyalty = -5
2532
+ duration = 7300
2533
+ }
2534
+ }
2535
+ }
2536
+
1739
2537
  estate_nobles_build_fort_building_in_y = {
1740
2538
  can_select = {
1741
2539
  any_owned_province = {
@@ -3650,6 +4448,1282 @@ estate_maratha_build_fort_building_in_y = {
3650
4448
  }
3651
4449
  }
3652
4450
 
4451
+ estate_qizilbash_build_fort_building_in_y = {
4452
+ can_select = {
4453
+ any_owned_province = {
4454
+ OR = {
4455
+ AND = {
4456
+ NOT = { has_building = fort_15th }
4457
+ NOT = { has_building = fort_16th }
4458
+ NOT = { has_building = fort_17th }
4459
+ NOT = { has_building = fort_18th }
4460
+ num_free_building_slots = 1
4461
+ any_neighbor_province = {
4462
+ owner = {
4463
+ OR = {
4464
+ is_rival = root
4465
+ root = { is_rival = prev }
4466
+ AND = {
4467
+ is_subject_other_than_tributary_trigger = yes
4468
+ overlord = {
4469
+ OR = {
4470
+ is_rival = root
4471
+ root = { is_rival = prev }
4472
+ }
4473
+ }
4474
+ }
4475
+ }
4476
+ }
4477
+ }
4478
+ NOT = {
4479
+ any_neighbor_province = {
4480
+ owned_by = root
4481
+ OR = {
4482
+ has_building = fort_15th
4483
+ has_building = fort_16th
4484
+ has_building = fort_17th
4485
+ has_building = fort_18th
4486
+ }
4487
+ }
4488
+ }
4489
+ }
4490
+ AND = {
4491
+ NOT = { has_building = fort_15th }
4492
+ NOT = { has_building = fort_16th }
4493
+ NOT = { has_building = fort_17th }
4494
+ NOT = { has_building = fort_18th }
4495
+ num_free_building_slots = 1
4496
+ any_neighbor_province = {
4497
+ owned_by = root
4498
+ any_neighbor_province = {
4499
+ owner = {
4500
+ OR = {
4501
+ is_rival = root
4502
+ root = { is_rival = prev }
4503
+ AND = {
4504
+ is_subject_other_than_tributary_trigger = yes
4505
+ overlord = {
4506
+ OR = {
4507
+ is_rival = root
4508
+ root = { is_rival = prev }
4509
+ }
4510
+ }
4511
+ }
4512
+ }
4513
+ }
4514
+ NOT = {
4515
+ any_neighbor_province = {
4516
+ owned_by = root
4517
+ OR = {
4518
+ has_building = fort_15th
4519
+ has_building = fort_16th
4520
+ has_building = fort_17th
4521
+ has_building = fort_18th
4522
+ }
4523
+ }
4524
+ }
4525
+ }
4526
+ }
4527
+ }
4528
+ AND = {
4529
+ has_building = fort_15th
4530
+ ROOT = { mil_tech = 14 }
4531
+ }
4532
+ AND = {
4533
+ has_building = fort_16th
4534
+ ROOT = { mil_tech = 19 }
4535
+ }
4536
+ AND = {
4537
+ has_building = fort_17th
4538
+ ROOT = { mil_tech = 24 }
4539
+ }
4540
+ }
4541
+ NOT = { has_building = fort_18th }
4542
+ }
4543
+ }
4544
+ selection_weight = {
4545
+ factor = 1
4546
+ modifier = {
4547
+ factor = 1.5
4548
+ any_neighbor_country = {
4549
+ OR = {
4550
+ is_rival = root
4551
+ root = { is_rival = prev }
4552
+ }
4553
+ army_size = root
4554
+ }
4555
+ }
4556
+ }
4557
+ pre_effect = {
4558
+ set_variable = {
4559
+ which = estate_nobles_build_fort_building_in_y_var
4560
+ value = 0
4561
+ }
4562
+ random_owned_province = {
4563
+ limit = {
4564
+ OR = {
4565
+ AND = {
4566
+ NOT = { has_building = fort_15th }
4567
+ NOT = { has_building = fort_16th }
4568
+ NOT = { has_building = fort_17th }
4569
+ NOT = { has_building = fort_18th }
4570
+ num_free_building_slots = 1
4571
+ any_neighbor_province = {
4572
+ owner = {
4573
+ OR = {
4574
+ is_rival = root
4575
+ root = { is_rival = prev }
4576
+ AND = {
4577
+ is_subject_other_than_tributary_trigger = yes
4578
+ overlord = {
4579
+ OR = {
4580
+ is_rival = root
4581
+ root = { is_rival = prev }
4582
+ }
4583
+ }
4584
+ }
4585
+ }
4586
+ }
4587
+ }
4588
+ NOT = {
4589
+ any_neighbor_province = {
4590
+ owned_by = root
4591
+ OR = {
4592
+ has_building = fort_15th
4593
+ has_building = fort_16th
4594
+ has_building = fort_17th
4595
+ has_building = fort_18th
4596
+ }
4597
+ }
4598
+ }
4599
+ }
4600
+ AND = {
4601
+ NOT = { has_building = fort_15th }
4602
+ NOT = { has_building = fort_16th }
4603
+ NOT = { has_building = fort_17th }
4604
+ NOT = { has_building = fort_18th }
4605
+ num_free_building_slots = 1
4606
+ any_neighbor_province = {
4607
+ owned_by = root
4608
+ any_neighbor_province = {
4609
+ owner = {
4610
+ OR = {
4611
+ is_rival = root
4612
+ root = { is_rival = prev }
4613
+ AND = {
4614
+ is_subject_other_than_tributary_trigger = yes
4615
+ overlord = {
4616
+ OR = {
4617
+ is_rival = root
4618
+ root = { is_rival = prev }
4619
+ }
4620
+ }
4621
+ }
4622
+ }
4623
+ }
4624
+ NOT = {
4625
+ any_neighbor_province = {
4626
+ owned_by = root
4627
+ OR = {
4628
+ has_building = fort_15th
4629
+ has_building = fort_16th
4630
+ has_building = fort_17th
4631
+ has_building = fort_18th
4632
+ }
4633
+ }
4634
+ }
4635
+ }
4636
+ }
4637
+ }
4638
+ AND = {
4639
+ has_building = fort_15th
4640
+ ROOT = { mil_tech = 14 }
4641
+ }
4642
+ AND = {
4643
+ has_building = fort_16th
4644
+ ROOT = { mil_tech = 19 }
4645
+ }
4646
+ AND = {
4647
+ has_building = fort_17th
4648
+ ROOT = { mil_tech = 24 }
4649
+ }
4650
+ }
4651
+ NOT = { has_building = fort_18th }
4652
+ }
4653
+ save_event_target_as = agenda_province
4654
+ }
4655
+ random_owned_province = {
4656
+ limit = {
4657
+ OR = {
4658
+ AND = {
4659
+ NOT = { has_building = fort_15th }
4660
+ NOT = { has_building = fort_16th }
4661
+ NOT = { has_building = fort_17th }
4662
+ NOT = { has_building = fort_18th }
4663
+ num_free_building_slots = 1
4664
+ any_neighbor_province = {
4665
+ owner = {
4666
+ OR = {
4667
+ is_rival = root
4668
+ root = { is_rival = prev }
4669
+ AND = {
4670
+ is_subject_other_than_tributary_trigger = yes
4671
+ overlord = {
4672
+ OR = {
4673
+ is_rival = root
4674
+ root = { is_rival = prev }
4675
+ }
4676
+ }
4677
+ }
4678
+ }
4679
+ }
4680
+ }
4681
+ NOT = {
4682
+ any_neighbor_province = {
4683
+ owned_by = root
4684
+ OR = {
4685
+ has_building = fort_15th
4686
+ has_building = fort_16th
4687
+ has_building = fort_17th
4688
+ has_building = fort_18th
4689
+ }
4690
+ }
4691
+ }
4692
+ has_terrain = hills
4693
+ }
4694
+ AND = {
4695
+ NOT = { has_building = fort_15th }
4696
+ NOT = { has_building = fort_16th }
4697
+ NOT = { has_building = fort_17th }
4698
+ NOT = { has_building = fort_18th }
4699
+ num_free_building_slots = 1
4700
+ any_neighbor_province = {
4701
+ owned_by = root
4702
+ any_neighbor_province = {
4703
+ owner = {
4704
+ OR = {
4705
+ is_rival = root
4706
+ root = { is_rival = prev }
4707
+ AND = {
4708
+ is_subject_other_than_tributary_trigger = yes
4709
+ overlord = {
4710
+ OR = {
4711
+ is_rival = root
4712
+ root = { is_rival = prev }
4713
+ }
4714
+ }
4715
+ }
4716
+ }
4717
+ }
4718
+ NOT = {
4719
+ any_neighbor_province = {
4720
+ owned_by = root
4721
+ OR = {
4722
+ has_building = fort_15th
4723
+ has_building = fort_16th
4724
+ has_building = fort_17th
4725
+ has_building = fort_18th
4726
+ }
4727
+ }
4728
+ }
4729
+ }
4730
+ }
4731
+ has_terrain = hills
4732
+ }
4733
+ AND = {
4734
+ has_building = fort_15th
4735
+ ROOT = { mil_tech = 14 }
4736
+ }
4737
+ AND = {
4738
+ has_building = fort_16th
4739
+ ROOT = { mil_tech = 19 }
4740
+ }
4741
+ AND = {
4742
+ has_building = fort_17th
4743
+ ROOT = { mil_tech = 24 }
4744
+ }
4745
+ }
4746
+ NOT = { has_building = fort_18th }
4747
+ }
4748
+ save_event_target_as = agenda_province
4749
+ }
4750
+ random_owned_province = {
4751
+ limit = {
4752
+ OR = {
4753
+ AND = {
4754
+ NOT = { has_building = fort_15th }
4755
+ NOT = { has_building = fort_16th }
4756
+ NOT = { has_building = fort_17th }
4757
+ NOT = { has_building = fort_18th }
4758
+ num_free_building_slots = 1
4759
+ any_neighbor_province = {
4760
+ owner = {
4761
+ OR = {
4762
+ is_rival = root
4763
+ root = { is_rival = prev }
4764
+ AND = {
4765
+ is_subject_other_than_tributary_trigger = yes
4766
+ overlord = {
4767
+ OR = {
4768
+ is_rival = root
4769
+ root = { is_rival = prev }
4770
+ }
4771
+ }
4772
+ }
4773
+ }
4774
+ }
4775
+ }
4776
+ NOT = {
4777
+ any_neighbor_province = {
4778
+ owned_by = root
4779
+ OR = {
4780
+ has_building = fort_15th
4781
+ has_building = fort_16th
4782
+ has_building = fort_17th
4783
+ has_building = fort_18th
4784
+ }
4785
+ }
4786
+ }
4787
+ has_terrain = highlands
4788
+ }
4789
+ AND = {
4790
+ NOT = { has_building = fort_15th }
4791
+ NOT = { has_building = fort_16th }
4792
+ NOT = { has_building = fort_17th }
4793
+ NOT = { has_building = fort_18th }
4794
+ num_free_building_slots = 1
4795
+ any_neighbor_province = {
4796
+ owned_by = root
4797
+ any_neighbor_province = {
4798
+ owner = {
4799
+ OR = {
4800
+ is_rival = root
4801
+ root = { is_rival = prev }
4802
+ AND = {
4803
+ is_subject_other_than_tributary_trigger = yes
4804
+ overlord = {
4805
+ OR = {
4806
+ is_rival = root
4807
+ root = { is_rival = prev }
4808
+ }
4809
+ }
4810
+ }
4811
+ }
4812
+ }
4813
+ NOT = {
4814
+ any_neighbor_province = {
4815
+ owned_by = root
4816
+ OR = {
4817
+ has_building = fort_15th
4818
+ has_building = fort_16th
4819
+ has_building = fort_17th
4820
+ has_building = fort_18th
4821
+ }
4822
+ }
4823
+ }
4824
+ }
4825
+ }
4826
+ has_terrain = highlands
4827
+ }
4828
+ AND = {
4829
+ has_building = fort_15th
4830
+ ROOT = { mil_tech = 14 }
4831
+ }
4832
+ AND = {
4833
+ has_building = fort_16th
4834
+ ROOT = { mil_tech = 19 }
4835
+ }
4836
+ AND = {
4837
+ has_building = fort_17th
4838
+ ROOT = { mil_tech = 24 }
4839
+ }
4840
+ }
4841
+ NOT = { has_building = fort_18th }
4842
+ }
4843
+ save_event_target_as = agenda_province
4844
+ }
4845
+ random_owned_province = {
4846
+ limit = {
4847
+ OR = {
4848
+ AND = {
4849
+ NOT = { has_building = fort_15th }
4850
+ NOT = { has_building = fort_16th }
4851
+ NOT = { has_building = fort_17th }
4852
+ NOT = { has_building = fort_18th }
4853
+ num_free_building_slots = 1
4854
+ any_neighbor_province = {
4855
+ owner = {
4856
+ OR = {
4857
+ is_rival = root
4858
+ root = { is_rival = prev }
4859
+ AND = {
4860
+ is_subject_other_than_tributary_trigger = yes
4861
+ overlord = {
4862
+ OR = {
4863
+ is_rival = root
4864
+ root = { is_rival = prev }
4865
+ }
4866
+ }
4867
+ }
4868
+ }
4869
+ }
4870
+ }
4871
+ NOT = {
4872
+ any_neighbor_province = {
4873
+ owned_by = root
4874
+ OR = {
4875
+ has_building = fort_15th
4876
+ has_building = fort_16th
4877
+ has_building = fort_17th
4878
+ has_building = fort_18th
4879
+ }
4880
+ }
4881
+ }
4882
+ has_terrain = mountain
4883
+ }
4884
+ AND = {
4885
+ NOT = { has_building = fort_15th }
4886
+ NOT = { has_building = fort_16th }
4887
+ NOT = { has_building = fort_17th }
4888
+ NOT = { has_building = fort_18th }
4889
+ num_free_building_slots = 1
4890
+ any_neighbor_province = {
4891
+ owned_by = root
4892
+ any_neighbor_province = {
4893
+ owner = {
4894
+ OR = {
4895
+ is_rival = root
4896
+ root = { is_rival = prev }
4897
+ AND = {
4898
+ is_subject_other_than_tributary_trigger = yes
4899
+ overlord = {
4900
+ OR = {
4901
+ is_rival = root
4902
+ root = { is_rival = prev }
4903
+ }
4904
+ }
4905
+ }
4906
+ }
4907
+ }
4908
+ NOT = {
4909
+ any_neighbor_province = {
4910
+ owned_by = root
4911
+ OR = {
4912
+ has_building = fort_15th
4913
+ has_building = fort_16th
4914
+ has_building = fort_17th
4915
+ has_building = fort_18th
4916
+ }
4917
+ }
4918
+ }
4919
+ }
4920
+ }
4921
+ has_terrain = mountain
4922
+ }
4923
+ AND = {
4924
+ has_building = fort_15th
4925
+ ROOT = { mil_tech = 14 }
4926
+ }
4927
+ AND = {
4928
+ has_building = fort_16th
4929
+ ROOT = { mil_tech = 19 }
4930
+ }
4931
+ AND = {
4932
+ has_building = fort_17th
4933
+ ROOT = { mil_tech = 24 }
4934
+ }
4935
+ }
4936
+ NOT = { has_building = fort_18th }
4937
+ }
4938
+ save_event_target_as = agenda_province
4939
+ }
4940
+ event_target:agenda_province = {
4941
+ if = {
4942
+ limit = {
4943
+ has_building = fort_17th
4944
+ }
4945
+ ROOT = {
4946
+ set_variable = {
4947
+ which = estate_nobles_build_fort_building_in_y_var
4948
+ value = 4
4949
+ }
4950
+ }
4951
+ }
4952
+ else_if = {
4953
+ limit = {
4954
+ has_building = fort_16th
4955
+ }
4956
+ ROOT = {
4957
+ set_variable = {
4958
+ which = estate_nobles_build_fort_building_in_y_var
4959
+ value = 3
4960
+ }
4961
+ }
4962
+ }
4963
+ else_if = {
4964
+ limit = {
4965
+ has_building = fort_15th
4966
+ }
4967
+ ROOT = {
4968
+ set_variable = {
4969
+ which = estate_nobles_build_fort_building_in_y_var
4970
+ value = 2
4971
+ }
4972
+ }
4973
+ }
4974
+ else = {
4975
+ ROOT = {
4976
+ set_variable = {
4977
+ which = estate_nobles_build_fort_building_in_y_var
4978
+ value = 1
4979
+ }
4980
+ }
4981
+ }
4982
+ }
4983
+ }
4984
+ provinces_to_highlight = {
4985
+ province_id = event_target:agenda_province
4986
+ }
4987
+ fail_if = {
4988
+ event_target:agenda_province = {
4989
+ NOT = { owned_by = root }
4990
+ }
4991
+ }
4992
+ task_requirements = {
4993
+ if = {
4994
+ limit = {
4995
+ has_estate_agenda_auto_completion = {
4996
+ estate = estate_qizilbash
4997
+ }
4998
+ }
4999
+ has_estate_agenda_auto_completion = {
5000
+ estate = estate_qizilbash
5001
+ }
5002
+ }
5003
+ else = {
5004
+ if = {
5005
+ limit = {
5006
+ check_variable = {
5007
+ which = estate_nobles_build_fort_building_in_y_var
5008
+ value = 4
5009
+ }
5010
+ }
5011
+ event_target:agenda_province = {
5012
+ has_building = fort_18th
5013
+ }
5014
+ }
5015
+ else_if = {
5016
+ limit = {
5017
+ check_variable = {
5018
+ which = estate_nobles_build_fort_building_in_y_var
5019
+ value = 3
5020
+ }
5021
+ }
5022
+ event_target:agenda_province = {
5023
+ OR = {
5024
+ has_building = fort_17th
5025
+ has_building = fort_18th
5026
+ }
5027
+ }
5028
+ }
5029
+ else_if = {
5030
+ limit = {
5031
+ check_variable = {
5032
+ which = estate_nobles_build_fort_building_in_y_var
5033
+ value = 2
5034
+ }
5035
+ }
5036
+ event_target:agenda_province = {
5037
+ OR = {
5038
+ has_building = fort_16th
5039
+ has_building = fort_17th
5040
+ has_building = fort_18th
5041
+ }
5042
+ }
5043
+ }
5044
+ else = {
5045
+ event_target:agenda_province = {
5046
+ OR = {
5047
+ has_building = fort_15th
5048
+ has_building = fort_16th
5049
+ has_building = fort_17th
5050
+ has_building = fort_18th
5051
+ }
5052
+ }
5053
+ }
5054
+ }
5055
+ }
5056
+ task_completed_effect = {
5057
+ on_completed_agenda_effect = {
5058
+ estate = estate_qizilbash
5059
+ }
5060
+ add_estate_loyalty = {
5061
+ estate = estate_qizilbash
5062
+ loyalty = 10
5063
+ }
5064
+ event_target:agenda_province = {
5065
+ add_base_manpower = 1
5066
+ }
5067
+ }
5068
+ failing_effect = {
5069
+ on_failed_agenda_effect = yes
5070
+ clr_auto_complete_flag = yes
5071
+ event_target:agenda_province = {
5072
+ if = {
5073
+ limit = { owned_by = root }
5074
+ add_named_unrest = {
5075
+ name = local_qizilbash_displeased
5076
+ value = 5
5077
+ }
5078
+ }
5079
+ }
5080
+ add_estate_loyalty_modifier = {
5081
+ estate = estate_qizilbash
5082
+ desc = EST_VAL_AGENDA_DENIED
5083
+ loyalty = -5
5084
+ duration = 7300
5085
+ }
5086
+ }
5087
+ }
5088
+
5089
+ estate_ghulams_build_fort_building_in_y = {
5090
+ can_select = {
5091
+ any_owned_province = {
5092
+ OR = {
5093
+ AND = {
5094
+ NOT = { has_building = fort_15th }
5095
+ NOT = { has_building = fort_16th }
5096
+ NOT = { has_building = fort_17th }
5097
+ NOT = { has_building = fort_18th }
5098
+ num_free_building_slots = 1
5099
+ any_neighbor_province = {
5100
+ owner = {
5101
+ OR = {
5102
+ is_rival = root
5103
+ root = { is_rival = prev }
5104
+ AND = {
5105
+ is_subject_other_than_tributary_trigger = yes
5106
+ overlord = {
5107
+ OR = {
5108
+ is_rival = root
5109
+ root = { is_rival = prev }
5110
+ }
5111
+ }
5112
+ }
5113
+ }
5114
+ }
5115
+ }
5116
+ NOT = {
5117
+ any_neighbor_province = {
5118
+ owned_by = root
5119
+ OR = {
5120
+ has_building = fort_15th
5121
+ has_building = fort_16th
5122
+ has_building = fort_17th
5123
+ has_building = fort_18th
5124
+ }
5125
+ }
5126
+ }
5127
+ }
5128
+ AND = {
5129
+ NOT = { has_building = fort_15th }
5130
+ NOT = { has_building = fort_16th }
5131
+ NOT = { has_building = fort_17th }
5132
+ NOT = { has_building = fort_18th }
5133
+ num_free_building_slots = 1
5134
+ any_neighbor_province = {
5135
+ owned_by = root
5136
+ any_neighbor_province = {
5137
+ owner = {
5138
+ OR = {
5139
+ is_rival = root
5140
+ root = { is_rival = prev }
5141
+ AND = {
5142
+ is_subject_other_than_tributary_trigger = yes
5143
+ overlord = {
5144
+ OR = {
5145
+ is_rival = root
5146
+ root = { is_rival = prev }
5147
+ }
5148
+ }
5149
+ }
5150
+ }
5151
+ }
5152
+ NOT = {
5153
+ any_neighbor_province = {
5154
+ owned_by = root
5155
+ OR = {
5156
+ has_building = fort_15th
5157
+ has_building = fort_16th
5158
+ has_building = fort_17th
5159
+ has_building = fort_18th
5160
+ }
5161
+ }
5162
+ }
5163
+ }
5164
+ }
5165
+ }
5166
+ AND = {
5167
+ has_building = fort_15th
5168
+ ROOT = { mil_tech = 14 }
5169
+ }
5170
+ AND = {
5171
+ has_building = fort_16th
5172
+ ROOT = { mil_tech = 19 }
5173
+ }
5174
+ AND = {
5175
+ has_building = fort_17th
5176
+ ROOT = { mil_tech = 24 }
5177
+ }
5178
+ }
5179
+ NOT = { has_building = fort_18th }
5180
+ }
5181
+ }
5182
+ selection_weight = {
5183
+ factor = 1
5184
+ modifier = {
5185
+ factor = 1.5
5186
+ any_neighbor_country = {
5187
+ OR = {
5188
+ is_rival = root
5189
+ root = { is_rival = prev }
5190
+ }
5191
+ army_size = root
5192
+ }
5193
+ }
5194
+ }
5195
+ pre_effect = {
5196
+ set_variable = {
5197
+ which = estate_nobles_build_fort_building_in_y_var
5198
+ value = 0
5199
+ }
5200
+ random_owned_province = {
5201
+ limit = {
5202
+ OR = {
5203
+ AND = {
5204
+ NOT = { has_building = fort_15th }
5205
+ NOT = { has_building = fort_16th }
5206
+ NOT = { has_building = fort_17th }
5207
+ NOT = { has_building = fort_18th }
5208
+ num_free_building_slots = 1
5209
+ any_neighbor_province = {
5210
+ owner = {
5211
+ OR = {
5212
+ is_rival = root
5213
+ root = { is_rival = prev }
5214
+ AND = {
5215
+ is_subject_other_than_tributary_trigger = yes
5216
+ overlord = {
5217
+ OR = {
5218
+ is_rival = root
5219
+ root = { is_rival = prev }
5220
+ }
5221
+ }
5222
+ }
5223
+ }
5224
+ }
5225
+ }
5226
+ NOT = {
5227
+ any_neighbor_province = {
5228
+ owned_by = root
5229
+ OR = {
5230
+ has_building = fort_15th
5231
+ has_building = fort_16th
5232
+ has_building = fort_17th
5233
+ has_building = fort_18th
5234
+ }
5235
+ }
5236
+ }
5237
+ }
5238
+ AND = {
5239
+ NOT = { has_building = fort_15th }
5240
+ NOT = { has_building = fort_16th }
5241
+ NOT = { has_building = fort_17th }
5242
+ NOT = { has_building = fort_18th }
5243
+ num_free_building_slots = 1
5244
+ any_neighbor_province = {
5245
+ owned_by = root
5246
+ any_neighbor_province = {
5247
+ owner = {
5248
+ OR = {
5249
+ is_rival = root
5250
+ root = { is_rival = prev }
5251
+ AND = {
5252
+ is_subject_other_than_tributary_trigger = yes
5253
+ overlord = {
5254
+ OR = {
5255
+ is_rival = root
5256
+ root = { is_rival = prev }
5257
+ }
5258
+ }
5259
+ }
5260
+ }
5261
+ }
5262
+ NOT = {
5263
+ any_neighbor_province = {
5264
+ owned_by = root
5265
+ OR = {
5266
+ has_building = fort_15th
5267
+ has_building = fort_16th
5268
+ has_building = fort_17th
5269
+ has_building = fort_18th
5270
+ }
5271
+ }
5272
+ }
5273
+ }
5274
+ }
5275
+ }
5276
+ AND = {
5277
+ has_building = fort_15th
5278
+ ROOT = { mil_tech = 14 }
5279
+ }
5280
+ AND = {
5281
+ has_building = fort_16th
5282
+ ROOT = { mil_tech = 19 }
5283
+ }
5284
+ AND = {
5285
+ has_building = fort_17th
5286
+ ROOT = { mil_tech = 24 }
5287
+ }
5288
+ }
5289
+ NOT = { has_building = fort_18th }
5290
+ }
5291
+ save_event_target_as = agenda_province
5292
+ }
5293
+ random_owned_province = {
5294
+ limit = {
5295
+ OR = {
5296
+ AND = {
5297
+ NOT = { has_building = fort_15th }
5298
+ NOT = { has_building = fort_16th }
5299
+ NOT = { has_building = fort_17th }
5300
+ NOT = { has_building = fort_18th }
5301
+ num_free_building_slots = 1
5302
+ any_neighbor_province = {
5303
+ owner = {
5304
+ OR = {
5305
+ is_rival = root
5306
+ root = { is_rival = prev }
5307
+ AND = {
5308
+ is_subject_other_than_tributary_trigger = yes
5309
+ overlord = {
5310
+ OR = {
5311
+ is_rival = root
5312
+ root = { is_rival = prev }
5313
+ }
5314
+ }
5315
+ }
5316
+ }
5317
+ }
5318
+ }
5319
+ NOT = {
5320
+ any_neighbor_province = {
5321
+ owned_by = root
5322
+ OR = {
5323
+ has_building = fort_15th
5324
+ has_building = fort_16th
5325
+ has_building = fort_17th
5326
+ has_building = fort_18th
5327
+ }
5328
+ }
5329
+ }
5330
+ has_terrain = hills
5331
+ }
5332
+ AND = {
5333
+ NOT = { has_building = fort_15th }
5334
+ NOT = { has_building = fort_16th }
5335
+ NOT = { has_building = fort_17th }
5336
+ NOT = { has_building = fort_18th }
5337
+ num_free_building_slots = 1
5338
+ any_neighbor_province = {
5339
+ owned_by = root
5340
+ any_neighbor_province = {
5341
+ owner = {
5342
+ OR = {
5343
+ is_rival = root
5344
+ root = { is_rival = prev }
5345
+ AND = {
5346
+ is_subject_other_than_tributary_trigger = yes
5347
+ overlord = {
5348
+ OR = {
5349
+ is_rival = root
5350
+ root = { is_rival = prev }
5351
+ }
5352
+ }
5353
+ }
5354
+ }
5355
+ }
5356
+ NOT = {
5357
+ any_neighbor_province = {
5358
+ owned_by = root
5359
+ OR = {
5360
+ has_building = fort_15th
5361
+ has_building = fort_16th
5362
+ has_building = fort_17th
5363
+ has_building = fort_18th
5364
+ }
5365
+ }
5366
+ }
5367
+ }
5368
+ }
5369
+ has_terrain = hills
5370
+ }
5371
+ AND = {
5372
+ has_building = fort_15th
5373
+ ROOT = { mil_tech = 14 }
5374
+ }
5375
+ AND = {
5376
+ has_building = fort_16th
5377
+ ROOT = { mil_tech = 19 }
5378
+ }
5379
+ AND = {
5380
+ has_building = fort_17th
5381
+ ROOT = { mil_tech = 24 }
5382
+ }
5383
+ }
5384
+ NOT = { has_building = fort_18th }
5385
+ }
5386
+ save_event_target_as = agenda_province
5387
+ }
5388
+ random_owned_province = {
5389
+ limit = {
5390
+ OR = {
5391
+ AND = {
5392
+ NOT = { has_building = fort_15th }
5393
+ NOT = { has_building = fort_16th }
5394
+ NOT = { has_building = fort_17th }
5395
+ NOT = { has_building = fort_18th }
5396
+ num_free_building_slots = 1
5397
+ any_neighbor_province = {
5398
+ owner = {
5399
+ OR = {
5400
+ is_rival = root
5401
+ root = { is_rival = prev }
5402
+ AND = {
5403
+ is_subject_other_than_tributary_trigger = yes
5404
+ overlord = {
5405
+ OR = {
5406
+ is_rival = root
5407
+ root = { is_rival = prev }
5408
+ }
5409
+ }
5410
+ }
5411
+ }
5412
+ }
5413
+ }
5414
+ NOT = {
5415
+ any_neighbor_province = {
5416
+ owned_by = root
5417
+ OR = {
5418
+ has_building = fort_15th
5419
+ has_building = fort_16th
5420
+ has_building = fort_17th
5421
+ has_building = fort_18th
5422
+ }
5423
+ }
5424
+ }
5425
+ has_terrain = highlands
5426
+ }
5427
+ AND = {
5428
+ NOT = { has_building = fort_15th }
5429
+ NOT = { has_building = fort_16th }
5430
+ NOT = { has_building = fort_17th }
5431
+ NOT = { has_building = fort_18th }
5432
+ num_free_building_slots = 1
5433
+ any_neighbor_province = {
5434
+ owned_by = root
5435
+ any_neighbor_province = {
5436
+ owner = {
5437
+ OR = {
5438
+ is_rival = root
5439
+ root = { is_rival = prev }
5440
+ AND = {
5441
+ is_subject_other_than_tributary_trigger = yes
5442
+ overlord = {
5443
+ OR = {
5444
+ is_rival = root
5445
+ root = { is_rival = prev }
5446
+ }
5447
+ }
5448
+ }
5449
+ }
5450
+ }
5451
+ NOT = {
5452
+ any_neighbor_province = {
5453
+ owned_by = root
5454
+ OR = {
5455
+ has_building = fort_15th
5456
+ has_building = fort_16th
5457
+ has_building = fort_17th
5458
+ has_building = fort_18th
5459
+ }
5460
+ }
5461
+ }
5462
+ }
5463
+ }
5464
+ has_terrain = highlands
5465
+ }
5466
+ AND = {
5467
+ has_building = fort_15th
5468
+ ROOT = { mil_tech = 14 }
5469
+ }
5470
+ AND = {
5471
+ has_building = fort_16th
5472
+ ROOT = { mil_tech = 19 }
5473
+ }
5474
+ AND = {
5475
+ has_building = fort_17th
5476
+ ROOT = { mil_tech = 24 }
5477
+ }
5478
+ }
5479
+ NOT = { has_building = fort_18th }
5480
+ }
5481
+ save_event_target_as = agenda_province
5482
+ }
5483
+ random_owned_province = {
5484
+ limit = {
5485
+ OR = {
5486
+ AND = {
5487
+ NOT = { has_building = fort_15th }
5488
+ NOT = { has_building = fort_16th }
5489
+ NOT = { has_building = fort_17th }
5490
+ NOT = { has_building = fort_18th }
5491
+ num_free_building_slots = 1
5492
+ any_neighbor_province = {
5493
+ owner = {
5494
+ OR = {
5495
+ is_rival = root
5496
+ root = { is_rival = prev }
5497
+ AND = {
5498
+ is_subject_other_than_tributary_trigger = yes
5499
+ overlord = {
5500
+ OR = {
5501
+ is_rival = root
5502
+ root = { is_rival = prev }
5503
+ }
5504
+ }
5505
+ }
5506
+ }
5507
+ }
5508
+ }
5509
+ NOT = {
5510
+ any_neighbor_province = {
5511
+ owned_by = root
5512
+ OR = {
5513
+ has_building = fort_15th
5514
+ has_building = fort_16th
5515
+ has_building = fort_17th
5516
+ has_building = fort_18th
5517
+ }
5518
+ }
5519
+ }
5520
+ has_terrain = mountain
5521
+ }
5522
+ AND = {
5523
+ NOT = { has_building = fort_15th }
5524
+ NOT = { has_building = fort_16th }
5525
+ NOT = { has_building = fort_17th }
5526
+ NOT = { has_building = fort_18th }
5527
+ num_free_building_slots = 1
5528
+ any_neighbor_province = {
5529
+ owned_by = root
5530
+ any_neighbor_province = {
5531
+ owner = {
5532
+ OR = {
5533
+ is_rival = root
5534
+ root = { is_rival = prev }
5535
+ AND = {
5536
+ is_subject_other_than_tributary_trigger = yes
5537
+ overlord = {
5538
+ OR = {
5539
+ is_rival = root
5540
+ root = { is_rival = prev }
5541
+ }
5542
+ }
5543
+ }
5544
+ }
5545
+ }
5546
+ NOT = {
5547
+ any_neighbor_province = {
5548
+ owned_by = root
5549
+ OR = {
5550
+ has_building = fort_15th
5551
+ has_building = fort_16th
5552
+ has_building = fort_17th
5553
+ has_building = fort_18th
5554
+ }
5555
+ }
5556
+ }
5557
+ }
5558
+ }
5559
+ has_terrain = mountain
5560
+ }
5561
+ AND = {
5562
+ has_building = fort_15th
5563
+ ROOT = { mil_tech = 14 }
5564
+ }
5565
+ AND = {
5566
+ has_building = fort_16th
5567
+ ROOT = { mil_tech = 19 }
5568
+ }
5569
+ AND = {
5570
+ has_building = fort_17th
5571
+ ROOT = { mil_tech = 24 }
5572
+ }
5573
+ }
5574
+ NOT = { has_building = fort_18th }
5575
+ }
5576
+ save_event_target_as = agenda_province
5577
+ }
5578
+ event_target:agenda_province = {
5579
+ if = {
5580
+ limit = {
5581
+ has_building = fort_17th
5582
+ }
5583
+ ROOT = {
5584
+ set_variable = {
5585
+ which = estate_nobles_build_fort_building_in_y_var
5586
+ value = 4
5587
+ }
5588
+ }
5589
+ }
5590
+ else_if = {
5591
+ limit = {
5592
+ has_building = fort_16th
5593
+ }
5594
+ ROOT = {
5595
+ set_variable = {
5596
+ which = estate_nobles_build_fort_building_in_y_var
5597
+ value = 3
5598
+ }
5599
+ }
5600
+ }
5601
+ else_if = {
5602
+ limit = {
5603
+ has_building = fort_15th
5604
+ }
5605
+ ROOT = {
5606
+ set_variable = {
5607
+ which = estate_nobles_build_fort_building_in_y_var
5608
+ value = 2
5609
+ }
5610
+ }
5611
+ }
5612
+ else = {
5613
+ ROOT = {
5614
+ set_variable = {
5615
+ which = estate_nobles_build_fort_building_in_y_var
5616
+ value = 1
5617
+ }
5618
+ }
5619
+ }
5620
+ }
5621
+ }
5622
+ provinces_to_highlight = {
5623
+ province_id = event_target:agenda_province
5624
+ }
5625
+ fail_if = {
5626
+ event_target:agenda_province = {
5627
+ NOT = { owned_by = root }
5628
+ }
5629
+ }
5630
+ task_requirements = {
5631
+ if = {
5632
+ limit = {
5633
+ has_estate_agenda_auto_completion = {
5634
+ estate = estate_ghulams
5635
+ }
5636
+ }
5637
+ has_estate_agenda_auto_completion = {
5638
+ estate = estate_ghulams
5639
+ }
5640
+ }
5641
+ else = {
5642
+ if = {
5643
+ limit = {
5644
+ check_variable = {
5645
+ which = estate_nobles_build_fort_building_in_y_var
5646
+ value = 4
5647
+ }
5648
+ }
5649
+ event_target:agenda_province = {
5650
+ has_building = fort_18th
5651
+ }
5652
+ }
5653
+ else_if = {
5654
+ limit = {
5655
+ check_variable = {
5656
+ which = estate_nobles_build_fort_building_in_y_var
5657
+ value = 3
5658
+ }
5659
+ }
5660
+ event_target:agenda_province = {
5661
+ OR = {
5662
+ has_building = fort_17th
5663
+ has_building = fort_18th
5664
+ }
5665
+ }
5666
+ }
5667
+ else_if = {
5668
+ limit = {
5669
+ check_variable = {
5670
+ which = estate_nobles_build_fort_building_in_y_var
5671
+ value = 2
5672
+ }
5673
+ }
5674
+ event_target:agenda_province = {
5675
+ OR = {
5676
+ has_building = fort_16th
5677
+ has_building = fort_17th
5678
+ has_building = fort_18th
5679
+ }
5680
+ }
5681
+ }
5682
+ else = {
5683
+ event_target:agenda_province = {
5684
+ OR = {
5685
+ has_building = fort_15th
5686
+ has_building = fort_16th
5687
+ has_building = fort_17th
5688
+ has_building = fort_18th
5689
+ }
5690
+ }
5691
+ }
5692
+ }
5693
+ }
5694
+ task_completed_effect = {
5695
+ on_completed_agenda_effect = {
5696
+ estate = estate_ghulams
5697
+ }
5698
+ add_estate_loyalty = {
5699
+ estate = estate_ghulams
5700
+ loyalty = 10
5701
+ }
5702
+ event_target:agenda_province = {
5703
+ add_base_manpower = 1
5704
+ }
5705
+ }
5706
+ failing_effect = {
5707
+ on_failed_agenda_effect = yes
5708
+ clr_auto_complete_flag = yes
5709
+ event_target:agenda_province = {
5710
+ if = {
5711
+ limit = { owned_by = root }
5712
+ add_named_unrest = {
5713
+ name = local_ghulams_displeased
5714
+ value = 5
5715
+ }
5716
+ }
5717
+ }
5718
+ add_estate_loyalty_modifier = {
5719
+ estate = estate_ghulams
5720
+ desc = EST_VAL_AGENDA_DENIED
5721
+ loyalty = -5
5722
+ duration = 7300
5723
+ }
5724
+ }
5725
+ }
5726
+
3653
5727
  estate_burghers_build_trade_building_in_y = {
3654
5728
  can_select = {
3655
5729
  dip_tech = 4
@@ -10717,6 +12791,338 @@ estate_nomadic_tribes_develop_x = {
10717
12791
  }
10718
12792
  }
10719
12793
 
12794
+ estate_qizilbash_develop_x = {
12795
+ selection_weight = {
12796
+ factor = 1
12797
+ }
12798
+ can_select = {
12799
+ capital_scope = {
12800
+ is_state_core = root
12801
+ }
12802
+ }
12803
+ pre_effect = {
12804
+ random_list = {
12805
+ 1 = {
12806
+ random_owned_province = {
12807
+ limit = {
12808
+ is_state_core = root
12809
+ area_for_scope_province = {
12810
+ is_capital_of = root
12811
+ }
12812
+ }
12813
+ save_event_target_as = agenda_province
12814
+ }
12815
+ }
12816
+ 1 = {
12817
+ trigger = {
12818
+ any_owned_province = {
12819
+ is_state_core = root
12820
+ OR = {
12821
+ AND = {
12822
+ religion = root
12823
+ OR = {
12824
+ culture = root
12825
+ has_owner_accepted_culture = yes
12826
+ }
12827
+ }
12828
+ }
12829
+ region_for_scope_province = {
12830
+ is_capital_of = root
12831
+ }
12832
+ }
12833
+ }
12834
+ random_owned_province = {
12835
+ limit = {
12836
+ is_state_core = root
12837
+ OR = {
12838
+ AND = {
12839
+ religion = root
12840
+ OR = {
12841
+ culture = root
12842
+ has_owner_accepted_culture = yes
12843
+ }
12844
+ }
12845
+ }
12846
+ region_for_scope_province = {
12847
+ is_capital_of = root
12848
+ }
12849
+ }
12850
+ save_event_target_as = agenda_province
12851
+ }
12852
+ }
12853
+ 1 = {
12854
+ random_owned_province = {
12855
+ limit = {
12856
+ is_state_core = root
12857
+ }
12858
+ save_event_target_as = agenda_province
12859
+ }
12860
+ }
12861
+ 7 = {
12862
+ trigger = {
12863
+ any_owned_province = {
12864
+ is_state_core = root
12865
+ OR = {
12866
+ culture = turco_iranian
12867
+ culture = azerbaijani
12868
+ culture = turkish
12869
+ culture = turkmeni
12870
+ }
12871
+ region_for_scope_province = {
12872
+ is_capital_of = root
12873
+ }
12874
+ }
12875
+ }
12876
+ random_owned_province = {
12877
+ limit = {
12878
+ is_state_core = root
12879
+ }
12880
+ save_event_target_as = agenda_province
12881
+ }
12882
+ }
12883
+ }
12884
+ event_target:agenda_province = {
12885
+ if = {
12886
+ limit = {
12887
+ check_variable = {
12888
+ which = province_mil_var
12889
+ value = 1
12890
+ }
12891
+ }
12892
+ set_variable = {
12893
+ which = province_mil_var
12894
+ value = 0
12895
+ }
12896
+ }
12897
+ export_to_variable = {
12898
+ which = province_mil_var
12899
+ value = trigger_value:base_manpower
12900
+ }
12901
+ change_variable = {
12902
+ which = province_mil_var
12903
+ value = 2
12904
+ }
12905
+ }
12906
+ }
12907
+ provinces_to_highlight = {
12908
+ province_id = event_target:agenda_province
12909
+ }
12910
+ fail_if = {
12911
+ event_target:agenda_province = {
12912
+ NOT = { owned_by = root }
12913
+ }
12914
+ }
12915
+ task_requirements = {
12916
+ if = {
12917
+ limit = {
12918
+ has_estate_agenda_auto_completion = {
12919
+ estate = estate_qizilbash
12920
+ }
12921
+ }
12922
+ has_estate_agenda_auto_completion = {
12923
+ estate = estate_qizilbash
12924
+ }
12925
+ }
12926
+ else = {
12927
+ event_target:agenda_province = {
12928
+ base_manpower = "province_mil_var"
12929
+ }
12930
+ }
12931
+ }
12932
+ task_completed_effect = {
12933
+ on_completed_agenda_effect = {
12934
+ estate = estate_qizilbash
12935
+ }
12936
+ add_estate_loyalty = {
12937
+ estate = estate_qizilbash
12938
+ loyalty = 10
12939
+ }
12940
+ add_yearly_manpower = 0.3
12941
+ }
12942
+ failing_effect = {
12943
+ on_failed_agenda_effect = yes
12944
+ clr_auto_complete_flag = yes
12945
+ event_target:agenda_province = {
12946
+ if = {
12947
+ limit = { owned_by = root }
12948
+ add_named_unrest = {
12949
+ name = local_qizilbash_displeased
12950
+ value = 5
12951
+ }
12952
+ }
12953
+ }
12954
+ add_estate_loyalty_modifier = {
12955
+ estate = estate_qizilbash
12956
+ desc = EST_VAL_AGENDA_DENIED
12957
+ loyalty = -5
12958
+ duration = 7300
12959
+ }
12960
+ }
12961
+ }
12962
+
12963
+ estate_ghulams_develop_x = {
12964
+ selection_weight = {
12965
+ factor = 1
12966
+ }
12967
+ can_select = {
12968
+ capital_scope = {
12969
+ is_state_core = root
12970
+ }
12971
+ }
12972
+ pre_effect = {
12973
+ random_list = {
12974
+ 1 = {
12975
+ random_owned_province = {
12976
+ limit = {
12977
+ is_state_core = root
12978
+ area_for_scope_province = {
12979
+ is_capital_of = root
12980
+ }
12981
+ }
12982
+ save_event_target_as = agenda_province
12983
+ }
12984
+ }
12985
+ 1 = {
12986
+ trigger = {
12987
+ any_owned_province = {
12988
+ is_state_core = root
12989
+ OR = {
12990
+ AND = {
12991
+ religion = root
12992
+ OR = {
12993
+ culture = root
12994
+ has_owner_accepted_culture = yes
12995
+ }
12996
+ }
12997
+ }
12998
+ region_for_scope_province = {
12999
+ is_capital_of = root
13000
+ }
13001
+ }
13002
+ }
13003
+ random_owned_province = {
13004
+ limit = {
13005
+ is_state_core = root
13006
+ OR = {
13007
+ AND = {
13008
+ religion = root
13009
+ OR = {
13010
+ culture = root
13011
+ has_owner_accepted_culture = yes
13012
+ }
13013
+ }
13014
+ }
13015
+ region_for_scope_province = {
13016
+ is_capital_of = root
13017
+ }
13018
+ }
13019
+ save_event_target_as = agenda_province
13020
+ }
13021
+ }
13022
+ 1 = {
13023
+ random_owned_province = {
13024
+ limit = {
13025
+ is_state_core = root
13026
+ }
13027
+ save_event_target_as = agenda_province
13028
+ }
13029
+ }
13030
+ 7 = {
13031
+ trigger = {
13032
+ any_owned_province = {
13033
+ is_state_core = root
13034
+ culture_group = caucasian
13035
+ region_for_scope_province = {
13036
+ is_capital_of = root
13037
+ }
13038
+ }
13039
+ }
13040
+ random_owned_province = {
13041
+ limit = {
13042
+ is_state_core = root
13043
+ }
13044
+ save_event_target_as = agenda_province
13045
+ }
13046
+ }
13047
+ }
13048
+ event_target:agenda_province = {
13049
+ if = {
13050
+ limit = {
13051
+ check_variable = {
13052
+ which = province_mil_var
13053
+ value = 1
13054
+ }
13055
+ }
13056
+ set_variable = {
13057
+ which = province_mil_var
13058
+ value = 0
13059
+ }
13060
+ }
13061
+ export_to_variable = {
13062
+ which = province_mil_var
13063
+ value = trigger_value:base_manpower
13064
+ }
13065
+ change_variable = {
13066
+ which = province_mil_var
13067
+ value = 2
13068
+ }
13069
+ }
13070
+ }
13071
+ provinces_to_highlight = {
13072
+ province_id = event_target:agenda_province
13073
+ }
13074
+ fail_if = {
13075
+ event_target:agenda_province = {
13076
+ NOT = { owned_by = root }
13077
+ }
13078
+ }
13079
+ task_requirements = {
13080
+ if = {
13081
+ limit = {
13082
+ has_estate_agenda_auto_completion = {
13083
+ estate = estate_ghulams
13084
+ }
13085
+ }
13086
+ has_estate_agenda_auto_completion = {
13087
+ estate = estate_ghulams
13088
+ }
13089
+ }
13090
+ else = {
13091
+ event_target:agenda_province = {
13092
+ base_manpower = "province_mil_var"
13093
+ }
13094
+ }
13095
+ }
13096
+ task_completed_effect = {
13097
+ on_completed_agenda_effect = {
13098
+ estate = estate_ghulams
13099
+ }
13100
+ add_estate_loyalty = {
13101
+ estate = estate_ghulams
13102
+ loyalty = 10
13103
+ }
13104
+ add_yearly_manpower = 0.3
13105
+ }
13106
+ failing_effect = {
13107
+ on_failed_agenda_effect = yes
13108
+ clr_auto_complete_flag = yes
13109
+ event_target:agenda_province = {
13110
+ if = {
13111
+ limit = { owned_by = root }
13112
+ add_named_unrest = {
13113
+ name = local_ghulams_displeased
13114
+ value = 5
13115
+ }
13116
+ }
13117
+ }
13118
+ add_estate_loyalty_modifier = {
13119
+ estate = estate_ghulams
13120
+ desc = EST_VAL_AGENDA_DENIED
13121
+ loyalty = -5
13122
+ duration = 7300
13123
+ }
13124
+ }
13125
+ }
10720
13126
 
10721
13127
  estate_cossacks_develop_x = {
10722
13128
  selection_weight = {
common/estate_agendas/02_noble_agendas.txt CHANGED
@@ -3223,4 +3223,484 @@ estate_nobles_improve_prestige = {
3223
3223
  }
3224
3224
  }
3225
3225
 
3226
+ #Mamluk Privileges as a reward of mam_recruit_the_mamluks
3227
+
3228
+ estate_nobles_mam_three_privileges = {
3229
+ can_select = {
3230
+ NOT = {
3231
+ num_of_estate_privileges = {
3232
+ estate = estate_nobles
3233
+ value = 3
3234
+ }
3235
+ }
3236
+ has_country_flag = mam_access_new_agendas_about_mamluks_flag
3237
+ }
3238
+ selection_weight = {
3239
+ factor = 5
3240
+ }
3241
+ pre_effect = {
3242
+ set_variable = {
3243
+ which = estate_dhimmi_three_privileges_var
3244
+ value = 0
3245
+ }
3246
+ if = {
3247
+ limit = {
3248
+ num_of_estate_privileges = {
3249
+ estate = estate_nobles
3250
+ value = 1
3251
+ }
3252
+ }
3253
+ set_variable = {
3254
+ which = estate_nobles_three_privileges_var
3255
+ value = 2
3256
+ }
3257
+ }
3258
+ else = {
3259
+ set_variable = {
3260
+ which = estate_nobles_three_privileges_var
3261
+ value = 1
3262
+ }
3263
+ }
3264
+ }
3265
+ task_requirements = {
3266
+ if = {
3267
+ limit = {
3268
+ has_estate_agenda_auto_completion = {
3269
+ estate = estate_nobles
3270
+ }
3271
+ }
3272
+ has_estate_agenda_auto_completion = {
3273
+ estate = estate_nobles
3274
+ }
3275
+ }
3276
+ else = {
3277
+ if = {
3278
+ limit = {
3279
+ check_variable = {
3280
+ which = estate_nobles_three_privileges_var
3281
+ value = 2
3282
+ }
3283
+ }
3284
+ num_of_estate_privileges = {
3285
+ estate = estate_nobles
3286
+ value = 3
3287
+ }
3288
+ }
3289
+ else = {
3290
+ num_of_estate_privileges = {
3291
+ estate = estate_nobles
3292
+ value = 2
3293
+ }
3294
+ }
3295
+ }
3296
+ }
3297
+ task_completed_effect = {
3298
+ on_completed_agenda_effect = {
3299
+ estate = estate_nobles
3300
+ }
3301
+ add_estate_loyalty = {
3302
+ estate = estate_nobles
3303
+ loyalty = 20
3304
+ }
3305
+ if = {
3306
+ limit = { has_government_mechanic = mamluk_mechanic }
3307
+ add_government_power = {
3308
+ mechanic_type = mamluk_mechanic
3309
+ power_type = mamluk_mil_power
3310
+ value = 10
3311
+ }
3312
+ }
3313
+ else = {
3314
+ add_mil_power = 25
3315
+ }
3316
+ }
3317
+ failing_effect = {
3318
+ on_failed_agenda_effect = yes
3319
+ clr_auto_complete_flag = yes
3320
+ add_estate_loyalty_modifier = {
3321
+ estate = estate_nobles
3322
+ desc = EST_VAL_AGENDA_DENIED
3323
+ loyalty = -5
3324
+ duration = 7300
3325
+ }
3326
+ }
3327
+ }
3328
+
3329
+ estate_nobles_mam_recruit_mamluks = {
3330
+ can_select = {
3331
+ has_country_flag = mam_access_new_agendas_about_mamluks_flag
3332
+ has_estate_privilege = estate_nobles_enlist_the_mamluks
3333
+ if = {
3334
+ limit = { NOT = { land_forcelimit = 200 } }
3335
+ NOT = { mamluks_percentage = 0.1 }
3336
+ }
3337
+ else = {
3338
+ NOT = { num_of_mamluks = 40 }
3339
+ }
3340
+ OR = {
3341
+ tag = MAM
3342
+ has_government_mechanic = mamluk_mechanic
3343
+ }
3344
+ NOT = { mamluks_percentage = 0.1 }
3345
+ }
3346
+ selection_weight = {
3347
+ factor = 10
3348
+ }
3349
+ task_requirements = {
3350
+ if = {
3351
+ limit = {
3352
+ has_estate_agenda_auto_completion = {
3353
+ estate = estate_nobles
3354
+ }
3355
+ }
3356
+ has_estate_agenda_auto_completion = {
3357
+ estate = estate_nobles
3358
+ }
3359
+ }
3360
+ else = {
3361
+ if = {
3362
+ limit = { NOT = { land_forcelimit = 200 } }
3363
+ mamluks_percentage = 0.1
3364
+ }
3365
+ else = { num_of_mamluks = 40 }
3366
+ }
3367
+ }
3368
+ task_completed_effect = {
3369
+ on_completed_agenda_effect = {
3370
+ estate = estate_nobles
3371
+ }
3372
+ add_estate_loyalty = {
3373
+ estate = estate_nobles
3374
+ loyalty = 10
3375
+ }
3376
+ create_general = {
3377
+ tradition = 60
3378
+ add_fire = 1
3379
+ add_shock = 1
3380
+ }
3381
+ }
3382
+ failing_effect = {
3383
+ on_failed_agenda_effect = yes
3384
+ clr_auto_complete_flag = yes
3385
+ add_estate_loyalty_modifier = {
3386
+ estate = estate_nobles
3387
+ desc = EST_VAL_AGENDA_DENIED
3388
+ loyalty = -5
3389
+ duration = 7300
3390
+ }
3391
+ }
3392
+ }
3393
+
3394
+ estate_nobles_mam_develop_military_infrastructure = {
3395
+ can_select = {
3396
+ has_country_flag = mam_access_new_agendas_about_mamluks_flag
3397
+ mil_tech = 8
3398
+ OR = {
3399
+ tag = MAM
3400
+ has_government_mechanic = mamluk_mechanic
3401
+ }
3402
+ if = {
3403
+ limit = { NOT = { num_of_provinces_in_states = 150 } }
3404
+ NOT = {
3405
+ num_of_owned_provinces_with = {
3406
+ has_manpower_building_trigger = yes
3407
+ value = 40
3408
+ }
3409
+ }
3410
+ }
3411
+ else_if = {
3412
+ limit = { NOT = { num_of_provinces_in_states = 125 } }
3413
+ NOT = {
3414
+ num_of_owned_provinces_with = {
3415
+ has_manpower_building_trigger = yes
3416
+ value = 30
3417
+ }
3418
+ }
3419
+ }
3420
+ else_if = {
3421
+ limit = { NOT = { num_of_provinces_in_states = 100 } }
3422
+ NOT = {
3423
+ num_of_owned_provinces_with = {
3424
+ has_manpower_building_trigger = yes
3425
+ value = 25
3426
+ }
3427
+ }
3428
+ }
3429
+ else_if = {
3430
+ limit = { NOT = { num_of_provinces_in_states = 75 } }
3431
+ NOT = {
3432
+ num_of_owned_provinces_with = {
3433
+ has_manpower_building_trigger = yes
3434
+ value = 20
3435
+ }
3436
+ }
3437
+ }
3438
+ else_if = {
3439
+ limit = { NOT = { num_of_provinces_in_states = 50 } }
3440
+ NOT = {
3441
+ num_of_owned_provinces_with = {
3442
+ has_manpower_building_trigger = yes
3443
+ value = 15
3444
+ }
3445
+ }
3446
+ }
3447
+ else_if = {
3448
+ limit = { NOT = { num_of_provinces_in_states = 25 } }
3449
+ NOT = {
3450
+ num_of_owned_provinces_with = {
3451
+ has_manpower_building_trigger = yes
3452
+ value = 5
3453
+ }
3454
+ }
3455
+ }
3456
+ else = {
3457
+ NOT = {
3458
+ num_of_owned_provinces_with = {
3459
+ has_manpower_building_trigger = yes
3460
+ value = 3
3461
+ }
3462
+ }
3463
+ }
3464
+ }
3465
+ selection_weight = {
3466
+ factor = 6
3467
+ }
3468
+ task_requirements = {
3469
+ if = {
3470
+ limit = {
3471
+ has_estate_agenda_auto_completion = {
3472
+ estate = estate_nobles
3473
+ }
3474
+ }
3475
+ has_estate_agenda_auto_completion = {
3476
+ estate = estate_nobles
3477
+ }
3478
+ }
3479
+ else = {
3480
+ if = {
3481
+ limit = { num_of_provinces_in_states = 150 }
3482
+ num_of_owned_provinces_with = {
3483
+ has_manpower_building_trigger = yes
3484
+ value = 40
3485
+ }
3486
+ }
3487
+ else_if = {
3488
+ limit = { num_of_provinces_in_states = 125 }
3489
+ num_of_owned_provinces_with = {
3490
+ has_manpower_building_trigger = yes
3491
+ value = 30
3492
+ }
3493
+ }
3494
+ else_if = {
3495
+ limit = { num_of_provinces_in_states = 100 }
3496
+ num_of_owned_provinces_with = {
3497
+ has_manpower_building_trigger = yes
3498
+ value = 25
3499
+ }
3500
+ }
3501
+ else_if = {
3502
+ limit = { num_of_provinces_in_states = 75 }
3503
+ num_of_owned_provinces_with = {
3504
+ has_manpower_building_trigger = yes
3505
+ value = 20
3506
+ }
3507
+ }
3508
+ else_if = {
3509
+ limit = { num_of_provinces_in_states = 50 }
3510
+ num_of_owned_provinces_with = {
3511
+ has_manpower_building_trigger = yes
3512
+ value = 15
3513
+ }
3514
+ }
3515
+ else_if = {
3516
+ limit = { num_of_provinces_in_states = 25 }
3517
+ num_of_owned_provinces_with = {
3518
+ has_manpower_building_trigger = yes
3519
+ value = 5
3520
+ }
3521
+ }
3522
+ else = {
3523
+ num_of_owned_provinces_with = {
3524
+ has_manpower_building_trigger = yes
3525
+ value = 3
3526
+ }
3527
+ }
3528
+ }
3529
+ }
3530
+ task_completed_effect = {
3531
+ on_completed_agenda_effect = {
3532
+ estate = estate_nobles
3533
+ }
3534
+ add_estate_loyalty = {
3535
+ estate = estate_nobles
3536
+ loyalty = 15
3537
+ }
3538
+ add_yearly_manpower = 1
3539
+ }
3540
+ failing_effect = {
3541
+ on_failed_agenda_effect = yes
3542
+ clr_auto_complete_flag = yes
3543
+ add_estate_loyalty_modifier = {
3544
+ estate = estate_nobles
3545
+ desc = EST_VAL_AGENDA_DENIED
3546
+ loyalty = -5
3547
+ duration = 7300
3548
+ }
3549
+ }
3550
+ }
3551
+
3552
+ estate_nobles_mam_increase_army_tradition = {
3553
+ can_select = {
3554
+ has_country_flag = mam_access_new_agendas_about_mamluks_flag
3555
+ OR = {
3556
+ tag = MAM
3557
+ has_estate_privilege = estate_nobles_enlist_the_mamluks
3558
+ }
3559
+ NOT = { army_tradition = 30 }
3560
+ }
3561
+ selection_weight = {
3562
+ factor = 10
3563
+ }
3564
+ task_requirements = {
3565
+ if = {
3566
+ limit = {
3567
+ has_estate_agenda_auto_completion = {
3568
+ estate = estate_nobles
3569
+ }
3570
+ }
3571
+ has_estate_agenda_auto_completion = {
3572
+ estate = estate_nobles
3573
+ }
3574
+ }
3575
+ else = {
3576
+ army_tradition = 30
3577
+ }
3578
+ }
3579
+ task_completed_effect = {
3580
+ on_completed_agenda_effect = {
3581
+ estate = estate_nobles
3582
+ }
3583
+ add_estate_loyalty = {
3584
+ estate = estate_nobles
3585
+ loyalty = 15
3586
+ }
3587
+ add_mil_power = 50
3588
+ }
3589
+ failing_effect = {
3590
+ on_failed_agenda_effect = yes
3591
+ clr_auto_complete_flag = yes
3592
+ add_estate_loyalty_modifier = {
3593
+ estate = estate_nobles
3594
+ desc = EST_VAL_AGENDA_DENIED
3595
+ loyalty = -5
3596
+ duration = 7300
3597
+ }
3598
+ }
3599
+ }
3600
+
3601
+ estate_nobles_mam_increase_army_professionalism = {
3602
+ can_select = {
3603
+ has_dlc = "Cradle of Civilization"
3604
+ has_country_flag = mam_access_new_agendas_about_mamluks_flag
3605
+ OR = {
3606
+ tag = MAM
3607
+ has_estate_privilege = estate_nobles_enlist_the_mamluks
3608
+ }
3609
+ army_professionalism = 0.1
3610
+ NOT = { army_professionalism = 0.25 }
3611
+ }
3612
+ selection_weight = {
3613
+ factor = 10
3614
+ }
3615
+ task_requirements = {
3616
+ if = {
3617
+ limit = {
3618
+ has_estate_agenda_auto_completion = {
3619
+ estate = estate_nobles
3620
+ }
3621
+ }
3622
+ has_estate_agenda_auto_completion = {
3623
+ estate = estate_nobles
3624
+ }
3625
+ }
3626
+ else = {
3627
+ army_professionalism = 0.25
3628
+ }
3629
+ }
3630
+ task_completed_effect = {
3631
+ on_completed_agenda_effect = {
3632
+ estate = estate_nobles
3633
+ }
3634
+ add_estate_loyalty = {
3635
+ estate = estate_nobles
3636
+ loyalty = 15
3637
+ }
3638
+ add_absolutism = 5
3639
+ add_army_professionalism = 0.1
3640
+ define_advisor = {
3641
+ type = commandant
3642
+ skill = 3
3643
+ discount = yes
3644
+ }
3645
+ }
3646
+ failing_effect = {
3647
+ on_failed_agenda_effect = yes
3648
+ clr_auto_complete_flag = yes
3649
+ add_estate_loyalty_modifier = {
3650
+ estate = estate_nobles
3651
+ desc = EST_VAL_AGENDA_DENIED
3652
+ loyalty = -5
3653
+ duration = 7300
3654
+ }
3655
+ }
3656
+ }
3657
+
3658
+ estate_nobles_mam_focus_on_military_matters = {
3659
+ can_select = {
3660
+ OR = {
3661
+ has_dlc = "Res Publica"
3662
+ has_dlc = "Common Sense"
3663
+ }
3664
+ has_country_flag = mam_access_new_agendas_about_mamluks_flag
3665
+ NOT = { national_focus = MIL }
3666
+ }
3667
+ selection_weight = {
3668
+ factor = 5
3669
+ }
3670
+ task_requirements = {
3671
+ if = {
3672
+ limit = {
3673
+ has_estate_agenda_auto_completion = {
3674
+ estate = estate_nobles
3675
+ }
3676
+ }
3677
+ has_estate_agenda_auto_completion = {
3678
+ estate = estate_nobles
3679
+ }
3680
+ }
3681
+ else = {
3682
+ national_focus = MIL
3683
+ }
3684
+ }
3685
+ task_completed_effect = {
3686
+ on_completed_agenda_effect = {
3687
+ estate = estate_nobles
3688
+ }
3689
+ add_estate_loyalty = {
3690
+ estate = estate_nobles
3691
+ loyalty = 15
3692
+ }
3693
+ capital_scope = { add_base_manpower = 1 }
3694
+ }
3695
+ failing_effect = {
3696
+ on_failed_agenda_effect = yes
3697
+ clr_auto_complete_flag = yes
3698
+ add_estate_loyalty_modifier = {
3699
+ estate = estate_nobles
3700
+ desc = EST_VAL_AGENDA_DENIED
3701
+ loyalty = -5
3702
+ duration = 7300
3703
+ }
3704
+ }
3705
+ }
3226
3706
 
common/estate_agendas/09_eunuchs_agendas.txt CHANGED
@@ -284,7 +284,7 @@ estate_eunuchs_monthly_adm_agenda = {
284
284
  else = {
285
285
  NOT = { monthly_adm = 7 }
286
286
  }
287
- has_unembraced_institution = yes
287
+
288
288
  }
289
289
  }
290
290
  task_requirements = {
@@ -301,10 +301,9 @@ estate_eunuchs_monthly_adm_agenda = {
301
301
  else = {
302
302
  if = {
303
303
  limit = { has_dlc = "Cradle of Civilization" }
304
- monthly_adm = 13
304
+ monthly_adm = 12
305
305
  }
306
- else = { monthly_adm = 9 }
307
- has_unembraced_institution = no
306
+ else = { monthly_adm = 8 }
308
307
  }
309
308
  }
310
309
  task_completed_effect = {
@@ -1044,7 +1043,7 @@ estate_eunuchs_porcelain_tower_agenda = {
1044
1043
  add_dip_power = 50
1045
1044
  add_mil_power = 50
1046
1045
  change_ruler_stat = {
1047
- stat = adm
1046
+ type = adm
1048
1047
  amount = 1
1049
1048
  }
1050
1049
  }
common/estate_agendas/10_qizilbash_agendas.txt ADDED
@@ -0,0 +1,1967 @@
1
+ #Generic Agendas - always available
2
+
3
+ #This one or the next one will always be valid
4
+ estate_qizilbash_hire_advisor = {
5
+ can_select = {
6
+ NOT = {
7
+ employed_advisor = {
8
+ category = MIL
9
+ }
10
+ }
11
+ }
12
+ selection_weight = {
13
+ factor = 1
14
+ }
15
+ task_requirements = {
16
+ if = {
17
+ limit = {
18
+ has_estate_agenda_auto_completion = {
19
+ estate = estate_qizilbash
20
+ }
21
+ }
22
+ has_estate_agenda_auto_completion = {
23
+ estate = estate_qizilbash
24
+ }
25
+ }
26
+ else = {
27
+ employed_advisor = {
28
+ category = MIL
29
+ }
30
+ is_in_deficit = no
31
+ }
32
+ }
33
+ task_completed_effect = {
34
+ add_estate_loyalty = {
35
+ estate = estate_qizilbash
36
+ loyalty = 10
37
+ }
38
+ }
39
+ failing_effect = {
40
+ add_estate_loyalty_modifier = {
41
+ estate = estate_qizilbash
42
+ desc = EST_VAL_AGENDA_DENIED
43
+ loyalty = -5
44
+ duration = 7300
45
+ }
46
+ }
47
+ }
48
+
49
+ estate_qizilbash_fire_advisor = {
50
+ can_select = {
51
+ employed_advisor = {
52
+ category = MIL
53
+ }
54
+ }
55
+ selection_weight = {
56
+ factor = 1
57
+ modifier = {
58
+ factor = 0.5
59
+ always = yes
60
+ }
61
+ }
62
+ immediate_effect = {
63
+ hidden_effect = {
64
+ set_country_flag = need_to_fire_mil_advisor
65
+ }
66
+ }
67
+ on_invalid = {
68
+ clr_country_flag = need_to_fire_mil_advisor
69
+ }
70
+ task_requirements = {
71
+ if = {
72
+ limit = {
73
+ has_estate_agenda_auto_completion = {
74
+ estate = estate_qizilbash
75
+ }
76
+ }
77
+ has_estate_agenda_auto_completion = {
78
+ estate = estate_qizilbash
79
+ }
80
+ }
81
+ else = {
82
+ custom_trigger_tooltip = {
83
+ tooltip = fire_mil_advisor_tooltip
84
+ has_country_flag = just_fired_mil_advisor
85
+ }
86
+ }
87
+ }
88
+ task_completed_effect = {
89
+ add_estate_loyalty = {
90
+ estate = estate_qizilbash
91
+ loyalty = 10
92
+ }
93
+ clr_country_flag = just_fired_mil_advisor
94
+ clr_country_flag = need_to_fire_mil_advisor
95
+ }
96
+ invalid_trigger = {
97
+ NOT = {
98
+ employed_advisor = {
99
+ category = MIL
100
+ }
101
+ }
102
+ NOT = { has_country_flag = just_fired_mil_advisor }
103
+ }
104
+ failing_effect = {
105
+ add_estate_loyalty_modifier = {
106
+ estate = estate_qizilbash
107
+ desc = EST_VAL_AGENDA_DENIED
108
+ loyalty = -5
109
+ duration = 7300
110
+ }
111
+ clr_country_flag = need_to_fire_mil_advisor
112
+ }
113
+ }
114
+
115
+ #Give us three privileges
116
+ estate_qizilbash_three_privileges = {
117
+ can_select = {
118
+ NOT = {
119
+ num_of_estate_privileges = {
120
+ estate = estate_qizilbash
121
+ value = 2
122
+ }
123
+ }
124
+ }
125
+ selection_weight = {
126
+ factor = 10
127
+ }
128
+ pre_effect = {
129
+ set_variable = {
130
+ which = estate_qizilbash_three_privileges_var
131
+ value = 0
132
+ }
133
+ if = {
134
+ limit = {
135
+ num_of_estate_privileges = {
136
+ estate = estate_qizilbash
137
+ value = 1
138
+ }
139
+ }
140
+ set_variable = {
141
+ which = estate_qizilbash_three_privileges_var
142
+ value = 2
143
+ }
144
+ }
145
+ else = {
146
+ set_variable = {
147
+ which = estate_qizilbash_three_privileges_var
148
+ value = 1
149
+ }
150
+ }
151
+ }
152
+ task_requirements = {
153
+ if = {
154
+ limit = {
155
+ has_estate_agenda_auto_completion = {
156
+ estate = estate_qizilbash
157
+ }
158
+ }
159
+ has_estate_agenda_auto_completion = {
160
+ estate = estate_qizilbash
161
+ }
162
+ }
163
+ else = {
164
+ if = {
165
+ limit = {
166
+ check_variable = {
167
+ which = estate_qizilbash_three_privileges_var
168
+ value = 2
169
+ }
170
+ }
171
+ num_of_estate_privileges = {
172
+ estate = estate_qizilbash
173
+ value = 3
174
+ }
175
+ }
176
+ else = {
177
+ num_of_estate_privileges = {
178
+ estate = estate_qizilbash
179
+ value = 2
180
+ }
181
+ }
182
+ }
183
+ }
184
+ task_completed_effect = {
185
+ add_estate_loyalty = {
186
+ estate = estate_qizilbash
187
+ loyalty = 20
188
+ }
189
+ }
190
+ failing_effect = {
191
+ add_estate_loyalty_modifier = {
192
+ estate = estate_qizilbash
193
+ desc = EST_VAL_AGENDA_DENIED
194
+ loyalty = -5
195
+ duration = 7300
196
+ }
197
+ }
198
+ }
199
+
200
+ #Increase Monthly Military Power
201
+ estate_qizilbash_increase_monthly_military_power = {
202
+ can_select = {
203
+ if = {
204
+ limit = {
205
+ #Promote Advisors - +2
206
+ has_dlc = "Cradle of Civilization"
207
+ #National Focus - +2
208
+ has_dlc = "Res Publica"
209
+ has_dlc = "Common Sense"
210
+ }
211
+ NOT = { monthly_mil = 12 }
212
+ }
213
+ else_if = {
214
+ limit = {
215
+ OR = {
216
+ has_dlc = "Cradle of Civilization"
217
+ has_dlc = "Res Publica"
218
+ has_dlc = "Common Sense"
219
+ }
220
+ }
221
+ NOT = { monthly_mil = 10 }
222
+ }
223
+ else = {
224
+ NOT = { monthly_mil = 8 }
225
+ }
226
+ }
227
+ selection_weight = {
228
+ factor = 1
229
+ }
230
+ task_requirements = {
231
+ if = {
232
+ limit = {
233
+ has_estate_agenda_auto_completion = {
234
+ estate = estate_qizilbash
235
+ }
236
+ }
237
+ has_estate_agenda_auto_completion = {
238
+ estate = estate_qizilbash
239
+ }
240
+ }
241
+ else = {
242
+ if = {
243
+ limit = {
244
+ #Promote Advisors - +2
245
+ has_dlc = "Cradle of Civilization"
246
+ #National Focus - +2
247
+ has_dlc = "Res Publica"
248
+ has_dlc = "Common Sense"
249
+ }
250
+ monthly_mil = 12
251
+ }
252
+ else_if = {
253
+ limit = {
254
+ OR = {
255
+ has_dlc = "Cradle of Civilization"
256
+ has_dlc = "Res Publica"
257
+ has_dlc = "Common Sense"
258
+ }
259
+ }
260
+ monthly_mil = 10
261
+ }
262
+ else = {
263
+ monthly_mil = 8
264
+ }
265
+ }
266
+ }
267
+ task_completed_effect = {
268
+ add_estate_loyalty = {
269
+ estate = estate_qizilbash
270
+ loyalty = 10
271
+ }
272
+ add_mil_power = 50
273
+ }
274
+ failing_effect = {
275
+ add_estate_loyalty_modifier = {
276
+ estate = estate_qizilbash
277
+ desc = EST_VAL_AGENDA_DENIED
278
+ loyalty = -5
279
+ duration = 7300
280
+ }
281
+ }
282
+ }
283
+
284
+ #Retake Core
285
+ estate_qizilbash_retake_core = {
286
+ can_select = {
287
+ is_free_or_tributary_trigger = yes
288
+ OR = {
289
+ is_part_of_hre = no
290
+ NOT = { hre_reform_passed = landfriede }
291
+ }
292
+ any_province = {
293
+ is_core = root
294
+ NOT = { country_or_non_sovereign_subject_holds = root }
295
+ is_city = yes
296
+ NOT = { owner = { ROOT = { truce_with = prev } } }
297
+ }
298
+ }
299
+ selection_weight = {
300
+ factor = 2
301
+ modifier = {
302
+ factor = 0.5
303
+ any_province = {
304
+ is_core = root
305
+ NOT = { country_or_non_sovereign_subject_holds = root }
306
+ is_city = yes
307
+ owner = {
308
+ NOT = { ROOT = { truce_with = prev } }
309
+ alliance_with = root
310
+ }
311
+ }
312
+ }
313
+ modifier = {
314
+ factor = 0.25
315
+ any_country = {
316
+ coalition_target = root
317
+ }
318
+ }
319
+ }
320
+ pre_effect = {
321
+ random_province = {
322
+ limit = {
323
+ is_core = root
324
+ NOT = { country_or_non_sovereign_subject_holds = root }
325
+ is_city = yes
326
+ NOT = { owner = { ROOT = { truce_with = prev } } }
327
+ }
328
+ save_event_target_as = agenda_province
329
+ }
330
+ random_province = {
331
+ limit = {
332
+ is_core = root
333
+ NOT = { country_or_non_sovereign_subject_holds = root }
334
+ is_city = yes
335
+ NOT = { owner = { ROOT = { truce_with = prev } } }
336
+ NOT = { owner = { alliance_with = root } }
337
+ }
338
+ save_event_target_as = agenda_province
339
+ }
340
+ random_province = {
341
+ limit = {
342
+ is_core = root
343
+ NOT = { country_or_non_sovereign_subject_holds = root }
344
+ is_city = yes
345
+ NOT = { owner = { ROOT = { truce_with = prev } } }
346
+ OR = {
347
+ AND = {
348
+ has_port = yes
349
+ root = {
350
+ any_owned_province = {
351
+ has_port = yes
352
+ }
353
+ }
354
+ }
355
+ any_neighbor_province = {
356
+ owned_by = root
357
+ }
358
+ }
359
+ }
360
+ save_event_target_as = agenda_province
361
+ }
362
+ random_province = {
363
+ limit = {
364
+ is_core = root
365
+ NOT = { country_or_non_sovereign_subject_holds = root }
366
+ is_city = yes
367
+ NOT = { owner = { ROOT = { truce_with = prev } } }
368
+ OR = {
369
+ AND = {
370
+ has_port = yes
371
+ root = {
372
+ any_owned_province = {
373
+ has_port = yes
374
+ }
375
+ }
376
+ }
377
+ any_neighbor_province = {
378
+ owned_by = root
379
+ }
380
+ }
381
+ NOT = { owner = { alliance_with = root } }
382
+ }
383
+ save_event_target_as = agenda_province
384
+ }
385
+ }
386
+ fail_if = {
387
+ event_target:agenda_province = {
388
+ NOT = { is_core = root }
389
+ }
390
+ }
391
+ provinces_to_highlight = {
392
+ province_id = event_target:agenda_province
393
+ }
394
+ task_requirements = {
395
+ if = {
396
+ limit = {
397
+ has_estate_agenda_auto_completion = {
398
+ estate = estate_qizilbash
399
+ }
400
+ }
401
+ has_estate_agenda_auto_completion = {
402
+ estate = estate_qizilbash
403
+ }
404
+ }
405
+ else = {
406
+ event_target:agenda_province = {
407
+ owned_by = root
408
+ }
409
+ }
410
+ }
411
+ task_completed_effect = {
412
+ add_estate_loyalty = {
413
+ estate = estate_qizilbash
414
+ loyalty = 10
415
+ }
416
+ add_country_modifier = {
417
+ name = military_victory
418
+ duration = 3650
419
+ }
420
+ }
421
+ failing_effect = {
422
+ add_estate_loyalty_modifier = {
423
+ estate = estate_qizilbash
424
+ desc = EST_VAL_AGENDA_DENIED
425
+ loyalty = -5
426
+ duration = 7300
427
+ }
428
+ }
429
+ }
430
+
431
+ #More Qizilbash Units
432
+ estate_qizilbash_recruit_more_qizilbash = {
433
+ can_select = {
434
+ NOT = { has_country_modifier = thriving_arms_industry }
435
+ NOT = { army_size_percentage = 0.5 }
436
+
437
+ if = {
438
+ limit = {
439
+ is_emperor = yes
440
+ }
441
+ NOT = { army_size_percentage = 0.35 }
442
+ }
443
+ }
444
+ selection_weight = {
445
+ factor = 5
446
+ modifier = {
447
+ factor = 2
448
+ any_rival_country = {
449
+ NOT = { truce_with = root }
450
+ army_size = root
451
+ }
452
+ }
453
+ modifier = {
454
+ factor = 2.0
455
+ NOT = { army_size_percentage = 0.3 }
456
+ NOT = { army_size = 150 }
457
+ }
458
+ modifier = { #this could be really annoying in the late game
459
+ factor = 0.5
460
+ army_size = 100
461
+ }
462
+ modifier = {
463
+ factor = 0.25
464
+ army_size = 200
465
+ }
466
+ modifier = {
467
+ factor = 0
468
+ army_size = 500
469
+ }
470
+ modifier = {
471
+ factor = 0.5
472
+ is_emperor = yes
473
+ }
474
+ modifier = {
475
+ has_estate_privilege = estate_janissary_allow_other_professions
476
+ factor = 0
477
+ }
478
+ }
479
+ task_requirements = {
480
+ if = {
481
+ limit = {
482
+ has_estate_agenda_auto_completion = {
483
+ estate = estate_qizilbash
484
+ }
485
+ }
486
+ has_estate_agenda_auto_completion = {
487
+ estate = estate_qizilbash
488
+ }
489
+ }
490
+ else = {
491
+ if = {
492
+ limit = {
493
+ is_emperor = yes
494
+ }
495
+ army_size_percentage = 0.65
496
+ }
497
+ else = {
498
+ army_size_percentage = 0.75
499
+ }
500
+ }
501
+ }
502
+ task_completed_effect = {
503
+ add_estate_loyalty = {
504
+ estate = estate_qizilbash
505
+ loyalty = 10
506
+ }
507
+ define_advisor = {
508
+ type = commandant
509
+ cost_multiplier = 0.25
510
+ }
511
+ }
512
+ failing_effect = {
513
+ add_estate_loyalty_modifier = {
514
+ estate = estate_qizilbash
515
+ desc = EST_VAL_AGENDA_DENIED
516
+ loyalty = -5
517
+ duration = 7300
518
+ }
519
+ }
520
+ }
521
+
522
+ #Humiliate Rival
523
+ estate_qizilbash_humiliate_rival = {
524
+ can_select = {
525
+ any_rival_country = {
526
+ NOT = { truce_with = ROOT }
527
+ NOT = { humiliated_by = root }
528
+ }
529
+ }
530
+ selection_weight = {
531
+ factor = 1
532
+ modifier = {
533
+ factor = 3
534
+ NOT = { has_country_flag = humiliated_rival }
535
+ }
536
+ modifier = {
537
+ has_estate_privilege = estate_janissary_allow_other_professions
538
+ factor = 0
539
+ }
540
+ }
541
+ pre_effect = {
542
+ random_rival_country = {
543
+ limit = {
544
+ NOT = { truce_with = ROOT }
545
+ NOT = { humiliated_by = root }
546
+ }
547
+ save_event_target_as = agenda_country
548
+ }
549
+ }
550
+ task_requirements = {
551
+ if = {
552
+ limit = {
553
+ has_estate_agenda_auto_completion = {
554
+ estate = estate_qizilbash
555
+ }
556
+ }
557
+ has_estate_agenda_auto_completion = {
558
+ estate = estate_qizilbash
559
+ }
560
+ }
561
+ else = {
562
+ event_target:agenda_country = {
563
+ OR = {
564
+ humiliated_by = root
565
+ has_been_eclipsed_by = root
566
+ }
567
+ }
568
+ }
569
+ }
570
+ fail_if = {
571
+ event_target:agenda_country = {
572
+ has_eclipsed = root
573
+ }
574
+ }
575
+ task_completed_effect = {
576
+ add_estate_loyalty = {
577
+ estate = estate_qizilbash
578
+ loyalty = 10
579
+ }
580
+ add_prestige_or_monarch_power = {
581
+ amount = 25
582
+ }
583
+ }
584
+ failing_effect = {
585
+ add_estate_loyalty_modifier = {
586
+ estate = estate_qizilbash
587
+ desc = EST_VAL_AGENDA_DENIED
588
+ loyalty = -5
589
+ duration = 7300
590
+ }
591
+ }
592
+ }
593
+
594
+ #Build soldier household
595
+ estate_qizilbash_build_soldier_household = {
596
+ can_select = {
597
+ any_owned_province = {
598
+ NOT = { religion_group = ROOT }
599
+ is_state_core = root
600
+ has_no_manufactory_trigger = yes
601
+ num_free_building_slots = 1
602
+ }
603
+ monthly_income = 30
604
+ adm_tech = 15
605
+ }
606
+ selection_weight = {
607
+ factor = 1
608
+ modifier = {
609
+ factor = 0.5
610
+ NOT = { monthly_income = 40 }
611
+ }
612
+ modifier = {
613
+ factor = 2
614
+ monthly_income = 60
615
+ }
616
+ modifier = {
617
+ factor = 0
618
+ has_estate_privilege = estate_janissary_allow_other_professions
619
+ }
620
+ }
621
+ pre_effect = {
622
+ random_owned_province = {
623
+ limit = {
624
+ NOT = { religion_group = ROOT }
625
+ is_state_core = root
626
+ has_no_manufactory_trigger = yes
627
+ num_free_building_slots = 1
628
+ }
629
+ save_event_target_as = agenda_province
630
+ }
631
+ random_owned_province = {
632
+ limit = {
633
+ NOT = { religion_group = ROOT }
634
+ is_state_core = root
635
+ has_no_manufactory_trigger = yes
636
+ num_free_building_slots = 1
637
+ base_manpower = 5
638
+ }
639
+ save_event_target_as = agenda_province
640
+ }
641
+ random_owned_province = {
642
+ limit = {
643
+ NOT = { religion_group = ROOT }
644
+ is_state_core = root
645
+ has_no_manufactory_trigger = yes
646
+ num_free_building_slots = 1
647
+ base_manpower = 10
648
+ }
649
+ save_event_target_as = agenda_province
650
+ }
651
+ }
652
+ provinces_to_highlight = {
653
+ province_id = event_target:agenda_province
654
+ }
655
+ fail_if = {
656
+ event_target:agenda_province = {
657
+ NOT = { owned_by = root }
658
+ }
659
+ }
660
+ task_requirements = {
661
+ if = {
662
+ limit = {
663
+ has_estate_agenda_auto_completion = {
664
+ estate = estate_qizilbash
665
+ }
666
+ }
667
+ has_estate_agenda_auto_completion = {
668
+ estate = estate_qizilbash
669
+ }
670
+ }
671
+ else = {
672
+ event_target:agenda_province = {
673
+ has_building = soldier_households
674
+ }
675
+ }
676
+ }
677
+ task_completed_effect = {
678
+ add_estate_loyalty = {
679
+ estate = estate_qizilbash
680
+ loyalty = 10
681
+ }
682
+ event_target:agenda_province = {
683
+ add_base_manpower = 2
684
+ add_province_modifier = {
685
+ name = new_recruitment_center
686
+ duration = 5475
687
+ }
688
+ }
689
+ }
690
+ failing_effect = {
691
+ event_target:agenda_province = {
692
+ if = {
693
+ limit = { owned_by = root }
694
+ add_named_unrest = {
695
+ name = local_qizilbash_displeased
696
+ value = 5
697
+ }
698
+ }
699
+ }
700
+ add_estate_loyalty_modifier = {
701
+ estate = estate_qizilbash
702
+ desc = EST_VAL_AGENDA_DENIED
703
+ loyalty = -5
704
+ duration = 7300
705
+ }
706
+ }
707
+ }
708
+
709
+ #Crush Revolts (not heretics)
710
+ estate_qizilbash_crush_revolts = {
711
+ can_select = {
712
+ num_of_rebel_armies = 1
713
+ NOT = { has_spawned_rebels = qizilbash_rebels }
714
+ }
715
+ selection_weight = {
716
+ factor = 2
717
+ modifier = {
718
+ factor = 2
719
+ num_of_rebel_controlled_provinces = 3
720
+ }
721
+ modifier = {
722
+ factor = 2
723
+ num_of_rebel_controlled_provinces = 5
724
+ }
725
+ modifier = {
726
+ factor = 0
727
+ has_estate_privilege = estate_janissary_allow_other_professions
728
+ }
729
+ }
730
+ provinces_to_highlight = {
731
+ owned_by = root
732
+ controlled_by = REB
733
+ }
734
+ fail_if = {
735
+ has_country_modifier = just_lost_to_rebels
736
+ }
737
+ task_requirements = {
738
+ if = {
739
+ limit = {
740
+ has_estate_agenda_auto_completion = {
741
+ estate = estate_qizilbash
742
+ }
743
+ }
744
+ has_estate_agenda_auto_completion = {
745
+ estate = estate_qizilbash
746
+ }
747
+ }
748
+ else = {
749
+ NOT = { num_of_rebel_controlled_provinces = 1 }
750
+ NOT = { num_of_rebel_armies = 1 }
751
+ hidden_trigger = { NOT = { has_country_modifier = just_lost_to_rebels } }
752
+ }
753
+ }
754
+ task_completed_effect = {
755
+ add_estate_loyalty = {
756
+ estate = estate_qizilbash
757
+ loyalty = 10
758
+ }
759
+ add_prestige = 10
760
+ }
761
+ failing_effect = {
762
+ add_estate_loyalty_modifier = {
763
+ estate = estate_qizilbash
764
+ desc = EST_VAL_AGENDA_DENIED
765
+ loyalty = -5
766
+ duration = 7300
767
+ }
768
+ }
769
+ }
770
+
771
+ #Conquer X area from heathen country you don't have great relations with
772
+ estate_qizilbash_expand_into_x = {
773
+ can_select = {
774
+ is_free_or_tributary_trigger = yes
775
+ is_at_war = no
776
+ any_neighbor_country = {
777
+ NOT = { religion_group = ROOT }
778
+ num_of_cities = 5
779
+ is_free_or_tributary_trigger = yes
780
+ NOT = { is_subject_of = root }
781
+ NOT = { overlord_of = root }
782
+ NOT = { alliance_with = root }
783
+ NOT = { ROOT = { truce_with = prev } }
784
+ NOT = {
785
+ has_opinion = {
786
+ who = root
787
+ value = 25
788
+ }
789
+ }
790
+ NOT = {
791
+ any_owned_province = { #No need for this agenda if covered by a mission
792
+ OR = {
793
+ is_permanent_claim = root
794
+ is_core = root
795
+ }
796
+ }
797
+ }
798
+ ROOT = {
799
+ knows_country = prev
800
+ }
801
+ any_owned_province = {
802
+ any_neighbor_province = {
803
+ owned_by = root
804
+ }
805
+ NOT = {
806
+ area_for_scope_province = {
807
+ OR = {
808
+ is_empty = yes
809
+ owned_by = root
810
+ }
811
+ }
812
+ }
813
+ }
814
+ OR = {
815
+ is_part_of_hre = no
816
+ NOT = { hre_reform_passed = landfriede }
817
+ ROOT = { is_part_of_hre = no }
818
+ }
819
+ }
820
+ }
821
+ selection_weight = {
822
+ factor = 2
823
+ modifier = {
824
+ factor = 0.5
825
+ has_non_generic_missions = yes
826
+ }
827
+ modifier = {
828
+ factor = 1.5
829
+ num_of_cities = 20
830
+ }
831
+ modifier = {
832
+ factor = 1.5
833
+ num_of_cities = 25
834
+ }
835
+ modifier = {
836
+ factor = 1.5
837
+ num_of_cities = 30
838
+ }
839
+ modifier = {
840
+ factor = 1.5
841
+ num_of_cities = 40
842
+ }
843
+ modifier = {
844
+ factor = 1.5
845
+ num_of_cities = 50
846
+ }
847
+ modifier = {
848
+ factor = 0.25
849
+ any_country = {
850
+ coalition_target = root
851
+ }
852
+ }
853
+ modifier = {
854
+ factor = 0
855
+ has_estate_privilege = estate_janissary_allow_other_professions
856
+ }
857
+ }
858
+ pre_effect = {
859
+ random_neighbor_country = {
860
+ limit = {
861
+ NOT = { religion_group = ROOT }
862
+ num_of_cities = 5
863
+ is_free_or_tributary_trigger = yes
864
+ NOT = { is_subject_of = root }
865
+ NOT = { overlord_of = root }
866
+ NOT = { alliance_with = root }
867
+ NOT = { ROOT = { truce_with = prev } }
868
+ NOT = {
869
+ has_opinion = {
870
+ who = root
871
+ value = 25
872
+ }
873
+ }
874
+ NOT = {
875
+ any_owned_province = { #No need for this agenda if covered by a mission
876
+ OR = {
877
+ is_permanent_claim = root
878
+ is_core = root
879
+ }
880
+ }
881
+ }
882
+ ROOT = {
883
+ knows_country = prev
884
+ }
885
+ any_owned_province = {
886
+ any_neighbor_province = {
887
+ owned_by = root
888
+ }
889
+ NOT = {
890
+ area_for_scope_province = {
891
+ OR = {
892
+ is_empty = yes
893
+ owned_by = root
894
+ }
895
+ }
896
+ }
897
+ }
898
+ OR = {
899
+ is_part_of_hre = no
900
+ NOT = { hre_reform_passed = landfriede }
901
+ ROOT = { is_part_of_hre = no }
902
+ }
903
+ }
904
+ random_owned_province = {
905
+ limit = {
906
+ any_neighbor_province = {
907
+ owned_by = root
908
+ }
909
+ area_for_scope_province = {
910
+ type = all
911
+ NOT = { owned_by = root }
912
+ is_empty = no
913
+ }
914
+ }
915
+ save_event_target_as = agenda_province
916
+ }
917
+ }
918
+ }
919
+ immediate_effect = {
920
+ if = {
921
+ limit = {
922
+ event_target:agenda_province = {
923
+ area_for_scope_province = {
924
+ NOT = { is_claim = root }
925
+ NOT = { is_core = root }
926
+ }
927
+ }
928
+ }
929
+ event_target:agenda_province = {
930
+ area = {
931
+ limit = {
932
+ NOT = { is_claim = root }
933
+ NOT = { is_core = root }
934
+ }
935
+ add_claim = root
936
+ }
937
+ }
938
+ }
939
+ }
940
+ on_invalid = {
941
+ if = {
942
+ limit = {
943
+ event_target:agenda_province = {
944
+ area_for_scope_province = {
945
+ is_claim = root
946
+ NOT = { is_permanent_claim = root }
947
+ }
948
+ }
949
+ }
950
+ event_target:agenda_province = {
951
+ area = {
952
+ limit = {
953
+ is_claim = root
954
+ NOT = { is_permanent_claim = root }
955
+ }
956
+ remove_claim = root
957
+ }
958
+ }
959
+ }
960
+ }
961
+ provinces_to_highlight = {
962
+ area_for_scope_province = {
963
+ province_id = event_target:agenda_province
964
+ }
965
+ }
966
+ task_requirements = {
967
+ if = {
968
+ limit = {
969
+ has_estate_agenda_auto_completion = {
970
+ estate = estate_qizilbash
971
+ }
972
+ }
973
+ has_estate_agenda_auto_completion = {
974
+ estate = estate_qizilbash
975
+ }
976
+ }
977
+ else = {
978
+ event_target:agenda_province = {
979
+ area_for_scope_province = {
980
+ owned_by = root
981
+ }
982
+ }
983
+ }
984
+ }
985
+ fail_if = {
986
+ event_target:agenda_province = {
987
+ area_for_scope_province = {
988
+ type = all
989
+ NOT = { is_claim = root }
990
+ NOT = { is_core = root }
991
+ NOT = { owned_by = root }
992
+ }
993
+ }
994
+ }
995
+ task_completed_effect = {
996
+ add_estate_loyalty = {
997
+ estate = estate_qizilbash
998
+ loyalty = 15
999
+ }
1000
+ add_adm_power = 50
1001
+ }
1002
+ failing_effect = {
1003
+ add_estate_loyalty_modifier = {
1004
+ estate = estate_qizilbash
1005
+ desc = EST_VAL_AGENDA_DENIED
1006
+ loyalty = -5
1007
+ duration = 7300
1008
+ }
1009
+ if = {
1010
+ limit = {
1011
+ event_target:agenda_province = {
1012
+ area_for_scope_province = {
1013
+ is_claim = root
1014
+ NOT = { is_permanent_claim = root }
1015
+ }
1016
+ }
1017
+ }
1018
+ event_target:agenda_province = {
1019
+ area = {
1020
+ limit = {
1021
+ is_claim = root
1022
+ NOT = { is_permanent_claim = root }
1023
+ }
1024
+ remove_claim = root
1025
+ }
1026
+ }
1027
+ }
1028
+ }
1029
+ }
1030
+
1031
+ #Bigger Army than Rival
1032
+ estate_qizilbash_bigger_army_than_rival = {
1033
+ can_select = {
1034
+ NOT = { has_country_modifier = thriving_arms_industry }
1035
+ NOT = { army_size_percentage = 1 }
1036
+ any_rival_country = {
1037
+ NOT = { war_with = root }
1038
+ NOT = { root = { army_size = prev } }
1039
+ army_balance = {
1040
+ who = root
1041
+ value = 1.05
1042
+ }
1043
+ NOT = {
1044
+ army_balance = {
1045
+ who = root
1046
+ value = 1.25
1047
+ }
1048
+ }
1049
+ }
1050
+ }
1051
+ selection_weight = {
1052
+ factor = 5
1053
+ modifier = {
1054
+ factor = 0
1055
+ has_estate_privilege = estate_janissary_allow_other_professions
1056
+ }
1057
+ }
1058
+ pre_effect = {
1059
+ random_rival_country = {
1060
+ limit = {
1061
+ NOT = { war_with = root }
1062
+ NOT = { root = { army_size = prev } }
1063
+ army_balance = {
1064
+ who = root
1065
+ value = 1.05
1066
+ }
1067
+ NOT = {
1068
+ army_balance = {
1069
+ who = root
1070
+ value = 1.25
1071
+ }
1072
+ }
1073
+ }
1074
+ save_event_target_as = agenda_country
1075
+ }
1076
+ }
1077
+ provinces_to_highlight = {
1078
+ is_capital_of = event_target:agenda_country
1079
+ }
1080
+ task_requirements = {
1081
+ if = {
1082
+ limit = {
1083
+ has_estate_agenda_auto_completion = {
1084
+ estate = estate_qizilbash
1085
+ }
1086
+ }
1087
+ has_estate_agenda_auto_completion = {
1088
+ estate = estate_qizilbash
1089
+ }
1090
+ }
1091
+ else = {
1092
+ if = {
1093
+ limit = { event_target:agenda_country = { num_of_cities = 1 } }
1094
+ army_size = event_target:agenda_country
1095
+ }
1096
+ else = {
1097
+ always = yes
1098
+ }
1099
+ }
1100
+ }
1101
+ task_completed_effect = {
1102
+ add_estate_loyalty = {
1103
+ estate = estate_qizilbash
1104
+ loyalty = 10
1105
+ }
1106
+ add_country_modifier = {
1107
+ name = thriving_arms_industry
1108
+ duration = 3650
1109
+ }
1110
+ }
1111
+ failing_effect = {
1112
+ add_estate_loyalty_modifier = {
1113
+ estate = estate_qizilbash
1114
+ desc = EST_VAL_AGENDA_DENIED
1115
+ loyalty = -5
1116
+ duration = 7300
1117
+ }
1118
+ }
1119
+ }
1120
+
1121
+ #Protect our Culture in X
1122
+ estate_qizilbash_protect_our_culture = {
1123
+ can_select = {
1124
+ is_free_or_tributary_trigger = yes
1125
+ is_at_war = no
1126
+ any_neighbor_country = {
1127
+ any_owned_province = {
1128
+ OR = {
1129
+ culture = root
1130
+ culture = azerbaijani
1131
+ culture = turkish
1132
+ culture = turkmeni
1133
+ culture = turco_iranian
1134
+ }
1135
+ OR = {
1136
+ religion = root
1137
+ religion = shiite
1138
+ root = { secondary_religion = prev }
1139
+ }
1140
+ }
1141
+ }
1142
+ any_owned_province = {
1143
+ any_neighbor_province = {
1144
+ is_city = yes
1145
+ OR = {
1146
+ religion = root
1147
+ religion = shiite
1148
+ root = { secondary_religion = prev }
1149
+ }
1150
+ OR = {
1151
+ culture = root
1152
+ culture = azerbaijani
1153
+ culture = turkish
1154
+ culture = turkmeni
1155
+ culture = turco_iranian
1156
+ }
1157
+ has_owner_culture = no
1158
+ has_owner_accepted_culture = no
1159
+ has_discovered = root
1160
+ owner = {
1161
+ is_free_or_tributary_trigger = yes
1162
+ is_nomad = no
1163
+ NOT = { is_subject_of = root }
1164
+ NOT = { overlord_of = root }
1165
+ NOT = { alliance_with = root }
1166
+ NOT = { ROOT = { truce_with = prev } }
1167
+ OR = {
1168
+ is_part_of_hre = no
1169
+ NOT = { hre_reform_passed = landfriede }
1170
+ ROOT = { is_part_of_hre = no }
1171
+ }
1172
+ }
1173
+ }
1174
+ }
1175
+ }
1176
+ selection_weight = {
1177
+ factor = 1.5
1178
+ modifier = {
1179
+ factor = 0.25
1180
+ any_country = {
1181
+ coalition_target = root
1182
+ }
1183
+ }
1184
+ }
1185
+ pre_effect = {
1186
+ random_owned_province = {
1187
+ limit = {
1188
+ any_neighbor_province = {
1189
+ is_city = yes
1190
+ OR = {
1191
+ religion = root
1192
+ religion = shiite
1193
+ root = { secondary_religion = prev }
1194
+ }
1195
+ OR = {
1196
+ culture = root
1197
+ culture = azerbaijani
1198
+ culture = turkish
1199
+ culture = turkmeni
1200
+ culture = turco_iranian
1201
+ }
1202
+ has_owner_culture = no
1203
+ has_owner_accepted_culture = no
1204
+ has_discovered = root
1205
+ owner = {
1206
+ is_free_or_tributary_trigger = yes
1207
+ is_nomad = no
1208
+ NOT = { is_subject_of = root }
1209
+ NOT = { overlord_of = root }
1210
+ NOT = { alliance_with = root }
1211
+ NOT = { ROOT = { truce_with = prev } }
1212
+ OR = {
1213
+ is_part_of_hre = no
1214
+ NOT = { hre_reform_passed = landfriede }
1215
+ ROOT = { is_part_of_hre = no }
1216
+ }
1217
+ }
1218
+ }
1219
+ }
1220
+ random_neighbor_province = {
1221
+ limit = {
1222
+ is_city = yes
1223
+ OR = {
1224
+ religion = root
1225
+ religion = shiite
1226
+ root = { secondary_religion = prev }
1227
+ }
1228
+ OR = {
1229
+ culture = root
1230
+ culture = azerbaijani
1231
+ culture = turkish
1232
+ culture = turkmeni
1233
+ culture = turco_iranian
1234
+ }
1235
+ has_owner_culture = no
1236
+ has_owner_accepted_culture = no
1237
+ has_discovered = root
1238
+ owner = {
1239
+ is_free_or_tributary_trigger = yes
1240
+ is_nomad = no
1241
+ NOT = { is_subject_of = root }
1242
+ NOT = { overlord_of = root }
1243
+ NOT = { alliance_with = root }
1244
+ NOT = { ROOT = { truce_with = prev } }
1245
+ OR = {
1246
+ is_part_of_hre = no
1247
+ NOT = { hre_reform_passed = landfriede }
1248
+ ROOT = { is_part_of_hre = no }
1249
+ }
1250
+ }
1251
+ }
1252
+ save_event_target_as = agenda_province
1253
+ owner = { save_event_target_as = agenda_country }
1254
+ }
1255
+ }
1256
+ }
1257
+ immediate_effect = {
1258
+ if = {
1259
+ limit = {
1260
+ event_target:agenda_province = {
1261
+ OR = {
1262
+ AND = {
1263
+ NOT = { is_claim = root }
1264
+ NOT = { is_core = root }
1265
+ }
1266
+ any_neighbor_province = {
1267
+ owned_by = event_target:agenda_country
1268
+ NOT = { is_claim = root }
1269
+ NOT = { is_core = root }
1270
+ culture = root
1271
+ }
1272
+ }
1273
+ }
1274
+ }
1275
+ event_target:agenda_province = {
1276
+ if = {
1277
+ limit = {
1278
+ NOT = { is_claim = root }
1279
+ NOT = { is_core = root }
1280
+ }
1281
+ add_claim = root
1282
+ }
1283
+ every_neighbor_province = {
1284
+ limit = {
1285
+ owned_by = event_target:agenda_country
1286
+ NOT = { is_claim = root }
1287
+ NOT = { is_core = root }
1288
+ culture = root
1289
+ }
1290
+ add_claim = root
1291
+ }
1292
+ }
1293
+ }
1294
+ }
1295
+ on_invalid = {
1296
+ event_target:agenda_province = {
1297
+ if = {
1298
+ limit = {
1299
+ is_claim = root
1300
+ NOT = { is_permanent_claim = root }
1301
+ }
1302
+ remove_claim = root
1303
+ }
1304
+ every_neighbor_province = {
1305
+ if = {
1306
+ limit = {
1307
+ owned_by = event_target:agenda_country
1308
+ NOT = { is_permanent_claim = root }
1309
+ is_claim = root
1310
+ }
1311
+ remove_claim = root
1312
+ }
1313
+ }
1314
+ }
1315
+ }
1316
+ provinces_to_highlight = {
1317
+ province_id = event_target:agenda_province
1318
+ }
1319
+ task_requirements = {
1320
+ if = {
1321
+ limit = {
1322
+ has_estate_agenda_auto_completion = {
1323
+ estate = estate_qizilbash
1324
+ }
1325
+ }
1326
+ has_estate_agenda_auto_completion = {
1327
+ estate = estate_qizilbash
1328
+ }
1329
+ }
1330
+ else = {
1331
+ if = {
1332
+ limit = {
1333
+ has_estate_agenda_auto_completion = {
1334
+ estate = estate_qizilbash
1335
+ }
1336
+ }
1337
+ has_estate_agenda_auto_completion = {
1338
+ estate = estate_qizilbash
1339
+ }
1340
+ }
1341
+ else = {
1342
+ event_target:agenda_province = {
1343
+ owner = {
1344
+ primary_culture = root
1345
+ }
1346
+ hidden_trigger = { culture = root }
1347
+ }
1348
+ }
1349
+ }
1350
+ }
1351
+ fail_if = {
1352
+ event_target:agenda_province = {
1353
+ NOT = { culture = root }
1354
+ }
1355
+ }
1356
+ task_completed_effect = {
1357
+ on_completed_agenda_effect = {
1358
+ estate = estate_qizilbash
1359
+ }
1360
+ if = {
1361
+ limit = {
1362
+ event_target:agenda_province = {
1363
+ owned_by = root
1364
+ }
1365
+ }
1366
+ event_target:agenda_province = {
1367
+ add_nationalism = -5
1368
+ }
1369
+ }
1370
+ else = { custom_tooltip = estate_nobles_protect_our_culture_effect_tooltip }
1371
+ add_estate_loyalty = {
1372
+ estate = estate_qizilbash
1373
+ loyalty = 15
1374
+ }
1375
+ }
1376
+ failing_effect = {
1377
+ on_failed_agenda_effect = yes
1378
+ clr_auto_complete_flag = yes
1379
+ add_estate_loyalty_modifier = {
1380
+ estate = estate_qizilbash
1381
+ desc = EST_VAL_AGENDA_DENIED
1382
+ loyalty = -5
1383
+ duration = 7300
1384
+ }
1385
+ event_target:agenda_province = {
1386
+ if = {
1387
+ limit = {
1388
+ is_claim = root
1389
+ NOT = { is_permanent_claim = root }
1390
+ }
1391
+ remove_claim = root
1392
+ }
1393
+ every_neighbor_province = {
1394
+ if = {
1395
+ limit = {
1396
+ owned_by = event_target:agenda_country
1397
+ NOT = { is_permanent_claim = root }
1398
+ is_claim = root
1399
+ }
1400
+ remove_claim = root
1401
+ }
1402
+ }
1403
+ }
1404
+ }
1405
+ }
1406
+
1407
+ #Loot X province with at least 12 development ("Despoil X")
1408
+ estate_qizilbash_despoil_x = {
1409
+ can_select = {
1410
+ is_at_war = yes
1411
+ NOT = {
1412
+ is_in_war = {
1413
+ duration = 1825
1414
+ }
1415
+ }
1416
+ any_neighbor_country = {
1417
+ war_with = root
1418
+ any_owned_province = {
1419
+ development = 12
1420
+ is_looted = no
1421
+ continent = root
1422
+ controlled_by = owner
1423
+ area_for_scope_province = {
1424
+ type = all
1425
+ owned_by = prev
1426
+ }
1427
+ }
1428
+ }
1429
+ NOT = { has_country_modifier = agenda_looting_zeal }
1430
+ }
1431
+ selection_weight = {
1432
+ factor = 2.5
1433
+ }
1434
+ pre_effect = {
1435
+ random_neighbor_country = {
1436
+ limit = {
1437
+ war_with = root
1438
+ any_owned_province = {
1439
+ development = 12
1440
+ is_looted = no
1441
+ continent = root
1442
+ controlled_by = owner
1443
+ area_for_scope_province = {
1444
+ type = all
1445
+ owned_by = prev
1446
+ }
1447
+ }
1448
+ }
1449
+ random_owned_province = {
1450
+ limit = {
1451
+ development = 12
1452
+ is_looted = no
1453
+ continent = root
1454
+ controlled_by = owner
1455
+ area_for_scope_province = {
1456
+ type = all
1457
+ owned_by = prev
1458
+ }
1459
+ }
1460
+ save_event_target_as = agenda_province
1461
+ }
1462
+ random_owned_province = {
1463
+ limit = {
1464
+ development = 16
1465
+ is_looted = no
1466
+ continent = root
1467
+ controlled_by = owner
1468
+ area_for_scope_province = {
1469
+ type = all
1470
+ owned_by = prev
1471
+ }
1472
+ }
1473
+ save_event_target_as = agenda_province
1474
+ }
1475
+ random_owned_province = {
1476
+ limit = {
1477
+ development = 20
1478
+ is_looted = no
1479
+ continent = root
1480
+ controlled_by = owner
1481
+ area_for_scope_province = {
1482
+ type = all
1483
+ owned_by = prev
1484
+ }
1485
+ }
1486
+ save_event_target_as = agenda_province
1487
+ }
1488
+ }
1489
+ }
1490
+ provinces_to_highlight = {
1491
+ province_id = event_target:agenda_province
1492
+ }
1493
+ task_requirements = {
1494
+ if = {
1495
+ limit = {
1496
+ has_estate_agenda_auto_completion = {
1497
+ estate = estate_qizilbash
1498
+ }
1499
+ }
1500
+ has_estate_agenda_auto_completion = {
1501
+ estate = estate_qizilbash
1502
+ }
1503
+ }
1504
+ else = {
1505
+ if = {
1506
+ limit = {
1507
+ has_estate_agenda_auto_completion = {
1508
+ estate = estate_qizilbash
1509
+ }
1510
+ }
1511
+ has_estate_agenda_auto_completion = {
1512
+ estate = estate_qizilbash
1513
+ }
1514
+ }
1515
+ else = {
1516
+ event_target:agenda_province = {
1517
+ area_for_scope_province = {
1518
+ type = all
1519
+ is_looted = yes
1520
+ }
1521
+ }
1522
+ }
1523
+ }
1524
+ }
1525
+ fail_if = {
1526
+ event_target:agenda_province = {
1527
+ owner = {
1528
+ NOT = {
1529
+ war_with = root
1530
+ }
1531
+ }
1532
+ }
1533
+ }
1534
+ task_completed_effect = {
1535
+ on_completed_agenda_effect = {
1536
+ estate = estate_qizilbash
1537
+ }
1538
+ add_estate_loyalty = {
1539
+ estate = estate_qizilbash
1540
+ loyalty = 10
1541
+ }
1542
+ add_country_modifier = {
1543
+ name = agenda_looting_zeal
1544
+ duration = 3650
1545
+ }
1546
+ }
1547
+ failing_effect = {
1548
+ on_failed_agenda_effect = yes
1549
+ clr_auto_complete_flag = yes
1550
+ add_estate_loyalty_modifier = {
1551
+ estate = estate_qizilbash
1552
+ desc = EST_VAL_AGENDA_DENIED
1553
+ loyalty = -5
1554
+ duration = 7300
1555
+ }
1556
+ }
1557
+ }
1558
+
1559
+ #Convert faith
1560
+ estate_qizilbash_convert_province_x = {
1561
+ can_select = {
1562
+ num_of_missionaries = 1
1563
+ religion = shiite
1564
+ any_owned_province = {
1565
+ is_state_core = root
1566
+ NOT = { religion = root }
1567
+ NOT = { has_province_modifier = religious_zeal_at_conv }
1568
+ NOT = { has_province_modifier = expelled_minority }
1569
+ NOT = { has_province_modifier = religious_migration }
1570
+ NOT = { religion = secondary }
1571
+ has_missionary = no
1572
+ missionary_strength = 0.01
1573
+ }
1574
+ }
1575
+ selection_weight = {
1576
+ factor = 1
1577
+ modifier = {
1578
+ factor = 1.5
1579
+ NOT = { religious_unity = 0.85 }
1580
+ }
1581
+ modifier = {
1582
+ factor = 1.5
1583
+ NOT = { religious_unity = 0.75 }
1584
+ }
1585
+ modifier = {
1586
+ factor = 1.5
1587
+ NOT = { religious_unity = 0.65 }
1588
+ }
1589
+ modifier = {
1590
+ factor = 1.5
1591
+ NOT = { religious_unity = 0.5 }
1592
+ }
1593
+ modifier = {
1594
+ factor = 1.5
1595
+ NOT = { religious_unity = 0.4 }
1596
+ }
1597
+ modifier = {
1598
+ factor = 0.25
1599
+ religion = confucianism
1600
+ }
1601
+ modifier = {
1602
+ factor = 0.35
1603
+ has_idea_group = humanist_ideas
1604
+ }
1605
+ modifier = {
1606
+ factor = 2
1607
+ has_idea_group = religious_ideas
1608
+ }
1609
+ modifier = {
1610
+ factor = 0.75
1611
+ NOT = { num_of_missionaries = 2 }
1612
+ }
1613
+ modifier = {
1614
+ factor = 1.25
1615
+ is_defender_of_faith = yes
1616
+ }
1617
+ modifier = {
1618
+ factor = 0.35
1619
+ has_country_modifier = recent_converted_province_mission_timer
1620
+ }
1621
+ }
1622
+ pre_effect = {
1623
+ random_owned_province = {
1624
+ limit = {
1625
+ is_state_core = root
1626
+ NOT = { religion = root }
1627
+ NOT = { has_province_modifier = religious_zeal_at_conv }
1628
+ NOT = { has_province_modifier = expelled_minority }
1629
+ NOT = { has_province_modifier = religious_migration }
1630
+ NOT = { religion = secondary }
1631
+ has_missionary = no
1632
+ }
1633
+ save_event_target_as = agenda_province
1634
+ }
1635
+ random_owned_province = {
1636
+ limit = {
1637
+ is_state_core = root
1638
+ NOT = { religion = root }
1639
+ NOT = { has_province_modifier = religious_zeal_at_conv }
1640
+ NOT = { has_province_modifier = expelled_minority }
1641
+ NOT = { has_province_modifier = religious_migration }
1642
+ NOT = { religion = secondary }
1643
+ has_missionary = no
1644
+ development = 10
1645
+ }
1646
+ save_event_target_as = agenda_province
1647
+ }
1648
+ }
1649
+ fail_if = {
1650
+ event_target:agenda_province = {
1651
+ OR = {
1652
+ NOT = { owned_by = root }
1653
+ AND = {
1654
+ NOT = { religion = root }
1655
+ religion = secondary
1656
+ }
1657
+ }
1658
+ }
1659
+ }
1660
+ immediate_effect = {
1661
+ event_target:agenda_province = {
1662
+ add_province_modifier = {
1663
+ name = agenda_conversion_zeal
1664
+ duration = 7300
1665
+ }
1666
+ }
1667
+ }
1668
+ on_invalid = {
1669
+ event_target:agenda_province = {
1670
+ if = {
1671
+ limit = { has_province_modifier = agenda_conversion_zeal }
1672
+ remove_province_modifier = agenda_conversion_zeal
1673
+ }
1674
+ }
1675
+ }
1676
+ provinces_to_highlight = {
1677
+ province_id = event_target:agenda_province
1678
+ }
1679
+ task_requirements = {
1680
+ if = {
1681
+ limit = {
1682
+ has_estate_agenda_auto_completion = {
1683
+ estate = estate_qizilbash
1684
+ }
1685
+ }
1686
+ has_estate_agenda_auto_completion = {
1687
+ estate = estate_qizilbash
1688
+ }
1689
+ }
1690
+ else = {
1691
+ if = {
1692
+ limit = {
1693
+ has_estate_agenda_auto_completion = {
1694
+ estate = estate_qizilbash
1695
+ }
1696
+ }
1697
+ has_estate_agenda_auto_completion = {
1698
+ estate = estate_qizilbash
1699
+ }
1700
+ }
1701
+ else = {
1702
+ event_target:agenda_province = {
1703
+ religion = root
1704
+ }
1705
+ }
1706
+ }
1707
+ }
1708
+ task_completed_effect = {
1709
+ on_completed_agenda_effect = {
1710
+ estate = estate_qizilbash
1711
+ }
1712
+ hidden_effect = {
1713
+ event_target:agenda_province = {
1714
+ if = {
1715
+ limit = { has_province_modifier = agenda_conversion_zeal }
1716
+ remove_province_modifier = agenda_conversion_zeal
1717
+ }
1718
+ }
1719
+ add_country_modifier = {
1720
+ name = recent_converted_province_mission_timer
1721
+ duration = 3650
1722
+ hidden = yes
1723
+ }
1724
+ }
1725
+ generate_scaled_advisor_of_type_and_religion_effect = {
1726
+ type = inquisitor
1727
+ religion = root
1728
+ discount = yes
1729
+ }
1730
+ add_estate_loyalty = {
1731
+ estate = estate_qizilbash
1732
+ loyalty = 10
1733
+ }
1734
+ }
1735
+ failing_effect = {
1736
+ on_failed_agenda_effect = yes
1737
+ clr_auto_complete_flag = yes
1738
+ event_target:agenda_province = {
1739
+ if = {
1740
+ limit = { has_province_modifier = agenda_conversion_zeal }
1741
+ remove_province_modifier = agenda_conversion_zeal
1742
+ }
1743
+ }
1744
+ add_estate_loyalty_modifier = {
1745
+ estate = estate_qizilbash
1746
+ desc = EST_VAL_AGENDA_DENIED
1747
+ loyalty = -5
1748
+ duration = 7300
1749
+ }
1750
+ }
1751
+ }
1752
+
1753
+ #Establish Safavid Order
1754
+ estate_qizilbash_establish_safavid_order = {
1755
+ can_select = {
1756
+ has_dlc = "Golden Century"
1757
+ any_owned_province = {
1758
+ is_state_core = root
1759
+ has_any_holy_order = no
1760
+ }
1761
+ can_create_holy_orders = yes
1762
+ }
1763
+ selection_weight = {
1764
+ factor = 2.5
1765
+ }
1766
+ pre_effect = {
1767
+ random_owned_province = {
1768
+ limit = {
1769
+ is_state_core = root
1770
+ has_any_holy_order = no
1771
+ }
1772
+ save_event_target_as = agenda_province
1773
+ area = {
1774
+ set_permanent_province_flag = qizilbash_safavid_order_flag
1775
+ }
1776
+ }
1777
+ }
1778
+ provinces_to_highlight = {
1779
+ province_id = event_target:agenda_province
1780
+ }
1781
+ task_requirements = {
1782
+ if = {
1783
+ limit = {
1784
+ has_estate_agenda_auto_completion = {
1785
+ estate = estate_qizilbash
1786
+ }
1787
+ }
1788
+ has_estate_agenda_auto_completion = {
1789
+ estate = estate_qizilbash
1790
+ }
1791
+ }
1792
+ else = {
1793
+ if = {
1794
+ limit = {
1795
+ has_estate_agenda_auto_completion = {
1796
+ estate = estate_qizilbash
1797
+ }
1798
+ }
1799
+ has_estate_agenda_auto_completion = {
1800
+ estate = estate_qizilbash
1801
+ }
1802
+ }
1803
+ else = {
1804
+ event_target:agenda_province = {
1805
+ has_any_holy_order = yes
1806
+ }
1807
+ }
1808
+ }
1809
+ }
1810
+ fail_if = {
1811
+ event_target:agenda_province = {
1812
+ NOT = { owned_by = root }
1813
+ }
1814
+ }
1815
+ task_completed_effect = {
1816
+ on_completed_agenda_effect = {
1817
+ estate = estate_qizilbash
1818
+ }
1819
+ add_estate_loyalty = {
1820
+ estate = estate_qizilbash
1821
+ loyalty = 10
1822
+ }
1823
+ add_years_of_owned_provinces_manpower = {
1824
+ custom_tooltip = FROM_AGENDA_PROVINCE_AREA
1825
+ years = 4
1826
+ trigger = {
1827
+ has_province_flag = qizilbash_safavid_order_flag
1828
+ }
1829
+ }
1830
+ hidden_effect = {
1831
+ event_target:agenda_province = {
1832
+ area = { clr_province_flag = qizilbash_safavid_order_flag }
1833
+ }
1834
+ }
1835
+ }
1836
+ failing_effect = {
1837
+ on_failed_agenda_effect = yes
1838
+ clr_auto_complete_flag = yes
1839
+ add_estate_loyalty_modifier = {
1840
+ estate = estate_qizilbash
1841
+ desc = EST_VAL_AGENDA_DENIED
1842
+ loyalty = -5
1843
+ duration = 7300
1844
+ }
1845
+ hidden_effect = {
1846
+ event_target:agenda_province = {
1847
+ area = { clr_province_flag = qizilbash_safavid_order_flag }
1848
+ }
1849
+ }
1850
+ }
1851
+ }
1852
+
1853
+ #Defeat Large Army
1854
+ estate_qizilbash_defeat_large_army = {
1855
+ can_select = {
1856
+ is_bankrupt = no
1857
+ army_size = 20
1858
+ }
1859
+ selection_weight = {
1860
+ factor = 1
1861
+ }
1862
+ pre_effect = {
1863
+ }
1864
+ provinces_to_highlight = {
1865
+ }
1866
+ task_requirements = {
1867
+ if = {
1868
+ limit = {
1869
+ has_estate_agenda_auto_completion = {
1870
+ estate = estate_qizilbash
1871
+ }
1872
+ }
1873
+ has_estate_agenda_auto_completion = {
1874
+ estate = estate_qizilbash
1875
+ }
1876
+ }
1877
+ else = {
1878
+ check_variable = {
1879
+ which = land_units_killed
1880
+ value = 40000
1881
+ }
1882
+ }
1883
+ }
1884
+ fail_if = {
1885
+ NOT = { army_size = 1 }
1886
+ is_at_war = no
1887
+ }
1888
+ task_completed_effect = {
1889
+ on_completed_agenda_effect = {
1890
+ estate = estate_qizilbash
1891
+ }
1892
+ add_estate_loyalty = {
1893
+ estate = estate_qizilbash
1894
+ loyalty = 10
1895
+ }
1896
+ add_army_tradition_or_mil_power = {
1897
+ amount = 20
1898
+ }
1899
+ }
1900
+ failing_effect = {
1901
+ on_failed_agenda_effect = yes
1902
+ clr_auto_complete_flag = yes
1903
+ add_estate_loyalty_modifier = {
1904
+ estate = estate_qizilbash
1905
+ desc = EST_VAL_AGENDA_DENIED
1906
+ loyalty = -5
1907
+ duration = 7300
1908
+ }
1909
+ }
1910
+ }
1911
+
1912
+ #Build Cavalry
1913
+ estate_qizilbash_build_cavalry = {
1914
+ can_select = {
1915
+ is_bankrupt = no
1916
+ NOT = { cavalry_fraction = 0.2 }
1917
+ NOT = { has_country_modifier = qizilbash_cavalry_modifier }
1918
+ }
1919
+ selection_weight = {
1920
+ factor = 1
1921
+ }
1922
+ pre_effect = {
1923
+ }
1924
+ provinces_to_highlight = {
1925
+ }
1926
+ task_requirements = {
1927
+ if = {
1928
+ limit = {
1929
+ has_estate_agenda_auto_completion = {
1930
+ estate = estate_qizilbash
1931
+ }
1932
+ }
1933
+ has_estate_agenda_auto_completion = {
1934
+ estate = estate_qizilbash
1935
+ }
1936
+ }
1937
+ else = {
1938
+ cavalry_fraction = 0.2
1939
+ }
1940
+ }
1941
+ fail_if = {
1942
+ is_bankrupt = yes
1943
+ }
1944
+ task_completed_effect = {
1945
+ on_completed_agenda_effect = {
1946
+ estate = estate_qizilbash
1947
+ }
1948
+ add_estate_loyalty = {
1949
+ estate = estate_qizilbash
1950
+ loyalty = 10
1951
+ }
1952
+ add_country_modifier = {
1953
+ name = qizilbash_cavalry_modifier
1954
+ duration = 7300
1955
+ }
1956
+ }
1957
+ failing_effect = {
1958
+ on_failed_agenda_effect = yes
1959
+ clr_auto_complete_flag = yes
1960
+ add_estate_loyalty_modifier = {
1961
+ estate = estate_qizilbash
1962
+ desc = EST_VAL_AGENDA_DENIED
1963
+ loyalty = -5
1964
+ duration = 7300
1965
+ }
1966
+ }
1967
+ }
common/estate_agendas/11_ghulams_agendas.txt ADDED
@@ -0,0 +1,1774 @@
1
+ #Generic Agendas - always available
2
+
3
+ #This one or the next one will always be valid
4
+ estate_ghulams_hire_advisor = {
5
+ can_select = {
6
+ NOT = {
7
+ employed_advisor = {
8
+ category = MIL
9
+ }
10
+ }
11
+ }
12
+ selection_weight = {
13
+ factor = 1
14
+ }
15
+ task_requirements = {
16
+ if = {
17
+ limit = {
18
+ has_estate_agenda_auto_completion = {
19
+ estate = estate_ghulams
20
+ }
21
+ }
22
+ has_estate_agenda_auto_completion = {
23
+ estate = estate_qizilbash
24
+ }
25
+ }
26
+ else = {
27
+ employed_advisor = {
28
+ category = MIL
29
+ }
30
+ is_in_deficit = no
31
+ }
32
+ }
33
+ task_completed_effect = {
34
+ add_estate_loyalty = {
35
+ estate = estate_ghulams
36
+ loyalty = 10
37
+ }
38
+ }
39
+ failing_effect = {
40
+ add_estate_loyalty_modifier = {
41
+ estate = estate_ghulams
42
+ desc = EST_VAL_AGENDA_DENIED
43
+ loyalty = -5
44
+ duration = 7300
45
+ }
46
+ }
47
+ }
48
+
49
+ estate_ghulams_fire_advisor = {
50
+ can_select = {
51
+ employed_advisor = {
52
+ category = MIL
53
+ }
54
+ }
55
+ selection_weight = {
56
+ factor = 1
57
+ modifier = {
58
+ factor = 0.5
59
+ always = yes
60
+ }
61
+ }
62
+ immediate_effect = {
63
+ hidden_effect = {
64
+ set_country_flag = need_to_fire_mil_advisor
65
+ }
66
+ }
67
+ on_invalid = {
68
+ clr_country_flag = need_to_fire_mil_advisor
69
+ }
70
+ task_requirements = {
71
+ if = {
72
+ limit = {
73
+ has_estate_agenda_auto_completion = {
74
+ estate = estate_ghulams
75
+ }
76
+ }
77
+ has_estate_agenda_auto_completion = {
78
+ estate = estate_qizilbash
79
+ }
80
+ }
81
+ else = {
82
+ custom_trigger_tooltip = {
83
+ tooltip = fire_mil_advisor_tooltip
84
+ has_country_flag = just_fired_mil_advisor
85
+ }
86
+ }
87
+ }
88
+ task_completed_effect = {
89
+ add_estate_loyalty = {
90
+ estate = estate_ghulams
91
+ loyalty = 10
92
+ }
93
+ clr_country_flag = just_fired_mil_advisor
94
+ clr_country_flag = need_to_fire_mil_advisor
95
+ }
96
+ invalid_trigger = {
97
+ NOT = {
98
+ employed_advisor = {
99
+ category = MIL
100
+ }
101
+ }
102
+ NOT = { has_country_flag = just_fired_mil_advisor }
103
+ }
104
+ failing_effect = {
105
+ add_estate_loyalty_modifier = {
106
+ estate = estate_ghulams
107
+ desc = EST_VAL_AGENDA_DENIED
108
+ loyalty = -5
109
+ duration = 7300
110
+ }
111
+ clr_country_flag = need_to_fire_mil_advisor
112
+ }
113
+ }
114
+
115
+ #Give us three privileges
116
+ estate_ghulams_three_privileges = {
117
+ can_select = {
118
+ NOT = {
119
+ num_of_estate_privileges = {
120
+ estate = estate_ghulams
121
+ value = 2
122
+ }
123
+ }
124
+ }
125
+ selection_weight = {
126
+ factor = 10
127
+ }
128
+ pre_effect = {
129
+ set_variable = {
130
+ which = estate_ghulams_three_privileges_var
131
+ value = 0
132
+ }
133
+ if = {
134
+ limit = {
135
+ num_of_estate_privileges = {
136
+ estate = estate_ghulams
137
+ value = 1
138
+ }
139
+ }
140
+ set_variable = {
141
+ which = estate_ghulams_three_privileges_var
142
+ value = 2
143
+ }
144
+ }
145
+ else = {
146
+ set_variable = {
147
+ which = estate_ghulams_three_privileges_var
148
+ value = 1
149
+ }
150
+ }
151
+ }
152
+ task_requirements = {
153
+ if = {
154
+ limit = {
155
+ has_estate_agenda_auto_completion = {
156
+ estate = estate_ghulams
157
+ }
158
+ }
159
+ has_estate_agenda_auto_completion = {
160
+ estate = estate_qizilbash
161
+ }
162
+ }
163
+ else = {
164
+ if = {
165
+ limit = {
166
+ check_variable = {
167
+ which = estate_ghulams_three_privileges_var
168
+ value = 2
169
+ }
170
+ }
171
+ num_of_estate_privileges = {
172
+ estate = estate_ghulams
173
+ value = 3
174
+ }
175
+ }
176
+ else = {
177
+ num_of_estate_privileges = {
178
+ estate = estate_ghulams
179
+ value = 2
180
+ }
181
+ }
182
+ }
183
+ }
184
+ task_completed_effect = {
185
+ add_estate_loyalty = {
186
+ estate = estate_ghulams
187
+ loyalty = 20
188
+ }
189
+ }
190
+ failing_effect = {
191
+ add_estate_loyalty_modifier = {
192
+ estate = estate_ghulams
193
+ desc = EST_VAL_AGENDA_DENIED
194
+ loyalty = -5
195
+ duration = 7300
196
+ }
197
+ }
198
+ }
199
+
200
+ #Reduce War Exhaustion
201
+ estate_ghulams_reduce_war_exhaustion = {
202
+ can_select = {
203
+ war_exhaustion = 5
204
+ is_at_war = no
205
+ NOT = { has_country_modifier = national_recovery }
206
+ }
207
+ selection_weight = {
208
+ factor = 2
209
+ modifier = {
210
+ factor = 1.5
211
+ war_exhaustion = 7.5
212
+ }
213
+ modifier = {
214
+ factor = 1.5
215
+ war_exhaustion = 10
216
+ }
217
+ }
218
+ fail_if = {
219
+ is_at_war = yes
220
+ }
221
+ task_requirements = {
222
+ if = {
223
+ limit = {
224
+ has_estate_agenda_auto_completion = {
225
+ estate = estate_ghulams
226
+ }
227
+ }
228
+ has_estate_agenda_auto_completion = {
229
+ estate = estate_qizilbash
230
+ }
231
+ }
232
+ else = {
233
+ NOT = { war_exhaustion = 1 }
234
+ }
235
+ }
236
+ task_completed_effect = {
237
+ add_estate_loyalty = {
238
+ estate = estate_ghulams
239
+ loyalty = 10
240
+ }
241
+ add_country_modifier = {
242
+ name = national_recovery
243
+ duration = 5475
244
+ }
245
+ }
246
+ failing_effect = {
247
+ add_estate_loyalty_modifier = {
248
+ estate = estate_ghulams
249
+ desc = EST_VAL_AGENDA_DENIED
250
+ loyalty = -5
251
+ duration = 7300
252
+ }
253
+ }
254
+ }
255
+
256
+ #Increase Monthly Military Power
257
+ estate_ghulams_increase_monthly_military_power = {
258
+ can_select = {
259
+ if = {
260
+ limit = {
261
+ #Promote Advisors - +2
262
+ has_dlc = "Cradle of Civilization"
263
+ #National Focus - +2
264
+ has_dlc = "Res Publica"
265
+ has_dlc = "Common Sense"
266
+ }
267
+ NOT = { monthly_mil = 12 }
268
+ }
269
+ else_if = {
270
+ limit = {
271
+ OR = {
272
+ has_dlc = "Cradle of Civilization"
273
+ has_dlc = "Res Publica"
274
+ has_dlc = "Common Sense"
275
+ }
276
+ }
277
+ NOT = { monthly_mil = 10 }
278
+ }
279
+ else = {
280
+ NOT = { monthly_mil = 8 }
281
+ }
282
+ }
283
+ selection_weight = {
284
+ factor = 1
285
+ }
286
+ task_requirements = {
287
+ if = {
288
+ limit = {
289
+ has_estate_agenda_auto_completion = {
290
+ estate = estate_ghulams
291
+ }
292
+ }
293
+ has_estate_agenda_auto_completion = {
294
+ estate = estate_qizilbash
295
+ }
296
+ }
297
+ else = {
298
+ if = {
299
+ limit = {
300
+ #Promote Advisors - +2
301
+ has_dlc = "Cradle of Civilization"
302
+ #National Focus - +2
303
+ has_dlc = "Res Publica"
304
+ has_dlc = "Common Sense"
305
+ }
306
+ monthly_mil = 12
307
+ }
308
+ else_if = {
309
+ limit = {
310
+ OR = {
311
+ has_dlc = "Cradle of Civilization"
312
+ has_dlc = "Res Publica"
313
+ has_dlc = "Common Sense"
314
+ }
315
+ }
316
+ monthly_mil = 10
317
+ }
318
+ else = {
319
+ monthly_mil = 8
320
+ }
321
+ }
322
+ }
323
+ task_completed_effect = {
324
+ add_estate_loyalty = {
325
+ estate = estate_ghulams
326
+ loyalty = 10
327
+ }
328
+ add_mil_power = 50
329
+ }
330
+ failing_effect = {
331
+ add_estate_loyalty_modifier = {
332
+ estate = estate_ghulams
333
+ desc = EST_VAL_AGENDA_DENIED
334
+ loyalty = -5
335
+ duration = 7300
336
+ }
337
+ }
338
+ }
339
+
340
+ #Retake Core
341
+ estate_ghulams_retake_core = {
342
+ can_select = {
343
+ is_free_or_tributary_trigger = yes
344
+ OR = {
345
+ is_part_of_hre = no
346
+ NOT = { hre_reform_passed = landfriede }
347
+ }
348
+ any_province = {
349
+ is_core = root
350
+ NOT = { country_or_non_sovereign_subject_holds = root }
351
+ is_city = yes
352
+ NOT = { owner = { ROOT = { truce_with = prev } } }
353
+ }
354
+ }
355
+ selection_weight = {
356
+ factor = 2
357
+ modifier = {
358
+ factor = 0.5
359
+ any_province = {
360
+ is_core = root
361
+ NOT = { country_or_non_sovereign_subject_holds = root }
362
+ is_city = yes
363
+ owner = {
364
+ NOT = { ROOT = { truce_with = prev } }
365
+ alliance_with = root
366
+ }
367
+ }
368
+ }
369
+ modifier = {
370
+ factor = 0.25
371
+ any_country = {
372
+ coalition_target = root
373
+ }
374
+ }
375
+ }
376
+ pre_effect = {
377
+ random_province = {
378
+ limit = {
379
+ is_core = root
380
+ NOT = { country_or_non_sovereign_subject_holds = root }
381
+ is_city = yes
382
+ NOT = { owner = { ROOT = { truce_with = prev } } }
383
+ }
384
+ save_event_target_as = agenda_province
385
+ }
386
+ random_province = {
387
+ limit = {
388
+ is_core = root
389
+ NOT = { country_or_non_sovereign_subject_holds = root }
390
+ is_city = yes
391
+ NOT = { owner = { ROOT = { truce_with = prev } } }
392
+ NOT = { owner = { alliance_with = root } }
393
+ }
394
+ save_event_target_as = agenda_province
395
+ }
396
+ random_province = {
397
+ limit = {
398
+ is_core = root
399
+ NOT = { country_or_non_sovereign_subject_holds = root }
400
+ is_city = yes
401
+ NOT = { owner = { ROOT = { truce_with = prev } } }
402
+ OR = {
403
+ AND = {
404
+ has_port = yes
405
+ root = {
406
+ any_owned_province = {
407
+ has_port = yes
408
+ }
409
+ }
410
+ }
411
+ any_neighbor_province = {
412
+ owned_by = root
413
+ }
414
+ }
415
+ }
416
+ save_event_target_as = agenda_province
417
+ }
418
+ random_province = {
419
+ limit = {
420
+ is_core = root
421
+ NOT = { country_or_non_sovereign_subject_holds = root }
422
+ is_city = yes
423
+ NOT = { owner = { ROOT = { truce_with = prev } } }
424
+ OR = {
425
+ AND = {
426
+ has_port = yes
427
+ root = {
428
+ any_owned_province = {
429
+ has_port = yes
430
+ }
431
+ }
432
+ }
433
+ any_neighbor_province = {
434
+ owned_by = root
435
+ }
436
+ }
437
+ NOT = { owner = { alliance_with = root } }
438
+ }
439
+ save_event_target_as = agenda_province
440
+ }
441
+ }
442
+ fail_if = {
443
+ event_target:agenda_province = {
444
+ NOT = { is_core = root }
445
+ }
446
+ }
447
+ provinces_to_highlight = {
448
+ province_id = event_target:agenda_province
449
+ }
450
+ task_requirements = {
451
+ if = {
452
+ limit = {
453
+ has_estate_agenda_auto_completion = {
454
+ estate = estate_ghulams
455
+ }
456
+ }
457
+ has_estate_agenda_auto_completion = {
458
+ estate = estate_qizilbash
459
+ }
460
+ }
461
+ else = {
462
+ event_target:agenda_province = {
463
+ owned_by = root
464
+ }
465
+ }
466
+ }
467
+ task_completed_effect = {
468
+ add_estate_loyalty = {
469
+ estate = estate_ghulams
470
+ loyalty = 10
471
+ }
472
+ add_country_modifier = {
473
+ name = military_victory
474
+ duration = 3650
475
+ }
476
+ }
477
+ failing_effect = {
478
+ add_estate_loyalty_modifier = {
479
+ estate = estate_ghulams
480
+ desc = EST_VAL_AGENDA_DENIED
481
+ loyalty = -5
482
+ duration = 7300
483
+ }
484
+ }
485
+ }
486
+
487
+ #Support independence of X (subject of rival)
488
+ estate_ghulams_support_independence = {
489
+ can_select = {
490
+ OR = {
491
+ has_dlc = "Conquest of Paradise"
492
+ has_dlc = "El Dorado"
493
+ }
494
+ is_at_war = no
495
+ is_subject = no
496
+ any_rival_country = {
497
+ NOT = { has_reform = daimyo }
498
+ NOT = { ROOT = { truce_with = prev } }
499
+ any_subject_country = {
500
+ is_subject_other_than_tributary_trigger = yes
501
+ liberty_desire = 50
502
+ has_opinion = {
503
+ who = root
504
+ value = -100
505
+ }
506
+ ROOT = {
507
+ NOT = { is_supporting_independence_of = prev }
508
+ }
509
+ }
510
+ }
511
+ }
512
+ selection_weight = {
513
+ factor = 2
514
+ }
515
+ pre_effect = {
516
+ random_rival_country = {
517
+ limit = {
518
+ NOT = { ROOT = { truce_with = prev } }
519
+ any_subject_country = {
520
+ NOT = { has_reform = daimyo }
521
+ is_subject_other_than_tributary_trigger = yes
522
+ liberty_desire = 50
523
+ has_opinion = {
524
+ who = root
525
+ value = -100
526
+ }
527
+ ROOT = {
528
+ NOT = { is_supporting_independence_of = prev }
529
+ }
530
+ }
531
+ }
532
+ save_event_target_as = agenda_rival_country
533
+ random_subject_country = {
534
+ limit = {
535
+ NOT = { has_reform = daimyo }
536
+ is_subject_other_than_tributary_trigger = yes
537
+ liberty_desire = 50
538
+ has_opinion = {
539
+ who = root
540
+ value = -100
541
+ }
542
+ ROOT = {
543
+ NOT = { is_supporting_independence_of = prev }
544
+ }
545
+ }
546
+ save_event_target_as = agenda_country
547
+ }
548
+ }
549
+ }
550
+ fail_if = {
551
+ OR = {
552
+ is_subject = yes
553
+ event_target:agenda_country = {
554
+ OR = {
555
+ NOT = { is_subject_of = event_target:agenda_rival_country }
556
+ NOT = { num_of_cities = 1 }
557
+ war_with = root
558
+ }
559
+ }
560
+ }
561
+ }
562
+ provinces_to_highlight = {
563
+ is_capital_of = event_target:agenda_country
564
+ }
565
+ task_requirements = {
566
+ if = {
567
+ limit = {
568
+ has_estate_agenda_auto_completion = {
569
+ estate = estate_ghulams
570
+ }
571
+ }
572
+ has_estate_agenda_auto_completion = {
573
+ estate = estate_qizilbash
574
+ }
575
+ }
576
+ else = {
577
+ is_supporting_independence_of = event_target:agenda_country
578
+ }
579
+ }
580
+ task_completed_effect = {
581
+ add_estate_loyalty = {
582
+ estate = estate_ghulams
583
+ loyalty = 10
584
+ }
585
+ add_dip_power = 50
586
+ }
587
+ failing_effect = {
588
+ add_estate_loyalty_modifier = {
589
+ estate = estate_ghulams
590
+ desc = EST_VAL_AGENDA_DENIED
591
+ loyalty = -5
592
+ duration = 7300
593
+ }
594
+ }
595
+ }
596
+
597
+ #Protect minority rights
598
+ estate_ghulams_stop_converting_province_x = {
599
+ can_select = {
600
+ num_of_missionaries = 1
601
+ any_owned_province = {
602
+ has_missionary = yes
603
+ religion_group = christian
604
+ missionary_strength = 0.01
605
+ }
606
+ is_free_or_tributary_trigger = yes
607
+ }
608
+ selection_weight = {
609
+ factor = 2
610
+ }
611
+ pre_effect = {
612
+ random_owned_province = {
613
+ limit = {
614
+ has_missionary = yes
615
+ religion_group = christian
616
+ missionary_strength = 0.01
617
+ }
618
+ save_event_target_as = agenda_province
619
+ }
620
+ }
621
+ fail_if = {
622
+ event_target:agenda_province = {
623
+ OR = {
624
+ NOT = { owned_by = root }
625
+ religion = root
626
+ }
627
+ }
628
+ }
629
+ provinces_to_highlight = {
630
+ province_id = event_target:agenda_province
631
+ }
632
+ task_requirements = {
633
+ if = {
634
+ limit = {
635
+ has_estate_agenda_auto_completion = {
636
+ estate = estate_ghulams
637
+ }
638
+ }
639
+ has_estate_agenda_auto_completion = {
640
+ estate = estate_qizilbash
641
+ }
642
+ }
643
+ else = {
644
+ event_target:agenda_province = {
645
+ has_missionary = no
646
+ NOT = { religion = root }
647
+ }
648
+ }
649
+ }
650
+ task_completed_effect = {
651
+ add_estate_loyalty = {
652
+ estate = estate_ghulams
653
+ loyalty = 15
654
+ }
655
+ event_target:agenda_province = {
656
+ add_province_modifier = {
657
+ name = agenda_guaranteed_minority_rights
658
+ duration = 7300
659
+ }
660
+ }
661
+ }
662
+ failing_effect = {
663
+ add_estate_loyalty_modifier = {
664
+ estate = estate_ghulams
665
+ desc = EST_VAL_AGENDA_DENIED
666
+ loyalty = -5
667
+ duration = 7300
668
+ }
669
+ }
670
+ }
671
+
672
+ #Bigger Army
673
+ estate_ghulams_build_an_army = {
674
+ can_select = {
675
+ NOT = { has_country_modifier = thriving_arms_industry }
676
+ NOT = { army_size_percentage = 0.5 }
677
+ if = {
678
+ limit = {
679
+ is_emperor = yes
680
+ }
681
+ NOT = { army_size_percentage = 0.35 }
682
+ }
683
+ }
684
+ selection_weight = {
685
+ factor = 5
686
+ modifier = {
687
+ factor = 2
688
+ any_rival_country = {
689
+ NOT = { truce_with = root }
690
+ army_size = root
691
+ }
692
+ }
693
+ modifier = {
694
+ factor = 2.0
695
+ NOT = { army_size_percentage = 0.3 }
696
+ NOT = { army_size = 150 }
697
+ }
698
+ modifier = { #this could be really annoying in the late game
699
+ factor = 0.5
700
+ army_size = 100
701
+ }
702
+ modifier = {
703
+ factor = 0.25
704
+ army_size = 200
705
+ }
706
+ modifier = {
707
+ factor = 0
708
+ army_size = 500
709
+ }
710
+ modifier = {
711
+ factor = 0.5
712
+ is_emperor = yes
713
+ }
714
+ modifier = {
715
+ has_estate_privilege = estate_janissary_allow_other_professions
716
+ factor = 0
717
+ }
718
+ }
719
+ task_requirements = {
720
+ if = {
721
+ limit = {
722
+ has_estate_agenda_auto_completion = {
723
+ estate = estate_ghulams
724
+ }
725
+ }
726
+ has_estate_agenda_auto_completion = {
727
+ estate = estate_qizilbash
728
+ }
729
+ }
730
+ else = {
731
+ if = {
732
+ limit = {
733
+ is_emperor = yes
734
+ }
735
+ army_size_percentage = 0.65
736
+ }
737
+ else = {
738
+ army_size_percentage = 0.75
739
+ }
740
+ }
741
+ }
742
+ task_completed_effect = {
743
+ add_estate_loyalty = {
744
+ estate = estate_ghulams
745
+ loyalty = 10
746
+ }
747
+ define_advisor = {
748
+ type = commandant
749
+ cost_multiplier = 0.25
750
+ }
751
+ }
752
+ failing_effect = {
753
+ add_estate_loyalty_modifier = {
754
+ estate = estate_ghulams
755
+ desc = EST_VAL_AGENDA_DENIED
756
+ loyalty = -5
757
+ duration = 7300
758
+ }
759
+ }
760
+ }
761
+
762
+ #Humiliate Rival
763
+ estate_ghulams_humiliate_rival = {
764
+ can_select = {
765
+ any_rival_country = {
766
+ NOT = { truce_with = ROOT }
767
+ NOT = { humiliated_by = root }
768
+ }
769
+ }
770
+ selection_weight = {
771
+ factor = 1
772
+ modifier = {
773
+ factor = 3
774
+ NOT = { has_country_flag = humiliated_rival }
775
+ }
776
+ modifier = {
777
+ has_estate_privilege = estate_janissary_allow_other_professions
778
+ factor = 0
779
+ }
780
+ }
781
+ pre_effect = {
782
+ random_rival_country = {
783
+ limit = {
784
+ NOT = { truce_with = ROOT }
785
+ NOT = { humiliated_by = root }
786
+ }
787
+ save_event_target_as = agenda_country
788
+ }
789
+ }
790
+ task_requirements = {
791
+ if = {
792
+ limit = {
793
+ has_estate_agenda_auto_completion = {
794
+ estate = estate_ghulams
795
+ }
796
+ }
797
+ has_estate_agenda_auto_completion = {
798
+ estate = estate_qizilbash
799
+ }
800
+ }
801
+ else = {
802
+ event_target:agenda_country = {
803
+ OR = {
804
+ humiliated_by = root
805
+ has_been_eclipsed_by = root
806
+ }
807
+ }
808
+ }
809
+ }
810
+ fail_if = {
811
+ event_target:agenda_country = {
812
+ has_eclipsed = root
813
+ }
814
+ }
815
+ task_completed_effect = {
816
+ add_estate_loyalty = {
817
+ estate = estate_ghulams
818
+ loyalty = 10
819
+ }
820
+ add_prestige_or_monarch_power = {
821
+ amount = 25
822
+ }
823
+ }
824
+ failing_effect = {
825
+ add_estate_loyalty_modifier = {
826
+ estate = estate_ghulams
827
+ desc = EST_VAL_AGENDA_DENIED
828
+ loyalty = -5
829
+ duration = 7300
830
+ }
831
+ }
832
+ }
833
+
834
+ #Build soldier household
835
+ estate_ghulams_build_soldier_household = {
836
+ can_select = {
837
+ any_owned_province = {
838
+ NOT = { religion_group = ROOT }
839
+ is_state_core = root
840
+ has_no_manufactory_trigger = yes
841
+ num_free_building_slots = 1
842
+ }
843
+ monthly_income = 30
844
+ adm_tech = 15
845
+ }
846
+ selection_weight = {
847
+ factor = 1
848
+ modifier = {
849
+ factor = 0.5
850
+ NOT = { monthly_income = 40 }
851
+ }
852
+ modifier = {
853
+ factor = 2
854
+ monthly_income = 60
855
+ }
856
+ modifier = {
857
+ factor = 0
858
+ has_estate_privilege = estate_janissary_allow_other_professions
859
+ }
860
+ }
861
+ pre_effect = {
862
+ random_owned_province = {
863
+ limit = {
864
+ NOT = { religion_group = ROOT }
865
+ is_state_core = root
866
+ has_no_manufactory_trigger = yes
867
+ num_free_building_slots = 1
868
+ }
869
+ save_event_target_as = agenda_province
870
+ }
871
+ random_owned_province = {
872
+ limit = {
873
+ NOT = { religion_group = ROOT }
874
+ is_state_core = root
875
+ has_no_manufactory_trigger = yes
876
+ num_free_building_slots = 1
877
+ base_manpower = 5
878
+ }
879
+ save_event_target_as = agenda_province
880
+ }
881
+ random_owned_province = {
882
+ limit = {
883
+ NOT = { religion_group = ROOT }
884
+ is_state_core = root
885
+ has_no_manufactory_trigger = yes
886
+ num_free_building_slots = 1
887
+ base_manpower = 10
888
+ }
889
+ save_event_target_as = agenda_province
890
+ }
891
+ }
892
+ provinces_to_highlight = {
893
+ province_id = event_target:agenda_province
894
+ }
895
+ fail_if = {
896
+ event_target:agenda_province = {
897
+ NOT = { owned_by = root }
898
+ }
899
+ }
900
+ task_requirements = {
901
+ if = {
902
+ limit = {
903
+ has_estate_agenda_auto_completion = {
904
+ estate = estate_ghulams
905
+ }
906
+ }
907
+ has_estate_agenda_auto_completion = {
908
+ estate = estate_qizilbash
909
+ }
910
+ }
911
+ else = {
912
+ event_target:agenda_province = {
913
+ has_building = soldier_households
914
+ }
915
+ }
916
+ }
917
+ task_completed_effect = {
918
+ add_estate_loyalty = {
919
+ estate = estate_ghulams
920
+ loyalty = 10
921
+ }
922
+ event_target:agenda_province = {
923
+ add_base_manpower = 2
924
+ add_province_modifier = {
925
+ name = new_recruitment_center
926
+ duration = 5475
927
+ }
928
+ }
929
+ }
930
+ failing_effect = {
931
+ event_target:agenda_province = {
932
+ if = {
933
+ limit = { owned_by = root }
934
+ add_named_unrest = {
935
+ name = local_ghulams_displeased
936
+ value = 5
937
+ }
938
+ }
939
+ }
940
+ add_estate_loyalty_modifier = {
941
+ estate = estate_ghulams
942
+ desc = EST_VAL_AGENDA_DENIED
943
+ loyalty = -5
944
+ duration = 7300
945
+ }
946
+ }
947
+ }
948
+
949
+ #Crush Revolts (not heretics)
950
+ estate_ghulams_crush_revolts = {
951
+ can_select = {
952
+ num_of_rebel_armies = 1
953
+ NOT = { has_spawned_rebels = ghulams_rebels }
954
+ }
955
+ selection_weight = {
956
+ factor = 2
957
+ modifier = {
958
+ factor = 2
959
+ num_of_rebel_controlled_provinces = 3
960
+ }
961
+ modifier = {
962
+ factor = 2
963
+ num_of_rebel_controlled_provinces = 5
964
+ }
965
+ modifier = {
966
+ factor = 0
967
+ has_estate_privilege = estate_janissary_allow_other_professions
968
+ }
969
+ }
970
+ provinces_to_highlight = {
971
+ owned_by = root
972
+ controlled_by = REB
973
+ }
974
+ fail_if = {
975
+ has_country_modifier = just_lost_to_rebels
976
+ }
977
+ task_requirements = {
978
+ if = {
979
+ limit = {
980
+ has_estate_agenda_auto_completion = {
981
+ estate = estate_ghulams
982
+ }
983
+ }
984
+ has_estate_agenda_auto_completion = {
985
+ estate = estate_qizilbash
986
+ }
987
+ }
988
+ else = {
989
+ NOT = { num_of_rebel_controlled_provinces = 1 }
990
+ NOT = { num_of_rebel_armies = 1 }
991
+ hidden_trigger = { NOT = { has_country_modifier = just_lost_to_rebels } }
992
+ }
993
+ }
994
+ task_completed_effect = {
995
+ add_estate_loyalty = {
996
+ estate = estate_ghulams
997
+ loyalty = 10
998
+ }
999
+ add_prestige = 10
1000
+ }
1001
+ failing_effect = {
1002
+ add_estate_loyalty_modifier = {
1003
+ estate = estate_ghulams
1004
+ desc = EST_VAL_AGENDA_DENIED
1005
+ loyalty = -5
1006
+ duration = 7300
1007
+ }
1008
+ }
1009
+ }
1010
+
1011
+ #Conquer X area from heathen country you don't have great relations with
1012
+ estate_ghulams_expand_into_x = {
1013
+ can_select = {
1014
+ is_free_or_tributary_trigger = yes
1015
+ is_at_war = no
1016
+ any_neighbor_country = {
1017
+ NOT = { religion_group = ROOT }
1018
+ num_of_cities = 5
1019
+ is_free_or_tributary_trigger = yes
1020
+ NOT = { is_subject_of = root }
1021
+ NOT = { overlord_of = root }
1022
+ NOT = { alliance_with = root }
1023
+ NOT = { ROOT = { truce_with = prev } }
1024
+ NOT = {
1025
+ has_opinion = {
1026
+ who = root
1027
+ value = 25
1028
+ }
1029
+ }
1030
+ NOT = {
1031
+ any_owned_province = { #No need for this agenda if covered by a mission
1032
+ OR = {
1033
+ is_permanent_claim = root
1034
+ is_core = root
1035
+ }
1036
+ }
1037
+ }
1038
+ ROOT = {
1039
+ knows_country = prev
1040
+ }
1041
+ any_owned_province = {
1042
+ any_neighbor_province = {
1043
+ owned_by = root
1044
+ }
1045
+ NOT = {
1046
+ area_for_scope_province = {
1047
+ OR = {
1048
+ is_empty = yes
1049
+ owned_by = root
1050
+ }
1051
+ }
1052
+ }
1053
+ }
1054
+ OR = {
1055
+ is_part_of_hre = no
1056
+ NOT = { hre_reform_passed = landfriede }
1057
+ ROOT = { is_part_of_hre = no }
1058
+ }
1059
+ }
1060
+ }
1061
+ selection_weight = {
1062
+ factor = 2
1063
+ modifier = {
1064
+ factor = 0.5
1065
+ has_non_generic_missions = yes
1066
+ }
1067
+ modifier = {
1068
+ factor = 1.5
1069
+ num_of_cities = 20
1070
+ }
1071
+ modifier = {
1072
+ factor = 1.5
1073
+ num_of_cities = 25
1074
+ }
1075
+ modifier = {
1076
+ factor = 1.5
1077
+ num_of_cities = 30
1078
+ }
1079
+ modifier = {
1080
+ factor = 1.5
1081
+ num_of_cities = 40
1082
+ }
1083
+ modifier = {
1084
+ factor = 1.5
1085
+ num_of_cities = 50
1086
+ }
1087
+ modifier = {
1088
+ factor = 0.25
1089
+ any_country = {
1090
+ coalition_target = root
1091
+ }
1092
+ }
1093
+ modifier = {
1094
+ factor = 0
1095
+ has_estate_privilege = estate_janissary_allow_other_professions
1096
+ }
1097
+ }
1098
+ pre_effect = {
1099
+ random_neighbor_country = {
1100
+ limit = {
1101
+ NOT = { religion_group = ROOT }
1102
+ num_of_cities = 5
1103
+ is_free_or_tributary_trigger = yes
1104
+ NOT = { is_subject_of = root }
1105
+ NOT = { overlord_of = root }
1106
+ NOT = { alliance_with = root }
1107
+ NOT = { ROOT = { truce_with = prev } }
1108
+ NOT = {
1109
+ has_opinion = {
1110
+ who = root
1111
+ value = 25
1112
+ }
1113
+ }
1114
+ NOT = {
1115
+ any_owned_province = { #No need for this agenda if covered by a mission
1116
+ OR = {
1117
+ is_permanent_claim = root
1118
+ is_core = root
1119
+ }
1120
+ }
1121
+ }
1122
+ ROOT = {
1123
+ knows_country = prev
1124
+ }
1125
+ any_owned_province = {
1126
+ any_neighbor_province = {
1127
+ owned_by = root
1128
+ }
1129
+ NOT = {
1130
+ area_for_scope_province = {
1131
+ OR = {
1132
+ is_empty = yes
1133
+ owned_by = root
1134
+ }
1135
+ }
1136
+ }
1137
+ }
1138
+ OR = {
1139
+ is_part_of_hre = no
1140
+ NOT = { hre_reform_passed = landfriede }
1141
+ ROOT = { is_part_of_hre = no }
1142
+ }
1143
+ }
1144
+ random_owned_province = {
1145
+ limit = {
1146
+ any_neighbor_province = {
1147
+ owned_by = root
1148
+ }
1149
+ area_for_scope_province = {
1150
+ type = all
1151
+ NOT = { owned_by = root }
1152
+ is_empty = no
1153
+ }
1154
+ }
1155
+ save_event_target_as = agenda_province
1156
+ }
1157
+ }
1158
+ }
1159
+ immediate_effect = {
1160
+ if = {
1161
+ limit = {
1162
+ event_target:agenda_province = {
1163
+ area_for_scope_province = {
1164
+ NOT = { is_claim = root }
1165
+ NOT = { is_core = root }
1166
+ }
1167
+ }
1168
+ }
1169
+ event_target:agenda_province = {
1170
+ area = {
1171
+ limit = {
1172
+ NOT = { is_claim = root }
1173
+ NOT = { is_core = root }
1174
+ }
1175
+ add_claim = root
1176
+ }
1177
+ }
1178
+ }
1179
+ }
1180
+ on_invalid = {
1181
+ if = {
1182
+ limit = {
1183
+ event_target:agenda_province = {
1184
+ area_for_scope_province = {
1185
+ is_claim = root
1186
+ NOT = { is_permanent_claim = root }
1187
+ }
1188
+ }
1189
+ }
1190
+ event_target:agenda_province = {
1191
+ area = {
1192
+ limit = {
1193
+ is_claim = root
1194
+ NOT = { is_permanent_claim = root }
1195
+ }
1196
+ remove_claim = root
1197
+ }
1198
+ }
1199
+ }
1200
+ }
1201
+ provinces_to_highlight = {
1202
+ area_for_scope_province = {
1203
+ province_id = event_target:agenda_province
1204
+ }
1205
+ }
1206
+ task_requirements = {
1207
+ if = {
1208
+ limit = {
1209
+ has_estate_agenda_auto_completion = {
1210
+ estate = estate_ghulams
1211
+ }
1212
+ }
1213
+ has_estate_agenda_auto_completion = {
1214
+ estate = estate_qizilbash
1215
+ }
1216
+ }
1217
+ else = {
1218
+ event_target:agenda_province = {
1219
+ area_for_scope_province = {
1220
+ owned_by = root
1221
+ }
1222
+ }
1223
+ }
1224
+ }
1225
+ fail_if = {
1226
+ event_target:agenda_province = {
1227
+ area_for_scope_province = {
1228
+ type = all
1229
+ NOT = { is_claim = root }
1230
+ NOT = { is_core = root }
1231
+ NOT = { owned_by = root }
1232
+ }
1233
+ }
1234
+ }
1235
+ task_completed_effect = {
1236
+ add_estate_loyalty = {
1237
+ estate = estate_ghulams
1238
+ loyalty = 15
1239
+ }
1240
+ add_adm_power = 50
1241
+ }
1242
+ failing_effect = {
1243
+ add_estate_loyalty_modifier = {
1244
+ estate = estate_ghulams
1245
+ desc = EST_VAL_AGENDA_DENIED
1246
+ loyalty = -5
1247
+ duration = 7300
1248
+ }
1249
+ if = {
1250
+ limit = {
1251
+ event_target:agenda_province = {
1252
+ area_for_scope_province = {
1253
+ is_claim = root
1254
+ NOT = { is_permanent_claim = root }
1255
+ }
1256
+ }
1257
+ }
1258
+ event_target:agenda_province = {
1259
+ area = {
1260
+ limit = {
1261
+ is_claim = root
1262
+ NOT = { is_permanent_claim = root }
1263
+ }
1264
+ remove_claim = root
1265
+ }
1266
+ }
1267
+ }
1268
+ }
1269
+ }
1270
+
1271
+ #Condottieri against rival (with Mare Nostrum)
1272
+ estate_ghulams_condottieri_rivals = {
1273
+ can_select = {
1274
+ has_dlc = "Mare Nostrum"
1275
+ is_at_war = no
1276
+ NOT = {
1277
+ any_country = {
1278
+ root = { is_renting_condottieri_to = prev }
1279
+ }
1280
+ }
1281
+ any_rival_country = {
1282
+ is_at_war = yes
1283
+ any_country = {
1284
+ war_with = prev
1285
+ num_of_cities = 5
1286
+ NOT = {
1287
+ border_distance = {
1288
+ who = root
1289
+ distance = 200
1290
+ }
1291
+ }
1292
+ NOT = { is_rival = root }
1293
+ NOT = { root = { is_rival = prev } }
1294
+ has_opinion = {
1295
+ who = root
1296
+ value = -50
1297
+ }
1298
+ is_free_or_tributary_trigger = yes
1299
+ }
1300
+ }
1301
+ manpower_percentage = 0.5
1302
+ army_size_percentage = 0.5
1303
+ }
1304
+ selection_weight = {
1305
+ factor = 2
1306
+ modifier = {
1307
+ factor = 2
1308
+ calc_true_if = {
1309
+ amount = 5
1310
+ all_country = {
1311
+ coalition_target = root
1312
+ }
1313
+ }
1314
+ }
1315
+ modifier = {
1316
+ factor = 0.5
1317
+ NOT = {
1318
+ any_country = {
1319
+ coalition_target = root
1320
+ army_size = root
1321
+ }
1322
+ }
1323
+ }
1324
+ modifier = {
1325
+ factor = 0
1326
+ has_estate_privilege = estate_janissary_allow_other_professions
1327
+ }
1328
+ }
1329
+ pre_effect = {
1330
+ random_rival_country = {
1331
+ limit = {
1332
+ is_at_war = yes
1333
+ any_country = {
1334
+ war_with = prev
1335
+ num_of_cities = 5
1336
+ NOT = {
1337
+ border_distance = {
1338
+ who = root
1339
+ distance = 200
1340
+ }
1341
+ }
1342
+ NOT = { is_rival = root }
1343
+ NOT = { root = { is_rival = prev } }
1344
+ has_opinion = {
1345
+ who = root
1346
+ value = -50
1347
+ }
1348
+ is_free_or_tributary_trigger = yes
1349
+ }
1350
+ }
1351
+ save_event_target_as = agenda_country
1352
+ random_country = {
1353
+ limit = {
1354
+ war_with = prev
1355
+ num_of_cities = 5
1356
+ NOT = {
1357
+ border_distance = {
1358
+ who = root
1359
+ distance = 200
1360
+ }
1361
+ }
1362
+ NOT = { is_rival = root }
1363
+ NOT = { root = { is_rival = prev } }
1364
+ has_opinion = {
1365
+ who = root
1366
+ value = -50
1367
+ }
1368
+ is_free_or_tributary_trigger = yes
1369
+ }
1370
+ save_event_target_as = agenda_enemy_country
1371
+ }
1372
+ }
1373
+ }
1374
+ fail_if = {
1375
+ OR = {
1376
+ is_subject = yes
1377
+ war_with = event_target:agenda_country
1378
+ event_target:agenda_country = {
1379
+ OR = {
1380
+ is_at_war = no
1381
+ NOT = { num_of_cities = 1 }
1382
+ }
1383
+ }
1384
+ }
1385
+ }
1386
+ provinces_to_highlight = {
1387
+ is_capital = yes
1388
+ owner = {
1389
+ war_with = event_target:agenda_country
1390
+ }
1391
+ }
1392
+ task_requirements = {
1393
+ if = {
1394
+ limit = {
1395
+ has_estate_agenda_auto_completion = {
1396
+ estate = estate_ghulams
1397
+ }
1398
+ }
1399
+ has_estate_agenda_auto_completion = {
1400
+ estate = estate_qizilbash
1401
+ }
1402
+ }
1403
+ else = {
1404
+ any_country = {
1405
+ war_with = event_target:agenda_country
1406
+ custom_trigger_tooltip = {
1407
+ tooltip = sending_condottieri_to_them
1408
+ ROOT = { is_renting_condottieri_to = prev }
1409
+ }
1410
+ }
1411
+ }
1412
+ }
1413
+ task_completed_effect = {
1414
+ add_estate_loyalty = {
1415
+ estate = estate_ghulams
1416
+ loyalty = 10
1417
+ }
1418
+ add_mil_power = 50
1419
+ }
1420
+ failing_effect = {
1421
+ add_estate_loyalty_modifier = {
1422
+ estate = estate_ghulams
1423
+ desc = EST_VAL_AGENDA_DENIED
1424
+ loyalty = -5
1425
+ duration = 7300
1426
+ }
1427
+ }
1428
+ }
1429
+
1430
+ #Bigger Army than Rival
1431
+ estate_ghulams_bigger_army_than_rival = {
1432
+ can_select = {
1433
+ NOT = { has_country_modifier = thriving_arms_industry }
1434
+ NOT = { army_size_percentage = 1 }
1435
+ any_rival_country = {
1436
+ NOT = { war_with = root }
1437
+ NOT = { root = { army_size = prev } }
1438
+ army_balance = {
1439
+ who = root
1440
+ value = 1.05
1441
+ }
1442
+ NOT = {
1443
+ army_balance = {
1444
+ who = root
1445
+ value = 1.25
1446
+ }
1447
+ }
1448
+ }
1449
+ }
1450
+ selection_weight = {
1451
+ factor = 5
1452
+ modifier = {
1453
+ factor = 0
1454
+ has_estate_privilege = estate_janissary_allow_other_professions
1455
+ }
1456
+ }
1457
+ pre_effect = {
1458
+ random_rival_country = {
1459
+ limit = {
1460
+ NOT = { war_with = root }
1461
+ NOT = { root = { army_size = prev } }
1462
+ army_balance = {
1463
+ who = root
1464
+ value = 1.05
1465
+ }
1466
+ NOT = {
1467
+ army_balance = {
1468
+ who = root
1469
+ value = 1.25
1470
+ }
1471
+ }
1472
+ }
1473
+ save_event_target_as = agenda_country
1474
+ }
1475
+ }
1476
+ provinces_to_highlight = {
1477
+ is_capital_of = event_target:agenda_country
1478
+ }
1479
+ task_requirements = {
1480
+ if = {
1481
+ limit = {
1482
+ has_estate_agenda_auto_completion = {
1483
+ estate = estate_ghulams
1484
+ }
1485
+ }
1486
+ has_estate_agenda_auto_completion = {
1487
+ estate = estate_qizilbash
1488
+ }
1489
+ }
1490
+ else = {
1491
+ if = {
1492
+ limit = { event_target:agenda_country = { num_of_cities = 1 } }
1493
+ army_size = event_target:agenda_country
1494
+ }
1495
+ else = {
1496
+ always = yes
1497
+ }
1498
+ }
1499
+ }
1500
+ task_completed_effect = {
1501
+ add_estate_loyalty = {
1502
+ estate = estate_ghulams
1503
+ loyalty = 10
1504
+ }
1505
+ add_country_modifier = {
1506
+ name = thriving_arms_industry
1507
+ duration = 3650
1508
+ }
1509
+ }
1510
+ failing_effect = {
1511
+ add_estate_loyalty_modifier = {
1512
+ estate = estate_ghulams
1513
+ desc = EST_VAL_AGENDA_DENIED
1514
+ loyalty = -5
1515
+ duration = 7300
1516
+ }
1517
+ }
1518
+ }
1519
+
1520
+ #Manpower reserves
1521
+ estate_ghulams_build_up_manpower_reserves = {
1522
+ can_select = {
1523
+ is_at_war = no
1524
+ NOT = { manpower_percentage = 0.40 }
1525
+ }
1526
+ selection_weight = {
1527
+ factor = 5
1528
+ modifier = {
1529
+ factor = 1.5
1530
+ NOT = { manpower_percentage = 0.35 }
1531
+ }
1532
+ modifier = {
1533
+ factor = 1.5
1534
+ NOT = { manpower_percentage = 0.3 }
1535
+ }
1536
+ modifier = {
1537
+ factor = 1.5
1538
+ NOT = { manpower_percentage = 0.25 }
1539
+ }
1540
+ modifier = {
1541
+ factor = 2
1542
+ NOT = { manpower_percentage = 0.2 }
1543
+ }
1544
+ modifier = {
1545
+ factor = 3
1546
+ NOT = { manpower_percentage = 0.15 }
1547
+ }
1548
+ modifier = {
1549
+ factor = 0
1550
+ has_estate_privilege = estate_janissary_allow_other_professions
1551
+ }
1552
+ }
1553
+ pre_effect = {
1554
+ set_variable = {
1555
+ which = estate_ghulams_build_up_manpower_reserves_variable
1556
+ value = 0
1557
+ }
1558
+ if = {
1559
+ limit = {
1560
+ NOT = {
1561
+ manpower_percentage = 0.1
1562
+ }
1563
+ }
1564
+ set_variable = {
1565
+ which = estate_ghulams_build_up_manpower_reserves_variable
1566
+ value = 1
1567
+ }
1568
+ }
1569
+ else_if = {
1570
+ limit = {
1571
+ NOT = {
1572
+ manpower_percentage = 0.3
1573
+ }
1574
+ }
1575
+ set_variable = {
1576
+ which = estate_ghulams_build_up_manpower_reserves_variable
1577
+ value = 2
1578
+ }
1579
+ }
1580
+ else = {
1581
+ set_variable = {
1582
+ which = estate_ghulams_build_up_manpower_reserves_variable
1583
+ value = 3
1584
+ }
1585
+ }
1586
+ pick_type_of_military_advisor = yes
1587
+ }
1588
+ fail_if = {
1589
+ is_at_war = yes
1590
+ }
1591
+ task_requirements = {
1592
+ if = {
1593
+ limit = {
1594
+ has_estate_agenda_auto_completion = {
1595
+ estate = estate_ghulams
1596
+ }
1597
+ }
1598
+ has_estate_agenda_auto_completion = {
1599
+ estate = estate_qizilbash
1600
+ }
1601
+ }
1602
+ else = {
1603
+ if = {
1604
+ limit = {
1605
+ check_variable = {
1606
+ which = estate_ghulams_build_up_manpower_reserves_variable
1607
+ value = 3
1608
+ }
1609
+ }
1610
+ manpower_percentage = 0.9
1611
+ }
1612
+ else_if = {
1613
+ limit = {
1614
+ check_variable = {
1615
+ which = estate_ghulams_build_up_manpower_reserves_variable
1616
+ value = 2
1617
+ }
1618
+ }
1619
+ manpower_percentage = 0.75
1620
+ }
1621
+ else = {
1622
+ manpower_percentage = 0.5
1623
+ }
1624
+ }
1625
+ }
1626
+ task_completed_effect = {
1627
+ add_estate_loyalty = {
1628
+ estate = estate_ghulams
1629
+ loyalty = 10
1630
+ }
1631
+ generate_scaled_military_advisor_of_religion_effect = {
1632
+ religion = hinduism
1633
+ discount = yes
1634
+ }
1635
+ clear_random_military_advisor_generation_flags = yes
1636
+ }
1637
+ failing_effect = {
1638
+ add_estate_loyalty_modifier = {
1639
+ estate = estate_ghulams
1640
+ desc = EST_VAL_AGENDA_DENIED
1641
+ loyalty = -5
1642
+ duration = 7300
1643
+ }
1644
+ clear_random_military_advisor_generation_flags = yes
1645
+ }
1646
+ }
1647
+
1648
+ #Reduce Other Estate Influence
1649
+ estate_ghulams_reduce_other_estate_influence = {
1650
+ can_select = {
1651
+ is_at_war = no
1652
+ NOT = { manpower_percentage = 0.40 }
1653
+ }
1654
+ selection_weight = {
1655
+ factor = 5
1656
+ modifier = {
1657
+ factor = 1.5
1658
+ NOT = { manpower_percentage = 0.35 }
1659
+ }
1660
+ modifier = {
1661
+ factor = 1.5
1662
+ NOT = { manpower_percentage = 0.3 }
1663
+ }
1664
+ modifier = {
1665
+ factor = 1.5
1666
+ NOT = { manpower_percentage = 0.25 }
1667
+ }
1668
+ modifier = {
1669
+ factor = 2
1670
+ NOT = { manpower_percentage = 0.2 }
1671
+ }
1672
+ modifier = {
1673
+ factor = 3
1674
+ NOT = { manpower_percentage = 0.15 }
1675
+ }
1676
+ modifier = {
1677
+ factor = 0
1678
+ has_estate_privilege = estate_janissary_allow_other_professions
1679
+ }
1680
+ }
1681
+ pre_effect = {
1682
+ set_variable = {
1683
+ which = estate_ghulams_build_up_manpower_reserves_variable
1684
+ value = 0
1685
+ }
1686
+ if = {
1687
+ limit = {
1688
+ NOT = {
1689
+ manpower_percentage = 0.1
1690
+ }
1691
+ }
1692
+ set_variable = {
1693
+ which = estate_ghulams_build_up_manpower_reserves_variable
1694
+ value = 1
1695
+ }
1696
+ }
1697
+ else_if = {
1698
+ limit = {
1699
+ NOT = {
1700
+ manpower_percentage = 0.3
1701
+ }
1702
+ }
1703
+ set_variable = {
1704
+ which = estate_ghulams_build_up_manpower_reserves_variable
1705
+ value = 2
1706
+ }
1707
+ }
1708
+ else = {
1709
+ set_variable = {
1710
+ which = estate_ghulams_build_up_manpower_reserves_variable
1711
+ value = 3
1712
+ }
1713
+ }
1714
+ pick_type_of_military_advisor = yes
1715
+ }
1716
+ fail_if = {
1717
+ is_at_war = yes
1718
+ }
1719
+ task_requirements = {
1720
+ if = {
1721
+ limit = {
1722
+ has_estate_agenda_auto_completion = {
1723
+ estate = estate_ghulams
1724
+ }
1725
+ }
1726
+ has_estate_agenda_auto_completion = {
1727
+ estate = estate_qizilbash
1728
+ }
1729
+ }
1730
+ else = {
1731
+ if = {
1732
+ limit = {
1733
+ check_variable = {
1734
+ which = estate_ghulams_build_up_manpower_reserves_variable
1735
+ value = 3
1736
+ }
1737
+ }
1738
+ manpower_percentage = 0.9
1739
+ }
1740
+ else_if = {
1741
+ limit = {
1742
+ check_variable = {
1743
+ which = estate_ghulams_build_up_manpower_reserves_variable
1744
+ value = 2
1745
+ }
1746
+ }
1747
+ manpower_percentage = 0.75
1748
+ }
1749
+ else = {
1750
+ manpower_percentage = 0.5
1751
+ }
1752
+ }
1753
+ }
1754
+ task_completed_effect = {
1755
+ add_estate_loyalty = {
1756
+ estate = estate_ghulams
1757
+ loyalty = 10
1758
+ }
1759
+ generate_scaled_military_advisor_of_religion_effect = {
1760
+ religion = hinduism
1761
+ discount = yes
1762
+ }
1763
+ clear_random_military_advisor_generation_flags = yes
1764
+ }
1765
+ failing_effect = {
1766
+ add_estate_loyalty_modifier = {
1767
+ estate = estate_ghulams
1768
+ desc = EST_VAL_AGENDA_DENIED
1769
+ loyalty = -5
1770
+ duration = 7300
1771
+ }
1772
+ clear_random_military_advisor_generation_flags = yes
1773
+ }
1774
+ }