Skip to content

Commit 84756a4

Browse files
authored
Merge pull request #174 from nbmsc/fix_caliphate_title
Fix caliphate title
2 parents fca353b + a00be5d commit 84756a4

3 files changed

Lines changed: 97 additions & 43 deletions

File tree

CleanSlate/common/landed_titles/01_religion_heads.txt

Lines changed: 59 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ d_hurufi = {
258258
controls_religion = hurufi
259259

260260
allow = {
261-
religion = hurufi
262261
can_create_duchy = yes
263262

264263
trigger_if = {
@@ -276,7 +275,8 @@ d_hurufi = {
276275
value = random
277276
}
278277
}
279-
can_usurp_religion_head = yes
278+
#can_usurp_religion_head = yes
279+
num_of_holy_sites >= 3
280280
}
281281
trigger_else = {
282282
muslim_religion_head_trigger = yes
@@ -312,7 +312,6 @@ d_ibadi = {
312312
controls_religion = ibadi
313313

314314
allow = {
315-
religion = ibadi
316315
can_create_duchy = yes
317316

318317
trigger_if = {
@@ -330,7 +329,8 @@ d_ibadi = {
330329
value = random
331330
}
332331
}
333-
can_usurp_religion_head = yes
332+
#can_usurp_religion_head = yes
333+
num_of_holy_sites >= 3
334334
}
335335
trigger_else = {
336336
muslim_religion_head_trigger = yes
@@ -428,16 +428,9 @@ d_kharijite = {
428428
controls_religion = kharijite
429429

430430
allow = {
431-
religion = kharijite
432431
can_create_duchy = yes
433432

434-
trigger_if = {
435-
limit = { piety < 1000 }
436-
OR = {
437-
trait = mirza
438-
trait = sayyid
439-
}
440-
}
433+
piety >= 1000
441434

442435
trigger_if = {
443436
limit = {
@@ -446,7 +439,8 @@ d_kharijite = {
446439
value = random
447440
}
448441
}
449-
can_usurp_religion_head = yes
442+
#can_usurp_religion_head = yes
443+
num_of_holy_sites >= 3
450444
}
451445
trigger_else = {
452446
muslim_religion_head_trigger = yes
@@ -704,30 +698,43 @@ d_qarmatian = {
704698
controls_religion = qarmatian
705699

706700
allow = {
707-
religion = qarmatian
708701
can_create_duchy = yes
709702

710703
trigger_if = {
711-
limit = {
712-
NOT = {
704+
limit = { piety < 1000 }
705+
OR = {
706+
trait = mirza
707+
trait = sayyid
708+
custom_tooltip = {
709+
text = qarmatian_bloodline_TT
710+
713711
any_owned_bloodline = {
714712
has_bloodline_flag = bloodline_qarmatian_leader
715713
bloodline_is_active_for = PREV
716714
}
717715
}
718716
}
717+
}
719718

720-
trigger_if = {
721-
limit = { piety < 1000 }
722-
OR = {
723-
trait = mirza
724-
trait = sayyid
719+
trigger_if = {
720+
limit = {
721+
NOT = {
722+
any_owned_bloodline = {
723+
has_bloodline_flag = bloodline_qarmatian_leader
724+
bloodline_is_active_for = PREV
725+
}
725726
}
726727
}
727-
can_usurp_religion_head = yes
728+
729+
#can_usurp_religion_head = yes
730+
num_of_holy_sites >= 3
731+
piety >= 500
728732
}
729733
trigger_else = {
730-
piety >= 500
734+
OR = {
735+
num_of_holy_sites >= 3
736+
piety >= 500
737+
}
731738
}
732739
}
733740

@@ -760,14 +767,21 @@ d_shiite = {
760767
controls_religion = shiite
761768

762769
allow = {
763-
religion = shiite
764770
can_create_duchy = yes
765771

766772
trigger_if = {
767773
limit = { piety < 1000 }
768774
OR = {
769775
trait = mirza
770776
trait = sayyid
777+
custom_tooltip = {
778+
text = shiite_bloodline_TT
779+
780+
any_owned_bloodline = {
781+
has_bloodline_flag = bloodline_shiite_leader
782+
bloodline_is_active_for = PREV
783+
}
784+
}
771785
}
772786
}
773787

@@ -778,7 +792,17 @@ d_shiite = {
778792
value = random
779793
}
780794
}
781-
can_usurp_religion_head = yes
795+
#can_usurp_religion_head = yes
796+
num_of_holy_sites >= 3
797+
}
798+
trigger_else_if = {
799+
limit = { has_global_flag = shia_caliphate_revolt_ongoing }
800+
801+
custom_tooltip = {
802+
text = not_shia_caliphate_revolt_ongoing
803+
804+
always = no
805+
}
782806
}
783807
trigger_else = {
784808
custom_tooltip = {
@@ -806,6 +830,12 @@ d_shiite = {
806830

807831
muslim_religion_head_trigger = yes
808832
}
833+
trigger_else = {
834+
OR = {
835+
muslim_religion_head_trigger = yes
836+
piety >= 500
837+
}
838+
}
809839
}
810840
}
811841

@@ -863,7 +893,6 @@ d_sunni = {
863893
controls_religion = sunni
864894

865895
allow = {
866-
religion = sunni
867896
can_create_duchy = yes
868897

869898
trigger_if = {
@@ -881,7 +910,8 @@ d_sunni = {
881910
value = random
882911
}
883912
}
884-
can_usurp_religion_head = yes
913+
#can_usurp_religion_head = yes
914+
num_of_holy_sites >= 3
885915
}
886916
trigger_else = {
887917
custom_tooltip = {
@@ -978,6 +1008,8 @@ d_yazidi = {
9781008
controls_religion = yazidi
9791009

9801010
allow = {
1011+
can_create_duchy = yes
1012+
9811013
piety >= 1000
9821014
}
9831015

CleanSlate/common/scripted_triggers/00_title_triggers.txt

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ has_titular_requirements = {
4949
}
5050

5151
muslim_religion_head_trigger = {
52-
NOT = { has_global_flag = shia_caliphate_revolt_ongoing }
53-
5452
trigger_if = {
5553
limit = { has_global_flag = destroyed_caliphates }
5654

@@ -108,18 +106,29 @@ muslim_religion_head_trigger = {
108106
}
109107
}
110108

111-
AND = {
112-
trait = sayyid
109+
trigger_if = {
110+
limit = {
111+
trait = sayyid
112+
NOR = {
113+
# Not for Kharijite
114+
FROM = { title = d_kharijite }
115+
# Not for bloodline owners as they have better option
116+
any_owned_bloodline = {
117+
has_bloodline_flag = bloodline_shiite_leader
118+
bloodline_is_active_for = PREV
119+
}
120+
}
121+
}
113122
piety >= 1000
114123
}
115124
}
116125
}
117126
trigger_else = {
118127
OR = {
119128
custom_tooltip = {
120-
text = controls_jerusalem_damascus_baghdad
129+
text = controls_mecca_medina
121130

122-
c_jerusalem = {
131+
c_mecca = {
123132
holder_scope = {
124133
OR = {
125134
character = ROOT
@@ -128,29 +137,29 @@ muslim_religion_head_trigger = {
128137
}
129138
}
130139

131-
c_damascus = {
140+
c_medina = {
132141
holder_scope = {
133142
OR = {
134143
character = ROOT
135144
is_vassal_or_below_of = ROOT
136145
}
137146
}
138147
}
148+
}
139149

140-
c_baghdad = {
150+
custom_tooltip = {
151+
text = controls_jerusalem_damascus_baghdad
152+
153+
c_jerusalem = {
141154
holder_scope = {
142155
OR = {
143156
character = ROOT
144157
is_vassal_or_below_of = ROOT
145158
}
146159
}
147160
}
148-
}
149161

150-
custom_tooltip = {
151-
text = controls_mecca_medina
152-
153-
c_mecca = {
162+
c_damascus = {
154163
holder_scope = {
155164
OR = {
156165
character = ROOT
@@ -159,7 +168,7 @@ muslim_religion_head_trigger = {
159168
}
160169
}
161170

162-
c_medina = {
171+
c_baghdad = {
163172
holder_scope = {
164173
OR = {
165174
character = ROOT
@@ -169,8 +178,19 @@ muslim_religion_head_trigger = {
169178
}
170179
}
171180

172-
AND = {
173-
trait = sayyid
181+
trigger_if = {
182+
limit = {
183+
trait = sayyid
184+
NOR = {
185+
# Not for Kharijite
186+
FROM = { title = d_kharijite }
187+
# Not for bloodline owners as they have better option
188+
any_owned_bloodline = {
189+
has_bloodline_flag = bloodline_shiite_leader
190+
bloodline_is_active_for = PREV
191+
}
192+
}
193+
}
174194
piety >= 1000
175195
}
176196
}

CleanSlate/decisions/HFP_realm_decisions.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,7 @@ decisions = {
16561656
d_kharijite = { has_holder = yes }
16571657
d_yazidi = { has_holder = yes }
16581658
d_hurufi = { has_holder = yes }
1659+
d_qarmatian = { has_holder = yes }
16591660
}
16601661
}
16611662

@@ -1668,6 +1669,7 @@ decisions = {
16681669
destroy_landed_title = d_kharijite
16691670
destroy_landed_title = d_yazidi
16701671
destroy_landed_title = d_hurufi
1672+
destroy_landed_title = d_qarmatian
16711673
}
16721674
}
16731675

0 commit comments

Comments
 (0)