﻿bme_num_same_realm_counties_in_duchy = { # thanks to Tobbzn
  if = {
		limit = {
			save_temporary_scope_as = this_county
		}
	}
  duchy = {
    every_de_jure_county = {
      limit = {
				holder.top_liege = scope:this_county.holder.top_liege
			}
      add = 1
    }
  }
}

bme_num_turkish_same_realm_counties_in_duchy = { # thanks to Tobbzn
  if = {
		limit = {
			save_temporary_scope_as = this_county
		}
	}
  duchy = {
    every_de_jure_county = {
      limit = {
				holder.top_liege = scope:this_county.holder.top_liege
				culture = {
					OR = {
						this = culture:turkish
						has_cultural_tradition = tradition_staunch_traditionalists
					}
				}
			}
      add = 1
    }
  }
}

bme_azeri_spread_event_weight_multiplier = {
	value = 1 # 867
	if = {
		limit = { current_date > 868.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 869.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 870.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 871.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 872.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 873.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 874.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 875.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 876.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 877.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 878.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 879.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 880.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 881.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 882.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 883.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 884.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 885.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 886.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 887.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 888.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 889.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 890.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 891.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 892.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 893.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 894.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 895.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 896.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 897.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 898.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 899.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 900.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 901.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 902.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 903.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 904.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 905.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 906.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 907.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 908.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 909.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 910.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 911.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 912.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 913.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 914.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 915.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 916.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 917.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 918.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 919.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 920.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 921.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 922.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 923.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 924.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 925.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 926.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 927.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 928.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 929.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 930.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 931.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 932.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 933.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 934.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 935.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 936.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 937.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 938.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 939.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 940.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 941.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 942.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 943.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 944.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 945.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 946.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 947.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 948.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 949.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 950.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 951.1.1 }
		add = 1
	}
	if = {
		limit = { current_date > 952.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 953.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 954.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 955.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 956.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 957.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 958.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 959.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 960.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 961.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 962.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 963.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 964.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 965.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 966.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 967.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 968.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 969.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 970.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 971.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 972.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 973.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 974.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 975.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 976.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 977.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 978.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 979.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 980.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 981.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 982.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 983.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 984.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 985.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 986.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 987.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 988.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 989.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 990.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 991.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 992.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 993.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 994.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 995.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 996.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 997.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 998.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 999.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1000.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1001.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1002.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1003.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1004.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1005.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1006.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1007.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1008.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1009.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1010.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1011.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1012.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1013.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1014.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1015.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1016.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1017.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1018.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1019.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1020.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1021.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1022.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1023.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1024.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1025.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1026.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1027.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1028.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1029.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1030.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1031.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1032.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1033.1.1 	}
			add = 1
		}
	if = {
		limit = { current_date > 1034.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1035.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1036.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1037.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1038.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1039.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1040.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1041.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1042.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1043.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1044.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1045.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1046.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1047.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1048.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1049.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1050.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1051.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1052.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1053.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1054.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1055.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1056.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1057.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1058.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1059.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1060.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1061.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1062.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1063.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1064.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1065.1.1 	}
			add = 1
			}
	if = {
		limit = { current_date > 1066.1.1 	}
			add = 1
			}
}
