namespace = kccmission

### Missionaries in China

# Decide how to react to missionaries
character_event = {
    id = kccmission.0001
	has_dlc = "Jade Dragon"
    hide_window = yes
    is_triggered_only = yes
	
	option = { #Welcome the Missionaries
		trigger = {
			FROM = {
				NOR = {
					has_character_modifier = angered_china_modifier
					has_character_modifier = failed_invasion_of_china
					has_character_modifier = china_raid_active
					has_character_modifier = china_raid_grace_cd
				}
			}
		}
		
		FROM = { letter_event = { id = kccmission.0002 days = 1 } }
		
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0.01
				FROM = { is_disliked_by_China_trigger = yes }
			}
			modifier = {
				factor = 1.25
				FROM = { realm_diplomacy = 24 }
			}
			modifier = {
				factor = 1.25
				FROM = { realm_diplomacy = 28 }
			}
			modifier = {
				factor = 1.5
				FROM = { realm_diplomacy = 32 }
			}
			modifier = {
				factor = 1.5
				FROM = { realm_diplomacy = 36 }
			}
			modifier = {
				factor = 1.25
				FROM = { prestige = 1000 }
			}
			modifier = {
				factor = 6
				FROM = { prestige = 3000 }
			}
			modifier = {
				factor = 10
				FROM = { prestige = 5000 }
			}
			modifier = {
				factor = 3
				FROM = {
					OR = {
						has_character_modifier = peace_deal_with_china
						has_character_modifier = chinese_imperial_trade_contract
						has_character_modifier = chinese_favored_in_trade
						has_offmap_currency = { offmap = offmap_china value = 1000 }
						AND = {
							top_liege = { has_landed_title = e_china_west_governor }
							independent = no
						}
						suzerain = { has_landed_title = e_china_west_governor }
					}
				}
			}
			modifier = {
				factor = 0.33
				offmap_china = {
					OR = {
						has_status = china_unrest
						has_status = china_famine
						has_status = china_plague
					}
				}
			}
			modifier = {
				factor = 0.01
				offmap_china = {
					OR = {
						has_status = china_civil_war
						has_status = china_mongol_invasion
						has_status = china_jurchen_invasion
					}
				}
			}
			modifier = {
				factor = 0.05
				trigger_if = {
					limit = {
						offmap_china = {
							offmap_ruler = {
								OR = {
									religion = sunni
									religion = zikri
								}
							}
						}
					}
					FROM = {
						OR = {
							religion = shiite
							religion = qarmatian
							religion = hurufi
						}
					}
				}
				trigger_if = {
					limit = {
						offmap_china = {
							offmap_ruler = {
								OR = {
									religion = shiite
									religion = qarmatian
									religion = hurufi
								}
							}
						}
					}
					FROM = {
						OR = {
							religion = sunni
							religion = zikri
						}
					}
				}
				trigger_if = {
					limit = {
						offmap_china = {
							offmap_ruler = {
								OR = {
									religion = zoroastrian
									religion_group = christian
								}
							}
						}
					}
					FROM = {
						OR = {
							religion = manichean
							religion_group = muslim
						}
					}
				}
				trigger_if = {
					limit = { offmap_china = { offmap_ruler = { religion = zoroastrian } } }
					FROM = { religion = mazdaki }
				}
				trigger_if = {
					limit = { offmap_china = { offmap_ruler = { religion_group = christian } } }
					FROM = { religion_group = pagan_group }
				}
				trigger_else = {
					offmap_china = {
						offmap_ruler = {
							religion_group = pagan_group
							has_religion_feature = religion_dogmatic
						}
					}
				}
			}
			modifier = {
				factor = 5
				offmap_china = {
					offmap_ruler = {
						religion_group = pagan_group
						OR = {
							has_religion_feature = religion_cosmopolitan
							has_religion_feature = religion_syncretic
							has_religion_feature = religion_feature_hellenic
							is_reformed_religion = no
						}
					}
				}
			}
		}
    }
	
	option = { #Reject the Missionaries
		
		FROM = { letter_event = { id = kccmission.0003 days = 1 } }
		
		ai_chance = {
			factor = 60
			modifier = {
				factor = 0.01
				FROM = { is_liked_by_China_trigger = yes }
			}
			modifier = {
				factor = 5
				FROM = { NOT = { realm_diplomacy = 4 } }
			}
			modifier = {
				factor = 5
				FROM = { NOT = { realm_diplomacy = 8 } }
			}
			modifier = {
				factor = 2
				FROM = { NOT = { realm_diplomacy = 12 } }
			}
			modifier = {
				factor = 2
				FROM = { NOT = { realm_diplomacy = 16 } }
			}
			modifier = {
				factor = 100
				FROM = { NOT = { prestige = 0 } }
			}
			modifier = {
				factor = 10
				FROM = { NOT = { prestige = 100 } }
			}
			modifier = {
				factor = 1.25
				FROM = { NOT = { prestige = 500 } }
			}
		}
    }
}

letter_event = {
    id = kccmission.0002
	has_dlc = "Jade Dragon"
    desc = EVTDESC_kccmission.0002
    border = GFX_event_letter_frame_diplomacy

    is_triggered_only = yes
    
    option = { 
        name = EVTOPT_kccmission.0002

        add_character_modifier = {
			inherit = yes
            name = chinese_missionaries_good
            years = 10
        }
		hidden_tooltip = {
			set_variable = { which = kcc_missionary_progress value = 0.5 }
			character_event = { id = kccmission.0022 years = 10 }
		}
    }
}

letter_event = {
    id = kccmission.0003
	has_dlc = "Jade Dragon"
    desc = {
		trigger = {
			OR = {
				has_character_modifier = angered_china_modifier
				has_character_modifier = failed_invasion_of_china
				has_character_modifier = china_raid_active
				has_character_modifier = china_raid_grace_cd
			}
		}
		text = EVTDESC_kccmission.0003a
	}
	desc = {
		trigger = {
			NOR = {
				has_character_modifier = angered_china_modifier
				has_character_modifier = failed_invasion_of_china
				has_character_modifier = china_raid_active
				has_character_modifier = china_raid_grace_cd
			}
		}
		text = EVTDESC_kccmission.0003b
	}
    border = GFX_event_letter_frame_diplomacy

    is_triggered_only = yes
    
    option = { 
        name = EVTOPT_kccmission.0003a

        add_character_modifier = {
			inherit = yes
            name = chinese_missionaries_bad
            years = 10
        }
		add_offmap_currency = {
			offmap = offmap_china
			value = -100
		}
		hidden_tooltip = {
			set_variable = { which = kcc_missionary_progress value = -0.5 }
			character_event = { id = kccmission.0022 years = 10 }
		}
		
		ai_chance = {
			factor = 20
			modifier = {
				factor = 5
				trait = zealous
			}
			modifier = {
				factor = 2
				OR = {
					trait = proud
					trait = ambitious
				}
			}
		}
    }
	
	option = { 
        name = EVTOPT_kccmission.0003b
		
		piety = -100
		prestige = -100
		hidden_tooltip = { character_event = { id = kccmission.0023 years = 10 } }
		
		ai_chance = {
			factor = 28
			modifier = {
				factor = 5
				trait = cynical
			}
			modifier = {
				factor = 2
				OR = {
					trait = humble
					trait = content
				}
			}
		}
    }
}

# Missionaries encounter starving peasants
character_event = {
	id = kccmission.0004
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0004
	picture = GFX_evt_china_famine
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_starving_peasants
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 0.01
			offmap_china = { has_status = china_golden_age }
		}
		modifier = {
			factor = 100
			offmap_china = { has_status = china_famine }
		}
		modifier = {
			factor = 10
			offmap_china = {
				OR = {
					has_status = china_unrest
					has_status = china_civil_war
				}
			}
		}
		modifier = {
			factor = 0.05
			has_character_flag = kcc_starving_peasants
		}
		modifier = {
			factor = 0
			has_character_flag = kcc_starving_peasants
			NOT = { offmap_china = { has_status = china_famine } }
		}
	}

	option = { #Feed them
		name = EVTOPT_kccmission.0004a
		piety = 100
		scaled_wealth = {
		    value = -0.2
		    min = -20
		    max = -300
		}
		random_list = {
			60 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.33
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.2
					realm_stewardship = 28
				}
				modifier = {
					factor = 1.2
					realm_stewardship = 36
				}
				modifier = {
					factor = 1.1
					culture_group = chinese_group
				}
				modifier = {
					factor = 1.5
					offmap_china = { has_status = china_famine }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			40 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.25
					NOT = { religion_authority = 0.4 }
				}
				modifier = {
					factor = 2
					NOT = { realm_stewardship = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_stewardship = 16 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
		}
		if = {
			limit = {
				trait = greedy
			}
			random_list = {
				25 = { remove_trait = greedy }
				75 = { }
			}
		}
		else_if = {
			limit = {
				NOT = { trait = charitable }
			}
			random_list = {
				25 = { add_trait = charitable }
				75 = { }
			}
		}
		else = {
			random_list = {
				50 = { change_diplomacy = 1 }
				50 = { }
			}
		}
		
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0
				OR = {
					trait = administrator
					trait = gardener
					stewardship = 20
				}
			}
			modifier = {
				factor = 0.1
				NOT = {
					scaled_wealth = {
						value = 0.2
						min = 20
						max = 300
					}
				}
			}
			modifier = {
				factor = 5
				trait = charitable
			}
			modifier = {
				factor = 0.5
				trait = greedy
			}
		}
	}
	
	option = { #Demand conversion for food
		name = EVTOPT_kccmission.0004b
		piety = -100
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.33
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.2
					realm_learning = 28
				}
				modifier = {
					factor = 1.2
					realm_learning = 36
				}
				modifier = {
					factor = 3
					offmap_china = { has_status = china_famine }
				}
				scaled_wealth = {
					value = -0.2
					min = -20
					max = -300
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			50 = {
				modifier = {
					factor = 2.33
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.25
					NOT = { religion_authority = 0.4 }
				}
				modifier = {
					factor = 2
					NOT = { realm_learning = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_learning = 16 }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0
				OR = {
					trait = administrator
					trait = gardener
					stewardship = 20
				}
			}
			modifier = {
				factor = 0
				NOT = {
					scaled_wealth = {
						value = 0.2
						min = 20
						max = 300
					}
				}
			}
			modifier = {
				factor = 2
				trait = cruel
			}
			modifier = {
				factor = 0.5
				trait = kind
			}
		}
		
	}
	
	option = { #Sorry, I can't afford this
		name = EVTOPT_kccmission.0004c
		piety = -25
		prestige = -50
		hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -1 } }
		custom_tooltip = {
			character_event = { id = kccpnews.0006 }
			text = kcc_missionary_fail
		}
		
		ai_chance = {
			factor = 5
			modifier = {
				factor = 0
				OR = {
					trait = administrator
					trait = gardener
					stewardship = 20
				}
			}
		}
	}
	
	option = { #I packed extra food!
		name = EVTOPT_kccmission.0004d
		tooltip_info = stewardship
		trigger = {
			OR = {
				trait = administrator
				trait = gardener
				stewardship = 20
			}
		}
		piety = 50
		prestige = 100
		hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 5 } }
		custom_tooltip = {
			character_event = { id = kccpnews.0005 }
			text = kcc_missionary_great
		}
	}
}

# Missionaries waylaid by bandits
character_event = {
	id = kccmission.0005
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0005
	picture = GFX_evt_bandits
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
		OR = {
			NOT = { has_character_flag = kcc_chinese_bandits }
			offmap_china = { has_status = china_unrest }
			offmap_china = { has_status = china_civil_war }
		}
	}
	
	immediate = {
		set_character_flag = kcc_chinese_bandits
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 0.8
			offmap_china = { has_status = china_golden_age }
		}
		modifier = {
			factor = 10
			offmap_china = {
				OR = {
					has_status = china_unrest
					has_status = china_civil_war
				}
			}
		}
		modifier = {
			factor = 0.1
			has_character_flag = kcc_chinese_bandits
		}
	}

	option = { #Pay for safe passage
		name = EVTOPT_kccmission.0005a
		prestige = -100
		scaled_wealth = {
		    value = -0.1
			min = -30
			max = -100
		}
		random_list = {
			66 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.33
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.2
					realm_stewardship = 28
				}
				modifier = {
					factor = 1.2
					realm_stewardship = 36
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
			33 = {
				modifier = {
					factor = 2
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.25
					NOT = { religion_authority = 0.4 }
				}
				modifier = {
					factor = 2
					NOT = { realm_stewardship = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_stewardship = 16 }
				}
				modifier = {
					factor = 1.2
					offmap_china = { has_status = china_unrest }
				}
				modifier = {
					factor = 1.5
					offmap_china = { has_status = china_civil_war }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 35
			modifier = {
				factor = 0
				NOT = {
					scaled_wealth = {
						value = -0.1
						min = -30
						max = -100
					}
				}
			}
			modifier = {
				factor = 0
				trait = proud
			}
			modifier = {
				factor = 2
				stewardship = 12
			}
			modifier = {
				factor = 2
				stewardship = 16
			}
			modifier = {
				factor = 0.1
				NOT = { stewardship = 8 }
			}
		}
	}
	
	option = { #Convert bandits
		name = EVTOPT_kccmission.0005b
		random_list = {
			20 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.33
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.5
					realm_learning = 28
				}
				modifier = {
					factor = 1.5
					realm_learning = 36
				}
				modifier = {
					factor = 2
					trait = theologian
				}
				modifier = {
					factor = 1.1
					culture_group = chinese_group
				}
				change_diplomacy = 2
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			80 = {
				modifier = {
					factor = 2.25
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.25
					NOT = { religion_authority = 0.4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_learning = 16 }
				}
				scaled_wealth = {
					value = -0.1
					min = -30
					max = -100
				}
				prestige = -100
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 20
			modifier = {
				factor = 2
				trait = erudite
			}
			modifier = {
				factor = 2
				learning = 12
			}
			modifier = {
				factor = 2
				learning = 16
			}
			modifier = {
				factor = 0.1
				NOT = { learning = 8 }
			}
		}
	}
	
	option = { #You have any idea who you're dealing with?
		name = EVTOPT_kccmission.0005c
		random_list = {
			25 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_martial = 28
				}
				modifier = {
					factor = 1.5
					realm_martial = 36
				}
				modifier = {
					factor = 1.5
					prestige = 1000
				}
				modifier = {
					factor = 1.5
					prestige = 2000
				}
				modifier = {
					factor = 2
					trait = strategist
				}
				modifier = {
					factor = 2
					trait = impaler
				}
				modifier = {
					factor = 2
					OR = {
						trait = cruel
						trait = wroth
					}
				}
				prestige = 250
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			75 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { prestige = 500 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_martial = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_martial = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_martial = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_martial = 16 }
				}
				scaled_wealth = {
					value = -0.1
					min = -30
					max = -100
				}
				prestige = -250
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -3 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0007 }
					text = kcc_missionary_epic_fail
				}
			}
		}
		
		ai_chance = {
			factor = 10
			modifier = {
				factor = 2
				trait = ambitious
			}
			modifier = {
				factor = 2
				trait = proud
			}
			modifier = {
				factor = 0.5
				trait = humble
			}
			modifier = {
				factor = 2
				real_tier = emperor
			}
		}
	}
}

# Debate with Confucian Scholar
character_event = {
	id = kccmission.0006
	has_dlc = "Jade Dragon"
	picture = GFX_evt_chinese_bureaucrat
	desc = {
		trigger = { has_character_flag = kcc_genius_confucian }
		text = EVTDESC_kccmission.0006a
	}
	desc = {
		trigger = { has_character_flag = kcc_mediocre_confucian }
		text = EVTDESC_kccmission.0006b
	}
	desc = {
		trigger = {
			NOR = {
				has_character_flag = kcc_genius_confucian
				has_character_flag = kcc_mediocre_confucian
			}
		}
		text = EVTDESC_kccmission.0006c
	}
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_confucian_debate
		random_list = {
			33 = { set_character_flag = kcc_genius_confucian }
			33 = { }
			33 = { set_character_flag = kcc_mediocre_confucian }
		}
		set_character_flag = kcc_this_is_scholar_event
	}
	
	after = {
		if = {
			limit = {
				has_character_flag = kcc_genius_confucian
			}
			clr_character_flag = kcc_genius_confucian
		}
		if = {
			limit = {
				has_character_flag = kcc_mediocre_confucian
			}
			clr_character_flag = kcc_mediocre_confucian
		}
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 2
			offmap_china = { has_status = china_golden_age }
		}
		modifier = {
			factor = 0.33
			offmap_china = {
				OR = {
					has_status = china_unrest
					has_status = china_civil_war
					has_status = china_famine
				}
			}
		}
		modifier = {
			factor = 1.5
			trait = scholar
		}
		modifier = {
			factor = 0
			has_character_flag = kcc_confucian_debate
		}
	}

	option = { #Religion makes good morals
		name = EVTOPT_kccmission.0006a
		random_list = {
			40 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 0.5
					has_character_flag = kcc_genius_confucian
				}
				modifier = {
					factor = 2
					has_character_flag = kcc_mediocre_confucian
				}
				modifier = {
					factor = 1.1
					culture_group = chinese_group
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.33
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.5
					realm_learning = 28
				}
				modifier = {
					factor = 1.5
					realm_learning = 36
				}
				if = {
					limit = {
						has_character_flag = kcc_genius_confucian
					}
					set_character_flag = kcc_genius_scholar_won
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 3 } }
				}
				else_if = {
					limit = {
						has_character_flag = kcc_mediocre_confucian
					}
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				}
				else = {
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 2 } }
				}
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			40 = {
				modifier = {
					factor = 1.1
					culture_group = chinese_group
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
			20 = {
				modifier = {
					factor = 1.72
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.25
					NOT = { religion_authority = 0.4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_learning = 16 }
				}
				if = {
					limit = {
						has_character_flag = kcc_mediocre_confucian
					}
					set_character_flag = kcc_mediocre_scholar_lost
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				}
				else = {
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -1 } }
				}
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 0.1
				OR = {
					trait = fair
					trait = genius
					trait = quick
					trait = strong
					AND = {
						trait = inbred
						OR = {
							religion = zoroastrian
							religion = messalian
							religion = egyptian_pagan
							religion = egyptian_pagan_reformed
							religion = aten_pagan
							AND = {
								religion_group = pagan_group
								OR = {
									has_religion_feature = religion_holy_family
									has_religion_feature = religion_feature_zun
								}
							}
						}
					}
					AND = {
						trait = lefthanded
						any_owned_bloodline = { has_bloodline_flag = southpaw_scion }
					}
				}
			}
			modifier = {
				factor = 0.66
				NOT = { realm_learning = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_learning = 16 }
			}
			modifier = {
				factor = 0.66
				NOT = { religion_authority = 0.2 }
			}
			modifier = {
				factor = 0.66
				NOT = { religion_authority = 0.4 }
			}
			modifier = {
				factor = 2
				realm_learning = 28
			}
			modifier = {
				factor = 2
				religion_authority = 0.8
			}
			modifier = {
				factor = 1.25
				OR = {
					trait = humble
					trait = kind
				}
			}
			modifier = {
				factor = 0.75
				OR = {
					trait = proud
					trait = cruel
				}
			}
		}
	}
	
	option = { #Religion makes good rulers
		name = EVTOPT_kccmission.0006b
		random_list = {
			40 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 0.5
					has_character_flag = kcc_genius_confucian
				}
				modifier = {
					factor = 2
					has_character_flag = kcc_mediocre_confucian
				}
				modifier = {
					factor = 1.1
					culture_group = chinese_group
				}
				modifier = {
					factor = 1.2
					realm_diplomacy = 28
				}
				modifier = {
					factor = 1.2
					realm_diplomacy = 36
				}
				modifier = {
					factor = 1.2
					realm_stewardship = 28
				}
				modifier = {
					factor = 1.2
					realm_stewardship = 36
				}
				if = {
					limit = {
						has_character_flag = kcc_genius_confucian
					}
					set_character_flag = kcc_genius_scholar_won
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 3 } }
				}
				else_if = {
					limit = {
						has_character_flag = kcc_mediocre_confucian
					}
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				}
				else = {
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 2 } }
				}
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			40 = {
				modifier = {
					factor = 1.1
					culture_group = chinese_group
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
			20 = {
				modifier = {
					factor = 1.72
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_diplomacy = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_stewardship = 16 }
				}
				if = {
					limit = {
						has_character_flag = kcc_mediocre_confucian
					}
					set_character_flag = kcc_mediocre_scholar_lost
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				}
				else = {
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -1 } }
				}
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 0.1
				OR = {
					trait = fair
					trait = genius
					trait = quick
					trait = strong
					AND = {
						trait = inbred
						OR = {
							religion = zoroastrian
							religion = messalian
							religion = egyptian_pagan
							religion = egyptian_pagan_reformed
							religion = aten_pagan
							AND = {
								religion_group = pagan_group
								OR = {
									has_religion_feature = religion_holy_family
									has_religion_feature = religion_feature_zun
								}
							}
						}
					}
					AND = {
						trait = lefthanded
						any_owned_bloodline = { has_bloodline_flag = southpaw_scion }
					}
				}
			}
			modifier = {
				factor = 0.66
				NOT = { realm_diplomacy = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_diplomacy = 16 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_stewardship = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_stewardship = 16 }
			}
			modifier = {
				factor = 2
				realm_stewardship = 28
			}
			modifier = {
				factor = 2
				realm_diplomacy = 28
			}
			modifier = {
				factor = 0.75
				OR = {
					trait = humble
					trait = content
				}
			}
			modifier = {
				factor = 1.25
				OR = {
					trait = proud
					trait = ambitious
				}
			}
		}
		
	}
	
	option = { #Religion makes good families
		name = EVTOPT_kccmission.0006c
		tooltip_info_custom = kcc_good_breeding
		trigger = {
			OR = {
				trait = fair
				trait = genius
				trait = quick
				trait = strong
				AND = {
					trait = inbred
					OR = {
						religion = zoroastrian
						religion = messalian
						religion_openly_in_egyptian_subgroup_trigger = yes
						has_religion_feature = religion_holy_family
						has_religion_feature = religion_feature_zun
					}
				}
				AND = {
					trait = lefthanded
					any_owned_bloodline = { has_bloodline_flag = southpaw_scion }
				}
			}
		}
		random_list = {
			40 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 0.5
					has_character_flag = kcc_genius_confucian
				}
				modifier = {
					factor = 2
					has_character_flag = kcc_mediocre_confucian
				}
				modifier = {
					factor = 1.1
					culture_group = chinese_group
				}
				modifier = {
					factor = 1.2
					fertility = 0.6
				}
				modifier = {
					factor = 1.2
					fertility = 0.8
				}
				modifier = {
					factor = 1.2
					fertility = 1.0
				}
				modifier = {
					factor = 1.2
					fertility = 1.2
				}
				modifier = {
					factor = 1.2
					any_close_relative = { personal_opinion = { who = ROOT value = 60 } }
				}
				modifier = {
					factor = 1.2
					any_close_relative = { personal_opinion = { who = ROOT value = 80 } }
				}
				modifier = {
					factor = 1.5
					any_close_relative = { personal_opinion = { who = ROOT value = 100 } }
				}
				modifier = {
					factor = 1.2
					any_spouse = { personal_opinion = { who = ROOT value = 60 } }
				}
				modifier = {
					factor = 1.2
					any_spouse = { personal_opinion = { who = ROOT value = 80 } }
				}
				modifier = {
					factor = 1.5
					any_spouse = { personal_opinion = { who = ROOT value = 100 } }
				}
				modifier = {
					factor = 1.5
					trait = inbred
					OR = {
						religion = zoroastrian
						religion = messalian
						religion_openly_in_egyptian_subgroup_trigger = yes
						has_religion_feature = religion_holy_family
						has_religion_feature = religion_feature_zun
					}
				}
				if = {
					limit = {
						has_character_flag = kcc_genius_confucian
					}
					set_character_flag = kcc_genius_scholar_won
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 3 } }
				}
				else_if = {
					limit = {
						has_character_flag = kcc_mediocre_confucian
					}
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				}
				else = {
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 2 } }
				}
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			40 = {
				modifier = {
					factor = 1.1
					culture_group = chinese_group
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
			20 = {
				modifier = {
					factor = 1.72
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 2
					NOT = { fertility = 0.2 }
				}
				modifier = {
					factor = 2
					NOT = { fertility = 0.4 }
				}
				modifier = {
					factor = 1.25
					any_close_relative = { NOT = { personal_opinion = { who = ROOT value = -25 } } }
				}
				modifier = {
					factor = 1.1
					any_close_relative = { NOT = { personal_opinion = { who = ROOT value = 0 } } }
				}
				modifier = {
					factor = 1.1
					any_close_relative = { NOT = { personal_opinion = { who = ROOT value = 25 } } }
				}
				modifier = {
					factor = 2
					any_spouse = { NOT = { personal_opinion = { who = ROOT value = -25 } } }
				}
				modifier = {
					factor = 1.6
					any_spouse = { NOT = { personal_opinion = { who = ROOT value = 0 } } }
				}
				modifier = {
					factor = 1.2
					any_spouse = { NOT = { personal_opinion = { who = ROOT value = 25 } } }
				}
				if = {
					limit = {
						has_character_flag = kcc_mediocre_confucian
					}
					set_character_flag = kcc_mediocre_scholar_lost
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				}
				else = {
					hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -1 } }
				}
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 100
				OR = {
					trait = fair
					trait = genius
					trait = quick
					trait = strong
					AND = {
						trait = inbred
						OR = {
							religion = zoroastrian
							religion = messalian
							religion_openly_in_egyptian_subgroup_trigger = yes
							has_religion_feature = religion_holy_family
							has_religion_feature = religion_feature_zun
						}
					}
					AND = {
						trait = lefthanded
						any_owned_bloodline = { has_bloodline_flag = southpaw_scion }
					}
				}
			}
		}
	}
	
	option = { #Concede the debate
		name = EVTOPT_kccmission.0006d
		prestige = -50
		
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0.1
				OR = {
					trait = fair
					trait = genius
					trait = quick
					trait = strong
					AND = {
						trait = inbred
						OR = {
							religion = zoroastrian
							religion = messalian
							religion = egyptian_pagan
							religion = egyptian_pagan_reformed
							religion = aten_pagan
							AND = {
								religion_group = pagan_group
								OR = {
									has_religion_feature = religion_holy_family
									has_religion_feature = religion_feature_zun
								}
							}
						}
					}
					AND = {
						trait = lefthanded
						any_owned_bloodline = { has_bloodline_flag = southpaw_scion }
					}
				}
			}
		}
	}
}

# Fake a Miracle?
character_event = {
	id = kccmission.0007
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0007
	picture = GFX_evt_magic_ritual
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_faked_miracle
		random_courtier_or_vassal = {
			limit = {
				is_adult = yes
				has_minor_title = title_court_physician
				liege = { character = ROOT }
			}
			save_event_target_as = court_physician
		}
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 2
			offmap_china = {
				OR = {
					has_status = china_famine
					has_status = china_plague
				}
			}
		}
		modifier = {
			factor = 1.2
			trait = deceitful
		}
		modifier = {
			factor = 1.2
			trait = cynical
		}
		modifier = {
			factor = 3
			trait = schemer
		}
		modifier = {
			factor = 0
			has_character_flag = kcc_faked_miracle
		}
	}

	option = { #Breathe Fire!
		name = EVTOPT_kccmission.0007a
		piety = -50
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 28
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 36
				}
				modifier = {
					factor = 1.5
					realm_stewardship = 28
				}
				modifier = {
					factor = 1.5
					realm_stewardship = 36
				}
				modifier = {
					factor = 1.1
					society_rank = {
						rank >= 1
						society = hermetics
					}
				}
				modifier = {
					factor = 1.1
					society_rank = {
						rank >= 2
						society = hermetics
					}
				}
				modifier = {
					factor = 1.1
					society_rank = {
						rank >= 3
						society = hermetics
					}
				}
				modifier = {
					factor = 1.1
					society_rank = {
						rank >= 4
						society = hermetics
					}
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			50 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 0.66
					offmap_china = {
						OR = {
							has_status = china_famine
							has_status = china_plague
						}
					}
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_intrigue = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_stewardship = 16 }
				}
				piety = -100
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -3 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0007 }
					text = kcc_missionary_epic_fail
				}
			}
		}
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 0
				trait = zealous
			}
			modifier = {
				factor = 0.66
				NOT = { realm_stewardship = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_stewardship = 16 }
			}
			modifier = {
				factor = 1.25
				society_rank = {
					rank >= 1
					society = hermetics
				}
			}
			modifier = {
				factor = 1.25
				society_rank = {
					rank >= 3
					society = hermetics
				}
			}
		}
	}
	
	option = { #Speak with Animals!
		name = EVTOPT_kccmission.0007b
		piety = -50
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 28
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 36
				}
				modifier = {
					factor = 1.5
					realm_diplomacy = 28
				}
				modifier = {
					factor = 1.5
					realm_diplomacy = 36
				}
				modifier = {
					factor = 2
					OR = {
						has_character_modifier = pet_hunting_dog
						has_character_modifier = pet_rat_dungeon
						has_character_modifier = pet_cat
						has_character_modifier = pet_parrot
						has_character_modifier = pet_owl
						has_character_modifier = pet_masterless_dog
						has_character_modifier = pet_house_dog
						has_character_modifier = pet_hedgehog
						has_character_modifier = pet_otter
						has_character_modifier = panda_pet
						has_character_modifier = pet_snake
						has_character_modifier = pet_hunting_eagle
						has_character_modifier = nomad_warhorse
					}
				}
				modifier = {
					factor = 2
					OR = {
						has_character_modifier = pet_best_friends
						has_character_modifier = crazy_cat_lady
						has_character_modifier = crazy_cat_lord
					}
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			50 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 0.66
					offmap_china = {
						OR = {
							has_status = china_famine
							has_status = china_plague
						}
					}
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_intrigue = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_diplomacy = 16 }
				}
				piety = -100
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -3 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0007 }
					text = kcc_missionary_epic_fail
				}
			}
		}
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 0
				trait = zealous
			}
			modifier = {
				factor = 0.66
				NOT = { realm_diplomacy = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_diplomacy = 16 }
			}
			modifier = {
				factor = 1.5
				OR = {
					has_character_modifier = pet_hunting_dog
					has_character_modifier = pet_rat_dungeon
					has_character_modifier = pet_cat
					has_character_modifier = pet_parrot
					has_character_modifier = pet_owl
					has_character_modifier = pet_masterless_dog
					has_character_modifier = pet_house_dog
					has_character_modifier = pet_hedgehog
					has_character_modifier = pet_otter
					has_character_modifier = panda_pet
					has_character_modifier = pet_snake
					has_character_modifier = pet_hunting_eagle
					has_character_modifier = nomad_warhorse
				}
			}
			modifier = {
				factor = 1.5
				OR = {
					has_character_modifier = pet_best_friends
					has_character_modifier = crazy_cat_lady
					has_character_modifier = crazy_cat_lord
				}
			}
		}
	}
	
	option = { #Heal the Sick!
		name = EVTOPT_kccmission.0007c
		piety = -50
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 28
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 36
				}
				modifier = {
					factor = 1.5
					realm_learning = 28
				}
				modifier = {
					factor = 1.5
					realm_learning = 36
				}
				modifier = {
					factor = 3
					OR = {
						trait = physician
						event_target:court_physician = { trait = physician }
					}
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			50 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 0.66
					offmap_china = {
						OR = {
							has_status = china_famine
							has_status = china_plague
						}
					}
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_intrigue = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_learning = 16 }
				}
				piety = -100
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -3 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0007 }
					text = kcc_missionary_epic_fail
				}
			}
		}
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 0
				trait = zealous
			}
			modifier = {
				factor = 0.66
				NOT = { realm_learning = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_learning = 16 }
			}
			modifier = {
				factor = 2
				OR = {
					trait = physician
					event_target:court_physician = { trait = physician }
				}
			}
		}
	}
	
	option = { #That's Impious!
		name = EVTOPT_kccmission.0007d
		hidden_tooltip = { character_event = { id = kccpnews.0067 } }
		piety = 50
		
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0.1
				trait = cynical
			}
			modifier = {
				factor = 2
				NOT = { realm_intrigue = 8 }
			}
			modifier = {
				factor = 10
				NOT = { realm_intrigue = 16 }
			}
		}
	}
}

# Help Peasants Build Stuff
character_event = {
	id = kccmission.0008
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0008
	picture = GFX_evt_powerful_tower
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_peasant_architecture
		set_character_flag = kcc_this_is_village_event
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 0
			has_character_flag = kcc_peasant_architecture
		}
	}

	option = { #Work Normally
		name = EVTOPT_kccmission.0008a
		random_list = {
			40 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 2
					trait = diligent
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			60 = {
				modifier = {
					factor = 2
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					trait = slothful
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
		}
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 0
				OR = {
					trait = proud
					trait = ambitious
					trait = lunatic
				}
			}
			modifier = {
				factor = 5
				trait = diligent
			}
		}
	}
	
	option = { #Work to Exhaustion
		name = EVTOPT_kccmission.0008b
		custom_tooltip = {
			change_variable = { which = kcc_missionary_progress value = 3 }
			text = kcc_missionary_overwork
		}
		set_character_flag = kcc_exhausted_missionaries
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 0
				OR = {
					trait = proud
					trait = ambitious
					trait = lunatic
				}
			}
			modifier = {
				factor = 10
				trait = zealous
			}
		}
	}
	
	option = { #A Statue of Myself
		name = EVTOPT_kccmission.0008c
		tooltip_info = proud
		#trigger_if = {
		#	limit = { trait = ambitious }
		#	tooltip_info = ambitious
		#}
		#trigger_else_if = {
		#	limit = { trait = proud }
		#	tooltip_info = proud
		#}
		#trigger_else_if = {
		#	limit = { trait = lunatic }
		#	tooltip_info = lunatic
		#}
		trigger = {
			OR = {
				trait = proud
				trait = ambitious
				trait = lunatic
			}
		}
		scaled_wealth = {
		    value = -0.15
		    min = -50
		    max = -500
		}
		random_list = {
			33 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					prestige = 1000
				}
				modifier = {
					factor = 1.5
					prestige = 2000
				}
				prestige = 200
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			66 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { prestige = 500 }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -3 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0007 }
					text = kcc_missionary_epic_fail
				}
			}
		}
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 0
				trait = zealous
			}
			modifier = {
				factor = 0.66
				NOT = { realm_learning = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_learning = 16 }
			}
			modifier = {
				factor = 2
				OR = {
					trait = proud
					trait = ambitious
					trait = lunatic
				}
			}
		}
	}
}

# Grieving Parent
character_event = {
	id = kccmission.0009
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0009
	picture = GFX_evt_died_child
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_grieving_parent
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 2
			offmap_china = {
				OR = {
					has_status = china_famine
					has_status = china_plague
					has_status = china_unrest
					has_status = china_civil_war
				}
			}
		}
		modifier = {
			factor = 0
			has_character_flag = kcc_grieving_parent
		}
	}

	option = { #All Part of God's Plan
		name = EVTOPT_kccmission.0009a
		random_list = {
			25 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_diplomacy = 28
				}
				modifier = {
					factor = 1.5
					realm_diplomacy = 36
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.2
					religion_authority = 1
				}
				modifier = {
					factor = 1.5
					piety = 1000
				}
				modifier = {
					factor = 1.5
					piety = 3000
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			75 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 2
					offmap_china = {
						has_status = china_golden_age
					}
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_diplomacy = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.4 }
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 0 }
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 500 }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 25
			modifier = {
				factor = 0
				OR = {
					trait = lunatic
					trait = possessed
					trait = zealous
				}
			}
			modifier = {
				factor = 0.66
				NOT = { realm_diplomacy = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_diplomacy = 16 }
			}
			modifier = {
				factor = 2
				trait = patient
			}
		}
	}
	
	option = { #All Satan's fault
		name = EVTOPT_kccmission.0009b
		random_list = {
			25 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_learning = 28
				}
				modifier = {
					factor = 1.5
					realm_learning = 36
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.2
					religion_authority = 1
				}
				modifier = {
					factor = 1.5
					prestige = 1000
				}
				modifier = {
					factor = 1.5
					prestige = 3000
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			75 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 2
					offmap_china = {
						has_status = china_golden_age
					}
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_learning = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.4 }
				}
				modifier = {
					factor = 1.5
					NOT = { prestige = 0 }
				}
				modifier = {
					factor = 1.5
					NOT = { prestige = 500 }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 25
			modifier = {
				factor = 0
				OR = {
					trait = lunatic
					trait = possessed
					trait = zealous
				}
			}
			modifier = {
				factor = 0.66
				NOT = { realm_learning = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_learning = 16 }
			}
			modifier = {
				factor = 2
				trait = wroth
			}
		}
	}
	
	option = { #God needs your kid to fight EVIL
		name = EVTOPT_kccmission.0009c
		tooltip_info = zealous
		#trigger_if = {
		#	limit = { trait = zealous }
		#	tooltip_info = zealous
		#}
		#trigger_else_if = {
		#	limit = { trait = possessed }
		#	tooltip_info = possessed
		#}
		#trigger_else_if = {
		#	limit = { trait = lunatic }
		#	tooltip_info = lunatic
		#}
		trigger = {
			OR = {
				trait = lunatic
				trait = possessed
				trait = zealous
			}
		}
		random_list = {
			10 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_martial = 28
				}
				modifier = {
					factor = 1.5
					realm_martial = 36
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.2
					religion_authority = 1
				}
				modifier = {
					factor = 2
					trait = gregarious
				}
				modifier = {
					factor = 3
					trait = socializer
				}
				modifier = {
					factor = 4
					trait = holy_warrior
				}
				modifier = {
					factor = 5
					offmap_china = { has_status = china_unrest }
				}
				modifier = {
					factor = 10
					offmap_china = { has_status = china_civil_war }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 4 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0005 }
					text = kcc_missionary_great
				}
			}
			90 = {
				modifier = {
					factor = 11
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_martial = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_martial = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_martial = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_martial = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.4 }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -4 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0007 }
					text = kcc_missionary_epic_fail
				}
			}
		}
		
		ai_chance = {
			factor = 25
		}
	}
	
	option = { #Just keep walking
		name = EVTOPT_kccmission.0009d
		hidden_tooltip = { character_event = { id = kccpnews.0067 } }
		
		ai_chance = {
			factor = 25
			modifier = {
				factor = 0
				OR = {
					trait = lunatic
					trait = possessed
					trait = zealous
				}
			}
			modifier = {
				factor = 2
				NOT = { religion_authority = 0.2 }
			}
			modifier = {
				factor = 2
				NOT = { religion_authority = 0.4 }
			}
		}
	}
}

# Translate Holy Texts?
character_event = {
	id = kccmission.0010
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0010
	picture = GFX_evt_book_carolingian_script
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_holy_translation
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 0
			has_character_flag = kcc_holy_translation
		}
		modifier = {
			factor = 0.5
			religion = catholic
		}
		modifier = {
			factor = 0.33
			culture_group = chinese_group
		}
	}

	option = { #Give it a shot!
		name = EVTOPT_kccmission.0010a
		random_list = {
			30 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_learning = 28
				}
				modifier = {
					factor = 1.5
					realm_learning = 36
				}
				modifier = {
					factor = 3
					trait = scholar
				}
				modifier = {
					factor = 2
					trait = erudite
				}
				modifier = {
					factor = 1.5
					has_character_modifier = student_of_language
				}
				modifier = {
					factor = 2
					has_character_modifier = multilingual
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			60 = { hidden_tooltip = { character_event = { id = kccpnews.0067 } } }
			10 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_learning = 16 }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 0
				culture_group = chinese_group
			}
			modifier = {
				factor = 0.66
				NOT = { realm_learning = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_learning = 16 }
			}
			modifier = {
				factor = 2
				OR = {
					trait = erudite
					trait = scholar
				}
			}
		}
	}
	
	option = { #No, oral tradition is best
		name = EVTOPT_kccmission.0010b
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_learning = 28
				}
				modifier = {
					factor = 1.5
					realm_learning = 36
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.2
					religion_authority = 1
				}
				modifier = {
					factor = 1.5
					piety = 1000
				}
				modifier = {
					factor = 1.5
					piety = 3000
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			50 = {
				modifier = {
					factor = 1.95
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_diplomacy = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.4 }
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 0 }
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 500 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
		}
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 0
				culture_group = chinese_group
			}
			modifier = {
				factor = 0.66
				NOT = { realm_diplomacy = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_diplomacy = 16 }
			}
			modifier = {
				factor = 2
				OR = {
					trait = gregarious
					trait = socializer
				}
			}
		}
	}
	
	option = { #We're Chinese
		name = EVTOPT_kccmission.0010c
		trigger = {
			culture_group = chinese_group
		}
		hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 4 } }
		custom_tooltip = {
			character_event = { id = kccpnews.0005 }
			text = kcc_missionary_great
		}
		
		ai_chance = {
			factor = 33
		}
	}
	
	option = { #How dare you suggest we profane the holy tongue?
		name = EVTOPT_kccmission.0010d
		trigger = { NOT = { culture_group = chinese_group } }
		hidden_tooltip = { character_event = { id = kccpnews.0067 } }
		piety = 100
		
		ai_chance = {
			factor = 0
		}
	}
}

# Convert Local Administrators
character_event = {
	id = kccmission.0011
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0011
	picture = GFX_evt_chinese_bureaucrat
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_convert_admin
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 0
			has_character_flag = kcc_convert_admin
		}
	}

	option = { #Religion is good for realm!
		name = EVTOPT_kccmission.0011a
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_diplomacy = 28
				}
				modifier = {
					factor = 1.5
					realm_diplomacy = 36
				}
				modifier = {
					factor = 1.5
					realm_stewardship = 28
				}
				modifier = {
					factor = 1.5
					realm_stewardship = 36
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			50 = {
				modifier = {
					factor = 1.95
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_diplomacy = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_stewardship = 16 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
		}
		
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0.66
				NOT = { realm_diplomacy = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_diplomacy = 16 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_stewardship = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_stewardship = 16 }
			}
			modifier = {
				factor = 2
				trait = administrator
			}
		}
	}
	
	option = { #Religion is good for rulers!
		name = EVTOPT_kccmission.0011b
		random_list = {
			20 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					prestige = 1000
				}
				modifier = {
					factor = 1.5
					prestige = 3000
				}
				modifier = {
					factor = 1.2
					diplomacy = 10
				}
				modifier = {
					factor = 1.2
					diplomacy = 12
				}
				modifier = {
					factor = 1.2
					diplomacy = 14
				}
				modifier = {
					factor = 1.2
					stewardship = 10
				}
				modifier = {
					factor = 1.2
					stewardship = 12
				}
				modifier = {
					factor = 1.2
					stewardship = 14
				}
				modifier = {
					factor = 1.1
					trait = fair
				}
				modifier = {
					factor = 1.2
					trait = quick
				}
				modifier = {
					factor = 1.2
					trait = strong
				}
				modifier = {
					factor = 1.3
					trait = genius
				}
				modifier = {
					factor = 1.1
					trait = lefthanded
					any_owned_bloodline = { has_bloodline_flag = southpaw_scion }
				}
				prestige = 100
				hidden_tooltip = {
					random_list = {
						20 = { change_variable = { which = kcc_missionary_progress value = 2 } }
						10 = { change_variable = { which = kcc_missionary_progress value = 3 } }
					}
				}
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			20 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
			0 = {
				additive_modifier = {
					value = 3
					NOT = { diplomacy = 2 }
				}
				additive_modifier = {
					value = 3
					NOT = { diplomacy = 3 }
				}
				additive_modifier = {
					value = 3
					NOT = { diplomacy = 4 }
				}
				additive_modifier = {
					value = 3
					NOT = { diplomacy = 5 }
				}
				additive_modifier = {
					value = 3
					NOT = { stewardship = 2 }
				}
				additive_modifier = {
					value = 3
					NOT = { stewardship = 3 }
				}
				additive_modifier = {
					value = 3
					NOT = { stewardship = 4 }
				}
				additive_modifier = {
					value = 3
					NOT = { stewardship = 5 }
				}
				additive_modifier = {
					value = 3
					NOT = { prestige = 0 }
				}
				additive_modifier = {
					value = 3
					NOT = { prestige = 500 }
				}
				additive_modifier = {
					value = 1
					trait = clubfooted
				}
				additive_modifier = {
					value = 1
					trait = harelip
				}
				additive_modifier = {
					value = 1
					trait = lisp
				}
				additive_modifier = {
					value = 1
					trait = stutter
				}
				additive_modifier = {
					value = 3
					trait = dwarf
				}
				additive_modifier = {
					value = 3
					trait = hunchback
				}
				additive_modifier = {
					value = 3
					trait = ugly
				}
				additive_modifier = {
					value = 5
					trait = slow
				}
				additive_modifier = {
					value = 5
					trait = weak
				}
				additive_modifier = {
					value = 7
					trait = imbecile
				}
				additive_modifier = {
					value = 7
					trait = inbred
					NOR = {
						religion = zoroastrian
						religion = messalian
						religion = egyptian_pagan
						religion = egyptian_pagan_reformed
						religion = aten_pagan
						AND = {
							religion_group = pagan_group
							OR = {
								has_religion_feature = religion_holy_family
								has_religion_feature = religion_feature_zun
							}
						}
					}
				}
				prestige = -100
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0.1
				OR = {
					has_education_intrigue_trigger = yes
					has_lifestyle_intrigue_trigger = yes
					trait = deceitful
				}
			}
			modifier = {
				factor = 0.66
				NOT = { diplomacy = 3 }
			}
			modifier = {
				factor = 0.66
				NOT = { diplomacy = 5 }
			}
			modifier = {
				factor = 0.66
				NOT = { stewardship = 3 }
			}
			modifier = {
				factor = 0.66
				NOT = { stewardship = 5 }
			}
			modifier = {
				factor = 0.5
				OR = {
					trait = clubfooted
					trait = harelip
					trait = lisp
					trait = stutter
					trait = dwarf
					trait = hunchback
					trait = ugly
					trait = slow
					trait = weak
					trait = imbecile
					trait = inbred
				}
			}
			modifier = {
				factor = 3
				OR = {
					trait = proud
					trait = ambitious
				}
			}
		}
	}
	
	option = { #Religion makes good schemers...
		name = EVTOPT_kccmission.0011c
		tooltip_info = intrigue
		trigger = {
			OR = {
				has_education_intrigue_trigger = yes
				has_lifestyle_intrigue_trigger = yes
				trait = deceitful
			}
		}
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 28
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 36
				}
				modifier = {
					factor = 2
					OR = {
						trait = quick
						trait = shrewd
					}
				}
				modifier = {
					factor = 3
					trait = genius
				}
				modifier = {
					factor = 1.2
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.2
					NOT = { religion_authority = 0.4 }
				}
				modifier = {
					factor = 2
					offmap_china = { has_status = china_unrest }
				}
				modifier = {
					factor = 2
					rightful_religious_head_scope = {
						OR = {
							trait = bad_priest_zoroastrian
							trait = bad_priest_aztec
							trait = bad_priest_norse
							trait = bad_priest_tengri
							trait = bad_priest_muslim
							trait = bad_priest_christian
							trait = bad_druid
							trait = bad_dryad
						}
					}
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			50 = {
				modifier = {
					factor = 1.95
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_intrigue = 16 }
				}
				modifier = {
					factor = 2
					OR = {
						trait = dull
						trait = slow
					}
				}
				modifier = {
					factor = 3
					trait = imbecile
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.2
					religion_authority = 1
				}
				modifier = {
					factor = 2
					offmap_china = { has_status = china_golden_age }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0.66
				NOT = { realm_intrigue = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_intrigue = 16 }
			}
			modifier = {
				factor = 1.5
				NOT = { religion_authority = 0.2 }
			}
			modifier = {
				factor = 1.5
				NOT = { religion_authority = 0.4 }
			}
			modifier = {
				factor = 2
				OR = {
					trait = genius
					trait = quick
					trait = shrewd
				}
			}
		}
	}
	
	option = { #Let's Not
		name = EVTOPT_kccmission.0011d
		hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
		custom_tooltip = {
			character_event = { id = kccpnews.0006 }
			text = kcc_missionary_fail
		}
		
		ai_chance = {
			factor = 10
		}
	}
}

# Convert Local Merchants
character_event = {
	id = kccmission.0012
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0012
	picture = GFX_evt_doge_republic
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_convert_money
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 2
			religion = mazdaki
		}
		modifier = {
			factor = 0
			has_character_flag = kcc_convert_money
		}
	}

	option = { #Greed is good
		name = {
			text = EVTOPT_kccmission.0012aa
			trigger = {
				NOT = { religion = mazdaki }
			}
		}
		name = {
			text = EVTOPT_kccmission.0012ab
			trigger = {
				religion = mazdaki
			}
		}
		if = {
			limit = { religion = mazdaki }
			piety = -100
		}
		random_list = {
			60 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.25
					scaled_wealth = 0.75
				}
				modifier = {
					factor = 1.25
					scaled_wealth = 1
				}
				modifier = {
					factor = 1.25
					scaled_wealth = 1.5
				}
				modifier = {
					factor = 1.25
					scaled_wealth = 2
				}
				modifier = {
					factor = 1.5
					realm_stewardship = 28
				}
				modifier = {
					factor = 1.5
					realm_stewardship = 36
				}
				modifier = {
					factor = 2
					trait = greedy
				}
				modifier = {
					factor = 0.5
					trait = charitable
				}
				add_character_modifier = {
					name = kcc_happy_china_merchant
					years = 5
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			30 = {
				modifier = {
					factor = 1.1
					NOT = { realm_stewardship = 4 }
				}
				modifier = {
					factor = 1.1
					NOT = { realm_stewardship = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_stewardship = 16 }
				}
				modifier = {
					factor = 1.1
					NOT = { scaled_wealth = -0.25 }
				}
				modifier = {
					factor = 1.1
					NOT = { scaled_wealth = 0 }
				}
				modifier = {
					factor = 1.5
					NOT = { scaled_wealth = 0.25 }
				}
				modifier = {
					factor = 1.25
					NOT = { scaled_wealth = 0.5 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
			10 = {
				modifier = {
					factor = 2.25
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 2
					NOT = { realm_stewardship = 4 }
				}
				modifier = {
					factor = 2
					NOT = { realm_stewardship = 8 }
				}
				modifier = {
					factor = 2
					NOT = { scaled_wealth = -0.25 }
				}
				modifier = {
					factor = 2
					NOT = { scaled_wealth = 0 }
				}
				add_character_modifier = {
					inherit = yes
					name = kcc_angry_china_merchant
					years = 5
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0
				religion = mazdaki
			}
			modifier = {
				factor = 0.66
				NOT = { realm_stewardship = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_stewardship = 16 }
			}
			modifier = {
				factor = 0.8
				NOT = { scaled_wealth = 0 }
			}
			modifier = {
				factor = 0.8
				NOT = { scaled_wealth = 0.5 }
			}
			modifier = {
				factor = 5
				trait = greedy
			}
			modifier = {
				factor = 0.2
				trait = charitable
			}
		}
	}
	
	option = { #Blessed are the poor
		name = {
			text = EVTOPT_kccmission.0012ba
			trigger = {
				NOT = { religion = mazdaki }
			}
		}
		name = {
			text = EVTOPT_kccmission.0012bb
			trigger = {
				religion = mazdaki
			}
		}
		if = {
			limit = { religion = mazdaki }
			piety = 50
		}
		add_character_modifier = {
			inherit = yes
			name = kcc_angry_china_merchant
			years = 5
		}
		random_list = {
			70 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					piety = 1000
				}
				modifier = {
					factor = 1.5
					piety = 3000
				}
				modifier = {
					factor = 1.25
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.25
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.25
					religion_authority = 1
				}
				modifier = {
					factor = 2
					trait = charitable
				}
				modifier = {
					factor = 0.5
					trait = greedy
				}
				piety = 100
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 3 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			30 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 0 }
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 500 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.4 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
		}
		
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0
				religion = mazdaki
			}
			modifier = {
				factor = 1.5
				piety = 1000
			}
			modifier = {
				factor = 1.5
				piety = 3000
			}
			modifier = {
				factor = 0.2
				NOT = { religion_authority = 0.5 }
			}
			modifier = {
				factor = 0.2
				trait = greedy
			}
			modifier = {
				factor = 5
				trait = charitable
			}
		}
	}
	
	option = { #Workers of the World, Unite!
		name = EVTOPT_kccmission.0012c
		trigger = {
			religion = mazdaki
		}
		if = {
			limit = {
				offmap_china = { offmap_has_like = likes_mazdakis }
			}
			add_character_modifier = {
				inherit = yes
				name = kcc_socialist_good
				years = 10
			}
			add_offmap_currency = {
				offmap = offmap_china
				value = 50
			}
		}
		else_if = {
			limit = {
				offmap_china = { offmap_has_dislike = likes_mazdans }
			}
			add_character_modifier = {
				inherit = yes
				name = kcc_socialist_horrible
				years = 10
			}
			add_offmap_currency = {
				offmap = offmap_china
				value = -250
			}
		}
		else = {
			add_character_modifier = {
				inherit = yes
				name = kcc_socialist_bad
				years = 10
			}
			add_offmap_currency = {
				offmap = offmap_china
				value = -100
			}
		}
		piety = 100
		hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 4 } }
		custom_tooltip = {
			character_event = { id = kccpnews.0005 }
			text = kcc_missionary_great
		}
		
		ai_chance = {
			factor = 30
		}
	}
}

# Display of Piety
character_event = {
	id = kccmission.0013
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0013
	picture = GFX_evt_religious_exultation
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_pious_display
		set_character_flag = kcc_pious_missionaries
		set_character_flag = kcc_this_is_piety_event
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 1.5
			piety = 1000
		}
		modifier = {
			factor = 1.5
			piety = 3000
		}
		modifier = {
			factor = 1.5
			trait = zealous
		}
		modifier = {
			factor = 0
			has_character_flag = kcc_pious_display
		}
	}

	option = { #Fast!
		name = EVTOPT_kccmission.0013a
		piety = 50
		random_list = {
			75 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.2
					realm_learning = 28
				}
				modifier = {
					factor = 1.2
					realm_learning = 36
				}
				modifier = {
					factor = 1.5
					piety = 1000
				}
				modifier = {
					factor = 1.5
					piety = 3000
				}
				modifier = {
					factor = 1.25
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.25
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.25
					religion_authority = 1
				}
				modifier = {
					factor = 0.5
					trait = gluttonous
				}
				modifier = {
					factor = 2
					trait = temperate
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			25 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 2
					NOT = { realm_learning = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_learning = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 0 }
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 500 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.4 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
		}
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 0.33
				trait = zealous
			}
			modifier = {
				factor = 0.5
				trait = ambitious
			}
			modifier = {
				factor = 0.5
				trait = gluttonous
			}
			modifier = {
				factor = 2
				trait = temperate
			}
		}
	}
	
	option = { #Whip Themselves!
		name = EVTOPT_kccmission.0013b
		piety = 100
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.2
					realm_learning = 28
				}
				modifier = {
					factor = 1.2
					realm_learning = 36
				}
				modifier = {
					factor = 1.5
					piety = 1000
				}
				modifier = {
					factor = 1.5
					piety = 3000
				}
				modifier = {
					factor = 1.25
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.25
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.25
					religion_authority = 1
				}
				modifier = {
					factor = 2
					trait = hedonist
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			50 = {
				modifier = {
					factor = 2
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 2
					NOT = { realm_learning = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_learning = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 0 }
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 500 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.4 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
		}
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 0.33
				trait = zealous
			}
			modifier = {
				factor = 2
				trait = hedonist
			}
		}
	}
	
	option = { #Immolate themself
		name = EVTOPT_kccmission.0013c
		tooltip_info_custom = kcc_known_as_holy
		trigger = {
			OR = {
				AND = {
					piety = 1000
					NOT = { trait = cynical }
				}
				trait = zealous
			}
		}
		piety = 150
		random_list = {
			25 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.2
					realm_learning = 28
				}
				modifier = {
					factor = 1.2
					realm_learning = 36
				}
				modifier = {
					factor = 1.5
					piety = 1000
				}
				modifier = {
					factor = 1.5
					piety = 3000
				}
				modifier = {
					factor = 1.25
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.25
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.25
					religion_authority = 1
				}
				modifier = {
					factor = 2
					trait = zealous
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 3 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			75 = {
				modifier = {
					factor = 3
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 2
					NOT = { realm_learning = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_learning = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 0 }
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 500 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.4 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
		}
		
		ai_chance = {
			factor = 33
			modifier = {
				factor = 5
				trait = zealous
			}
			modifier = {
				factor = 2
				trait = ambitious
			}
		}
	}
}

# Scapegoated!
character_event = {
	id = kccmission.0014
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0014
	picture = GFX_evt_shadowy_cabal
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_scapegoat
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 0
			has_character_flag = kcc_scapegoat
		}
	}

	option = { #Complain to local authorities
		name = EVTOPT_kccmission.0014a
		random_list = {
			70 = {
				trigger = { has_character_modifier = chinese_missionaries_good }
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 600 }
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 700 }
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 800 }
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 900 }
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 1000 }
				}
				modifier = {
					factor = 1.33
					has_offmap_currency = { offmap = offmap_china value = 1500 }
				}
				modifier = {
					factor = 1.33
					has_offmap_currency = { offmap = offmap_china value = 2000 }
				}
				modifier = {
					factor = 1.5
					prestige = 1000
				}
				modifier = {
					factor = 1.5
					prestige = 2000
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
			30 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 3
					NOT = { has_offmap_currency = { offmap = offmap_china value = 1 } }
				}
				modifier = {
					factor = 2
					NOT = { has_offmap_currency = { offmap = offmap_china value = 100 } }
				}
				modifier = {
					factor = 1.5
					NOT = { has_offmap_currency = { offmap = offmap_china value = 200 } }
				}
				modifier = {
					factor = 1.5
					NOT = { has_offmap_currency = { offmap = offmap_china value = 300 } }
				}
				modifier = {
					factor = 1.25
					NOT = { has_offmap_currency = { offmap = offmap_china value = 400 } }
				}
				modifier = {
					factor = 1.25
					NOT = { has_offmap_currency = { offmap = offmap_china value = 500 } }
				}
				modifier = {
					factor = 1.5
					NOT = { prestige = 0 }
				}
				modifier = {
					factor = 1.5
					NOT = { prestige = 500 }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		if = {
			limit = {
				trait = arbitrary
			}
			random_list = {
				50 = { remove_trait = arbitrary }
				50 = { }
			}
		}
		else_if = {
			limit = {
				NOT = { trait = just }
			}
			random_list = {
				50 = { add_trait = just }
				50 = { }
			}
		}
		else = {
			random_list = {
				50 = { change_diplomacy = 1 }
				50 = { }
			}
		}
		
		ai_chance = {
			factor = 20
			modifier = {
				factor = 2
				trait = just
			}
			modifier = {
				factor = 0.5
				trait = arbitrary
			}
			modifier = {
				factor = 0.5
				OR = {
					trait = cynical
					trait = paranoid
					trait = deceitful
					trait = schemer
				}
			}
			modifier = {
				factor = 0
				has_character_modifier = chinese_missionaries_bad
			}
		}
	}
	
	option = { #Prove wrong with good deeds
		name = EVTOPT_kccmission.0014b
		random_list = {
			20 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.2
					realm_diplomacy = 28
				}
				modifier = {
					factor = 1.2
					realm_diplomacy = 36
				}
				modifier = {
					factor = 1.33
					trait = diligent
				}
				modifier = {
					factor = 1.33
					trait = patient
				}
				modifier = {
					factor = 0.66
					trait = slothful
				}
				modifier = {
					factor = 0.66
					trait = wroth
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			30 = { hidden_tooltip = { character_event = { id = kccpnews.0067 } } }
			50 = {
				modifier = {
					factor = 2.25
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_diplomacy = 16 }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 20
			modifier = {
				factor = 2
				trait = diligent
			}
			modifier = {
				factor = 2
				trait = patient
			}
			modifier = {
				factor = 0.5
				trait = slothful
			}
			modifier = {
				factor = 0.5
				trait = wroth
			}
			modifier = {
				factor = 0.5
				OR = {
					trait = cynical
					trait = paranoid
					trait = deceitful
					trait = schemer
				}
			}
		}
	}
	
	option = { #Frame local Clergy
		name = EVTOPT_kccmission.0014c
		tooltip_info = intrigue
		trigger = {
			realm_intrigue = 28
		}
		piety = -75
		random_list = {
			33 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.33
					realm_intrigue = 28
				}
				modifier = {
					factor = 1.33
					realm_intrigue = 32
				}
				modifier = {
					factor = 1.33
					realm_intrigue = 36
				}
				modifier = {
					factor = 1.5
					offmap_china = { offmap_ruler = { NOT = { religion_authority = 0.2 } } }
				}
				modifier = {
					factor = 1.5
					offmap_china = { offmap_ruler = { NOT = { religion_authority = 0.4 } } }
				}
				modifier = {
					factor = 1.25
					trait = cynical
				}
				modifier = {
					factor = 1.25
					trait = paranoid
				}
				modifier = {
					factor = 1.25
					trait = deceitful
				}
				modifier = {
					factor = 1.25
					trait = schemer
				}
				add_offmap_currency = {
					offmap = offmap_china
					value = 100
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 3 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			66 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.25
					offmap_china = { offmap_ruler = { religion_authority = 0.6 } }
				}
				modifier = {
					factor = 1.25
					offmap_china = { offmap_ruler = { religion_authority = 0.8 } }
				}
				modifier = {
					factor = 1.25
					offmap_china = { offmap_ruler = { religion_authority = 1 } }
				}
				modifier = {
					factor = 1.33
					trait = trusting
				}
				modifier = {
					factor = 1.33
					trait = honest
				}
				add_offmap_currency = {
					offmap = offmap_china
					value = -100
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -3 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0007 }
					text = kcc_missionary_epic_fail
				}
			}
		}
		
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				trait = cynical
			}
			modifier = {
				factor = 2
				trait = paranoid
			}
			modifier = {
				factor = 2
				trait = deceitful
			}
			modifier = {
				factor = 2
				trait = schemer
			}
			modifier = {
				factor = 0.5
				trait = trusting
			}
			modifier = {
				factor = 0.5
				trait = honest
			}
		}
	}
}

# Imperial Examination?
character_event = {
	id = kccmission.0015
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0015
	picture = GFX_evt_monk
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_imperial_examination
		set_character_flag = kcc_this_is_examination_event
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 0
			has_character_flag = kcc_imperial_examination
		}
		modifier = {
			factor = 0
			OR = {
				offmap_china = { has_status = china_civil_war }
				offmap_china = { has_status = china_mongol_invasion }
				offmap_china = { has_status = china_jurchen_invasion }
				AND = {
					offmap_china = { has_status = china_stable }
					any_playable_ruler = { has_character_modifier = war_with_china_modifier }
				}
			}
		}
	}

	option = { #Do your best
		name = EVTOPT_kccmission.0015a
		random_list = {
			33 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_learning = 28
				}
				modifier = {
					factor = 1.5
					realm_learning = 36
				}
				modifier = {
					factor = 1.5
					realm_stewardship = 28
				}
				modifier = {
					factor = 1.5
					realm_stewardship = 36
				}
				modifier = {
					factor = 1.5
					culture_group = chinese_group
				}
				prestige = 500
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 5 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0005 }
					text = kcc_missionary_great
				}
			}
			66 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 2
					NOT = { realm_stewardship = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_stewardship = 16 }
				}
				modifier = {
					factor = 2
					NOT = { realm_learning = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_learning = 16 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
				set_character_flag = kcc_missionary_bombed_exam
			}
		}
		
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0
				OR = {
					trait = administrator
					trait = scholar
				}
			}
			modifier = {
				factor = 0.66
				NOT = { realm_stewardship = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_stewardship = 16 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_learning = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_learning = 16 }
			}
			modifier = {
				factor = 2
				trait = ambitious
			}
			modifier = {
				factor = 2
				culture_group = chinese_group
			}
		}
	}
	
	option = { #Cheat
		name = EVTOPT_kccmission.0015b
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 28
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 32
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 36
				}
				modifier = {
					factor = 1.5
					culture_group = chinese_group
				}
				prestige = 400
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 4 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0005 }
					text = kcc_missionary_great
				}
			}
			50 = {
				modifier = {
					factor = 2.25
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_intrigue = 16 }
				}
				prestige = -250
				add_offmap_currency = {
					offmap = offmap_china
					value = -100
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -4 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0007 }
					text = kcc_missionary_epic_fail
				}
			}
		}
		
		ai_chance = {
			factor = 45
			modifier = {
				factor = 0
				OR = {
					trait = administrator
					trait = scholar
				}
			}
			modifier = {
				factor = 0.66
				NOT = { realm_intrigue = 8 }
			}
			modifier = {
				factor = 0.66
				NOT = { realm_intrigue = 16 }
			}
			modifier = {
				factor = 2
				OR = {
					trait = deceitful
					trait = schemer
				}
			}
			modifier = {
				factor = 1.33
				culture_group = chinese_group
			}
		}
	}
	
	option = { #They're actually qualified for this
		name = EVTOPT_kccmission.0015c
		tooltip_info = administrator
		#trigger_if = {
		#	limit = { trait = administrator }
		#	tooltip_info = administrator
		#}
		#trigger_else_if = {
		#	limit = { trait = scholar }
		#	tooltip_info = scholar
		#}
		trigger = {
			OR = {
				trait = administrator
				trait = scholar
			}
		}
		prestige = 500
		hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 5 } }
		custom_tooltip = {
			character_event = { id = kccpnews.0005 }
			text = kcc_missionary_great
		}
	}
	
	option = { #Let's not
		name = EVTOPT_kccmission.0015d
		
		ai_chance = {
			factor = 15
			modifier = {
				factor = 0
				OR = {
					trait = administrator
					trait = scholar
				}
			}
		}
	}
}

# Drunken Brawl
character_event = {
	id = kccmission.0016
	has_dlc = "Jade Dragon"
	desc = {
		trigger = {
			OR = {
				trait = decadent
				NOT = { religion_group = muslim }
			}
		}
		text = EVTDESC_kccmission.0016a
	}
	desc = {
		trigger = {
			NOT = { trait = decadent }
			religion_group = muslim
		}
		text = EVTDESC_kccmission.0016b
	}
	picture = GFX_evt_outside_tavern_hf
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_drunken_brawl
		set_character_flag = kcc_this_is_drunk_event
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 0
			has_character_flag = kcc_drunken_brawl
		}
	}

	option = { #Good thing they can fight
		name = EVTOPT_kccmission.0016a
		piety = -50
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.2
					combat_rating = 30
				}
				modifier = {
					factor = 1.2
					combat_rating = 40
				}
				modifier = {
					factor = 1.2
					combat_rating = 50
				}
				modifier = {
					factor = 1.2
					combat_rating = 60
				}
				modifier = {
					factor = 1.2
					combat_rating = 70
				}
				modifier = {
					factor = 1.2
					combat_rating = 80
				}
				modifier = {
					factor = 1.2
					combat_rating = 90
				}
				modifier = {
					factor = 1.2
					combat_rating = 100
				}
				modifier = {
					factor = 1.5
					OR = {
						trait = misguided_warrior
						trait = tough_soldier
					}
				}
				modifier = {
					factor = 2
					OR = {
						trait = skilled_tactician
						trait = brilliant_strategist
					}
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
			50 = {
				modifier = {
					factor = 2
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.2
					NOT = { combat_rating = -20 }
				}
				modifier = {
					factor = 1.2
					NOT = { combat_rating = -10 }
				}
				modifier = {
					factor = 1.2
					NOT = { combat_rating = 0 }
				}
				modifier = {
					factor = 1.2
					NOT = { combat_rating = 10 }
				}
				modifier = {
					factor = 1.2
					NOT = { combat_rating = 20 }
				}
				prestige = -50
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 25
			modifier = {
				factor = 0.33
				NOT = { martial = 2 }
			}
			modifier = {
				factor = 0.33
				NOT = { martial = 3 }
			}
			modifier = {
				factor = 0.5
				NOT = { martial = 4 }
			}
			modifier = {
				factor = 0.66
				NOT = { martial = 5 }
			}
			modifier = {
				factor = 0.66
				NOT = { martial = 6 }
			}
			modifier = {
				factor = 2
				trait = wroth
			}
			modifier = {
				factor = 5
				trait = duelist
			}
		}
	}
	
	option = { #Good thing they can fight dirty
		name = EVTOPT_kccmission.0016b
		piety = -50
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 28
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 32
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 36
				}
				modifier = {
					factor = 1.5
					OR = {
						trait = quick
						trait = shrewd
					}
				}
				modifier = {
					factor = 2
					trait = genius
				}
				modifier = {
					factor = 1.5
					OR = {
						trait = amateurish_plotter
						trait = flamboyant_schemer
					}
				}
				modifier = {
					factor = 2
					OR = {
						trait = intricate_webweaver
						trait = elusive_shadow
					}
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
			50 = {
				modifier = {
					factor = 2
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_intrigue = 16 }
				}
				modifier = {
					factor = 1.5
					OR = {
						trait = slow
						trait = dull
					}
				}
				modifier = {
					factor = 2
					trait = imbecile
				}
				prestige = -50
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 25
			modifier = {
				factor = 0.33
				NOT = { intrigue = 2 }
			}
			modifier = {
				factor = 0.33
				NOT = { intrigue = 3 }
			}
			modifier = {
				factor = 0.5
				NOT = { intrigue = 4 }
			}
			modifier = {
				factor = 0.66
				NOT = { intrigue = 5 }
			}
			modifier = {
				factor = 0.66
				NOT = { intrigue = 6 }
			}
			modifier = {
				factor = 2
				trait = deceitful
			}
			modifier = {
				factor = 5
				trait = schemer
			}
		}
	}
	
	option = { #Good thing I hired nice guards
		name = EVTOPT_kccmission.0016c
		random_list = {
			33 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_stewardship = 28
				}
				modifier = {
					factor = 1.5
					realm_stewardship = 36
				}
				modifier = {
					factor = 1.5
					prestige = 1000
				}
				modifier = {
					factor = 1.5
					prestige = 2000
				}
				modifier = {
					factor = 1.5
					OR = {
						trait = indulgent_wastrel
						trait = thrifty_clerk
					}
				}
				modifier = {
					factor = 2
					OR = {
						trait = fortune_builder
						trait = midas_touched
					}
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			66 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_stewardship = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_stewardship = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { prestige = 0 }
				}
				modifier = {
					factor = 1.5
					NOT = { prestige = 500 }
				}
				add_offmap_currency = {
					offmap = offmap_china
					value = -100
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 25
			modifier = {
				factor = 0.33
				NOT = { stewardship = 2 }
			}
			modifier = {
				factor = 0.33
				NOT = { stewardship = 3 }
			}
			modifier = {
				factor = 0.5
				NOT = { stewardship = 4 }
			}
			modifier = {
				factor = 0.66
				NOT = { stewardship = 5 }
			}
			modifier = {
				factor = 0.66
				NOT = { stewardship = 6 }
			}
			modifier = {
				factor = 2
				trait = greedy
			}
		}
	}
	
	option = { #Good thing they turned the other cheek
		name = {
			text = EVTOPT_kccmission.0016da
			trigger = {
				OR = {
					trait = decadent
					NOT = { religion_group = muslim }
				}
			}
		}
		name = {
			text = EVTOPT_kccmission.0016db
			trigger = {
				NOT = { trait = decadent }
				religion_group = muslim
			}
		}
		piety = 50
		set_character_flag = kcc_missionaries_other_cheek
		hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 2 } }
		custom_tooltip = {
			character_event = { id = kccpnews.0004 }
			text = kcc_missionary_good
		}
		
		ai_chance = {
			factor = 25
			modifier = {
				factor = 3
				trait = humble
			}
			modifier = {
				factor = 3
				trait = content
			}modifier = {
				factor = 3
				trait = kind
			}
		}
	}
}

# Sinful Locals
character_event = {
	id = kccmission.0017
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0017
	picture = GFX_evt_heretic
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_sinful_locals
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 0
			has_character_flag = kcc_sinful_locals
		}
	}

	option = { #What he actually meant was...
		name = EVTOPT_kccmission.0017a
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.25
					realm_diplomacy = 28
				}
				modifier = {
					factor = 1.25
					realm_diplomacy = 36
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 600 }
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 700 }
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 800 }
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 900 }
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 1000 }
				}
				modifier = {
					factor = 1.33
					has_offmap_currency = { offmap = offmap_china value = 1500 }
				}
				modifier = {
					factor = 1.33
					has_offmap_currency = { offmap = offmap_china value = 2000 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
			50 = {
				modifier = {
					factor = 2
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_diplomacy = 16 }
				}
				modifier = {
					factor = 3
					NOT = { has_offmap_currency = { offmap = offmap_china value = 1 } }
				}
				modifier = {
					factor = 2
					NOT = { has_offmap_currency = { offmap = offmap_china value = 100 } }
				}
				modifier = {
					factor = 1.5
					NOT = { has_offmap_currency = { offmap = offmap_china value = 200 } }
				}
				modifier = {
					factor = 1.5
					NOT = { has_offmap_currency = { offmap = offmap_china value = 300 } }
				}
				modifier = {
					factor = 1.25
					NOT = { has_offmap_currency = { offmap = offmap_china value = 400 } }
				}
				modifier = {
					factor = 1.25
					NOT = { has_offmap_currency = { offmap = offmap_china value = 500 } }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0
				is_dumb_trigger = no
			}
			modifier = {
				factor = 2
				realm_diplomacy = 28
			}
			modifier = {
				factor = 2
				has_offmap_currency = { offmap = offmap_china value = 600 }
			}
			modifier = {
				factor = 2
				OR = {
					trait = honest
					trait = gregarious
				}
			}
		}
	}
	
	option = { #This is all a conspiracy against us!
		name = EVTOPT_kccmission.0017b
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 28
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 36
				}
				modifier = {
					factor = 1.5
					prestige = 1000
				}
				modifier = {
					factor = 1.5
					prestige = 2000
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
			50 = {
				modifier = {
					factor = 2
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_intrigue = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { prestige = 0 }
				}
				modifier = {
					factor = 1.5
					NOT = { prestige = 500 }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0
				is_dumb_trigger = no
			}
			modifier = {
				factor = 2
				realm_intrigue = 28
			}
			modifier = {
				factor = 2
				prestige = 1000
			}
			modifier = {
				factor = 2
				OR = {
					trait = proud
					trait = ambitious
				}
			}
		}
	}
	
	option = { #What is sin, really?
		name = EVTOPT_kccmission.0017c
		random_list = {
			33 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.33
					realm_diplomacy = 28
				}
				modifier = {
					factor = 1.33
					realm_diplomacy = 36
				}
				modifier = {
					factor = 1.33
					realm_intrigue = 28
				}
				modifier = {
					factor = 1.33
					realm_intrigue = 36
				}
				add_character_modifier = {
					name = kcc_sneaky_missionaries
					years = 3
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			66 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_diplomacy = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_intrigue = 16 }
				}
				prestige = -100
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -3 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0007 }
					text = kcc_missionary_epic_fail
				}
			}
		}
		
		ai_chance = {
			factor = 20
			modifier = {
				factor = 0
				is_dumb_trigger = no
			}
			modifier = {
				factor = 2
				realm_diplomacy = 28
			}
			modifier = {
				factor = 2
				realm_intrigue = 28
			}
			modifier = {
				factor = 2
				OR = {
					trait = deceitful
					trait = schemer
				}
			}
		}
	}
	
	option = { #But they *were* sinning!
		name = EVTOPT_kccmission.0017d
		tooltip_info_custom = available_because_dumb
		trigger = {
			is_dumb_trigger = yes
		}
		piety = 150
		add_character_modifier = {
			name = kcc_honest_missionaries
			years = 3
		}
		hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
		custom_tooltip = {
			character_event = { id = kccpnews.0006 }
			text = kcc_missionary_fail
		}
		
		ai_chance = {
			factor = 20
		}
	}
}

# Military patrol, mingle with soldiers
character_event = {
	id = kccmission.0018
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0018
	picture = GFX_evt_teaching_moment
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_mingled_soldiers
		set_character_flag = kcc_this_is_soldier_event
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 1.5
			offmap_china = { has_status = china_unrest }
		}
		modifier = {
			factor = 3
			OR = {
				offmap_china = { has_status = china_civil_war }
				offmap_china = { has_status = china_mongol_invasion }
				offmap_china = { has_status = china_jurchen_invasion }
				AND = {
					offmap_china = { has_status = china_stable }
					any_playable_ruler = { has_character_modifier = war_with_china_modifier }
				}
			}
		}
		modifier = {
			factor = 0
			has_character_flag = kcc_mingled_soldiers
		}
	}

	option = { #You must show bravery in battle!
		name = EVTOPT_kccmission.0018a
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.5
					realm_martial = 28
				}
				modifier = {
					factor = 1.5
					realm_martial = 36
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.2
					religion_authority = 1
				}
				modifier = {
					factor = 1.25
					trait = brave
				}
				modifier = {
					factor = 1.25
					trait = zealous
				}
				modifier = {
					factor = 0.75
					trait = craven
				}
				modifier = {
					factor = 0.75
					trait = cynical
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			50 = {
				modifier = {
					factor = 2
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.5
					NOT = { realm_martial = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_martial = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_martial = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_martial = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.4 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
		}
		
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2
				realm_martial = 28
			}
			modifier = {
				factor = 2
				OR = {
					trait = brave
					trait = zealous
				}
			}
			modifier = {
				factor = 2
				OR = {
					trait = craven
					trait = cynical
				}
			}
		}
	}
	
	option = { #Pacifism is best
		name = EVTOPT_kccmission.0018b
		random_list = {
			25 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 3
					offmap_china = { has_status = china_unrest }
				}
				modifier = {
					factor = 9
					OR = {
						offmap_china = { has_status = china_civil_war }
						offmap_china = { has_status = china_mongol_invasion }
						offmap_china = { has_status = china_jurchen_invasion }
						AND = {
							offmap_china = { has_status = china_stable }
							any_playable_ruler = { has_character_modifier = war_with_china_modifier }
						}
					}
				}
				modifier = {
					factor = 1.5
					piety = 1000
				}
				modifier = {
					factor = 1.5
					piety = 3000
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.2
					religion_authority = 1
				}
				modifier = {
					factor = 1.25
					trait = kind
				}
				modifier = {
					factor = 1.25
					trait = content
				}
				modifier = {
					factor = 1.25
					trait = humble
				}
				modifier = {
					factor = 0.75
					trait = cruel
				}
				modifier = {
					factor = 0.75
					trait = ambitious
				}
				modifier = {
					factor = 0.75
					trait = proud
				}
				set_character_flag = kcc_pacifist_soldiers
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			75 = {
				modifier = {
					factor = 3
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 0 }
				}
				modifier = {
					factor = 1.5
					NOT = { piety = 500 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.4 }
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -2 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2
				piety = 1000
			}
			modifier = {
				factor = 0.2
				OR = {
					trait = cruel
					trait = proud
					trait = ambitious
				}
			}
			modifier = {
				factor = 5
				OR = {
					trait = kind
					trait = humble
					trait = content
				}
			}
		}
	}
	
	option = { #God will grant you invincibility!
		name = EVTOPT_kccmission.0018c
		tooltip_info = intrigue
		#trigger_if = {
		#	limit = {
		#		trait = deceitful
		#		has_crusade_trait_trigger = yes
		#	}
		#	tooltip_info = intrigue
		#	#tooltip_info_custom = kcc_lying_crusader
		#}
		#trigger_else_if = {
		#	limit = { trait = possessed }
		#	tooltip_info = possessed
		#}
		#trigger_else_if = {
		#	limit = { trait = lunatic }
		#	tooltip_info = lunatic
		#}
		trigger = {
			OR = {
				trait = lunatic
				trait = possessed
				AND = {
					trait = deceitful
					has_crusade_trait_trigger = yes
				}
			}
		}
		random_list = {
			33 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.33
					realm_learning = 28
				}
				modifier = {
					factor = 1.33
					realm_learning = 36
				}
				modifier = {
					factor = 1.2
					combat_rating = 30
				}
				modifier = {
					factor = 1.2
					combat_rating = 40
				}
				modifier = {
					factor = 1.2
					combat_rating = 50
				}
				modifier = {
					factor = 1.2
					combat_rating = 60
				}
				modifier = {
					factor = 1.2
					combat_rating = 70
				}
				modifier = {
					factor = 1.2
					combat_rating = 80
				}
				modifier = {
					factor = 1.2
					combat_rating = 90
				}
				modifier = {
					factor = 1.2
					combat_rating = 100
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 4 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0005 }
					text = kcc_missionary_great
				}
			}
			66 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_intrigue = 16 }
				}
				modifier = {
					factor = 1.2
					NOT = { combat_rating = -20 }
				}
				modifier = {
					factor = 1.2
					NOT = { combat_rating = -10 }
				}
				modifier = {
					factor = 1.2
					NOT = { combat_rating = 0 }
				}
				modifier = {
					factor = 1.2
					NOT = { combat_rating = 10 }
				}
				modifier = {
					factor = 1.2
					NOT = { combat_rating = 20 }
				}
				add_offmap_currency = {
					offmap = offmap_china
					value = -100
				}
				set_character_flag = kcc_not_invincible
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -3 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0007 }
					text = kcc_missionary_epic_fail
				}
			}
		}
		
		ai_chance = {
			factor = 60
			modifier = {
				factor = 2
				combat_rating = 50
			}
			modifier = {
				factor = 2
				realm_intrigue = 28
			}
			modifier = {
				factor = 2
				trait = schemer
			}
		}
	}
	
	option = { #Let's not
		name = EVTOPT_kccmission.0018d
		hidden_tooltip = { character_event = { id = kccpnews.0067 } }
		
		ai_chance = {
			factor = 20
			modifier = {
				factor = 1.5
				NOT = { religion_authority = 0.2 }
			}
			modifier = {
				factor = 1.5
				NOT = { religion_authority = 0.4 }
			}
		}
	}
}

# Military patrol, meet with officer
character_event = {
	id = kccmission.0019
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0019
	picture = GFX_evt_china_rebel_general
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_officer_meeting
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 1.25
			offmap_china = { has_status = china_unrest }
		}
		modifier = {
			factor = 2.5
			OR = {
				offmap_china = { has_status = china_civil_war }
				offmap_china = { has_status = china_mongol_invasion }
				offmap_china = { has_status = china_jurchen_invasion }
				AND = {
					offmap_china = { has_status = china_stable }
					any_playable_ruler = { has_character_modifier = war_with_china_modifier }
				}
			}
		}
		modifier = {
			factor = 0
			has_character_flag = kcc_officer_meeting
		}
	}

	option = { #Religious principles makes good commanders
		name = EVTOPT_kccmission.0019a
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.2
					martial = 10
				}
				modifier = {
					factor = 1.2
					martial = 12
				}
				modifier = {
					factor = 1.2
					martial = 14
				}
				modifier = {
					factor = 1.5
					realm_learning = 28
				}
				modifier = {
					factor = 1.5
					realm_learning = 36
				}
				modifier = {
					factor = 1.1
					trait = aggressive_leader
				}
				modifier = {
					factor = 1.1
					trait = narrow_flank_leader
				}
				modifier = {
					factor = 1.1
					trait = defensive_leader
				}
				modifier = {
					factor = 1.1
					trait = experimenter
				}
				modifier = {
					factor = 1.1
					trait = flanker
				}
				modifier = {
					factor = 1.1
					trait = holy_warrior
				}
				modifier = {
					factor = 1.1
					trait = inspiring_leader
				}
				modifier = {
					factor = 1.1
					trait = organizer
				}
				modifier = {
					factor = 1.1
					trait = siege_leader
				}
				modifier = {
					factor = 1.1
					trait = trickster
				}
				modifier = {
					factor = 1.1
					trait = unyielding_leader
				}
				modifier = {
					factor = 1.1
					trait = winter_soldier
				}
				modifier = {
					factor = 1.1
					trait = cavalry_leader
				}
				modifier = {
					factor = 1.1
					trait = heavy_infantry_leader
				}
				modifier = {
					factor = 1.1
					trait = light_foot_leader
				}
				modifier = {
					factor = 1.1
					trait = war_elephant_leader
				}
				modifier = {
					factor = 1.1
					trait =	desert_terrain_leader
				}
				modifier = {
					factor = 1.1
					trait = flat_terrain_leader
				}
				modifier = {
					factor = 1.1
					trait = jungle_terrain_leader
				}
				modifier = {
					factor = 1.1
					trait = mountain_terrain_leader
				}
				modifier = {
					factor = 1.1
					trait = rough_terrain_leader
				}
				modifier = {
					factor = 1.2
					OR = {
						trait = norse_leader
						trait = tengri_leader
						trait = baltic_leader
						trait = finnish_leader
						trait = slavic_leader
						trait = west_african_leader
						trait = zun_leader
						trait = bon_leader
						trait = hellenic_leader
						trait = celtic_leader
						trait = britannic_leader
						trait = egyptian_leader
						trait = titan_leader
					}
				}
				modifier = {
					factor = 1.33
					trait = logistics_expert
				}
				modifier = {
					factor = 1.33
					trait = master_of_flame
				}
				modifier = {
					factor = 1.33
					trait = sapper
				}
				modifier = {
					factor = 1.33
					trait = levy_coordinator
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			50 = {
				modifier = {
					factor = 2
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { martial = 2 }
				}
				modifier = {
					factor = 1.5
					NOT = { martial = 3 }
				}
				modifier = {
					factor = 1.5
					NOT = { martial = 4 }
				}
				modifier = {
					factor = 1.25
					NOT = { martial = 5 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_learning = 16 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
		}
		
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0
				trait = strategist
			}
			modifier = {
				factor = 2
				realm_learning = 28
			}
			modifier = {
				factor = 1.1
				martial = 10
			}
			modifier = {
				factor = 1.1
				martial = 14
			}
			modifier = {
				factor = 1.25
				OR = {
					trait = aggressive_leader
					trait = narrow_flank_leader
					trait = defensive_leader
					trait = experimenter
					trait = flanker
					trait = holy_warrior
					trait = inspiring_leader
					trait = organizer
					trait = siege_leader
					trait = trickster
					trait = unyielding_leader
					trait = winter_soldier
					trait = cavalry_leader
					trait = heavy_infantry_leader
					trait = light_foot_leader
					trait = war_elephant_leader
					trait =	desert_terrain_leader
					trait = flat_terrain_leader
					trait = jungle_terrain_leader
					trait = mountain_terrain_leader
					trait = rough_terrain_leader
				}
			}
			modifier = {
				factor = 1.5
				OR = {
					trait = norse_leader
					trait = tengri_leader
					trait = baltic_leader
					trait = finnish_leader
					trait = slavic_leader
					trait = west_african_leader
					trait = zun_leader
					trait = bon_leader
					trait = hellenic_leader
					trait = celtic_leader
					trait = britannic_leader
					trait = egyptian_leader
					trait = titan_leader
				}
			}
			modifier = {
				factor = 2
				OR = {
					trait = logistics_expert
					trait = master_of_flame
					trait = sapper
					trait = levy_coordinator
				}
			}
		}
	}
	
	option = { #A vision!  You will be a holy warrior!
		name = EVTOPT_kccmission.0019b
		random_list = {
			33 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 28
				}
				modifier = {
					factor = 1.5
					realm_intrigue = 36
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.2
					religion_authority = 1
				}
				modifier = {
					factor = 1.33
					trait = mystic
				}
				modifier = {
					factor = 1.1
					OR = {
						has_character_modifier = good_battle_omen
						has_character_modifier = good_relationship_omen
						has_character_modifier = good_power_omen
					}
				}
				modifier = {
					factor = 0.9
					OR = {
						has_character_modifier = bad_battle_omen
						has_character_modifier = bad_relationship_omen
						has_character_modifier = bad_power_omen
					}
				}
				modifier = {
					factor = 1.33
					has_character_modifier = fulfilled_vision_great
				}
				modifier = {
					factor = 1.2
					has_character_modifier = fulfilled_vision_ok
				}
				modifier = {
					factor = 0.8
					has_character_modifier = fulfilled_vision_bad
				}
				modifier = {
					factor = 0.66
					has_character_modifier = fulfilled_vision_worst
				}
				piety = 100
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 4 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0005 }
					text = kcc_missionary_great
				}
			}
			66 = {
				modifier = {
					factor = 1.5
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_intrigue = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_intrigue = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.4 }
				}
				piety = -100
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -3 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0007 }
					text = kcc_missionary_epic_fail
				}
			}
		}
		
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0
				trait = strategist
			}
			modifier = {
				factor = 2
				realm_intrigue = 28
			}
			modifier = {
				factor = 2
				religion_authority = 0.6
			}
			modifier = {
				factor = 2
				religion_authority = 0.8
			}
			modifier = {
				factor = 3
				trait = schemer
			}
		}
	}
	
	option = { #Missionary has military experience, talk strategy
		name = EVTOPT_kccmission.0019c
		tooltip_info = strategist
		trigger = {
			trait = strategist
		}
		prestige = 50
		hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 4 } }
		custom_tooltip = {
			character_event = { id = kccpnews.0005 }
			text = kcc_missionary_great
		}
		if = {
			limit = {
				NOR = {
					trait = logistics_expert
					trait = master_of_flame
					trait = sapper
					trait = levy_coordinator
				}
			}
			set_character_flag = taught_chinese_strategy
			custom_tooltip = {
				random_list = {
					25 = { add_trait = logistics_expert }
					25 = { add_trait = master_of_flame }
					25 = { add_trait = sapper }
					25 = { add_trait = levy_coordinator }
				}
				text = kcc_better_command
			}
		}
		else = {
			change_martial = 2
		}
		
		ai_chance = {
			factor = 40
		}
	}
	
	option = { #Bow out respectfully
		name = EVTOPT_kccmission.0019d
		prestige = -50
		hidden_tooltip = { character_event = { id = kccpnews.0067 } }
		add_offmap_currency = {
			offmap = offmap_china
			value = -25
		}
		
		ai_chance = {
			factor = 20
			modifier = {
				factor = 0
				trait = strategist
			}
		}
	}
}

# Traditionalist Encounter
character_event = {
	id = kccmission.0020
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0020
	picture = GFX_evt_elder_council
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_traditionalists
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 0
			has_character_flag = kcc_traditionalists
		}
	}

	option = { #Our faith is but a natural extension of your own
		name = EVTOPT_kccmission.0020a
		random_list = {
			60 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_learning = 28
				}
				modifier = {
					factor = 1.5
					realm_learning = 36
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 600 }
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 700 }
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 800 }
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 900 }
				}
				modifier = {
					factor = 1.2
					has_offmap_currency = { offmap = offmap_china value = 1000 }
				}
				modifier = {
					factor = 1.33
					has_offmap_currency = { offmap = offmap_china value = 1500 }
				}
				modifier = {
					factor = 1.33
					has_offmap_currency = { offmap = offmap_china value = 2000 }
				}
				modifier = {
					factor = 2
					trait = sympathy_indian
				}
				modifier = {
					factor = 2
					OR = {
						religion = buddhist
						religion = jain
						religion = hindu
						religion = khurmazta
					}
					OR = {
						trait = scholar
						trait = theologian
					}
				}
				modifier = {
					factor = 0.33
					trait = zealous
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			40 = {
				modifier = {
					factor = 2
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_learning = 16 }
				}
				modifier = {
					factor = 3
					NOT = { has_offmap_currency = { offmap = offmap_china value = 1 } }
				}
				modifier = {
					factor = 2
					NOT = { has_offmap_currency = { offmap = offmap_china value = 100 } }
				}
				modifier = {
					factor = 1.5
					NOT = { has_offmap_currency = { offmap = offmap_china value = 200 } }
				}
				modifier = {
					factor = 1.5
					NOT = { has_offmap_currency = { offmap = offmap_china value = 300 } }
				}
				modifier = {
					factor = 1.25
					NOT = { has_offmap_currency = { offmap = offmap_china value = 400 } }
				}
				modifier = {
					factor = 1.25
					NOT = { has_offmap_currency = { offmap = offmap_china value = 500 } }
				}
				piety = -50
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = -1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0006 }
					text = kcc_missionary_fail
				}
			}
		}
		if = {
			limit = {
				trait = zealous
			}
			random_list = {
				66 = { remove_trait = zealous }
				33 = { }
			}
		}
		else_if = {
			limit = {
				NOT = { trait = sympathy_indian }
				NOT = { religion_group = indian_group }
			}
			random_list = {
				50 = { add_trait = sympathy_indian }
				50 = { }
			}
		}
		else = {
			random_list = {
				50 = { change_learning = 1 }
				50 = { }
			}
		}
		
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0.01
				trait = zealous
			}
			modifier = {
				factor = 3
				trait = sympathy_indian
			}
		}
	}
	
	option = { #Compromising with local religions is heresy!
		name = EVTOPT_kccmission.0020b
		piety = 150
		hidden_tooltip = { character_event = { id = kccpnews.0067 } }
		if = {
			limit = {
				trait = sympathy_indian
			}
			remove_trait = sympathy_indian
		}
		else_if = {
			limit = {
				trait = cynical
			}
			remove_trait = cynical
		}
		else_if = {
			limit = {
				NOT = { trait = cynical }
			}
			add_trait = zealous
		}
		else = {
			random_list = {
				50 = { change_martial = 2 }
				50 = { }
			}
		}
		
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				religion_group = pagan_group
				has_religion_feature = religion_syncretic
			}
		}
	}
}

# Encounter Asian traveler in China
character_event = {
	id = kccmission.0021
	has_dlc = "Jade Dragon"
	desc = {
		trigger = { has_character_flag = kcc_wandering_japanese }
		text = EVTDESC_kccmission.0021a
	}
	desc = {
		trigger = { has_character_flag = kcc_wandering_korean }
		text = EVTDESC_kccmission.0021b
	}
	desc = {
		trigger = { has_character_flag = kcc_wandering_vietnamese }
		text = EVTDESC_kccmission.0021c
	}
	desc = {
		trigger = { has_character_flag = kcc_wandering_malayan }
		text = EVTDESC_kccmission.0021d
	}
	picture = GFX_evt_market_altaic
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		set_character_flag = kcc_asian_pilgrim
		random_list = {
			25 = { set_character_flag = kcc_wandering_japanese }
			25 = { set_character_flag = kcc_wandering_korean }
			25 = { set_character_flag = kcc_wandering_vietnamese }
			25 = { set_character_flag = kcc_wandering_malayan }
		}
	}
	
	after = {
		kcc_post_missionary_effect = yes
	}
	
	weight_multiplier = {
		days = 42
		modifier = {
			factor = 0
			has_character_flag = kcc_asian_pilgrim
		}
	}

	option = { #Try to convert, send them back home as missionary
		name = EVTOPT_kccmission.0021a
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_learning = 28
				}
				modifier = {
					factor = 1.5
					realm_learning = 36
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.6
				}
				modifier = {
					factor = 1.2
					religion_authority = 0.8
				}
				modifier = {
					factor = 1.2
					religion_authority = 1
				}
				modifier = {
					factor = 1.2
					trait = gregarious
				}
				modifier = {
					factor = 1.2
					trait = socializer
				}
				modifier = {
					factor = 0.8
					trait = shy
				}
				hidden_tooltip = { change_variable = { which = kcc_missionary_progress value = 1 } }
				custom_tooltip = {
					character_event = { id = kccpnews.0004 }
					text = kcc_missionary_good
				}
			}
			50 = {
				modifier = {
					factor = 2
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_learning = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_learning = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.2 }
				}
				modifier = {
					factor = 1.5
					NOT = { religion_authority = 0.4 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0067 } }
			}
		}
		
		ai_chance = {
			factor = 40
			modifier = {
				factor = 2
				realm_learning = 28
			}
			modifier = {
				factor = 2
				OR = {
					trait = gregarious
					trait = socializer
				}
			}
			modifier = {
				factor = 0.5
				trait = shy
			}
		}
	}
	
	option = { #You must come back to court!
		name = EVTOPT_kccmission.0021b
		random_list = {
			50 = {
				modifier = {
					factor = 1.25
					has_character_flag = kcc_genius_scholar_won
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pious_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_pacifist_soldiers
				}
				modifier = {
					factor = 1.5
					realm_diplomacy = 28
				}
				modifier = {
					factor = 1.5
					realm_diplomacy = 36
				}
				modifier = {
					factor = 1.5
					prestige = 1000
				}
				modifier = {
					factor = 1.5
					prestige = 2000
				}
				modifier = {
					factor = 1.2
					trait = ambitious
				}
				modifier = {
					factor = 1.2
					trait = gamer
				}
				modifier = {
					factor = 0.8
					trait = content
				}
				custom_tooltip = {
					random_list = {
						25 = {
							add_character_modifier = {
								name = kcc_asian_diplomacy
								years = 25
							}
						}
						25 = {
							add_character_modifier = {
								name = kcc_asian_martial
								years = 25
							}
						}
						25 = {
							add_character_modifier = {
								name = kcc_asian_stewardship
								years = 25
							}
						}
						25 = {
							add_character_modifier = {
								name = kcc_asian_intrigue
								years = 25
							}
						}
					}
					character_event = { id = kccpnews.0068 }
					text = kcc_asian_courtier
				}
			}
			50 = {
				modifier = {
					factor = 2
					has_character_modifier = chinese_missionaries_bad
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_mediocre_scholar_lost
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_exhausted_missionaries
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionary_bombed_exam
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_missionaries_other_cheek
				}
				modifier = {
					factor = 1.25
					has_character_flag = kcc_not_invincible
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 4 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 8 }
				}
				modifier = {
					factor = 1.5
					NOT = { realm_diplomacy = 12 }
				}
				modifier = {
					factor = 1.25
					NOT = { realm_diplomacy = 16 }
				}
				modifier = {
					factor = 1.5
					NOT = { prestige = 0 }
				}
				modifier = {
					factor = 1.5
					NOT = { prestige = 500 }
				}
				hidden_tooltip = { character_event = { id = kccpnews.0069 } }
			}
		}
		
		ai_chance = {
			factor = 40
			modifier = {
				factor = 2
				realm_diplomacy = 28
			}
			modifier = {
				factor = 2
				OR = {
					trait = ambitious
					trait = gamer
				}
			}
			modifier = {
				factor = 0.5
				trait = content
			}
		}
	}
	
	option = { #Greet & move on
		name = EVTOPT_kccmission.0021c
		hidden_tooltip = { character_event = { id = kccpnews.0067 } }
		piety = -50
		
		ai_chance = {
			factor = 20
		}
	}
}

# Mission over, how'd you do?
character_event = {
	id = kccmission.0022
	has_dlc = "Jade Dragon"
	picture = GFX_evt_upsetting_letter
	desc = {
		trigger = {
			OR = {
				has_character_flag = kcc_end_missionary_epic_success
				has_character_flag = kcc_end_missionary_final_success
			}
		}
		text = EVTDESC_kccmission.0022a
		picture = GFX_evt_pleasing_letter
	}
	desc = {
		trigger = { has_character_flag = kcc_end_missionary_final_fail }
		text = EVTDESC_kccmission.0022b
	}
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	is_triggered_only = yes
	
	trigger = {
		NOT = { has_character_flag = kcc_got_the_boot_from_china }
	}
	
	immediate = {
		if = {
			limit = { check_variable = { which = kcc_missionary_progress value = 15.5 } }
			set_character_flag = kcc_end_missionary_epic_success
		}
		else_if = {
			limit = { check_variable = { which = kcc_missionary_progress value = 8.5 } }
			set_character_flag = kcc_end_missionary_final_success
		}
		else = {
			set_character_flag = kcc_end_missionary_final_fail
		}
	}
	
	after = {
		kcc_clr_missionary_flags_effect = yes
		if = {
			limit = {
				religion = catholic
				check_variable = { which = "global_chinese_catholics" value = 20 }
				NOT = { has_global_flag = catholic_china_one }
			}
			set_global_flag = catholic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_catholics
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = catholic
				check_variable = { which = "global_chinese_catholics" value = 40 }
				NOT = { has_global_flag = catholic_china_two }
			}
			set_global_flag = catholic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_catholics
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = catholic
				check_variable = { which = "global_chinese_catholics" value = 100 }
				NOT = { has_global_flag = catholic_china_three }
			}
			set_global_flag = catholic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_catholics
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = cathar
				check_variable = { which = "global_chinese_cathars" value = 20 }
				NOT = { has_global_flag = cathar_china_one }
			}
			set_global_flag = cathar_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_cathars
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = cathar
				check_variable = { which = "global_chinese_cathars" value = 40 }
				NOT = { has_global_flag = cathar_china_two }
			}
			set_global_flag = cathar_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_cathars
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = cathar
				check_variable = { which = "global_chinese_cathars" value = 100 }
				NOT = { has_global_flag = cathar_china_three }
			}
			set_global_flag = cathar_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_cathars
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = fraticelli
				check_variable = { which = "global_chinese_fraticellis" value = 20 }
				NOT = { has_global_flag = fraticelli_china_one }
			}
			set_global_flag = fraticelli_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_fraticellis
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = fraticelli
				check_variable = { which = "global_chinese_fraticellis" value = 40 }
				NOT = { has_global_flag = fraticelli_china_two }
			}
			set_global_flag = fraticelli_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_fraticellis
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = fraticelli
				check_variable = { which = "global_chinese_fraticellis" value = 100 }
				NOT = { has_global_flag = fraticelli_china_three }
			}
			set_global_flag = fraticelli_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_fraticellis
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = waldensian
				check_variable = { which = "global_chinese_waldensians" value = 20 }
				NOT = { has_global_flag = waldensian_china_one }
			}
			set_global_flag = waldensian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_waldensians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = waldensian
				check_variable = { which = "global_chinese_waldensians" value = 40 }
				NOT = { has_global_flag = waldensian_china_two }
			}
			set_global_flag = waldensian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_waldensians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = waldensian
				check_variable = { which = "global_chinese_waldensians" value = 100 }
				NOT = { has_global_flag = waldensian_china_three }
			}
			set_global_flag = waldensian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_waldensians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = lollard
				check_variable = { which = "global_chinese_lollards" value = 20 }
				NOT = { has_global_flag = lollard_china_one }
			}
			set_global_flag = lollard_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_lollards
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = lollard
				check_variable = { which = "global_chinese_lollards" value = 40 }
				NOT = { has_global_flag = lollard_china_two }
			}
			set_global_flag = lollard_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_lollards
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = lollard
				check_variable = { which = "global_chinese_lollards" value = 100 }
				NOT = { has_global_flag = lollard_china_three }
			}
			set_global_flag = lollard_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_lollards
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = orthodox
				check_variable = { which = "global_chinese_orthodoxs" value = 20 }
				NOT = { has_global_flag = orthodox_china_one }
			}
			set_global_flag = orthodox_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_orthodoxy
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = orthodox
				check_variable = { which = "global_chinese_orthodoxs" value = 40 }
				NOT = { has_global_flag = orthodox_china_two }
			}
			set_global_flag = orthodox_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_orthodoxy
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = orthodox
				check_variable = { which = "global_chinese_orthodoxs" value = 100 }
				NOT = { has_global_flag = orthodox_china_three }
			}
			set_global_flag = orthodox_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_orthodoxy
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = miaphysite
				check_variable = { which = "global_chinese_miaphysites" value = 20 }
				NOT = { has_global_flag = miaphysite_china_one }
			}
			set_global_flag = miaphysite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_miaphysites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = miaphysite
				check_variable = { which = "global_chinese_miaphysites" value = 40 }
				NOT = { has_global_flag = miaphysite_china_two }
			}
			set_global_flag = miaphysite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_miaphysites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = miaphysite
				check_variable = { which = "global_chinese_miaphysites" value = 100 }
				NOT = { has_global_flag = miaphysite_china_three }
			}
			set_global_flag = miaphysite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_miaphysites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = monophysite
				check_variable = { which = "global_chinese_monophysites" value = 20 }
				NOT = { has_global_flag = monophysite_china_one }
			}
			set_global_flag = monophysite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_monophysites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monophysite
				check_variable = { which = "global_chinese_monophysites" value = 40 }
				NOT = { has_global_flag = monophysite_china_two }
			}
			set_global_flag = monophysite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_monophysites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monophysite
				check_variable = { which = "global_chinese_monophysites" value = 100 }
				NOT = { has_global_flag = monophysite_china_three }
			}
			set_global_flag = monophysite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_monophysites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = bogomilist
				check_variable = { which = "global_chinese_bogomilists" value = 20 }
				NOT = { has_global_flag = bogomilist_china_one }
			}
			set_global_flag = bogomilist_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_bogomilists
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bogomilist
				check_variable = { which = "global_chinese_bogomilists" value = 40 }
				NOT = { has_global_flag = bogomilist_china_two }
			}
			set_global_flag = bogomilist_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_bogomilists
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bogomilist
				check_variable = { which = "global_chinese_bogomilists" value = 100 }
				NOT = { has_global_flag = bogomilist_china_three }
			}
			set_global_flag = bogomilist_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_bogomilists
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = monothelite
				check_variable = { which = "global_chinese_monothelites" value = 20 }
				NOT = { has_global_flag = monothelite_china_one }
			}
			set_global_flag = monothelite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_monothelites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monothelite
				check_variable = { which = "global_chinese_monothelites" value = 40 }
				NOT = { has_global_flag = monothelite_china_two }
			}
			set_global_flag = monothelite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_monothelites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monothelite
				check_variable = { which = "global_chinese_monothelites" value = 100 }
				NOT = { has_global_flag = monothelite_china_three }
			}
			set_global_flag = monothelite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_monothelites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = iconoclast
				check_variable = { which = "global_chinese_iconoclasts" value = 20 }
				NOT = { has_global_flag = iconoclast_china_one }
			}
			set_global_flag = iconoclast_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_iconoclasts
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = iconoclast
				check_variable = { which = "global_chinese_iconoclasts" value = 40 }
				NOT = { has_global_flag = iconoclast_china_two }
			}
			set_global_flag = iconoclast_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_iconoclasts
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = iconoclast
				check_variable = { which = "global_chinese_iconoclasts" value = 100 }
				NOT = { has_global_flag = iconoclast_china_three }
			}
			set_global_flag = iconoclast_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_iconoclasts
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = paulician
				check_variable = { which = "global_chinese_paulicians" value = 20 }
				NOT = { has_global_flag = paulician_china_one }
			}
			set_global_flag = paulician_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_paulicians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = paulician
				check_variable = { which = "global_chinese_paulicians" value = 40 }
				NOT = { has_global_flag = paulician_china_two }
			}
			set_global_flag = paulician_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_paulicians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = paulician
				check_variable = { which = "global_chinese_paulicians" value = 100 }
				NOT = { has_global_flag = paulician_china_three }
			}
			set_global_flag = paulician_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_paulicians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = nestorian
				check_variable = { which = "global_chinese_nestorians" value = 20 }
				NOT = { has_global_flag = nestorian_china_one }
			}
			set_global_flag = nestorian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_nestorians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = nestorian
				check_variable = { which = "global_chinese_nestorians" value = 40 }
				NOT = { has_global_flag = nestorian_china_two }
			}
			set_global_flag = nestorian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_nestorians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = nestorian
				check_variable = { which = "global_chinese_nestorians" value = 100 }
				NOT = { has_global_flag = nestorian_china_three }
			}
			set_global_flag = nestorian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_nestorians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = messalian
				check_variable = { which = "global_chinese_messalians" value = 20 }
				NOT = { has_global_flag = messalian_china_one }
			}
			set_global_flag = messalian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_messalians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = messalian
				check_variable = { which = "global_chinese_messalians" value = 40 }
				NOT = { has_global_flag = messalian_china_two }
			}
			set_global_flag = messalian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_messalians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = messalian
				check_variable = { which = "global_chinese_messalians" value = 100 }
				NOT = { has_global_flag = messalian_china_three }
			}
			set_global_flag = messalian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_messalians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = sunni
				check_variable = { which = "global_chinese_sunnis" value = 20 }
				NOT = { has_global_flag = sunni_china_one }
			}
			set_global_flag = sunni_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_sunnis
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = sunni
				check_variable = { which = "global_chinese_sunnis" value = 40 }
				NOT = { has_global_flag = sunni_china_two }
			}
			set_global_flag = sunni_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_sunnis
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = sunni
				check_variable = { which = "global_chinese_sunnis" value = 100 }
				NOT = { has_global_flag = sunni_china_three }
			}
			set_global_flag = sunni_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_sunnis
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = zikri
				check_variable = { which = "global_chinese_zikris" value = 20 }
				NOT = { has_global_flag = zikri_china_one }
			}
			set_global_flag = zikri_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zikris
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zikri
				check_variable = { which = "global_chinese_zikris" value = 40 }
				NOT = { has_global_flag = zikri_china_two }
			}
			set_global_flag = zikri_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zikris
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zikri
				check_variable = { which = "global_chinese_zikris" value = 100 }
				NOT = { has_global_flag = zikri_china_three }
			}
			set_global_flag = zikri_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zikris
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = ibadi
				check_variable = { which = "global_chinese_ibadis" value = 20 }
				NOT = { has_global_flag = ibadi_china_one }
			}
			set_global_flag = ibadi_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_ibadis
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = ibadi
				check_variable = { which = "global_chinese_ibadis" value = 40 }
				NOT = { has_global_flag = ibadi_china_two }
			}
			set_global_flag = ibadi_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_ibadis
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = ibadi
				check_variable = { which = "global_chinese_ibadis" value = 100 }
				NOT = { has_global_flag = ibadi_china_three }
			}
			set_global_flag = ibadi_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_ibadis
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = kharijite
				check_variable = { which = "global_chinese_kharijites" value = 20 }
				NOT = { has_global_flag = kharijite_china_one }
			}
			set_global_flag = kharijite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_kharijites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = kharijite
				check_variable = { which = "global_chinese_kharijites" value = 40 }
				NOT = { has_global_flag = kharijite_china_two }
			}
			set_global_flag = kharijite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_kharijites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = kharijite
				check_variable = { which = "global_chinese_kharijites" value = 100 }
				NOT = { has_global_flag = kharijite_china_three }
			}
			set_global_flag = kharijite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_kharijites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = shiite
				check_variable = { which = "global_chinese_shiites" value = 20 }
				NOT = { has_global_flag = shiite_china_one }
			}
			set_global_flag = shiite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_shiites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = shiite
				check_variable = { which = "global_chinese_shiites" value = 40 }
				NOT = { has_global_flag = shiite_china_two }
			}
			set_global_flag = shiite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_shiites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = shiite
				check_variable = { which = "global_chinese_shiites" value = 100 }
				NOT = { has_global_flag = shiite_china_three }
			}
			set_global_flag = shiite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_shiites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = qarmatian
				check_variable = { which = "global_chinese_qarmatians" value = 20 }
				NOT = { has_global_flag = qarmatian_china_one }
			}
			set_global_flag = qarmatian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_qarmatian
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = qarmatian
				check_variable = { which = "global_chinese_qarmatians" value = 40 }
				NOT = { has_global_flag = qarmatian_china_two }
			}
			set_global_flag = qarmatian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_qarmatian
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = qarmatian
				check_variable = { which = "global_chinese_qarmatians" value = 100 }
				NOT = { has_global_flag = qarmatian_china_three }
			}
			set_global_flag = qarmatian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_qarmatian
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = hurufi
				check_variable = { which = "global_chinese_hurufis" value = 20 }
				NOT = { has_global_flag = hurufi_china_one }
			}
			set_global_flag = hurufi_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hurufis
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hurufi
				check_variable = { which = "global_chinese_hurufis" value = 40 }
				NOT = { has_global_flag = hurufi_china_two }
			}
			set_global_flag = hurufi_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hurufis
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hurufi
				check_variable = { which = "global_chinese_hurufis" value = 100 }
				NOT = { has_global_flag = hurufi_china_three }
			}
			set_global_flag = hurufi_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hurufis
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = zoroastrian
				check_variable = { which = "global_chinese_zoroastrians" value = 20 }
				NOT = { has_global_flag = zoroastrian_china_one }
			}
			set_global_flag = zoroastrian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zoroastrians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zoroastrian
				check_variable = { which = "global_chinese_zoroastrians" value = 40 }
				NOT = { has_global_flag = zoroastrian_china_two }
			}
			set_global_flag = zoroastrian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zoroastrians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zoroastrian
				check_variable = { which = "global_chinese_zoroastrians" value = 100 }
				NOT = { has_global_flag = zoroastrian_china_three }
			}
			set_global_flag = zoroastrian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zoroastrians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = mazdaki
				check_variable = { which = "global_chinese_mazdakis" value = 20 }
				NOT = { has_global_flag = mazdaki_china_one }
			}
			set_global_flag = mazdaki_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_mazdakis
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mazdaki
				check_variable = { which = "global_chinese_mazdakis" value = 40 }
				NOT = { has_global_flag = mazdaki_china_two }
			}
			set_global_flag = mazdaki_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_mazdakis
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mazdaki
				check_variable = { which = "global_chinese_mazdakis" value = 100 }
				NOT = { has_global_flag = mazdaki_china_three }
			}
			set_global_flag = mazdaki_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_mazdakis
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = manichean
				check_variable = { which = "global_chinese_manicheans" value = 20 }
				NOT = { has_global_flag = manichean_china_one }
			}
			set_global_flag = manichean_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_manicheans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = manichean
				check_variable = { which = "global_chinese_manicheans" value = 40 }
				NOT = { has_global_flag = manichean_china_two }
			}
			set_global_flag = manichean_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_manicheans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = manichean
				check_variable = { which = "global_chinese_manicheans" value = 100 }
				NOT = { has_global_flag = manichean_china_three }
			}
			set_global_flag = manichean_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_manicheans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = buddhist
				check_variable = { which = "global_chinese_buddhists" value = 20 }
				NOT = { has_global_flag = buddhist_china_one }
			}
			set_global_flag = buddhist_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_buddhists
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = buddhist
				check_variable = { which = "global_chinese_buddhists" value = 40 }
				NOT = { has_global_flag = buddhist_china_two }
			}
			set_global_flag = buddhist_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_buddhists
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = buddhist
				check_variable = { which = "global_chinese_buddhists" value = 100 }
				NOT = { has_global_flag = buddhist_china_three }
			}
			set_global_flag = buddhist_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_buddhists
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = jain
				check_variable = { which = "global_chinese_jains" value = 20 }
				NOT = { has_global_flag = jain_china_one }
			}
			set_global_flag = jain_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_jains
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jain
				check_variable = { which = "global_chinese_jains" value = 40 }
				NOT = { has_global_flag = jain_china_two }
			}
			set_global_flag = jain_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_jains
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jain
				check_variable = { which = "global_chinese_jains" value = 100 }
				NOT = { has_global_flag = jain_china_three }
			}
			set_global_flag = jain_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_jains
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = aten_pagan
				check_variable = { which = "global_chinese_megalithic_reformeds" value = 20 }
				NOT = { has_global_flag = atenic_china_one }
			}
			set_global_flag = atenic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_atenics
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aten_pagan
				check_variable = { which = "global_chinese_megalithic_reformeds" value = 40 }
				NOT = { has_global_flag = atenic_china_two }
			}
			set_global_flag = atenic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_atenics
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aten_pagan
				check_variable = { which = "global_chinese_megalithic_reformeds" value = 100 }
				NOT = { has_global_flag = atenic_china_three }
			}
			set_global_flag = atenic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_atenics
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = britannic_pagan
				check_variable = { which = "global_chinese_britanics" value = 20 }
				NOT = { has_global_flag = britanic_china_one }
			}
			set_global_flag = britanic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_britannics
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = britannic_pagan
				check_variable = { which = "global_chinese_britanics" value = 40 }
				NOT = { has_global_flag = britanic_china_two }
			}
			set_global_flag = britanic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_britannics
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = britannic_pagan
				check_variable = { which = "global_chinese_britanics" value = 100 }
				NOT = { has_global_flag = britanic_china_three }
			}
			set_global_flag = britanic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_britannics
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = promethean_pagan
				check_variable = { which = "global_chinese_zalmoxian_reformeds" value = 20 }
				NOT = { has_global_flag = promethean_china_one }
			}
			set_global_flag = promethean_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_prometheans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = promethean_pagan
				check_variable = { which = "global_chinese_zalmoxian_reformeds" value = 40 }
				NOT = { has_global_flag = promethean_china_two }
			}
			set_global_flag = promethean_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_prometheans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = promethean_pagan
				check_variable = { which = "global_chinese_zalmoxian_reformeds" value = 100 }
				NOT = { has_global_flag = promethean_china_three }
			}
			set_global_flag = promethean_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_prometheans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = bon_reformed
				check_variable = { which = "global_chinese_bon_reformeds" value = 20 }
				NOT = { has_global_flag = bon_china_one }
			}
			set_global_flag = bon_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_bon
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bon_reformed
				check_variable = { which = "global_chinese_bon_reformeds" value = 40 }
				NOT = { has_global_flag = bon_china_two }
			}
			set_global_flag = bon_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_bon
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bon_reformed
				check_variable = { which = "global_chinese_bon_reformeds" value = 100 }
				NOT = { has_global_flag = bon_china_three }
			}
			set_global_flag = bon_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_bon
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = norse_pagan_reformed
				check_variable = { which = "global_chinese_norse_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = norse_china_one }
			}
			set_global_flag = norse_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_norse
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = norse_pagan_reformed
				check_variable = { which = "global_chinese_norse_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = norse_china_two }
			}
			set_global_flag = norse_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_norse
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = norse_pagan_reformed
				check_variable = { which = "global_chinese_norse_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = norse_china_three }
			}
			set_global_flag = norse_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_norse
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = tengri_pagan_reformed
				check_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = tengri_china_one }
			}
			set_global_flag = tengri_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_tengri
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = tengri_pagan_reformed
				check_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = tengri_china_two }
			}
			set_global_flag = tengri_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_tengri
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = tengri_pagan_reformed
				check_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = tengri_china_three }
			}
			set_global_flag = tengri_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_tengri
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = baltic_pagan_reformed
				check_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = baltic_china_one }
			}
			set_global_flag = baltic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_baltic
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = baltic_pagan_reformed
				check_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = baltic_china_two }
			}
			set_global_flag = baltic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_baltic
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = baltic_pagan_reformed
				check_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = baltic_china_three }
			}
			set_global_flag = baltic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_baltic
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = finnish_pagan_reformed
				check_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = finnish_china_one }
			}
			set_global_flag = finnish_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_finnish
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = finnish_pagan_reformed
				check_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = finnish_china_two }
			}
			set_global_flag = finnish_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_finnish
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = finnish_pagan_reformed
				check_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = finnish_china_three }
			}
			set_global_flag = finnish_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_finnish
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = aztec_reformed
				check_variable = { which = "global_chinese_aztec_reformeds" value = 20 }
				NOT = { has_global_flag = aztec_china_one }
			}
			set_global_flag = aztec_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_aztecs
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aztec_reformed
				check_variable = { which = "global_chinese_aztec_reformeds" value = 40 }
				NOT = { has_global_flag = aztec_china_two }
			}
			set_global_flag = aztec_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_aztecs
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aztec_reformed
				check_variable = { which = "global_chinese_aztec_reformeds" value = 100 }
				NOT = { has_global_flag = aztec_china_three }
			}
			set_global_flag = aztec_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_aztecs
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = slavic_pagan_reformed
				check_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = slavic_china_one }
			}
			set_global_flag = slavic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_slavic
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = slavic_pagan_reformed
				check_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = slavic_china_two }
			}
			set_global_flag = slavic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_slavic
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = slavic_pagan_reformed
				check_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = slavic_china_three }
			}
			set_global_flag = slavic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_slavic
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = west_african_pagan_reformed
				check_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = african_china_one }
			}
			set_global_flag = african_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_africans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = west_african_pagan_reformed
				check_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = african_china_two }
			}
			set_global_flag = african_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_africans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = west_african_pagan_reformed
				check_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = african_china_three }
			}
			set_global_flag = african_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_africans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = zun_pagan_reformed
				check_variable = { which = "global_chinese_zun_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = zun_china_one }
			}
			set_global_flag = zun_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zun
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zun_pagan_reformed
				check_variable = { which = "global_chinese_zun_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = zun_china_two }
			}
			set_global_flag = zun_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zun
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zun_pagan_reformed
				check_variable = { which = "global_chinese_zun_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = zun_china_three }
			}
			set_global_flag = zun_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zun
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = hellenic_pagan_reformed
				check_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = hellenic_china_one }
			}
			set_global_flag = hellenic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hellenics
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hellenic_pagan_reformed
				check_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = hellenic_china_two }
			}
			set_global_flag = hellenic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hellenics
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hellenic_pagan_reformed
				check_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = hellenic_china_three }
			}
			set_global_flag = hellenic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hellenics
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = celtic_pagan_reformed
				check_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = celtic_china_one }
			}
			set_global_flag = celtic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_celtics
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = celtic_pagan_reformed
				check_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = celtic_china_two }
			}
			set_global_flag = celtic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_celtics
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = celtic_pagan_reformed
				check_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = celtic_china_three }
			}
			set_global_flag = celtic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_celtics
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = egyptian_pagan_reformed
				check_variable = { which = "global_chinese_kemetisms" value = 20 }
				NOT = { has_global_flag = egyptian_china_one }
			}
			set_global_flag = egyptian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_egyptians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = egyptian_pagan_reformed
				check_variable = { which = "global_chinese_kemetisms" value = 40 }
				NOT = { has_global_flag = egyptian_china_two }
			}
			set_global_flag = egyptian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_egyptians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = egyptian_pagan_reformed
				check_variable = { which = "global_chinese_kemetisms" value = 100 }
				NOT = { has_global_flag = egyptian_china_three }
			}
			set_global_flag = egyptian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_egyptians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = catholic
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_catholic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_catholic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = catholic
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_catholic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_catholic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = cathar
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_cathar_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_cathar_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = cathar
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_cathar_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_cathar_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = fraticelli
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_fraticelli_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_fraticelli_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = fraticelli
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_fraticelli_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_fraticelli_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = waldensian
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_waldensian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_waldensian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = waldensian
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_waldensian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_waldensian_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = lollard
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_lollard_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_lollard_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = lollard
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_lollard_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_lollard_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = orthodox
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_orthodox_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_orthodox_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = orthodox
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_orthodox_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_orthodox_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = miaphysite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_miaphysite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_miaphysite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = miaphysite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_miaphysite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_miaphysite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = monophysite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_monophysite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_monophysite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = monophysite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_monophysite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_monophysite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = bogomilist
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_bogomilist_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_bogomilist_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = bogomilist
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_bogomilist_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_bogomilist_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = monothelite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_monothelite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_monothelite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = monothelite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_monothelite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_monothelite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = iconoclast
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_iconoclast_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_iconoclast_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = iconoclast
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_iconoclast_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_iconoclast_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = paulician
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_paulician_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_paulician_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = paulician
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_paulician_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_paulician_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = nestorian
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_nestorian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_nestorian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = nestorian
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_nestorian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_nestorian_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = messalian
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_messalian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_messalian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = messalian
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_messalian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_messalian_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = sunni
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_sunni_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_sunni_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = sunni
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_sunni_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_sunni_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = zikri
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_zikri_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_zikri_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = zikri
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_zikri_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_zikri_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = ibadi
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_ibadi_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_ibadi_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = ibadi
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_ibadi_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_ibadi_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = kharijite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_kharijite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_kharijite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = kharijite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_kharijite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_kharijite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = shiite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_shiite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_shiite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = shiite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_shiite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_shiite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = qarmatian
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_qarmatian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_qarmatian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = qarmatian
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_qarmatian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_qarmatian_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = hurufi
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_hurufi_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_hurufi_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = hurufi
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_hurufi_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_hurufi_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = zoroastrian
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_zoroastrian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_zoroastrian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = zoroastrian
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_zoroastrian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_zoroastrian_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = mazdaki
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_mazdaki_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_mazdaki_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = mazdaki
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_mazdaki_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_mazdaki_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = manichean
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_manichean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_manichean_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = manichean
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_manichean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_manichean_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = buddhist
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_buddhist_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_buddhist_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = buddhist
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_buddhist_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_buddhist_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = jain
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_jain_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_jain_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = jain
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_jain_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_jain_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = aten_pagan
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_atenic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_atenic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = aten_pagan
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_atenic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_atenic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = britannic_pagan
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_britannic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_britannic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = britannic_pagan
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_britannic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_britannic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = promethean_pagan
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_promethean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_promethean_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = promethean_pagan
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_promethean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_promethean_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = bon_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_bon_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_bon_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = bon_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_bon_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_bon_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = norse_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_norse_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_norse_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = norse_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_norse_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_norse_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = tengri_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_tengri_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_tengri_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = tengri_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_tengri_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_tengri_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = baltic_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_baltic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_baltic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = baltic_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_baltic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_baltic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = finnish_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_finnish_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_finnish_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = finnish_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_finnish_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_finnish_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = aztec_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_aztec_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_aztec_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = aztec_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_aztec_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_aztec_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = slavic_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_slavic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_slavic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = slavic_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_slavic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_slavic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = west_african_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_african_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_african_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = west_african_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_african_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_african_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = zun_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_zun_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_zun_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = zun_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_zun_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_zun_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = hellenic_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_hellenic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_hellenic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = hellenic_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_hellenic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_hellenic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = celtic_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_celtic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_celtic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = celtic_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_celtic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_celtic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = egyptian_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_egyptian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_egyptian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = egyptian_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_egyptian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_egyptian_mission years = 5 hidden = yes } }
		}
		#Christian Immersion
		if = {
			limit = {
				religion = adoptionist
				check_variable = { which = "global_chinese_adoptionists" value = 20 }
				NOT = { has_global_flag = adoptionist_china_one }
			}
			set_global_flag = adoptionist_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_adoptionists
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = adoptionist
				check_variable = { which = "global_chinese_adoptionists" value = 40 }
				NOT = { has_global_flag = adoptionist_china_two }
			}
			set_global_flag = adoptionist_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_adoptionists
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = adoptionist
				check_variable = { which = "global_chinese_adoptionists" value = 100 }
				NOT = { has_global_flag = adoptionist_china_three }
			}
			set_global_flag = adoptionist_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_adoptionists
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = adoptionist
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_adoptionist_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_adoptionist_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = adoptionist
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_adoptionist_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_adoptionist_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = free_spirits
				check_variable = { which = "global_chinese_free_spirits" value = 20 }
				NOT = { has_global_flag = free_spirits_china_one }
			}
			set_global_flag = free_spirits_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_free_spirits
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = free_spirits
				check_variable = { which = "global_chinese_free_spirits" value = 40 }
				NOT = { has_global_flag = free_spirits_china_two }
			}
			set_global_flag = free_spirits_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_free_spirits
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = free_spirits
				check_variable = { which = "global_chinese_free_spirits" value = 100 }
				NOT = { has_global_flag = free_spirits_china_three }
			}
			set_global_flag = free_spirits_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_free_spirits
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = free_spirits
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_free_spirits_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_free_spirits_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = free_spirits
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_free_spirits_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_free_spirits_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = barlaamite
				check_variable = { which = "global_chinese_barlaamites" value = 20 }
				NOT = { has_global_flag = barlaamite_china_one }
			}
			set_global_flag = barlaamite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_barlaamites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = barlaamite
				check_variable = { which = "global_chinese_barlaamites" value = 40 }
				NOT = { has_global_flag = barlaamite_china_two }
			}
			set_global_flag = barlaamite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_barlaamites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = barlaamite
				check_variable = { which = "global_chinese_barlaamites" value = 100 }
				NOT = { has_global_flag = barlaamite_china_three }
			}
			set_global_flag = barlaamite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_barlaamites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = barlaamite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_barlaamite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_barlaamite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = barlaamite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_barlaamite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_barlaamite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = judaizer
				check_variable = { which = "global_chinese_judaizers" value = 20 }
				NOT = { has_global_flag = judaizer_china_one }
			}
			set_global_flag = judaizer_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_judaizers
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = judaizer
				check_variable = { which = "global_chinese_judaizers" value = 40 }
				NOT = { has_global_flag = judaizer_china_two }
			}
			set_global_flag = judaizer_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_judaizers
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = judaizer
				check_variable = { which = "global_chinese_judaizers" value = 100 }
				NOT = { has_global_flag = judaizer_china_three }
			}
			set_global_flag = judaizer_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_judaizers
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = judaizer
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_judaizer_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_judaizer_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = judaizer
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_judaizer_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_judaizer_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = mandean
				check_variable = { which = "global_chinese_mandeans" value = 20 }
				NOT = { has_global_flag = mandean_china_one }
			}
			set_global_flag = mandean_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_mandeans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mandean
				check_variable = { which = "global_chinese_mandeans" value = 40 }
				NOT = { has_global_flag = mandean_china_two }
			}
			set_global_flag = mandean_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_mandeans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mandean
				check_variable = { which = "global_chinese_mandeans" value = 100 }
				NOT = { has_global_flag = mandean_china_three }
			}
			set_global_flag = mandean_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_mandeans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = mandean
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_mandean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_mandean_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = mandean
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_mandean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_mandean_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = chaldean
				check_variable = { which = "global_chinese_chaldeans" value = 20 }
				NOT = { has_global_flag = chaldean_china_one }
			}
			set_global_flag = chaldean_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_chaldeans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = chaldean
				check_variable = { which = "global_chinese_chaldeans" value = 40 }
				NOT = { has_global_flag = chaldean_china_two }
			}
			set_global_flag = chaldean_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_chaldeans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = chaldean
				check_variable = { which = "global_chinese_chaldeans" value = 100 }
				NOT = { has_global_flag = chaldean_china_three }
			}
			set_global_flag = chaldean_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_chaldeans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = chaldean
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_chaldean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_chaldean_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = chaldean
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_chaldean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_chaldean_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = apollinarian
				check_variable = { which = "global_chinese_apollinarians" value = 20 }
				NOT = { has_global_flag = apollinarian_china_one }
			}
			set_global_flag = apollinarian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_apollinarians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = apollinarian
				check_variable = { which = "global_chinese_apollinarians" value = 40 }
				NOT = { has_global_flag = apollinarian_china_two }
			}
			set_global_flag = apollinarian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_apollinarians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = apollinarian
				check_variable = { which = "global_chinese_apollinarians" value = 100 }
				NOT = { has_global_flag = apollinarian_china_three }
			}
			set_global_flag = apollinarian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_apollinarians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = apollinarian
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_apollinarian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_apollinarian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = apollinarian
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_apollinarian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_apollinarian_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = yarsan
				check_variable = { which = "global_chinese_yarsans" value = 20 }
				NOT = { has_global_flag = yarsan_china_one }
			}
			set_global_flag = yarsan_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_yarsans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yarsan
				check_variable = { which = "global_chinese_yarsans" value = 40 }
				NOT = { has_global_flag = yarsan_china_two }
			}
			set_global_flag = yarsan_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_yarsans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yarsan
				check_variable = { which = "global_chinese_yarsans" value = 100 }
				NOT = { has_global_flag = yarsan_china_three }
			}
			set_global_flag = yarsan_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_yarsans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = yarsan
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_yarsan_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_yarsan_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = yarsan
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_yarsan_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_yarsan_mission years = 5 hidden = yes } }
		}
		#Last Vanilla Religions
		if = {
			limit = {
				religion = yazidi
				check_variable = { which = "global_chinese_yazidis" value = 20 }
				NOT = { has_global_flag = yazidi_china_one }
			}
			set_global_flag = yazidi_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_yazidis
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yazidi
				check_variable = { which = "global_chinese_yazidis" value = 40 }
				NOT = { has_global_flag = yazidi_china_two }
			}
			set_global_flag = yazidi_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_yazidis
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yazidi
				check_variable = { which = "global_chinese_yazidis" value = 100 }
				NOT = { has_global_flag = yazidi_china_three }
			}
			set_global_flag = yazidi_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_yazidis
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = yazidi
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_yazidi_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_yazidi_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = yazidi
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_yazidi_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_yazidi_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = druze
				check_variable = { which = "global_chinese_druzes" value = 20 }
				NOT = { has_global_flag = druze_china_one }
			}
			set_global_flag = druze_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_druze
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = druze
				check_variable = { which = "global_chinese_druzes" value = 40 }
				NOT = { has_global_flag = druze_china_two }
			}
			set_global_flag = druze_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_druze
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = druze
				check_variable = { which = "global_chinese_druzes" value = 100 }
				NOT = { has_global_flag = druze_china_three }
			}
			set_global_flag = druze_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_druze
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = druze
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_druze_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_druze_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = druze
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_druze_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_druze_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = khurmazta
				check_variable = { which = "global_chinese_khurmaztas" value = 20 }
				NOT = { has_global_flag = khurmazta_china_one }
			}
			set_global_flag = khurmazta_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_khurmaztas
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = khurmazta
				check_variable = { which = "global_chinese_khurmaztas" value = 40 }
				NOT = { has_global_flag = khurmazta_china_two }
			}
			set_global_flag = khurmazta_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_khurmaztas
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = khurmazta
				check_variable = { which = "global_chinese_khurmaztas" value = 100 }
				NOT = { has_global_flag = khurmazta_china_three }
			}
			set_global_flag = khurmazta_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_khurmaztas
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = khurmazta
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_khurmazta_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_khurmazta_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = khurmazta
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_khurmazta_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_khurmazta_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = jewish
				check_variable = { which = "global_chinese_jewishs" value = 20 }
				NOT = { has_global_flag = jewish_china_one }
			}
			set_global_flag = jewish_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_jews
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jewish
				check_variable = { which = "global_chinese_jewishs" value = 40 }
				NOT = { has_global_flag = jewish_china_two }
			}
			set_global_flag = jewish_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_jews
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jewish
				check_variable = { which = "global_chinese_jewishs" value = 100 }
				NOT = { has_global_flag = jewish_china_three }
			}
			set_global_flag = jewish_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_jews
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = jewish
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_jewish_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_jewish_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = jewish
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_jewish_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_jewish_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = samaritan
				check_variable = { which = "global_chinese_samaritans" value = 20 }
				NOT = { has_global_flag = samaritan_china_one }
			}
			set_global_flag = samaritan_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_samaritans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = samaritan
				check_variable = { which = "global_chinese_samaritans" value = 40 }
				NOT = { has_global_flag = samaritan_china_two }
			}
			set_global_flag = samaritan_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_samaritans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = samaritan
				check_variable = { which = "global_chinese_samaritans" value = 100 }
				NOT = { has_global_flag = samaritan_china_three }
			}
			set_global_flag = samaritan_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_samaritans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = samaritan
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_samaritan_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_samaritan_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = samaritan
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_samaritan_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_samaritan_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = karaite
				check_variable = { which = "global_chinese_karaites" value = 20 }
				NOT = { has_global_flag = karaite_china_one }
			}
			set_global_flag = karaite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_karaites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = karaite
				check_variable = { which = "global_chinese_karaites" value = 40 }
				NOT = { has_global_flag = karaite_china_two }
			}
			set_global_flag = karaite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_karaites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = karaite
				check_variable = { which = "global_chinese_karaites" value = 100 }
				NOT = { has_global_flag = karaite_china_three }
			}
			set_global_flag = karaite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_karaites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = karaite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_karaite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_karaite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = karaite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_karaite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_karaite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = hindu
				check_variable = { which = "global_chinese_hindus" value = 20 }
				NOT = { has_global_flag = hindu_china_one }
			}
			set_global_flag = hindu_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hindus
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hindu
				check_variable = { which = "global_chinese_hindus" value = 40 }
				NOT = { has_global_flag = hindu_china_two }
			}
			set_global_flag = hindu_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hindus
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hindu
				check_variable = { which = "global_chinese_hindus" value = 100 }
				NOT = { has_global_flag = hindu_china_three }
			}
			set_global_flag = hindu_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hindus
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = hindu
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_hindu_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_hindu_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = hindu
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_hindu_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_hindu_mission years = 5 hidden = yes } }
		}
	}
	
	option = {
		name = EVTOPT_kccmission.0022a
		trigger = { has_character_flag = kcc_end_missionary_epic_success }
		prestige = 50
		piety = 100
		if = {
			limit = {
				religion = catholic
				NOT = { has_global_flag = catholics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_catholics" value = 5 } }
			set_global_flag = catholics_in_china
			set_global_flag = kcc_missionspread_catholics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = catholic
				has_global_flag = catholics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_catholics" value = 5 } }
		}
		if = {
			limit = {
				religion = cathar
				NOT = { has_global_flag = cathars_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_cathars" value = 5 } }
			set_global_flag = cathars_in_china
			set_global_flag = kcc_missionspread_cathars
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = cathar
				has_global_flag = cathars_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_cathars" value = 5 } }
		}
		if = {
			limit = {
				religion = fraticelli
				NOT = { has_global_flag = fraticellis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_fraticellis" value = 5 } }
			set_global_flag = fraticellis_in_china
			set_global_flag = kcc_missionspread_fraticellis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = fraticelli
				has_global_flag = fraticellis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_fraticellis" value = 5 } }
		}
		if = {
			limit = {
				religion = waldensian
				NOT = { has_global_flag = waldensians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_waldensians" value = 5 } }
			set_global_flag = waldensians_in_china
			set_global_flag = kcc_missionspread_waldensians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = waldensian
				has_global_flag = waldensians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_waldensians" value = 5 } }
		}
		if = {
			limit = {
				religion = lollard
				NOT = { has_global_flag = lollards_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_lollards" value = 5 } }
			set_global_flag = lollards_in_china
			set_global_flag = kcc_missionspread_lollards
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = lollard
				has_global_flag = lollards_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_lollards" value = 5 } }
		}
		if = {
			limit = {
				religion = orthodox
				NOT = { has_global_flag = orthodoxy_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_orthodoxs" value = 5 } }
			set_global_flag = orthodoxy_in_china
			set_global_flag = kcc_missionspread_orthodoxy
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = orthodox
				has_global_flag = orthodoxy_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_orthodoxs" value = 5 } }
		}
		if = {
			limit = {
				religion = miaphysite
				NOT = { has_global_flag = miaphysites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_miaphysites" value = 5 } }
			set_global_flag = miaphysites_in_china
			set_global_flag = kcc_missionspread_miaphysites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = miaphysite
				has_global_flag = miaphysites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_miaphysites" value = 5 } }
		}
		if = {
			limit = {
				religion = monophysite
				NOT = { has_global_flag = monophysites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_monophysites" value = 5 } }
			set_global_flag = monophysites_in_china
			set_global_flag = kcc_missionspread_monophysites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monophysite
				has_global_flag = monophysites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_monophysites" value = 5 } }
		}
		if = {
			limit = {
				religion = bogomilist
				NOT = { has_global_flag = bogomilists_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_bogomilists" value = 5 } }
			set_global_flag = bogomilists_in_china
			set_global_flag = kcc_missionspread_bogomilists
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bogomilist
				has_global_flag = bogomilists_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_bogomilists" value = 5 } }
		}
		if = {
			limit = {
				religion = monothelite
				NOT = { has_global_flag = monothelites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_monothelites" value = 5 } }
			set_global_flag = monothelites_in_china
			set_global_flag = kcc_missionspread_monothelites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monothelite
				has_global_flag = monothelites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_monothelites" value = 5 } }
		}
		if = {
			limit = {
				religion = iconoclast
				NOT = { has_global_flag = iconoclasts_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_iconoclasts" value = 5 } }
			set_global_flag = iconoclasts_in_china
			set_global_flag = kcc_missionspread_iconoclasts
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = iconoclast
				has_global_flag = iconoclasts_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_iconoclasts" value = 5 } }
		}
		if = {
			limit = {
				religion = paulician
				NOT = { has_global_flag = paulicians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_paulicians" value = 5 } }
			set_global_flag = paulicians_in_china
			set_global_flag = kcc_missionspread_paulicians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = paulician
				has_global_flag = paulicians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_paulicians" value = 5 } }
		}
		if = {
			limit = {
				religion = nestorian
				NOT = { has_global_flag = nestorians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_nestorians" value = 5 } }
			set_global_flag = nestorians_in_china
			set_global_flag = kcc_missionspread_nestorians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = nestorian
				has_global_flag = nestorians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_nestorians" value = 5 } }
		}
		if = {
			limit = {
				religion = messalian
				NOT = { has_global_flag = messalians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_messalians" value = 5 } }
			set_global_flag = messalians_in_china
			set_global_flag = kcc_missionspread_messalians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = messalian
				has_global_flag = messalians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_messalians" value = 5 } }
		}
		if = {
			limit = {
				religion = sunni
				NOT = { has_global_flag = sunnis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_sunnis" value = 5 } }
			set_global_flag = sunnis_in_china
			set_global_flag = kcc_missionspread_sunnis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = sunni
				has_global_flag = sunnis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_sunnis" value = 5 } }
		}
		if = {
			limit = {
				religion = zikri
				NOT = { has_global_flag = zikris_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zikris" value = 5 } }
			set_global_flag = zikris_in_china
			set_global_flag = kcc_missionspread_zikris
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zikri
				has_global_flag = zikris_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zikris" value = 5 } }
		}
		if = {
			limit = {
				religion = ibadi
				NOT = { has_global_flag = ibadis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_ibadis" value = 5 } }
			set_global_flag = ibadis_in_china
			set_global_flag = kcc_missionspread_ibadis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = ibadi
				has_global_flag = ibadis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_ibadis" value = 5 } }
		}
		if = {
			limit = {
				religion = kharijite
				NOT = { has_global_flag = kharijites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_kharijites" value = 5 } }
			set_global_flag = kharijites_in_china
			set_global_flag = kcc_missionspread_kharijites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = kharijite
				has_global_flag = kharijites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_kharijites" value = 5 } }
		}
		if = {
			limit = {
				religion = shiite
				NOT = { has_global_flag = shiites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_shiites" value = 5 } }
			set_global_flag = shiites_in_china
			set_global_flag = kcc_missionspread_shiites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = shiite
				has_global_flag = shiites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_shiites" value = 5 } }
		}
		if = {
			limit = {
				religion = qarmatian
				NOT = { has_global_flag = qarmatian_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_qarmatians" value = 5 } }
			set_global_flag = qarmatian_in_china
			set_global_flag = kcc_missionspread_qarmatian
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = qarmatian
				has_global_flag = qarmatian_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_qarmatians" value = 5 } }
		}
		if = {
			limit = {
				religion = hurufi
				NOT = { has_global_flag = hurufis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_hurufis" value = 5 } }
			set_global_flag = hurufis_in_china
			set_global_flag = kcc_missionspread_hurufis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hurufi
				has_global_flag = hurufis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_hurufis" value = 5 } }
		}
		if = {
			limit = {
				religion = zoroastrian
				NOT = { has_global_flag = zoroastrians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zoroastrians" value = 5 } }
			set_global_flag = zoroastrians_in_china
			set_global_flag = kcc_missionspread_zoroastrians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zoroastrian
				has_global_flag = zoroastrians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zoroastrians" value = 5 } }
		}
		if = {
			limit = {
				religion = mazdaki
				NOT = { has_global_flag = mazdakis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_mazdakis" value = 5 } }
			set_global_flag = mazdakis_in_china
			set_global_flag = kcc_missionspread_mazdakis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mazdaki
				has_global_flag = mazdakis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_mazdakis" value = 5 } }
		}
		if = {
			limit = {
				religion = manichean
				NOT = { has_global_flag = manicheans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_manicheans" value = 5 } }
			set_global_flag = manicheans_in_china
			set_global_flag = kcc_missionspread_manicheans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = manichean
				has_global_flag = manicheans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_manicheans" value = 5 } }
		}
		if = {
			limit = {
				religion = buddhist
				NOT = { has_global_flag = buddhists_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_buddhists" value = 5 } }
			set_global_flag = buddhists_in_china
			set_global_flag = kcc_missionspread_buddhists
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = buddhist
				has_global_flag = buddhists_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_buddhists" value = 5 } }
		}
		if = {
			limit = {
				religion = jain
				NOT = { has_global_flag = jains_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_jains" value = 5 } }
			set_global_flag = jains_in_china
			set_global_flag = kcc_missionspread_jains
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jain
				has_global_flag = jains_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_jains" value = 5 } }
		}
		if = {
			limit = {
				religion = aten_pagan
				NOT = { has_global_flag = atenics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_megalithic_reformeds" value = 5 } }
			set_global_flag = atenics_in_china
			set_global_flag = kcc_missionspread_atenics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aten_pagan
				has_global_flag = atenics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_megalithic_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = britannic_pagan
				NOT = { has_global_flag = britannics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_cybelene_reformeds" value = 5 } }
			set_global_flag = britannics_in_china
			set_global_flag = kcc_missionspread_britannics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = britannic_pagan
				has_global_flag = britannics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_cybelene_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = promethean_pagan
				NOT = { has_global_flag = prometheans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zalmoxian_reformeds" value = 5 } }
			set_global_flag = prometheans_in_china
			set_global_flag = kcc_missionspread_prometheans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = promethean_pagan
				has_global_flag = prometheans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zalmoxian_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = bon_reformed
				NOT = { has_global_flag = bon_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_bon_reformeds" value = 5 } }
			set_global_flag = bon_in_china
			set_global_flag = kcc_missionspread_bon
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bon_reformed
				has_global_flag = bon_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_bon_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = norse_pagan_reformed
				NOT = { has_global_flag = norse_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_norse_pagan_reformeds" value = 5 } }
			set_global_flag = norse_in_china
			set_global_flag = kcc_missionspread_norse
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = norse_pagan_reformed
				has_global_flag = norse_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_norse_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = tengri_pagan_reformed
				NOT = { has_global_flag = tengri_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 5 } }
			set_global_flag = tengri_in_china
			set_global_flag = kcc_missionspread_tengri
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = tengri_pagan_reformed
				has_global_flag = tengri_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = baltic_pagan_reformed
				NOT = { has_global_flag = baltics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 5 } }
			set_global_flag = baltics_in_china
			set_global_flag = kcc_missionspread_baltic
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = baltic_pagan_reformed
				has_global_flag = baltics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = finnish_pagan_reformed
				NOT = { has_global_flag = finnish_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 5 } }
			set_global_flag = finnish_in_china
			set_global_flag = kcc_missionspread_finnish
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = finnish_pagan_reformed
				has_global_flag = finnish_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = aztec_reformed
				NOT = { has_global_flag = aztecs_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_aztec_reformeds" value = 5 } }
			set_global_flag = aztecs_in_china
			set_global_flag = kcc_missionspread_aztecs
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aztec_reformed
				has_global_flag = aztec_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_aztec_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = slavic_pagan_reformed
				NOT = { has_global_flag = slavs_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 5 } }
			set_global_flag = slavs_in_china
			set_global_flag = kcc_missionspread_slavic
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = slavic_pagan_reformed
				has_global_flag = slavs_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = west_african_pagan_reformed
				NOT = { has_global_flag = africans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 5 } }
			set_global_flag = africans_in_china
			set_global_flag = kcc_missionspread_africans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = west_african_pagan_reformed
				has_global_flag = africans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = zun_pagan_reformed
				NOT = { has_global_flag = zun_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zun_pagan_reformeds" value = 5 } }
			set_global_flag = zun_in_china
			set_global_flag = kcc_missionspread_zun
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zun_pagan_reformed
				has_global_flag = zun_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zun_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = hellenic_pagan_reformed
				NOT = { has_global_flag = hellenics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 5 } }
			set_global_flag = hellenics_in_china
			set_global_flag = kcc_missionspread_hellenics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hellenic_pagan_reformed
				has_global_flag = hellenics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = celtic_pagan_reformed
				NOT = { has_global_flag = celts_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 5 } }
			set_global_flag = celts_in_china
			set_global_flag = kcc_missionspread_celtics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = celtic_pagan_reformed
				has_global_flag = celts_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = egyptian_pagan_reformed
				NOT = { has_global_flag = egyptians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_kemetisms" value = 5 } }
			set_global_flag = egyptians_in_china
			set_global_flag = kcc_missionspread_egyptians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = egyptian_pagan_reformed
				has_global_flag = egyptians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_kemetisms" value = 5 } }
		}
		#Christian Immersion
		if = {
			limit = {
				religion = adoptionist
				NOT = { has_global_flag = adoptionists_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_adoptionists" value = 5 } }
			set_global_flag = adoptionists_in_china
			set_global_flag = kcc_missionspread_adoptionists
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = adoptionist
				has_global_flag = adoptionists_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_adoptionists" value = 5 } }
		}
		if = {
			limit = {
				religion = free_spirits
				NOT = { has_global_flag = free_spirits_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_free_spirits" value = 5 } }
			set_global_flag = free_spirits_in_china
			set_global_flag = kcc_missionspread_free_spirits
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = free_spirits
				has_global_flag = free_spirits_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_free_spirits" value = 5 } }
		}
		if = {
			limit = {
				religion = barlaamite
				NOT = { has_global_flag = barlaamites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_barlaamites" value = 5 } }
			set_global_flag = barlaamites_in_china
			set_global_flag = kcc_missionspread_barlaamites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = barlaamite
				has_global_flag = barlaamites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_barlaamites" value = 5 } }
		}
		if = {
			limit = {
				religion = judaizer
				NOT = { has_global_flag = judaizers_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_judaizers" value = 5 } }
			set_global_flag = judaizers_in_china
			set_global_flag = kcc_missionspread_judaizers
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = judaizer
				has_global_flag = judaizers_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_judaizers" value = 5 } }
		}
		if = {
			limit = {
				religion = mandean
				NOT = { has_global_flag = mandeans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_mandeans" value = 5 } }
			set_global_flag = mandeans_in_china
			set_global_flag = kcc_missionspread_mandeans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mandean
				has_global_flag = mandeans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_mandeans" value = 5 } }
		}
		if = {
			limit = {
				religion = chaldean
				NOT = { has_global_flag = chaldeans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_chaldeans" value = 5 } }
			set_global_flag = chaldeans_in_china
			set_global_flag = kcc_missionspread_chaldeans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = chaldean
				has_global_flag = chaldeans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_chaldeans" value = 5 } }
		}
		if = {
			limit = {
				religion = apollinarian
				NOT = { has_global_flag = apollinarians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_apollinarians" value = 5 } }
			set_global_flag = apollinarians_in_china
			set_global_flag = kcc_missionspread_apollinarians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = apollinarian
				has_global_flag = apollinarians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_apollinarians" value = 5 } }
		}
		if = {
			limit = {
				religion = yarsan
				NOT = { has_global_flag = yarsans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_yarsans" value = 5 } }
			set_global_flag = yarsans_in_china
			set_global_flag = kcc_missionspread_yarsans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yarsan
				has_global_flag = yarsans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_yarsans" value = 5 } }
		}
		#Last Vanilla Religions
		if = {
			limit = {
				religion = yazidi
				NOT = { has_global_flag = yazidis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_yazidis" value = 5 } }
			set_global_flag = yazidis_in_china
			set_global_flag = kcc_missionspread_yazidis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yazidi
				has_global_flag = yazidis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_yazidis" value = 5 } }
		}
		if = {
			limit = {
				religion = druze
				NOT = { has_global_flag = druze_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_druzes" value = 5 } }
			set_global_flag = druze_in_china
			set_global_flag = kcc_missionspread_druze
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = druze
				has_global_flag = druze_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_druzes" value = 5 } }
		}
		if = {
			limit = {
				religion = khurmazta
				NOT = { has_global_flag = khurmaztas_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_khurmaztas" value = 5 } }
			set_global_flag = khurmaztas_in_china
			set_global_flag = kcc_missionspread_khurmaztas
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = khurmazta
				has_global_flag = khurmaztas_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_khurmaztas" value = 5 } }
		}
		if = {
			limit = {
				religion = jewish
				NOT = { has_global_flag = jews_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_jewishs" value = 5 } }
			set_global_flag = jews_in_china
			set_global_flag = kcc_missionspread_jews
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jewish
				has_global_flag = jews_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_jewishs" value = 5 } }
		}
		if = {
			limit = {
				religion = samaritan
				NOT = { has_global_flag = samaritans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_samaritans" value = 5 } }
			set_global_flag = samaritans_in_china
			set_global_flag = kcc_missionspread_samaritans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = samaritan
				has_global_flag = samaritans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_samaritans" value = 5 } }
		}
		if = {
			limit = {
				religion = karaite
				NOT = { has_global_flag = karaites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_karaites" value = 5 } }
			set_global_flag = karaites_in_china
			set_global_flag = kcc_missionspread_karaites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = karaite
				has_global_flag = karaites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_karaites" value = 5 } }
		}
		if = {
			limit = {
				religion = hindu
				NOT = { has_global_flag = hindus_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_hindus" value = 5 } }
			set_global_flag = hindus_in_china
			set_global_flag = kcc_missionspread_hindus
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hindu
				has_global_flag = hindus_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_hindus" value = 5 } }
		}
	}
	
	option = {
		name = EVTOPT_kccmission.0022b
		trigger = { has_character_flag = kcc_end_missionary_final_success }
		prestige = 25
		piety = 50
		if = {
			limit = {
				religion = catholic
				NOT = { has_global_flag = catholics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_catholics" value = 2 } }
			set_global_flag = catholics_in_china
			set_global_flag = kcc_missionspread_catholics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = catholic
				has_global_flag = catholics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_catholics" value = 2 } }
		}
		if = {
			limit = {
				religion = cathar
				NOT = { has_global_flag = cathars_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_cathars" value = 2 } }
			set_global_flag = cathars_in_china
			set_global_flag = kcc_missionspread_cathars
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = cathar
				has_global_flag = cathars_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_cathars" value = 2 } }
		}
		if = {
			limit = {
				religion = fraticelli
				NOT = { has_global_flag = fraticellis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_fraticellis" value = 2 } }
			set_global_flag = fraticellis_in_china
			set_global_flag = kcc_missionspread_fraticellis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = fraticelli
				has_global_flag = fraticellis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_fraticellis" value = 2 } }
		}
		if = {
			limit = {
				religion = waldensian
				NOT = { has_global_flag = waldensians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_waldensians" value = 2 } }
			set_global_flag = waldensians_in_china
			set_global_flag = kcc_missionspread_waldensians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = waldensian
				has_global_flag = waldensians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_waldensians" value = 2 } }
		}
		if = {
			limit = {
				religion = lollard
				NOT = { has_global_flag = lollards_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_lollards" value = 2 } }
			set_global_flag = lollards_in_china
			set_global_flag = kcc_missionspread_lollards
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = lollard
				has_global_flag = lollards_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_lollards" value = 2 } }
		}
		if = {
			limit = {
				religion = orthodox
				NOT = { has_global_flag = orthodoxy_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_orthodoxs" value = 2 } }
			set_global_flag = orthodoxy_in_china
			set_global_flag = kcc_missionspread_orthodoxy
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = orthodox
				has_global_flag = orthodoxy_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_orthodoxs" value = 2 } }
		}
		if = {
			limit = {
				religion = miaphysite
				NOT = { has_global_flag = miaphysites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_miaphysites" value = 2 } }
			set_global_flag = miaphysites_in_china
			set_global_flag = kcc_missionspread_miaphysites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = miaphysite
				has_global_flag = miaphysites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_miaphysites" value = 2 } }
		}
		if = {
			limit = {
				religion = monophysite
				NOT = { has_global_flag = monophysites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_monophysites" value = 2 } }
			set_global_flag = monophysites_in_china
			set_global_flag = kcc_missionspread_monophysites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monophysite
				has_global_flag = monophysites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_monophysites" value = 2 } }
		}
		if = {
			limit = {
				religion = bogomilist
				NOT = { has_global_flag = bogomilists_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_bogomilists" value = 2 } }
			set_global_flag = bogomilists_in_china
			set_global_flag = kcc_missionspread_bogomilists
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bogomilist
				has_global_flag = bogomilists_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_bogomilists" value = 2 } }
		}
		if = {
			limit = {
				religion = monothelite
				NOT = { has_global_flag = monothelites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_monothelites" value = 2 } }
			set_global_flag = monothelites_in_china
			set_global_flag = kcc_missionspread_monothelites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monothelite
				has_global_flag = monothelites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_monothelites" value = 2 } }
		}
		if = {
			limit = {
				religion = iconoclast
				NOT = { has_global_flag = iconoclasts_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_iconoclasts" value = 2 } }
			set_global_flag = iconoclasts_in_china
			set_global_flag = kcc_missionspread_iconoclasts
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = iconoclast
				has_global_flag = iconoclasts_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_iconoclasts" value = 2 } }
		}
		if = {
			limit = {
				religion = paulician
				NOT = { has_global_flag = paulicians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_paulicians" value = 2 } }
			set_global_flag = paulicians_in_china
			set_global_flag = kcc_missionspread_paulicians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = paulician
				has_global_flag = paulicians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_paulicians" value = 2 } }
		}
		if = {
			limit = {
				religion = nestorian
				NOT = { has_global_flag = nestorians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_nestorians" value = 2 } }
			set_global_flag = nestorians_in_china
			set_global_flag = kcc_missionspread_nestorians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = nestorian
				has_global_flag = nestorians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_nestorians" value = 2 } }
		}
		if = {
			limit = {
				religion = messalian
				NOT = { has_global_flag = messalians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_messalians" value = 2 } }
			set_global_flag = messalians_in_china
			set_global_flag = kcc_missionspread_messalians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = messalian
				has_global_flag = messalians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_messalians" value = 2 } }
		}
		if = {
			limit = {
				religion = sunni
				NOT = { has_global_flag = sunnis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_sunnis" value = 2 } }
			set_global_flag = sunnis_in_china
			set_global_flag = kcc_missionspread_sunnis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = sunni
				has_global_flag = sunnis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_sunnis" value = 2 } }
		}
		if = {
			limit = {
				religion = zikri
				NOT = { has_global_flag = zikris_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zikris" value = 2 } }
			set_global_flag = zikris_in_china
			set_global_flag = kcc_missionspread_zikris
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zikri
				has_global_flag = zikris_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zikris" value = 2 } }
		}
		if = {
			limit = {
				religion = ibadi
				NOT = { has_global_flag = ibadis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_ibadis" value = 2 } }
			set_global_flag = ibadis_in_china
			set_global_flag = kcc_missionspread_ibadis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = ibadi
				has_global_flag = ibadis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_ibadis" value = 2 } }
		}
		if = {
			limit = {
				religion = kharijite
				NOT = { has_global_flag = kharijites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_kharijites" value = 2 } }
			set_global_flag = kharijites_in_china
			set_global_flag = kcc_missionspread_kharijites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = kharijite
				has_global_flag = kharijites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_kharijites" value = 2 } }
		}
		if = {
			limit = {
				religion = shiite
				NOT = { has_global_flag = shiites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_shiites" value = 2 } }
			set_global_flag = shiites_in_china
			set_global_flag = kcc_missionspread_shiites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = shiite
				has_global_flag = shiites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_shiites" value = 2 } }
		}
		if = {
			limit = {
				religion = qarmatian
				NOT = { has_global_flag = qarmatian_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_qarmatians" value = 2 } }
			set_global_flag = qarmatian_in_china
			set_global_flag = kcc_missionspread_qarmatian
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = qarmatian
				has_global_flag = qarmatian_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_qarmatians" value = 2 } }
		}
		if = {
			limit = {
				religion = hurufi
				NOT = { has_global_flag = hurufis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_hurufis" value = 2 } }
			set_global_flag = hurufis_in_china
			set_global_flag = kcc_missionspread_hurufis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hurufi
				has_global_flag = hurufis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_hurufis" value = 2 } }
		}
		if = {
			limit = {
				religion = zoroastrian
				NOT = { has_global_flag = zoroastrians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zoroastrians" value = 2 } }
			set_global_flag = zoroastrians_in_china
			set_global_flag = kcc_missionspread_zoroastrians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zoroastrian
				has_global_flag = zoroastrians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zoroastrians" value = 2 } }
		}
		if = {
			limit = {
				religion = mazdaki
				NOT = { has_global_flag = mazdakis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_mazdakis" value = 2 } }
			set_global_flag = mazdakis_in_china
			set_global_flag = kcc_missionspread_mazdakis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mazdaki
				has_global_flag = mazdakis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_mazdakis" value = 2 } }
		}
		if = {
			limit = {
				religion = manichean
				NOT = { has_global_flag = manicheans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_manicheans" value = 2 } }
			set_global_flag = manicheans_in_china
			set_global_flag = kcc_missionspread_manicheans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = manichean
				has_global_flag = manicheans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_manicheans" value = 2 } }
		}
		if = {
			limit = {
				religion = buddhist
				NOT = { has_global_flag = buddhists_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_buddhists" value = 2 } }
			set_global_flag = buddhists_in_china
			set_global_flag = kcc_missionspread_buddhists
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = buddhist
				has_global_flag = buddhists_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_buddhists" value = 2 } }
		}
		if = {
			limit = {
				religion = jain
				NOT = { has_global_flag = jains_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_jains" value = 2 } }
			set_global_flag = jains_in_china
			set_global_flag = kcc_missionspread_jains
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jain
				has_global_flag = jains_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_jains" value = 2 } }
		}
		if = {
			limit = {
				religion = aten_pagan
				NOT = { has_global_flag = atenics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_megalithic_reformeds" value = 2 } }
			set_global_flag = atenics_in_china
			set_global_flag = kcc_missionspread_atenics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aten_pagan
				has_global_flag = atenics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_megalithic_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = britannic_pagan
				NOT = { has_global_flag = britannics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_cybelene_reformeds" value = 2 } }
			set_global_flag = britannics_in_china
			set_global_flag = kcc_missionspread_britannics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = britannic_pagan
				has_global_flag = britannics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_cybelene_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = promethean_pagan
				NOT = { has_global_flag = prometheans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zalmoxian_reformeds" value = 2 } }
			set_global_flag = prometheans_in_china
			set_global_flag = kcc_missionspread_prometheans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = promethean_pagan
				has_global_flag = prometheans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zalmoxian_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = bon_reformed
				NOT = { has_global_flag = bon_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_bon_reformeds" value = 2 } }
			set_global_flag = bon_in_china
			set_global_flag = kcc_missionspread_bon
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bon_reformed
				has_global_flag = bon_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_bon_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = norse_pagan_reformed
				NOT = { has_global_flag = norse_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_norse_pagan_reformeds" value = 2 } }
			set_global_flag = norse_in_china
			set_global_flag = kcc_missionspread_norse
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = norse_pagan_reformed
				has_global_flag = norse_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_norse_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = tengri_pagan_reformed
				NOT = { has_global_flag = tengri_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 2 } }
			set_global_flag = tengri_in_china
			set_global_flag = kcc_missionspread_tengri
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = tengri_pagan_reformed
				has_global_flag = tengri_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = baltic_pagan_reformed
				NOT = { has_global_flag = baltics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 2 } }
			set_global_flag = baltics_in_china
			set_global_flag = kcc_missionspread_baltic
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = baltic_pagan_reformed
				has_global_flag = baltics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = finnish_pagan_reformed
				NOT = { has_global_flag = finnish_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 2 } }
			set_global_flag = finnish_in_china
			set_global_flag = kcc_missionspread_finnish
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = finnish_pagan_reformed
				has_global_flag = finnish_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = aztec_reformed
				NOT = { has_global_flag = aztecs_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_aztec_reformeds" value = 2 } }
			set_global_flag = aztecs_in_china
			set_global_flag = kcc_missionspread_aztecs
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aztec_reformed
				has_global_flag = aztec_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_aztec_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = slavic_pagan_reformed
				NOT = { has_global_flag = slavs_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 2 } }
			set_global_flag = slavs_in_china
			set_global_flag = kcc_missionspread_slavic
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = slavic_pagan_reformed
				has_global_flag = slavs_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = west_african_pagan_reformed
				NOT = { has_global_flag = africans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 2 } }
			set_global_flag = africans_in_china
			set_global_flag = kcc_missionspread_africans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = west_african_pagan_reformed
				has_global_flag = africans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = zun_pagan_reformed
				NOT = { has_global_flag = zun_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zun_pagan_reformeds" value = 2 } }
			set_global_flag = zun_in_china
			set_global_flag = kcc_missionspread_zun
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zun_pagan_reformed
				has_global_flag = zun_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zun_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = hellenic_pagan_reformed
				NOT = { has_global_flag = hellenics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 2 } }
			set_global_flag = hellenics_in_china
			set_global_flag = kcc_missionspread_hellenics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hellenic_pagan_reformed
				has_global_flag = hellenics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = celtic_pagan_reformed
				NOT = { has_global_flag = celts_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 2 } }
			set_global_flag = celts_in_china
			set_global_flag = kcc_missionspread_celtics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = celtic_pagan_reformed
				has_global_flag = celts_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = egyptian_pagan_reformed
				NOT = { has_global_flag = egyptians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_kemetisms" value = 2 } }
			set_global_flag = egyptians_in_china
			set_global_flag = kcc_missionspread_egyptians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = egyptian_pagan_reformed
				has_global_flag = egyptians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_kemetisms" value = 2 } }
		}
		#Christian Immersion
		if = {
			limit = {
				religion = adoptionist
				NOT = { has_global_flag = adoptionists_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_adoptionists" value = 2 } }
			set_global_flag = adoptionists_in_china
			set_global_flag = kcc_missionspread_adoptionists
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = adoptionist
				has_global_flag = adoptionists_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_adoptionists" value = 2 } }
		}
		if = {
			limit = {
				religion = free_spirits
				NOT = { has_global_flag = free_spirits_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_free_spirits" value = 2 } }
			set_global_flag = free_spirits_in_china
			set_global_flag = kcc_missionspread_free_spirits
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = free_spirits
				has_global_flag = free_spirits_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_free_spirits" value = 2 } }
		}
		if = {
			limit = {
				religion = barlaamite
				NOT = { has_global_flag = barlaamites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_barlaamites" value = 2 } }
			set_global_flag = barlaamites_in_china
			set_global_flag = kcc_missionspread_barlaamites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = barlaamite
				has_global_flag = barlaamites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_barlaamites" value = 2 } }
		}
		if = {
			limit = {
				religion = judaizer
				NOT = { has_global_flag = judaizers_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_judaizers" value = 2 } }
			set_global_flag = judaizers_in_china
			set_global_flag = kcc_missionspread_judaizers
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = judaizer
				has_global_flag = judaizers_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_judaizers" value = 2 } }
		}
		if = {
			limit = {
				religion = mandean
				NOT = { has_global_flag = mandeans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_mandeans" value = 2 } }
			set_global_flag = mandeans_in_china
			set_global_flag = kcc_missionspread_mandeans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mandean
				has_global_flag = mandeans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_mandeans" value = 2 } }
		}
		if = {
			limit = {
				religion = chaldean
				NOT = { has_global_flag = chaldeans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_chaldeans" value = 2 } }
			set_global_flag = chaldeans_in_china
			set_global_flag = kcc_missionspread_chaldeans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = chaldean
				has_global_flag = chaldeans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_chaldeans" value = 2 } }
		}
		if = {
			limit = {
				religion = apollinarian
				NOT = { has_global_flag = apollinarians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_apollinarians" value = 2 } }
			set_global_flag = apollinarians_in_china
			set_global_flag = kcc_missionspread_apollinarians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = apollinarian
				has_global_flag = apollinarians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_apollinarians" value = 2 } }
		}
		if = {
			limit = {
				religion = yarsan
				NOT = { has_global_flag = yarsans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_yarsans" value = 2 } }
			set_global_flag = yarsans_in_china
			set_global_flag = kcc_missionspread_yarsans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yarsan
				has_global_flag = yarsans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_yarsans" value = 2 } }
		}
		#Last Vanilla Religions
		if = {
			limit = {
				religion = yazidi
				NOT = { has_global_flag = yazidis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_yazidis" value = 2 } }
			set_global_flag = yazidis_in_china
			set_global_flag = kcc_missionspread_yazidis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yazidi
				has_global_flag = yazidis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_yazidis" value = 2 } }
		}
		if = {
			limit = {
				religion = druze
				NOT = { has_global_flag = druze_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_druzes" value = 2 } }
			set_global_flag = druze_in_china
			set_global_flag = kcc_missionspread_druze
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = druze
				has_global_flag = druze_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_druzes" value = 2 } }
		}
		if = {
			limit = {
				religion = khurmazta
				NOT = { has_global_flag = khurmaztas_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_khurmaztas" value = 2 } }
			set_global_flag = khurmaztas_in_china
			set_global_flag = kcc_missionspread_khurmaztas
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = khurmazta
				has_global_flag = khurmaztas_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_khurmaztas" value = 2 } }
		}
		if = {
			limit = {
				religion = jewish
				NOT = { has_global_flag = jews_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_jewishs" value = 2 } }
			set_global_flag = jews_in_china
			set_global_flag = kcc_missionspread_jews
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jewish
				has_global_flag = jews_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_jewishs" value = 2 } }
		}
		if = {
			limit = {
				religion = samaritan
				NOT = { has_global_flag = samaritans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_samaritans" value = 2 } }
			set_global_flag = samaritans_in_china
			set_global_flag = kcc_missionspread_samaritans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = samaritan
				has_global_flag = samaritans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_samaritans" value = 2 } }
		}
		if = {
			limit = {
				religion = karaite
				NOT = { has_global_flag = karaites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_karaites" value = 2 } }
			set_global_flag = karaites_in_china
			set_global_flag = kcc_missionspread_karaites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = karaite
				has_global_flag = karaites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_karaites" value = 2 } }
		}
		if = {
			limit = {
				religion = hindu
				NOT = { has_global_flag = hindus_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_hindus" value = 2 } }
			set_global_flag = hindus_in_china
			set_global_flag = kcc_missionspread_hindus
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hindu
				has_global_flag = hindus_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_hindus" value = 2 } }
		}
	}
	
	option = {
		name = EVTOPT_kccmission.0022c
		trigger = { has_character_flag = kcc_end_missionary_final_fail }
		prestige = -25
		piety = -50
	}
}

# You can try prosletyzing again now
character_event = {
	id = kccmission.0023
	has_dlc = "Jade Dragon"
    hide_window = yes
    is_triggered_only = yes
	
	immediate = {
		clr_character_flag = proselytized_in_china
	}

}

#Transfer missionary progress to heir
character_event = {
	id = kccmission.0024
	has_dlc = "Jade Dragon"
	hide_window = yes

	trigger = {
		OR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}

	is_triggered_only = yes

	immediate = {
		if = {
			limit = {
				current_heir = {
					NOR = {
						has_character_modifier = chinese_missionaries_good
						has_character_modifier = chinese_missionaries_bad
					}
					religion = ROOT
				}
			}
			current_heir = {
				if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 11.5 } } }
					set_variable = { which = kcc_missionary_progress value = 11.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 10.5 } } }
					set_variable = { which = kcc_missionary_progress value = 10.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 9.5 } } }
					set_variable = { which = kcc_missionary_progress value = 9.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 8.5 } } }
					set_variable = { which = kcc_missionary_progress value = 8.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 7.5 } } }
					set_variable = { which = kcc_missionary_progress value = 7.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 6.5 } } }
					set_variable = { which = kcc_missionary_progress value = 6.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 5.5 } } }
					set_variable = { which = kcc_missionary_progress value = 5.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 4.5 } } }
					set_variable = { which = kcc_missionary_progress value = 4.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 3.5 } } }
					set_variable = { which = kcc_missionary_progress value = 3.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 2.5 } } }
					set_variable = { which = kcc_missionary_progress value = 2.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 1.5 } } }
					set_variable = { which = kcc_missionary_progress value = 1.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 0.5 } } }
					set_variable = { which = kcc_missionary_progress value = 0.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = -0.5 } } }
					set_variable = { which = kcc_missionary_progress value = -0.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = -1.5 } } }
					set_variable = { which = kcc_missionary_progress value = -1.5 }
				}
				else = {
					set_variable = { which = kcc_missionary_progress value = -2.5 }
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_starving_peasants } }
					random_list = {
						50 = { set_character_flag = kcc_starving_peasants }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_chinese_bandits } }
					random_list = {
						50 = { set_character_flag = kcc_chinese_bandits }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_confucian_debate } }
					random_list = {
						50 = { set_character_flag = kcc_confucian_debate }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_faked_miracle } }
					random_list = {
						50 = { set_character_flag = kcc_faked_miracle }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_peasant_architecture } }
					random_list = {
						50 = { set_character_flag = kcc_peasant_architecture}
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_grieving_parent } }
					random_list = {
						50 = { set_character_flag = kcc_grieving_parent }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_holy_translation } }
					random_list = {
						50 = { set_character_flag = kcc_holy_translation }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_convert_admin } }
					random_list = {
						50 = { set_character_flag = kcc_convert_admin }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_convert_money } }
					random_list = {
						50 = { set_character_flag = kcc_convert_money }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_pious_display } }
					random_list = {
						50 = { set_character_flag = kcc_pious_display }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_scapegoat } }
					random_list = {
						50 = { set_character_flag = kcc_scapegoat }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_imperial_examination } }
					random_list = {
						50 = { set_character_flag = kcc_imperial_examination }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_drunken_brawl } }
					random_list = {
						50 = { set_character_flag = kcc_drunken_brawl }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_sinful_locals } }
					random_list = {
						50 = { set_character_flag = kcc_sinful_locals }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_mingled_soldiers } }
					random_list = {
						50 = { set_character_flag = kcc_mingled_soldiers }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_officer_meeting } }
					random_list = {
						50 = { set_character_flag = kcc_officer_meeting }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_traditionalists } }
					random_list = {
						50 = { set_character_flag = kcc_traditionalists }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_asian_pilgrim } }
					random_list = {
						50 = { set_character_flag = kcc_asian_pilgrim }
						50 = {}
					}
				}
				letter_event = { id = kccmission.0025 days = 5 }
			}
		}
		else_if = {
			limit = {
				current_heir = {
					NOR = {
						has_character_modifier = chinese_missionaries_good
						has_character_modifier = chinese_missionaries_bad
					}
					NOT = { religion = ROOT }
				}
			}
			current_heir = {
				character_event = { id = kccmission.0032 days = 5 }
			}
		}
	}
}

#Inform heir on missionary progress, abandon mission?
letter_event = {
    id = kccmission.0025
	has_dlc = "Jade Dragon"
    desc = {
		trigger = { has_character_modifier = chinese_missionaries_good }
		text = EVTDESC_kccmission.0025a
	}
	desc = {
		trigger = { NOT = { has_character_modifier = chinese_missionaries_good } }
		text = EVTDESC_kccmission.0025b
	}
    border = GFX_event_letter_frame_diplomacy

    is_triggered_only = yes
	
	immediate = {
		offmap_china = {
			ruler = {
				save_event_target_as = portrait_target
			}
		}
		set_character_flag = proselytized_in_china
		if = {
			limit = {
				NOR = {	
					has_character_modifier = chinese_missionaries_good
					has_character_modifier = chinese_missionaries_bad
				}
			}
			random_list = {
				50 = {
					modifier = {
						factor = 3
						is_liked_by_China_trigger = yes
					}
					modifier = {
						factor = 2
						prestige = 2000
					}
					modifier = {
						factor = 2
						realm_diplomacy = 28
					}
					add_character_modifier = {
						inherit = yes
						name = chinese_missionaries_good
						years = 5
					}
				}
				50 = {
					modifier = {
						factor = 3
						is_disliked_by_China_trigger = yes
					}
					modifier = {
						factor = 2
						NOT = { prestige = 500 }
					}
					modifier = {
						factor = 2
						NOT = { realm_diplomacy = 16 }
					}
					add_character_modifier = {
						inherit = yes
						name = chinese_missionaries_bad
						years = 5
					}
				}
			}
		}
	}
	
	portrait = event_target:portrait_target
    
    option = { #OK
        name = EVTOPT_kccmission.0025a
		trigger = { has_secret_religion = no }
		set_character_flag = kcc_inherited_missionaries
		if = {
			limit = { has_character_modifier = chinese_missionaries_bad }
			add_offmap_currency = {
				offmap = offmap_china
				value = -100
			}
		}
		
		ai_chance = {
			factor = 50
			modifier = {
				factor = 5
				trait = zealous
			}
			modifier = {
				factor = 2
				OR = {
					trait = proud
					trait = ambitious
				}
			}
			modifier = {
				factor = 0.33
				has_character_modifier = chinese_missionaries_bad
			}
		}
    }
	
	option = { #Let's stop
		name = {
			text = EVTOPT_kccmission.0025b
			trigger = { has_secret_religion = no }
		}
		name = {
			text = EVTOPT_kccmission.0025c
			trigger = { has_secret_religion = yes }
		}
		if = {
			limit = { has_character_modifier = chinese_missionaries_good }
			remove_character_modifier = chinese_missionaries_good
			prestige = -100
			piety = -100
		}
		else = {
			remove_character_modifier = chinese_missionaries_bad
		}
		kcc_clr_missionary_flags_effect = yes
		hidden_tooltip = {
			character_event = { id = kccmission.0023 years = 10 }
			set_variable = { which = kcc_missionary_progress value = 0 }
		}
		
		ai_chance = {
			factor = 50
			modifier = {
				factor = 5
				trait = cynical
			}
			modifier = {
				factor = 2
				OR = {
					trait = humble
					trait = content
				}
			}
			modifier = {
				factor = 0.33
				has_character_modifier = chinese_missionaries_good
			}
		}
    }
}

# Mission over, how'd your heir do?
character_event = {
	id = kccmission.0026
	has_dlc = "Jade Dragon"
	picture = GFX_evt_upsetting_letter
	desc = {
		trigger = {
			OR = {
				has_character_flag = kcc_end_missionary_epic_success
				has_character_flag = kcc_end_missionary_final_success
			}
		}
		text = EVTDESC_kccmission.0026a
		picture = GFX_evt_pleasing_letter
	}
	desc = {
		trigger = { has_character_flag = kcc_end_missionary_final_fail }
		text = EVTDESC_kccmission.0022b
	}
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	has_character_flag = kcc_inherited_missionaries
	
	is_triggered_only = yes
	
	trigger = {
		NOR = {	
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
			has_character_flag = kcc_got_the_boot_from_china
		}
	}
	
	immediate = {
		if = {
			limit = { check_variable = { which = kcc_missionary_progress value = 15.5 } }
			set_character_flag = kcc_end_missionary_epic_success
		}
		else_if = {
			limit = { check_variable = { which = kcc_missionary_progress value = 8.5 } }
			set_character_flag = kcc_end_missionary_final_success
		}
		else = {
			set_character_flag = kcc_end_missionary_final_fail
		}
	}
	
	after = {
		clr_character_flag = kcc_inherited_missionaries
		kcc_clr_missionary_flags_effect = yes
		if = {
			limit = {
				religion = catholic
				check_variable = { which = "global_chinese_catholics" value = 20 }
				NOT = { has_global_flag = catholic_china_one }
			}
			set_global_flag = catholic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_catholics
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = catholic
				check_variable = { which = "global_chinese_catholics" value = 40 }
				NOT = { has_global_flag = catholic_china_two }
			}
			set_global_flag = catholic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_catholics
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = catholic
				check_variable = { which = "global_chinese_catholics" value = 100 }
				NOT = { has_global_flag = catholic_china_three }
			}
			set_global_flag = catholic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_catholics
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = cathar
				check_variable = { which = "global_chinese_cathars" value = 20 }
				NOT = { has_global_flag = cathar_china_one }
			}
			set_global_flag = cathar_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_cathars
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = cathar
				check_variable = { which = "global_chinese_cathars" value = 40 }
				NOT = { has_global_flag = cathar_china_two }
			}
			set_global_flag = cathar_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_cathars
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = cathar
				check_variable = { which = "global_chinese_cathars" value = 100 }
				NOT = { has_global_flag = cathar_china_three }
			}
			set_global_flag = cathar_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_cathars
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = fraticelli
				check_variable = { which = "global_chinese_fraticellis" value = 20 }
				NOT = { has_global_flag = fraticelli_china_one }
			}
			set_global_flag = fraticelli_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_fraticellis
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = fraticelli
				check_variable = { which = "global_chinese_fraticellis" value = 40 }
				NOT = { has_global_flag = fraticelli_china_two }
			}
			set_global_flag = fraticelli_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_fraticellis
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = fraticelli
				check_variable = { which = "global_chinese_fraticellis" value = 100 }
				NOT = { has_global_flag = fraticelli_china_three }
			}
			set_global_flag = fraticelli_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_fraticellis
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = waldensian
				check_variable = { which = "global_chinese_waldensians" value = 20 }
				NOT = { has_global_flag = waldensian_china_one }
			}
			set_global_flag = waldensian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_waldensians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = waldensian
				check_variable = { which = "global_chinese_waldensians" value = 40 }
				NOT = { has_global_flag = waldensian_china_two }
			}
			set_global_flag = waldensian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_waldensians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = waldensian
				check_variable = { which = "global_chinese_waldensians" value = 100 }
				NOT = { has_global_flag = waldensian_china_three }
			}
			set_global_flag = waldensian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_waldensians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = lollard
				check_variable = { which = "global_chinese_lollards" value = 20 }
				NOT = { has_global_flag = lollard_china_one }
			}
			set_global_flag = lollard_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_lollards
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = lollard
				check_variable = { which = "global_chinese_lollards" value = 40 }
				NOT = { has_global_flag = lollard_china_two }
			}
			set_global_flag = lollard_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_lollards
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = lollard
				check_variable = { which = "global_chinese_lollards" value = 100 }
				NOT = { has_global_flag = lollard_china_three }
			}
			set_global_flag = lollard_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_lollards
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = orthodox
				check_variable = { which = "global_chinese_orthodoxs" value = 20 }
				NOT = { has_global_flag = orthodox_china_one }
			}
			set_global_flag = orthodox_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_orthodoxy
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = orthodox
				check_variable = { which = "global_chinese_orthodoxs" value = 40 }
				NOT = { has_global_flag = orthodox_china_two }
			}
			set_global_flag = orthodox_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_orthodoxy
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = orthodox
				check_variable = { which = "global_chinese_orthodoxs" value = 100 }
				NOT = { has_global_flag = orthodox_china_three }
			}
			set_global_flag = orthodox_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_orthodoxy
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = miaphysite
				check_variable = { which = "global_chinese_miaphysites" value = 20 }
				NOT = { has_global_flag = miaphysite_china_one }
			}
			set_global_flag = miaphysite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_miaphysites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = miaphysite
				check_variable = { which = "global_chinese_miaphysites" value = 40 }
				NOT = { has_global_flag = miaphysite_china_two }
			}
			set_global_flag = miaphysite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_miaphysites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = miaphysite
				check_variable = { which = "global_chinese_miaphysites" value = 100 }
				NOT = { has_global_flag = miaphysite_china_three }
			}
			set_global_flag = miaphysite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_miaphysites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = monophysite
				check_variable = { which = "global_chinese_monophysites" value = 20 }
				NOT = { has_global_flag = monophysite_china_one }
			}
			set_global_flag = monophysite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_monophysites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monophysite
				check_variable = { which = "global_chinese_monophysites" value = 40 }
				NOT = { has_global_flag = monophysite_china_two }
			}
			set_global_flag = monophysite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_monophysites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monophysite
				check_variable = { which = "global_chinese_monophysites" value = 100 }
				NOT = { has_global_flag = monophysite_china_three }
			}
			set_global_flag = monophysite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_monophysites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = bogomilist
				check_variable = { which = "global_chinese_bogomilists" value = 20 }
				NOT = { has_global_flag = bogomilist_china_one }
			}
			set_global_flag = bogomilist_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_bogomilists
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bogomilist
				check_variable = { which = "global_chinese_bogomilists" value = 40 }
				NOT = { has_global_flag = bogomilist_china_two }
			}
			set_global_flag = bogomilist_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_bogomilists
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bogomilist
				check_variable = { which = "global_chinese_bogomilists" value = 100 }
				NOT = { has_global_flag = bogomilist_china_three }
			}
			set_global_flag = bogomilist_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_bogomilists
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = monothelite
				check_variable = { which = "global_chinese_monothelites" value = 20 }
				NOT = { has_global_flag = monothelite_china_one }
			}
			set_global_flag = monothelite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_monothelites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monothelite
				check_variable = { which = "global_chinese_monothelites" value = 40 }
				NOT = { has_global_flag = monothelite_china_two }
			}
			set_global_flag = monothelite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_monothelites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monothelite
				check_variable = { which = "global_chinese_monothelites" value = 100 }
				NOT = { has_global_flag = monothelite_china_three }
			}
			set_global_flag = monothelite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_monothelites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = iconoclast
				check_variable = { which = "global_chinese_iconoclasts" value = 20 }
				NOT = { has_global_flag = iconoclast_china_one }
			}
			set_global_flag = iconoclast_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_iconoclasts
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = iconoclast
				check_variable = { which = "global_chinese_iconoclasts" value = 40 }
				NOT = { has_global_flag = iconoclast_china_two }
			}
			set_global_flag = iconoclast_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_iconoclasts
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = iconoclast
				check_variable = { which = "global_chinese_iconoclasts" value = 100 }
				NOT = { has_global_flag = iconoclast_china_three }
			}
			set_global_flag = iconoclast_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_iconoclasts
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = paulician
				check_variable = { which = "global_chinese_paulicians" value = 20 }
				NOT = { has_global_flag = paulician_china_one }
			}
			set_global_flag = paulician_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_paulicians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = paulician
				check_variable = { which = "global_chinese_paulicians" value = 40 }
				NOT = { has_global_flag = paulician_china_two }
			}
			set_global_flag = paulician_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_paulicians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = paulician
				check_variable = { which = "global_chinese_paulicians" value = 100 }
				NOT = { has_global_flag = paulician_china_three }
			}
			set_global_flag = paulician_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_paulicians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = nestorian
				check_variable = { which = "global_chinese_nestorians" value = 20 }
				NOT = { has_global_flag = nestorian_china_one }
			}
			set_global_flag = nestorian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_nestorians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = nestorian
				check_variable = { which = "global_chinese_nestorians" value = 40 }
				NOT = { has_global_flag = nestorian_china_two }
			}
			set_global_flag = nestorian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_nestorians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = nestorian
				check_variable = { which = "global_chinese_nestorians" value = 100 }
				NOT = { has_global_flag = nestorian_china_three }
			}
			set_global_flag = nestorian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_nestorians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = messalian
				check_variable = { which = "global_chinese_messalians" value = 20 }
				NOT = { has_global_flag = messalian_china_one }
			}
			set_global_flag = messalian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_messalians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = messalian
				check_variable = { which = "global_chinese_messalians" value = 40 }
				NOT = { has_global_flag = messalian_china_two }
			}
			set_global_flag = messalian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_messalians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = messalian
				check_variable = { which = "global_chinese_messalians" value = 100 }
				NOT = { has_global_flag = messalian_china_three }
			}
			set_global_flag = messalian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_messalians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = sunni
				check_variable = { which = "global_chinese_sunnis" value = 20 }
				NOT = { has_global_flag = sunni_china_one }
			}
			set_global_flag = sunni_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_sunnis
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = sunni
				check_variable = { which = "global_chinese_sunnis" value = 40 }
				NOT = { has_global_flag = sunni_china_two }
			}
			set_global_flag = sunni_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_sunnis
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = sunni
				check_variable = { which = "global_chinese_sunnis" value = 100 }
				NOT = { has_global_flag = sunni_china_three }
			}
			set_global_flag = sunni_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_sunnis
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = zikri
				check_variable = { which = "global_chinese_zikris" value = 20 }
				NOT = { has_global_flag = zikri_china_one }
			}
			set_global_flag = zikri_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zikris
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zikri
				check_variable = { which = "global_chinese_zikris" value = 40 }
				NOT = { has_global_flag = zikri_china_two }
			}
			set_global_flag = zikri_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zikris
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zikri
				check_variable = { which = "global_chinese_zikris" value = 100 }
				NOT = { has_global_flag = zikri_china_three }
			}
			set_global_flag = zikri_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zikris
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = ibadi
				check_variable = { which = "global_chinese_ibadis" value = 20 }
				NOT = { has_global_flag = ibadi_china_one }
			}
			set_global_flag = ibadi_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_ibadis
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = ibadi
				check_variable = { which = "global_chinese_ibadis" value = 40 }
				NOT = { has_global_flag = ibadi_china_two }
			}
			set_global_flag = ibadi_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_ibadis
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = ibadi
				check_variable = { which = "global_chinese_ibadis" value = 100 }
				NOT = { has_global_flag = ibadi_china_three }
			}
			set_global_flag = ibadi_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_ibadis
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = kharijite
				check_variable = { which = "global_chinese_kharijites" value = 20 }
				NOT = { has_global_flag = kharijite_china_one }
			}
			set_global_flag = kharijite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_kharijites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = kharijite
				check_variable = { which = "global_chinese_kharijites" value = 40 }
				NOT = { has_global_flag = kharijite_china_two }
			}
			set_global_flag = kharijite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_kharijites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = kharijite
				check_variable = { which = "global_chinese_kharijites" value = 100 }
				NOT = { has_global_flag = kharijite_china_three }
			}
			set_global_flag = kharijite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_kharijites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = shiite
				check_variable = { which = "global_chinese_shiites" value = 20 }
				NOT = { has_global_flag = shiite_china_one }
			}
			set_global_flag = shiite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_shiites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = shiite
				check_variable = { which = "global_chinese_shiites" value = 40 }
				NOT = { has_global_flag = shiite_china_two }
			}
			set_global_flag = shiite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_shiites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = shiite
				check_variable = { which = "global_chinese_shiites" value = 100 }
				NOT = { has_global_flag = shiite_china_three }
			}
			set_global_flag = shiite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_shiites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = qarmatian
				check_variable = { which = "global_chinese_qarmatians" value = 20 }
				NOT = { has_global_flag = qarmatian_china_one }
			}
			set_global_flag = qarmatian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_qarmatian
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = qarmatian
				check_variable = { which = "global_chinese_qarmatians" value = 40 }
				NOT = { has_global_flag = qarmatian_china_two }
			}
			set_global_flag = qarmatian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_qarmatian
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = qarmatian
				check_variable = { which = "global_chinese_qarmatians" value = 100 }
				NOT = { has_global_flag = qarmatian_china_three }
			}
			set_global_flag = qarmatian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_qarmatian
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = hurufi
				check_variable = { which = "global_chinese_hurufis" value = 20 }
				NOT = { has_global_flag = hurufi_china_one }
			}
			set_global_flag = hurufi_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hurufis
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hurufi
				check_variable = { which = "global_chinese_hurufis" value = 40 }
				NOT = { has_global_flag = hurufi_china_two }
			}
			set_global_flag = hurufi_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hurufis
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hurufi
				check_variable = { which = "global_chinese_hurufis" value = 100 }
				NOT = { has_global_flag = hurufi_china_three }
			}
			set_global_flag = hurufi_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hurufis
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = zoroastrian
				check_variable = { which = "global_chinese_zoroastrians" value = 20 }
				NOT = { has_global_flag = zoroastrian_china_one }
			}
			set_global_flag = zoroastrian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zoroastrians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zoroastrian
				check_variable = { which = "global_chinese_zoroastrians" value = 40 }
				NOT = { has_global_flag = zoroastrian_china_two }
			}
			set_global_flag = zoroastrian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zoroastrians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zoroastrian
				check_variable = { which = "global_chinese_zoroastrians" value = 100 }
				NOT = { has_global_flag = zoroastrian_china_three }
			}
			set_global_flag = zoroastrian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zoroastrians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = mazdaki
				check_variable = { which = "global_chinese_mazdakis" value = 20 }
				NOT = { has_global_flag = mazdaki_china_one }
			}
			set_global_flag = mazdaki_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_mazdakis
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mazdaki
				check_variable = { which = "global_chinese_mazdakis" value = 40 }
				NOT = { has_global_flag = mazdaki_china_two }
			}
			set_global_flag = mazdaki_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_mazdakis
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mazdaki
				check_variable = { which = "global_chinese_mazdakis" value = 100 }
				NOT = { has_global_flag = mazdaki_china_three }
			}
			set_global_flag = mazdaki_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_mazdakis
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = manichean
				check_variable = { which = "global_chinese_manicheans" value = 20 }
				NOT = { has_global_flag = manichean_china_one }
			}
			set_global_flag = manichean_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_manicheans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = manichean
				check_variable = { which = "global_chinese_manicheans" value = 40 }
				NOT = { has_global_flag = manichean_china_two }
			}
			set_global_flag = manichean_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_manicheans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = manichean
				check_variable = { which = "global_chinese_manicheans" value = 100 }
				NOT = { has_global_flag = manichean_china_three }
			}
			set_global_flag = manichean_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_manicheans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = buddhist
				check_variable = { which = "global_chinese_buddhists" value = 20 }
				NOT = { has_global_flag = buddhist_china_one }
			}
			set_global_flag = buddhist_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_buddhists
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = buddhist
				check_variable = { which = "global_chinese_buddhists" value = 40 }
				NOT = { has_global_flag = buddhist_china_two }
			}
			set_global_flag = buddhist_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_buddhists
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = buddhist
				check_variable = { which = "global_chinese_buddhists" value = 100 }
				NOT = { has_global_flag = buddhist_china_three }
			}
			set_global_flag = buddhist_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_buddhists
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = jain
				check_variable = { which = "global_chinese_jains" value = 20 }
				NOT = { has_global_flag = jain_china_one }
			}
			set_global_flag = jain_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_jains
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jain
				check_variable = { which = "global_chinese_jains" value = 40 }
				NOT = { has_global_flag = jain_china_two }
			}
			set_global_flag = jain_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_jains
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jain
				check_variable = { which = "global_chinese_jains" value = 100 }
				NOT = { has_global_flag = jain_china_three }
			}
			set_global_flag = jain_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_jains
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = aten_pagan
				check_variable = { which = "global_chinese_megalithic_reformeds" value = 20 }
				NOT = { has_global_flag = atenic_china_one }
			}
			set_global_flag = atenic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_atenics
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aten_pagan
				check_variable = { which = "global_chinese_megalithic_reformeds" value = 40 }
				NOT = { has_global_flag = atenic_china_two }
			}
			set_global_flag = atenic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_atenics
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aten_pagan
				check_variable = { which = "global_chinese_megalithic_reformeds" value = 100 }
				NOT = { has_global_flag = atenic_china_three }
			}
			set_global_flag = atenic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_atenics
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = britannic_pagan
				check_variable = { which = "global_chinese_britanics" value = 20 }
				NOT = { has_global_flag = britanic_china_one }
			}
			set_global_flag = britanic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_britannics
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = britannic_pagan
				check_variable = { which = "global_chinese_britanics" value = 40 }
				NOT = { has_global_flag = britanic_china_two }
			}
			set_global_flag = britanic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_britannics
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = britannic_pagan
				check_variable = { which = "global_chinese_britanics" value = 100 }
				NOT = { has_global_flag = britanic_china_three }
			}
			set_global_flag = britanic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_britannics
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = promethean_pagan
				check_variable = { which = "global_chinese_zalmoxian_reformeds" value = 20 }
				NOT = { has_global_flag = promethean_china_one }
			}
			set_global_flag = promethean_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_prometheans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = promethean_pagan
				check_variable = { which = "global_chinese_zalmoxian_reformeds" value = 40 }
				NOT = { has_global_flag = promethean_china_two }
			}
			set_global_flag = promethean_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_prometheans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = promethean_pagan
				check_variable = { which = "global_chinese_zalmoxian_reformeds" value = 100 }
				NOT = { has_global_flag = promethean_china_three }
			}
			set_global_flag = promethean_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_prometheans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = bon_reformed
				check_variable = { which = "global_chinese_bon_reformeds" value = 20 }
				NOT = { has_global_flag = bon_china_one }
			}
			set_global_flag = bon_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_bon
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bon_reformed
				check_variable = { which = "global_chinese_bon_reformeds" value = 40 }
				NOT = { has_global_flag = bon_china_two }
			}
			set_global_flag = bon_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_bon
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bon_reformed
				check_variable = { which = "global_chinese_bon_reformeds" value = 100 }
				NOT = { has_global_flag = bon_china_three }
			}
			set_global_flag = bon_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_bon
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = norse_pagan_reformed
				check_variable = { which = "global_chinese_norse_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = norse_china_one }
			}
			set_global_flag = norse_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_norse
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = norse_pagan_reformed
				check_variable = { which = "global_chinese_norse_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = norse_china_two }
			}
			set_global_flag = norse_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_norse
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = norse_pagan_reformed
				check_variable = { which = "global_chinese_norse_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = norse_china_three }
			}
			set_global_flag = norse_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_norse
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = tengri_pagan_reformed
				check_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = tengri_china_one }
			}
			set_global_flag = tengri_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_tengri
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = tengri_pagan_reformed
				check_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = tengri_china_two }
			}
			set_global_flag = tengri_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_tengri
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = tengri_pagan_reformed
				check_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = tengri_china_three }
			}
			set_global_flag = tengri_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_tengri
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = baltic_pagan_reformed
				check_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = baltic_china_one }
			}
			set_global_flag = baltic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_baltic
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = baltic_pagan_reformed
				check_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = baltic_china_two }
			}
			set_global_flag = baltic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_baltic
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = baltic_pagan_reformed
				check_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = baltic_china_three }
			}
			set_global_flag = baltic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_baltic
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = finnish_pagan_reformed
				check_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = finnish_china_one }
			}
			set_global_flag = finnish_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_finnish
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = finnish_pagan_reformed
				check_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = finnish_china_two }
			}
			set_global_flag = finnish_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_finnish
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = finnish_pagan_reformed
				check_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = finnish_china_three }
			}
			set_global_flag = finnish_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_finnish
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = aztec_reformed
				check_variable = { which = "global_chinese_aztec_reformeds" value = 20 }
				NOT = { has_global_flag = aztec_china_one }
			}
			set_global_flag = aztec_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_aztecs
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aztec_reformed
				check_variable = { which = "global_chinese_aztec_reformeds" value = 40 }
				NOT = { has_global_flag = aztec_china_two }
			}
			set_global_flag = aztec_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_aztecs
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aztec_reformed
				check_variable = { which = "global_chinese_aztec_reformeds" value = 100 }
				NOT = { has_global_flag = aztec_china_three }
			}
			set_global_flag = aztec_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_aztecs
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = slavic_pagan_reformed
				check_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = slavic_china_one }
			}
			set_global_flag = slavic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_slavic
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = slavic_pagan_reformed
				check_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = slavic_china_two }
			}
			set_global_flag = slavic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_slavic
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = slavic_pagan_reformed
				check_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = slavic_china_three }
			}
			set_global_flag = slavic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_slavic
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = west_african_pagan_reformed
				check_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = african_china_one }
			}
			set_global_flag = african_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_africans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = west_african_pagan_reformed
				check_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = african_china_two }
			}
			set_global_flag = african_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_africans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = west_african_pagan_reformed
				check_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = african_china_three }
			}
			set_global_flag = african_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_africans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = zun_pagan_reformed
				check_variable = { which = "global_chinese_zun_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = zun_china_one }
			}
			set_global_flag = zun_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zun
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zun_pagan_reformed
				check_variable = { which = "global_chinese_zun_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = zun_china_two }
			}
			set_global_flag = zun_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zun
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zun_pagan_reformed
				check_variable = { which = "global_chinese_zun_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = zun_china_three }
			}
			set_global_flag = zun_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_zun
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = hellenic_pagan_reformed
				check_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = hellenic_china_one }
			}
			set_global_flag = hellenic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hellenics
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hellenic_pagan_reformed
				check_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = hellenic_china_two }
			}
			set_global_flag = hellenic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hellenics
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hellenic_pagan_reformed
				check_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = hellenic_china_three }
			}
			set_global_flag = hellenic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hellenics
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = celtic_pagan_reformed
				check_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 20 }
				NOT = { has_global_flag = celtic_china_one }
			}
			set_global_flag = celtic_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_celtics
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = celtic_pagan_reformed
				check_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 40 }
				NOT = { has_global_flag = celtic_china_two }
			}
			set_global_flag = celtic_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_celtics
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = celtic_pagan_reformed
				check_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 100 }
				NOT = { has_global_flag = celtic_china_three }
			}
			set_global_flag = celtic_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_celtics
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = egyptian_pagan_reformed
				check_variable = { which = "global_chinese_kemetisms" value = 20 }
				NOT = { has_global_flag = egyptian_china_one }
			}
			set_global_flag = egyptian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_egyptians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = egyptian_pagan_reformed
				check_variable = { which = "global_chinese_kemetisms" value = 40 }
				NOT = { has_global_flag = egyptian_china_two }
			}
			set_global_flag = egyptian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_egyptians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = egyptian_pagan_reformed
				check_variable = { which = "global_chinese_kemetisms" value = 100 }
				NOT = { has_global_flag = egyptian_china_three }
			}
			set_global_flag = egyptian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_egyptians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = catholic
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_catholic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_catholic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = catholic
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_catholic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_catholic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = cathar
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_cathar_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_cathar_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = cathar
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_cathar_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_cathar_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = fraticelli
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_fraticelli_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_fraticelli_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = fraticelli
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_fraticelli_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_fraticelli_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = waldensian
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_waldensian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_waldensian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = waldensian
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_waldensian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_waldensian_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = lollard
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_lollard_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_lollard_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = lollard
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_lollard_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_lollard_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = orthodox
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_orthodox_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_orthodox_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = orthodox
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_orthodox_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_orthodox_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = miaphysite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_miaphysite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_miaphysite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = miaphysite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_miaphysite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_miaphysite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = monophysite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_monophysite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_monophysite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = monophysite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_monophysite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_monophysite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = bogomilist
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_bogomilist_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_bogomilist_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = bogomilist
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_bogomilist_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_bogomilist_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = monothelite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_monothelite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_monothelite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = monothelite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_monothelite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_monothelite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = iconoclast
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_iconoclast_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_iconoclast_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = iconoclast
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_iconoclast_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_iconoclast_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = paulician
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_paulician_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_paulician_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = paulician
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_paulician_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_paulician_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = nestorian
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_nestorian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_nestorian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = nestorian
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_nestorian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_nestorian_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = messalian
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_messalian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_messalian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = messalian
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_messalian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_messalian_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = sunni
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_sunni_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_sunni_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = sunni
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_sunni_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_sunni_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = zikri
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_zikri_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_zikri_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = zikri
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_zikri_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_zikri_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = ibadi
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_ibadi_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_ibadi_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = ibadi
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_ibadi_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_ibadi_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = kharijite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_kharijite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_kharijite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = kharijite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_kharijite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_kharijite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = shiite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_shiite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_shiite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = shiite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_shiite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_shiite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = qarmatian
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_qarmatian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_qarmatian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = qarmatian
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_qarmatian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_qarmatian_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = hurufi
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_hurufi_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_hurufi_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = hurufi
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_hurufi_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_hurufi_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = zoroastrian
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_zoroastrian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_zoroastrian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = zoroastrian
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_zoroastrian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_zoroastrian_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = mazdaki
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_mazdaki_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_mazdaki_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = mazdaki
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_mazdaki_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_mazdaki_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = manichean
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_manichean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_manichean_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = manichean
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_manichean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_manichean_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = buddhist
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_buddhist_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_buddhist_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = buddhist
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_buddhist_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_buddhist_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = jain
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_jain_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_jain_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = jain
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_jain_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_jain_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = aten_pagan
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_atenic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_atenic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = aten_pagan
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_atenic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_atenic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = britannic_pagan
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_britannic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_britannic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = britannic_pagan
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_britannic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_britannic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = promethean_pagan
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_promethean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_promethean_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = promethean_pagan
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_promethean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_promethean_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = bon_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_bon_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_bon_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = bon_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_bon_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_bon_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = norse_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_norse_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_norse_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = norse_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_norse_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_norse_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = tengri_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_tengri_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_tengri_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = tengri_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_tengri_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_tengri_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = baltic_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_baltic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_baltic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = baltic_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_baltic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_baltic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = finnish_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_finnish_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_finnish_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = finnish_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_finnish_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_finnish_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = aztec_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_aztec_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_aztec_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = aztec_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_aztec_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_aztec_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = slavic_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_slavic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_slavic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = slavic_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_slavic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_slavic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = west_african_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_african_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_african_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = west_african_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_african_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_african_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = zun_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_zun_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_zun_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = zun_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_zun_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_zun_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = hellenic_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_hellenic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_hellenic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = hellenic_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_hellenic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_hellenic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = celtic_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_celtic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_celtic_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = celtic_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_celtic_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_celtic_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = egyptian_pagan_reformed
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_egyptian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_egyptian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = egyptian_pagan_reformed
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_egyptian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_egyptian_mission years = 5 hidden = yes } }
		}
		#Christian Immersion
		if = {
			limit = {
				religion = adoptionist
				check_variable = { which = "global_chinese_adoptionists" value = 20 }
				NOT = { has_global_flag = adoptionist_china_one }
			}
			set_global_flag = adoptionist_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_adoptionists
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = adoptionist
				check_variable = { which = "global_chinese_adoptionists" value = 40 }
				NOT = { has_global_flag = adoptionist_china_two }
			}
			set_global_flag = adoptionist_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_adoptionists
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = adoptionist
				check_variable = { which = "global_chinese_adoptionists" value = 100 }
				NOT = { has_global_flag = adoptionist_china_three }
			}
			set_global_flag = adoptionist_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_adoptionists
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = adoptionist
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_adoptionist_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_adoptionist_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = adoptionist
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_adoptionist_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_adoptionist_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = free_spirits
				check_variable = { which = "global_chinese_free_spirits" value = 20 }
				NOT = { has_global_flag = free_spirits_china_one }
			}
			set_global_flag = free_spirits_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_free_spirits
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = free_spirits
				check_variable = { which = "global_chinese_free_spirits" value = 40 }
				NOT = { has_global_flag = free_spirits_china_two }
			}
			set_global_flag = free_spirits_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_free_spirits
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = free_spirits
				check_variable = { which = "global_chinese_free_spirits" value = 100 }
				NOT = { has_global_flag = free_spirits_china_three }
			}
			set_global_flag = free_spirits_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_free_spirits
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = free_spirits
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_free_spirits_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_free_spirits_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = free_spirits
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_free_spirits_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_free_spirits_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = barlaamite
				check_variable = { which = "global_chinese_barlaamites" value = 20 }
				NOT = { has_global_flag = barlaamite_china_one }
			}
			set_global_flag = barlaamite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_barlaamites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = barlaamite
				check_variable = { which = "global_chinese_barlaamites" value = 40 }
				NOT = { has_global_flag = barlaamite_china_two }
			}
			set_global_flag = barlaamite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_barlaamites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = barlaamite
				check_variable = { which = "global_chinese_barlaamites" value = 100 }
				NOT = { has_global_flag = barlaamite_china_three }
			}
			set_global_flag = barlaamite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_barlaamites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = barlaamite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_barlaamite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_barlaamite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = barlaamite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_barlaamite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_barlaamite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = judaizer
				check_variable = { which = "global_chinese_judaizers" value = 20 }
				NOT = { has_global_flag = judaizer_china_one }
			}
			set_global_flag = judaizer_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_judaizers
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = judaizer
				check_variable = { which = "global_chinese_judaizers" value = 40 }
				NOT = { has_global_flag = judaizer_china_two }
			}
			set_global_flag = judaizer_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_judaizers
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = judaizer
				check_variable = { which = "global_chinese_judaizers" value = 100 }
				NOT = { has_global_flag = judaizer_china_three }
			}
			set_global_flag = judaizer_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_judaizers
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = judaizer
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_judaizer_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_judaizer_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = judaizer
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_judaizer_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_judaizer_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = mandean
				check_variable = { which = "global_chinese_mandeans" value = 20 }
				NOT = { has_global_flag = mandean_china_one }
			}
			set_global_flag = mandean_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_mandeans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mandean
				check_variable = { which = "global_chinese_mandeans" value = 40 }
				NOT = { has_global_flag = mandean_china_two }
			}
			set_global_flag = mandean_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_mandeans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mandean
				check_variable = { which = "global_chinese_mandeans" value = 100 }
				NOT = { has_global_flag = mandean_china_three }
			}
			set_global_flag = mandean_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_mandeans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = mandean
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_mandean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_mandean_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = mandean
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_mandean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_mandean_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = chaldean
				check_variable = { which = "global_chinese_chaldeans" value = 20 }
				NOT = { has_global_flag = chaldean_china_one }
			}
			set_global_flag = chaldean_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_chaldeans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = chaldean
				check_variable = { which = "global_chinese_chaldeans" value = 40 }
				NOT = { has_global_flag = chaldean_china_two }
			}
			set_global_flag = chaldean_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_chaldeans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = chaldean
				check_variable = { which = "global_chinese_chaldeans" value = 100 }
				NOT = { has_global_flag = chaldean_china_three }
			}
			set_global_flag = chaldean_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_chaldeans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = chaldean
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_chaldean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_chaldean_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = chaldean
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_chaldean_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_chaldean_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = apollinarian
				check_variable = { which = "global_chinese_apollinarians" value = 20 }
				NOT = { has_global_flag = apollinarian_china_one }
			}
			set_global_flag = apollinarian_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_apollinarians
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = apollinarian
				check_variable = { which = "global_chinese_apollinarians" value = 40 }
				NOT = { has_global_flag = apollinarian_china_two }
			}
			set_global_flag = apollinarian_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_apollinarians
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = apollinarian
				check_variable = { which = "global_chinese_apollinarians" value = 100 }
				NOT = { has_global_flag = apollinarian_china_three }
			}
			set_global_flag = apollinarian_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_apollinarians
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = apollinarian
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_apollinarian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_apollinarian_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = apollinarian
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_apollinarian_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_apollinarian_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = yarsan
				check_variable = { which = "global_chinese_yarsans" value = 20 }
				NOT = { has_global_flag = yarsan_china_one }
			}
			set_global_flag = yarsan_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_yarsans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yarsan
				check_variable = { which = "global_chinese_yarsans" value = 40 }
				NOT = { has_global_flag = yarsan_china_two }
			}
			set_global_flag = yarsan_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_yarsans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yarsan
				check_variable = { which = "global_chinese_yarsans" value = 100 }
				NOT = { has_global_flag = yarsan_china_three }
			}
			set_global_flag = yarsan_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_yarsans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = yarsan
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_yarsan_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_yarsan_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = yarsan
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_yarsan_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_yarsan_mission years = 5 hidden = yes } }
		}
		#Last Vanilla Religions
		if = {
			limit = {
				religion = yazidi
				check_variable = { which = "global_chinese_yazidis" value = 20 }
				NOT = { has_global_flag = yazidi_china_one }
			}
			set_global_flag = yazidi_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_yazidis
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yazidi
				check_variable = { which = "global_chinese_yazidis" value = 40 }
				NOT = { has_global_flag = yazidi_china_two }
			}
			set_global_flag = yazidi_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_yazidis
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yazidi
				check_variable = { which = "global_chinese_yazidis" value = 100 }
				NOT = { has_global_flag = yazidi_china_three }
			}
			set_global_flag = yazidi_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_yazidis
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = yazidi
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_yazidi_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_yazidi_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = yazidi
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_yazidi_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_yazidi_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = druze
				check_variable = { which = "global_chinese_druzes" value = 20 }
				NOT = { has_global_flag = druze_china_one }
			}
			set_global_flag = druze_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_druze
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = druze
				check_variable = { which = "global_chinese_druzes" value = 40 }
				NOT = { has_global_flag = druze_china_two }
			}
			set_global_flag = druze_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_druze
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = druze
				check_variable = { which = "global_chinese_druzes" value = 100 }
				NOT = { has_global_flag = druze_china_three }
			}
			set_global_flag = druze_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_druze
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = druze
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_druze_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_druze_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = druze
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_druze_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_druze_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = khurmazta
				check_variable = { which = "global_chinese_khurmaztas" value = 20 }
				NOT = { has_global_flag = khurmazta_china_one }
			}
			set_global_flag = khurmazta_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_khurmaztas
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = khurmazta
				check_variable = { which = "global_chinese_khurmaztas" value = 40 }
				NOT = { has_global_flag = khurmazta_china_two }
			}
			set_global_flag = khurmazta_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_khurmaztas
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = khurmazta
				check_variable = { which = "global_chinese_khurmaztas" value = 100 }
				NOT = { has_global_flag = khurmazta_china_three }
			}
			set_global_flag = khurmazta_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_khurmaztas
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = khurmazta
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_khurmazta_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_khurmazta_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = khurmazta
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_khurmazta_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_khurmazta_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = jewish
				check_variable = { which = "global_chinese_jewishs" value = 20 }
				NOT = { has_global_flag = jewish_china_one }
			}
			set_global_flag = jewish_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_jews
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jewish
				check_variable = { which = "global_chinese_jewishs" value = 40 }
				NOT = { has_global_flag = jewish_china_two }
			}
			set_global_flag = jewish_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_jews
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jewish
				check_variable = { which = "global_chinese_jewishs" value = 100 }
				NOT = { has_global_flag = jewish_china_three }
			}
			set_global_flag = jewish_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_jews
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = jewish
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_jewish_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_jewish_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = jewish
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_jewish_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_jewish_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = samaritan
				check_variable = { which = "global_chinese_samaritans" value = 20 }
				NOT = { has_global_flag = samaritan_china_one }
			}
			set_global_flag = samaritan_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_samaritans
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = samaritan
				check_variable = { which = "global_chinese_samaritans" value = 40 }
				NOT = { has_global_flag = samaritan_china_two }
			}
			set_global_flag = samaritan_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_samaritans
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = samaritan
				check_variable = { which = "global_chinese_samaritans" value = 100 }
				NOT = { has_global_flag = samaritan_china_three }
			}
			set_global_flag = samaritan_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_samaritans
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = samaritan
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_samaritan_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_samaritan_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = samaritan
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_samaritan_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_samaritan_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = karaite
				check_variable = { which = "global_chinese_karaites" value = 20 }
				NOT = { has_global_flag = karaite_china_one }
			}
			set_global_flag = karaite_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_karaites
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = karaite
				check_variable = { which = "global_chinese_karaites" value = 40 }
				NOT = { has_global_flag = karaite_china_two }
			}
			set_global_flag = karaite_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_karaites
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = karaite
				check_variable = { which = "global_chinese_karaites" value = 100 }
				NOT = { has_global_flag = karaite_china_three }
			}
			set_global_flag = karaite_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_karaites
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = karaite
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_karaite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_karaite_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = karaite
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_karaite_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_karaite_mission years = 5 hidden = yes } }
		}
		if = {
			limit = {
				religion = hindu
				check_variable = { which = "global_chinese_hindus" value = 20 }
				NOT = { has_global_flag = hindu_china_one }
			}
			set_global_flag = hindu_china_one
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hindus
			any_playable_ruler = { narrative_event = { id = kccspread.0013 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hindu
				check_variable = { which = "global_chinese_hindus" value = 40 }
				NOT = { has_global_flag = hindu_china_two }
			}
			set_global_flag = hindu_china_two
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hindus
			any_playable_ruler = { narrative_event = { id = kccspread.0014 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hindu
				check_variable = { which = "global_chinese_hindus" value = 100 }
				NOT = { has_global_flag = hindu_china_three }
			}
			set_global_flag = hindu_china_three
			save_global_event_target_as = target_kcc_religion_bump
			set_global_flag = kcc_missionspread_hindus
			any_playable_ruler = { narrative_event = { id = kccspread.0015 days = 1 } }
		}
		if = {
			limit = {
				religion = hindu
				has_character_flag = kcc_end_missionary_epic_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_hindu_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_hindu_mission years = 15 hidden = yes } }
		}
		else_if = {
			limit = {
				religion = hindu
				has_character_flag = kcc_end_missionary_final_success
				NOT = { 1513 = { has_province_modifier = kcc_recent_hindu_mission } }
			}
			1513 = { add_province_modifier = { name = kcc_recent_hindu_mission years = 5 hidden = yes } }
		}
	}
	
	option = {
		name = EVTOPT_kccmission.0022a
		trigger = { has_character_flag = kcc_end_missionary_epic_success }
		prestige = 50
		piety = 100
		if = {
			limit = {
				religion = catholic
				NOT = { has_global_flag = catholics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_catholics" value = 5 } }
			set_global_flag = catholics_in_china
			set_global_flag = kcc_missionspread_catholics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = catholic
				has_global_flag = catholics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_catholics" value = 5 } }
		}
		if = {
			limit = {
				religion = cathar
				NOT = { has_global_flag = cathars_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_cathars" value = 5 } }
			set_global_flag = cathars_in_china
			set_global_flag = kcc_missionspread_cathars
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = cathar
				has_global_flag = cathars_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_cathars" value = 5 } }
		}
		if = {
			limit = {
				religion = fraticelli
				NOT = { has_global_flag = fraticellis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_fraticellis" value = 5 } }
			set_global_flag = fraticellis_in_china
			set_global_flag = kcc_missionspread_fraticellis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = fraticelli
				has_global_flag = fraticellis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_fraticellis" value = 5 } }
		}
		if = {
			limit = {
				religion = waldensian
				NOT = { has_global_flag = waldensians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_waldensians" value = 5 } }
			set_global_flag = waldensians_in_china
			set_global_flag = kcc_missionspread_waldensians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = waldensian
				has_global_flag = waldensians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_waldensians" value = 5 } }
		}
		if = {
			limit = {
				religion = lollard
				NOT = { has_global_flag = lollards_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_lollards" value = 5 } }
			set_global_flag = lollards_in_china
			set_global_flag = kcc_missionspread_lollards
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = lollard
				has_global_flag = lollards_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_lollards" value = 5 } }
		}
		if = {
			limit = {
				religion = orthodox
				NOT = { has_global_flag = orthodoxy_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_orthodoxs" value = 5 } }
			set_global_flag = orthodoxy_in_china
			set_global_flag = kcc_missionspread_orthodoxy
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = orthodox
				has_global_flag = orthodoxy_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_orthodoxs" value = 5 } }
		}
		if = {
			limit = {
				religion = miaphysite
				NOT = { has_global_flag = miaphysites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_miaphysites" value = 5 } }
			set_global_flag = miaphysites_in_china
			set_global_flag = kcc_missionspread_miaphysites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = miaphysite
				has_global_flag = miaphysites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_miaphysites" value = 5 } }
		}
		if = {
			limit = {
				religion = monophysite
				NOT = { has_global_flag = monophysites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_monophysites" value = 5 } }
			set_global_flag = monophysites_in_china
			set_global_flag = kcc_missionspread_monophysites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monophysite
				has_global_flag = monophysites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_monophysites" value = 5 } }
		}
		if = {
			limit = {
				religion = bogomilist
				NOT = { has_global_flag = bogomilists_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_bogomilists" value = 5 } }
			set_global_flag = bogomilists_in_china
			set_global_flag = kcc_missionspread_bogomilists
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bogomilist
				has_global_flag = bogomilists_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_bogomilists" value = 5 } }
		}
		if = {
			limit = {
				religion = monothelite
				NOT = { has_global_flag = monothelites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_monothelites" value = 5 } }
			set_global_flag = monothelites_in_china
			set_global_flag = kcc_missionspread_monothelites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monothelite
				has_global_flag = monothelites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_monothelites" value = 5 } }
		}
		if = {
			limit = {
				religion = iconoclast
				NOT = { has_global_flag = iconoclasts_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_iconoclasts" value = 5 } }
			set_global_flag = iconoclasts_in_china
			set_global_flag = kcc_missionspread_iconoclasts
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = iconoclast
				has_global_flag = iconoclasts_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_iconoclasts" value = 5 } }
		}
		if = {
			limit = {
				religion = paulician
				NOT = { has_global_flag = paulicians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_paulicians" value = 5 } }
			set_global_flag = paulicians_in_china
			set_global_flag = kcc_missionspread_paulicians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = paulician
				has_global_flag = paulicians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_paulicians" value = 5 } }
		}
		if = {
			limit = {
				religion = nestorian
				NOT = { has_global_flag = nestorians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_nestorians" value = 5 } }
			set_global_flag = nestorians_in_china
			set_global_flag = kcc_missionspread_nestorians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = nestorian
				has_global_flag = nestorians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_nestorians" value = 5 } }
		}
		if = {
			limit = {
				religion = messalian
				NOT = { has_global_flag = messalians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_messalians" value = 5 } }
			set_global_flag = messalians_in_china
			set_global_flag = kcc_missionspread_messalians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = messalian
				has_global_flag = messalians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_messalians" value = 5 } }
		}
		if = {
			limit = {
				religion = sunni
				NOT = { has_global_flag = sunnis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_sunnis" value = 5 } }
			set_global_flag = sunnis_in_china
			set_global_flag = kcc_missionspread_sunnis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = sunni
				has_global_flag = sunnis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_sunnis" value = 5 } }
		}
		if = {
			limit = {
				religion = zikri
				NOT = { has_global_flag = zikris_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zikris" value = 5 } }
			set_global_flag = zikris_in_china
			set_global_flag = kcc_missionspread_zikris
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zikri
				has_global_flag = zikris_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zikris" value = 5 } }
		}
		if = {
			limit = {
				religion = ibadi
				NOT = { has_global_flag = ibadis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_ibadis" value = 5 } }
			set_global_flag = ibadis_in_china
			set_global_flag = kcc_missionspread_ibadis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = ibadi
				has_global_flag = ibadis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_ibadis" value = 5 } }
		}
		if = {
			limit = {
				religion = kharijite
				NOT = { has_global_flag = kharijites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_kharijites" value = 5 } }
			set_global_flag = kharijites_in_china
			set_global_flag = kcc_missionspread_kharijites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = kharijite
				has_global_flag = kharijites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_kharijites" value = 5 } }
		}
		if = {
			limit = {
				religion = shiite
				NOT = { has_global_flag = shiites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_shiites" value = 5 } }
			set_global_flag = shiites_in_china
			set_global_flag = kcc_missionspread_shiites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = shiite
				has_global_flag = shiites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_shiites" value = 5 } }
		}
		if = {
			limit = {
				religion = qarmatian
				NOT = { has_global_flag = qarmatian_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_qarmatians" value = 5 } }
			set_global_flag = qarmatian_in_china
			set_global_flag = kcc_missionspread_qarmatian
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = qarmatian
				has_global_flag = qarmatian_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_qarmatians" value = 5 } }
		}
		if = {
			limit = {
				religion = hurufi
				NOT = { has_global_flag = hurufis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_hurufis" value = 5 } }
			set_global_flag = hurufis_in_china
			set_global_flag = kcc_missionspread_hurufis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hurufi
				has_global_flag = hurufis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_hurufis" value = 5 } }
		}
		if = {
			limit = {
				religion = zoroastrian
				NOT = { has_global_flag = zoroastrians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zoroastrians" value = 5 } }
			set_global_flag = zoroastrians_in_china
			set_global_flag = kcc_missionspread_zoroastrians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zoroastrian
				has_global_flag = zoroastrians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zoroastrians" value = 5 } }
		}
		if = {
			limit = {
				religion = mazdaki
				NOT = { has_global_flag = mazdakis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_mazdakis" value = 5 } }
			set_global_flag = mazdakis_in_china
			set_global_flag = kcc_missionspread_mazdakis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mazdaki
				has_global_flag = mazdakis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_mazdakis" value = 5 } }
		}
		if = {
			limit = {
				religion = manichean
				NOT = { has_global_flag = manicheans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_manicheans" value = 5 } }
			set_global_flag = manicheans_in_china
			set_global_flag = kcc_missionspread_manicheans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = manichean
				has_global_flag = manicheans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_manicheans" value = 5 } }
		}
		if = {
			limit = {
				religion = buddhist
				NOT = { has_global_flag = buddhists_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_buddhists" value = 5 } }
			set_global_flag = buddhists_in_china
			set_global_flag = kcc_missionspread_buddhists
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = buddhist
				has_global_flag = buddhists_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_buddhists" value = 5 } }
		}
		if = {
			limit = {
				religion = jain
				NOT = { has_global_flag = jains_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_jains" value = 5 } }
			set_global_flag = jains_in_china
			set_global_flag = kcc_missionspread_jains
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jain
				has_global_flag = jains_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_jains" value = 5 } }
		}
		if = {
			limit = {
				religion = aten_pagan
				NOT = { has_global_flag = atenics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_megalithic_reformeds" value = 5 } }
			set_global_flag = atenics_in_china
			set_global_flag = kcc_missionspread_atenics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aten_pagan
				has_global_flag = atenics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_megalithic_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = britannic_pagan
				NOT = { has_global_flag = britannics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_cybelene_reformeds" value = 5 } }
			set_global_flag = britannics_in_china
			set_global_flag = kcc_missionspread_britannics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = britannic_pagan
				has_global_flag = britannics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_cybelene_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = promethean_pagan
				NOT = { has_global_flag = prometheans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zalmoxian_reformeds" value = 5 } }
			set_global_flag = prometheans_in_china
			set_global_flag = kcc_missionspread_prometheans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = promethean_pagan
				has_global_flag = prometheans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zalmoxian_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = bon_reformed
				NOT = { has_global_flag = bon_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_bon_reformeds" value = 5 } }
			set_global_flag = bon_in_china
			set_global_flag = kcc_missionspread_bon
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bon_reformed
				has_global_flag = bon_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_bon_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = norse_pagan_reformed
				NOT = { has_global_flag = norse_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_norse_pagan_reformeds" value = 5 } }
			set_global_flag = norse_in_china
			set_global_flag = kcc_missionspread_norse
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = norse_pagan_reformed
				has_global_flag = norse_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_norse_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = tengri_pagan_reformed
				NOT = { has_global_flag = tengri_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 5 } }
			set_global_flag = tengri_in_china
			set_global_flag = kcc_missionspread_tengri
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = tengri_pagan_reformed
				has_global_flag = tengri_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = baltic_pagan_reformed
				NOT = { has_global_flag = baltics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 5 } }
			set_global_flag = baltics_in_china
			set_global_flag = kcc_missionspread_baltic
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = baltic_pagan_reformed
				has_global_flag = baltics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = finnish_pagan_reformed
				NOT = { has_global_flag = finnish_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 5 } }
			set_global_flag = finnish_in_china
			set_global_flag = kcc_missionspread_finnish
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = finnish_pagan_reformed
				has_global_flag = finnish_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = aztec_reformed
				NOT = { has_global_flag = aztecs_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_aztec_reformeds" value = 5 } }
			set_global_flag = aztecs_in_china
			set_global_flag = kcc_missionspread_aztecs
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aztec_reformed
				has_global_flag = aztec_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_aztec_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = slavic_pagan_reformed
				NOT = { has_global_flag = slavs_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 5 } }
			set_global_flag = slavs_in_china
			set_global_flag = kcc_missionspread_slavic
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = slavic_pagan_reformed
				has_global_flag = slavs_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = west_african_pagan_reformed
				NOT = { has_global_flag = africans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 5 } }
			set_global_flag = africans_in_china
			set_global_flag = kcc_missionspread_africans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = west_african_pagan_reformed
				has_global_flag = africans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = zun_pagan_reformed
				NOT = { has_global_flag = zun_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zun_pagan_reformeds" value = 5 } }
			set_global_flag = zun_in_china
			set_global_flag = kcc_missionspread_zun
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zun_pagan_reformed
				has_global_flag = zun_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zun_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = hellenic_pagan_reformed
				NOT = { has_global_flag = hellenics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 5 } }
			set_global_flag = hellenics_in_china
			set_global_flag = kcc_missionspread_hellenics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hellenic_pagan_reformed
				has_global_flag = hellenics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = celtic_pagan_reformed
				NOT = { has_global_flag = celts_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 5 } }
			set_global_flag = celts_in_china
			set_global_flag = kcc_missionspread_celtics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = celtic_pagan_reformed
				has_global_flag = celts_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 5 } }
		}
		if = {
			limit = {
				religion = egyptian_pagan_reformed
				NOT = { has_global_flag = egyptians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_kemetisms" value = 5 } }
			set_global_flag = egyptians_in_china
			set_global_flag = kcc_missionspread_egyptians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = egyptian_pagan_reformed
				has_global_flag = egyptians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_kemetisms" value = 5 } }
		}
		#Christian Immersion
		if = {
			limit = {
				religion = adoptionist
				NOT = { has_global_flag = adoptionists_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_adoptionists" value = 5 } }
			set_global_flag = adoptionists_in_china
			set_global_flag = kcc_missionspread_adoptionists
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = adoptionist
				has_global_flag = adoptionists_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_adoptionists" value = 5 } }
		}
		if = {
			limit = {
				religion = free_spirits
				NOT = { has_global_flag = free_spirits_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_free_spirits" value = 5 } }
			set_global_flag = free_spirits_in_china
			set_global_flag = kcc_missionspread_free_spirits
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = free_spirits
				has_global_flag = free_spirits_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_free_spirits" value = 5 } }
		}
		if = {
			limit = {
				religion = barlaamite
				NOT = { has_global_flag = barlaamites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_barlaamites" value = 5 } }
			set_global_flag = barlaamites_in_china
			set_global_flag = kcc_missionspread_barlaamites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = barlaamite
				has_global_flag = barlaamites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_barlaamites" value = 5 } }
		}
		if = {
			limit = {
				religion = judaizer
				NOT = { has_global_flag = judaizers_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_judaizers" value = 5 } }
			set_global_flag = judaizers_in_china
			set_global_flag = kcc_missionspread_judaizers
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = judaizer
				has_global_flag = judaizers_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_judaizers" value = 5 } }
		}
		if = {
			limit = {
				religion = mandean
				NOT = { has_global_flag = mandeans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_mandeans" value = 5 } }
			set_global_flag = mandeans_in_china
			set_global_flag = kcc_missionspread_mandeans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mandean
				has_global_flag = mandeans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_mandeans" value = 5 } }
		}
		if = {
			limit = {
				religion = chaldean
				NOT = { has_global_flag = chaldeans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_chaldeans" value = 5 } }
			set_global_flag = chaldeans_in_china
			set_global_flag = kcc_missionspread_chaldeans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = chaldean
				has_global_flag = chaldeans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_chaldeans" value = 5 } }
		}
		if = {
			limit = {
				religion = apollinarian
				NOT = { has_global_flag = apollinarians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_apollinarians" value = 5 } }
			set_global_flag = apollinarians_in_china
			set_global_flag = kcc_missionspread_apollinarians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = apollinarian
				has_global_flag = apollinarians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_apollinarians" value = 5 } }
		}
		if = {
			limit = {
				religion = yarsan
				NOT = { has_global_flag = yarsans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_yarsans" value = 5 } }
			set_global_flag = yarsans_in_china
			set_global_flag = kcc_missionspread_yarsans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yarsan
				has_global_flag = yarsans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_yarsans" value = 5 } }
		}
		#Last Vanilla Religions
		if = {
			limit = {
				religion = yazidi
				NOT = { has_global_flag = yazidis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_yazidis" value = 5 } }
			set_global_flag = yazidis_in_china
			set_global_flag = kcc_missionspread_yazidis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yazidi
				has_global_flag = yazidis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_yazidis" value = 5 } }
		}
		if = {
			limit = {
				religion = druze
				NOT = { has_global_flag = druze_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_druzes" value = 5 } }
			set_global_flag = druze_in_china
			set_global_flag = kcc_missionspread_druze
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = druze
				has_global_flag = druze_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_druzes" value = 5 } }
		}
		if = {
			limit = {
				religion = khurmazta
				NOT = { has_global_flag = khurmaztas_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_khurmaztas" value = 5 } }
			set_global_flag = khurmaztas_in_china
			set_global_flag = kcc_missionspread_khurmaztas
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = khurmazta
				has_global_flag = khurmaztas_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_khurmaztas" value = 5 } }
		}
		if = {
			limit = {
				religion = jewish
				NOT = { has_global_flag = jews_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_jewishs" value = 5 } }
			set_global_flag = jews_in_china
			set_global_flag = kcc_missionspread_jews
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jewish
				has_global_flag = jews_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_jewishs" value = 5 } }
		}
		if = {
			limit = {
				religion = samaritan
				NOT = { has_global_flag = samaritans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_samaritans" value = 5 } }
			set_global_flag = samaritans_in_china
			set_global_flag = kcc_missionspread_samaritans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = samaritan
				has_global_flag = samaritans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_samaritans" value = 5 } }
		}
		if = {
			limit = {
				religion = karaite
				NOT = { has_global_flag = karaites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_karaites" value = 5 } }
			set_global_flag = karaites_in_china
			set_global_flag = kcc_missionspread_karaites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = karaite
				has_global_flag = karaites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_karaites" value = 5 } }
		}
		if = {
			limit = {
				religion = hindu
				NOT = { has_global_flag = hindus_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_hindus" value = 5 } }
			set_global_flag = hindus_in_china
			set_global_flag = kcc_missionspread_hindus
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hindu
				has_global_flag = hindus_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_hindus" value = 5 } }
		}
	}
	
	option = {
		name = EVTOPT_kccmission.0022b
		trigger = { has_character_flag = kcc_end_missionary_final_success }
		prestige = 25
		piety = 50
		if = {
			limit = {
				religion = catholic
				NOT = { has_global_flag = catholics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_catholics" value = 2 } }
			set_global_flag = catholics_in_china
			set_global_flag = kcc_missionspread_catholics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = catholic
				has_global_flag = catholics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_catholics" value = 2 } }
		}
		if = {
			limit = {
				religion = cathar
				NOT = { has_global_flag = cathars_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_cathars" value = 2 } }
			set_global_flag = cathars_in_china
			set_global_flag = kcc_missionspread_cathars
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = cathar
				has_global_flag = cathars_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_cathars" value = 2 } }
		}
		if = {
			limit = {
				religion = fraticelli
				NOT = { has_global_flag = fraticellis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_fraticellis" value = 2 } }
			set_global_flag = fraticellis_in_china
			set_global_flag = kcc_missionspread_fraticellis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = fraticelli
				has_global_flag = fraticellis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_fraticellis" value = 2 } }
		}
		if = {
			limit = {
				religion = waldensian
				NOT = { has_global_flag = waldensians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_waldensians" value = 2 } }
			set_global_flag = waldensians_in_china
			set_global_flag = kcc_missionspread_waldensians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = waldensian
				has_global_flag = waldensians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_waldensians" value = 2 } }
		}
		if = {
			limit = {
				religion = lollard
				NOT = { has_global_flag = lollards_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_lollards" value = 2 } }
			set_global_flag = lollards_in_china
			set_global_flag = kcc_missionspread_lollards
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = lollard
				has_global_flag = lollards_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_lollards" value = 2 } }
		}
		if = {
			limit = {
				religion = orthodox
				NOT = { has_global_flag = orthodoxy_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_orthodoxs" value = 2 } }
			set_global_flag = orthodoxy_in_china
			set_global_flag = kcc_missionspread_orthodoxy
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = orthodox
				has_global_flag = orthodoxy_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_orthodoxs" value = 2 } }
		}
		if = {
			limit = {
				religion = miaphysite
				NOT = { has_global_flag = miaphysites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_miaphysites" value = 2 } }
			set_global_flag = miaphysites_in_china
			set_global_flag = kcc_missionspread_miaphysites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = miaphysite
				has_global_flag = miaphysites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_miaphysites" value = 2 } }
		}
		if = {
			limit = {
				religion = monophysite
				NOT = { has_global_flag = monophysites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_monophysites" value = 2 } }
			set_global_flag = monophysites_in_china
			set_global_flag = kcc_missionspread_monophysites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monophysite
				has_global_flag = monophysites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_monophysites" value = 2 } }
		}
		if = {
			limit = {
				religion = bogomilist
				NOT = { has_global_flag = bogomilists_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_bogomilists" value = 2 } }
			set_global_flag = bogomilists_in_china
			set_global_flag = kcc_missionspread_bogomilists
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bogomilist
				has_global_flag = bogomilists_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_bogomilists" value = 2 } }
		}
		if = {
			limit = {
				religion = monothelite
				NOT = { has_global_flag = monothelites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_monothelites" value = 2 } }
			set_global_flag = monothelites_in_china
			set_global_flag = kcc_missionspread_monothelites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = monothelite
				has_global_flag = monothelites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_monothelites" value = 2 } }
		}
		if = {
			limit = {
				religion = iconoclast
				NOT = { has_global_flag = iconoclasts_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_iconoclasts" value = 2 } }
			set_global_flag = iconoclasts_in_china
			set_global_flag = kcc_missionspread_iconoclasts
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = iconoclast
				has_global_flag = iconoclasts_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_iconoclasts" value = 2 } }
		}
		if = {
			limit = {
				religion = paulician
				NOT = { has_global_flag = paulicians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_paulicians" value = 2 } }
			set_global_flag = paulicians_in_china
			set_global_flag = kcc_missionspread_paulicians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = paulician
				has_global_flag = paulicians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_paulicians" value = 2 } }
		}
		if = {
			limit = {
				religion = nestorian
				NOT = { has_global_flag = nestorians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_nestorians" value = 2 } }
			set_global_flag = nestorians_in_china
			set_global_flag = kcc_missionspread_nestorians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = nestorian
				has_global_flag = nestorians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_nestorians" value = 2 } }
		}
		if = {
			limit = {
				religion = messalian
				NOT = { has_global_flag = messalians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_messalians" value = 2 } }
			set_global_flag = messalians_in_china
			set_global_flag = kcc_missionspread_messalians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = messalian
				has_global_flag = messalians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_messalians" value = 2 } }
		}
		if = {
			limit = {
				religion = sunni
				NOT = { has_global_flag = sunnis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_sunnis" value = 2 } }
			set_global_flag = sunnis_in_china
			set_global_flag = kcc_missionspread_sunnis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = sunni
				has_global_flag = sunnis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_sunnis" value = 2 } }
		}
		if = {
			limit = {
				religion = zikri
				NOT = { has_global_flag = zikris_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zikris" value = 2 } }
			set_global_flag = zikris_in_china
			set_global_flag = kcc_missionspread_zikris
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zikri
				has_global_flag = zikris_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zikris" value = 2 } }
		}
		if = {
			limit = {
				religion = ibadi
				NOT = { has_global_flag = ibadis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_ibadis" value = 2 } }
			set_global_flag = ibadis_in_china
			set_global_flag = kcc_missionspread_ibadis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = ibadi
				has_global_flag = ibadis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_ibadis" value = 2 } }
		}
		if = {
			limit = {
				religion = kharijite
				NOT = { has_global_flag = kharijites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_kharijites" value = 2 } }
			set_global_flag = kharijites_in_china
			set_global_flag = kcc_missionspread_kharijites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = kharijite
				has_global_flag = kharijites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_kharijites" value = 2 } }
		}
		if = {
			limit = {
				religion = shiite
				NOT = { has_global_flag = shiites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_shiites" value = 2 } }
			set_global_flag = shiites_in_china
			set_global_flag = kcc_missionspread_shiites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = shiite
				has_global_flag = shiites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_shiites" value = 2 } }
		}
		if = {
			limit = {
				religion = qarmatian
				NOT = { has_global_flag = qarmatian_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_qarmatians" value = 2 } }
			set_global_flag = qarmatian_in_china
			set_global_flag = kcc_missionspread_qarmatian
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = qarmatian
				has_global_flag = qarmatian_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_qarmatians" value = 2 } }
		}
		if = {
			limit = {
				religion = hurufi
				NOT = { has_global_flag = hurufis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_hurufis" value = 2 } }
			set_global_flag = hurufis_in_china
			set_global_flag = kcc_missionspread_hurufis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hurufi
				has_global_flag = hurufis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_hurufis" value = 2 } }
		}
		if = {
			limit = {
				religion = zoroastrian
				NOT = { has_global_flag = zoroastrians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zoroastrians" value = 2 } }
			set_global_flag = zoroastrians_in_china
			set_global_flag = kcc_missionspread_zoroastrians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zoroastrian
				has_global_flag = zoroastrians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zoroastrians" value = 2 } }
		}
		if = {
			limit = {
				religion = mazdaki
				NOT = { has_global_flag = mazdakis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_mazdakis" value = 2 } }
			set_global_flag = mazdakis_in_china
			set_global_flag = kcc_missionspread_mazdakis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mazdaki
				has_global_flag = mazdakis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_mazdakis" value = 2 } }
		}
		if = {
			limit = {
				religion = manichean
				NOT = { has_global_flag = manicheans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_manicheans" value = 2 } }
			set_global_flag = manicheans_in_china
			set_global_flag = kcc_missionspread_manicheans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = manichean
				has_global_flag = manicheans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_manicheans" value = 2 } }
		}
		if = {
			limit = {
				religion = buddhist
				NOT = { has_global_flag = buddhists_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_buddhists" value = 2 } }
			set_global_flag = buddhists_in_china
			set_global_flag = kcc_missionspread_buddhists
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = buddhist
				has_global_flag = buddhists_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_buddhists" value = 2 } }
		}
		if = {
			limit = {
				religion = jain
				NOT = { has_global_flag = jains_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_jains" value = 2 } }
			set_global_flag = jains_in_china
			set_global_flag = kcc_missionspread_jains
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jain
				has_global_flag = jains_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_jains" value = 2 } }
		}
		if = {
			limit = {
				religion = aten_pagan
				NOT = { has_global_flag = atenics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_megalithic_reformeds" value = 2 } }
			set_global_flag = atenics_in_china
			set_global_flag = kcc_missionspread_atenics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aten_pagan
				has_global_flag = atenics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_megalithic_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = britannic_pagan
				NOT = { has_global_flag = britannics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_cybelene_reformeds" value = 2 } }
			set_global_flag = britannics_in_china
			set_global_flag = kcc_missionspread_britannics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = britannic_pagan
				has_global_flag = britannics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_cybelene_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = promethean_pagan
				NOT = { has_global_flag = prometheans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zalmoxian_reformeds" value = 2 } }
			set_global_flag = prometheans_in_china
			set_global_flag = kcc_missionspread_prometheans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = promethean_pagan
				has_global_flag = prometheans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zalmoxian_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = bon_reformed
				NOT = { has_global_flag = bon_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_bon_reformeds" value = 2 } }
			set_global_flag = bon_in_china
			set_global_flag = kcc_missionspread_bon
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = bon_reformed
				has_global_flag = bon_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_bon_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = norse_pagan_reformed
				NOT = { has_global_flag = norse_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_norse_pagan_reformeds" value = 2 } }
			set_global_flag = norse_in_china
			set_global_flag = kcc_missionspread_norse
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = norse_pagan_reformed
				has_global_flag = norse_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_norse_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = tengri_pagan_reformed
				NOT = { has_global_flag = tengri_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 2 } }
			set_global_flag = tengri_in_china
			set_global_flag = kcc_missionspread_tengri
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = tengri_pagan_reformed
				has_global_flag = tengri_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_tengri_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = baltic_pagan_reformed
				NOT = { has_global_flag = baltics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 2 } }
			set_global_flag = baltics_in_china
			set_global_flag = kcc_missionspread_baltic
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = baltic_pagan_reformed
				has_global_flag = baltics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_baltic_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = finnish_pagan_reformed
				NOT = { has_global_flag = finnish_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 2 } }
			set_global_flag = finnish_in_china
			set_global_flag = kcc_missionspread_finnish
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = finnish_pagan_reformed
				has_global_flag = finnish_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_finnish_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = aztec_reformed
				NOT = { has_global_flag = aztecs_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_aztec_reformeds" value = 2 } }
			set_global_flag = aztecs_in_china
			set_global_flag = kcc_missionspread_aztecs
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = aztec_reformed
				has_global_flag = aztec_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_aztec_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = slavic_pagan_reformed
				NOT = { has_global_flag = slavs_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 2 } }
			set_global_flag = slavs_in_china
			set_global_flag = kcc_missionspread_slavic
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = slavic_pagan_reformed
				has_global_flag = slavs_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_slavic_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = west_african_pagan_reformed
				NOT = { has_global_flag = africans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 2 } }
			set_global_flag = africans_in_china
			set_global_flag = kcc_missionspread_africans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = west_african_pagan_reformed
				has_global_flag = africans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_west_african_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = zun_pagan_reformed
				NOT = { has_global_flag = zun_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_zun_pagan_reformeds" value = 2 } }
			set_global_flag = zun_in_china
			set_global_flag = kcc_missionspread_zun
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = zun_pagan_reformed
				has_global_flag = zun_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_zun_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = hellenic_pagan_reformed
				NOT = { has_global_flag = hellenics_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 2 } }
			set_global_flag = hellenics_in_china
			set_global_flag = kcc_missionspread_hellenics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hellenic_pagan_reformed
				has_global_flag = hellenics_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_hellenic_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = celtic_pagan_reformed
				NOT = { has_global_flag = celts_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 2 } }
			set_global_flag = celts_in_china
			set_global_flag = kcc_missionspread_celtics
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = celtic_pagan_reformed
				has_global_flag = celts_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_druidic_pagan_reformeds" value = 2 } }
		}
		if = {
			limit = {
				religion = egyptian_pagan_reformed
				NOT = { has_global_flag = egyptians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_kemetisms" value = 2 } }
			set_global_flag = egyptians_in_china
			set_global_flag = kcc_missionspread_egyptians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = egyptian_pagan_reformed
				has_global_flag = egyptians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_kemetisms" value = 2 } }
		}
		#Christian Immersion
		if = {
			limit = {
				religion = adoptionist
				NOT = { has_global_flag = adoptionists_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_adoptionists" value = 2 } }
			set_global_flag = adoptionists_in_china
			set_global_flag = kcc_missionspread_adoptionists
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = adoptionist
				has_global_flag = adoptionists_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_adoptionists" value = 2 } }
		}
		if = {
			limit = {
				religion = free_spirits
				NOT = { has_global_flag = free_spirits_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_free_spirits" value = 2 } }
			set_global_flag = free_spirits_in_china
			set_global_flag = kcc_missionspread_free_spirits
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = free_spirits
				has_global_flag = free_spirits_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_free_spirits" value = 2 } }
		}
		if = {
			limit = {
				religion = barlaamite
				NOT = { has_global_flag = barlaamites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_barlaamites" value = 2 } }
			set_global_flag = barlaamites_in_china
			set_global_flag = kcc_missionspread_barlaamites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = barlaamite
				has_global_flag = barlaamites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_barlaamites" value = 2 } }
		}
		if = {
			limit = {
				religion = judaizer
				NOT = { has_global_flag = judaizers_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_judaizers" value = 2 } }
			set_global_flag = judaizers_in_china
			set_global_flag = kcc_missionspread_judaizers
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = judaizer
				has_global_flag = judaizers_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_judaizers" value = 2 } }
		}
		if = {
			limit = {
				religion = mandean
				NOT = { has_global_flag = mandeans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_mandeans" value = 2 } }
			set_global_flag = mandeans_in_china
			set_global_flag = kcc_missionspread_mandeans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = mandean
				has_global_flag = mandeans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_mandeans" value = 2 } }
		}
		if = {
			limit = {
				religion = chaldean
				NOT = { has_global_flag = chaldeans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_chaldeans" value = 2 } }
			set_global_flag = chaldeans_in_china
			set_global_flag = kcc_missionspread_chaldeans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = chaldean
				has_global_flag = chaldeans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_chaldeans" value = 2 } }
		}
		if = {
			limit = {
				religion = apollinarian
				NOT = { has_global_flag = apollinarians_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_apollinarians" value = 2 } }
			set_global_flag = apollinarians_in_china
			set_global_flag = kcc_missionspread_apollinarians
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = apollinarian
				has_global_flag = apollinarians_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_apollinarians" value = 2 } }
		}
		if = {
			limit = {
				religion = yarsan
				NOT = { has_global_flag = yarsans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_yarsans" value = 2 } }
			set_global_flag = yarsans_in_china
			set_global_flag = kcc_missionspread_yarsans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yarsan
				has_global_flag = yarsans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_yarsans" value = 2 } }
		}
		#Last Vanilla Religions
		if = {
			limit = {
				religion = yazidi
				NOT = { has_global_flag = yazidis_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_yazidis" value = 2 } }
			set_global_flag = yazidis_in_china
			set_global_flag = kcc_missionspread_yazidis
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = yazidi
				has_global_flag = yazidis_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_yazidis" value = 2 } }
		}
		if = {
			limit = {
				religion = druze
				NOT = { has_global_flag = druze_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_druzes" value = 2 } }
			set_global_flag = druze_in_china
			set_global_flag = kcc_missionspread_druze
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = druze
				has_global_flag = druze_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_druzes" value = 2 } }
		}
		if = {
			limit = {
				religion = khurmazta
				NOT = { has_global_flag = khurmaztas_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_khurmaztas" value = 2 } }
			set_global_flag = khurmaztas_in_china
			set_global_flag = kcc_missionspread_khurmaztas
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = khurmazta
				has_global_flag = khurmaztas_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_khurmaztas" value = 2 } }
		}
		if = {
			limit = {
				religion = jewish
				NOT = { has_global_flag = jews_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_jewishs" value = 2 } }
			set_global_flag = jews_in_china
			set_global_flag = kcc_missionspread_jews
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = jewish
				has_global_flag = jews_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_jewishs" value = 2 } }
		}
		if = {
			limit = {
				religion = samaritan
				NOT = { has_global_flag = samaritans_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_samaritans" value = 2 } }
			set_global_flag = samaritans_in_china
			set_global_flag = kcc_missionspread_samaritans
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = samaritan
				has_global_flag = samaritans_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_samaritans" value = 2 } }
		}
		if = {
			limit = {
				religion = karaite
				NOT = { has_global_flag = karaites_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_karaites" value = 2 } }
			set_global_flag = karaites_in_china
			set_global_flag = kcc_missionspread_karaites
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = karaite
				has_global_flag = karaites_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_karaites" value = 2 } }
		}
		if = {
			limit = {
				religion = hindu
				NOT = { has_global_flag = hindus_in_china }
			}
			hidden_tooltip = { set_variable = { which = "global_chinese_hindus" value = 2 } }
			set_global_flag = hindus_in_china
			set_global_flag = kcc_missionspread_hindus
			save_global_event_target_as = target_kcc_religion_bump
			any_playable_ruler = { narrative_event = { id = kccspread.0012 days = 1 } }
		}
		else_if = {
			limit = {
				religion = hindu
				has_global_flag = hindus_in_china
			}
			hidden_tooltip = { change_variable = { which = "global_chinese_hindus" value = 2 } }
		}
	}
	
	option = {
		name = EVTOPT_kccmission.0022c
		trigger = { has_character_flag = kcc_end_missionary_final_fail }
	}
}

# Cancel missionaries on religion change
character_event = {
	id = kccmission.0027
	has_dlc = "Jade Dragon"
	picture = GFX_evt_hiding_from_pursuers
	desc = {
		trigger = { has_secret_religion = no }
		text = EVTDESC_kccmission.0027a
		picture = GFX_evt_diplomat_hf
	}
	desc = {
		trigger = {
			has_secret_religion = yes
			secret_religion = FROM
		}
		text = EVTDESC_kccmission.0027b
	}
	desc = {
		trigger = {
			has_secret_religion = yes
			NOT = { secret_religion = FROM }
		}
		text = EVTDESC_kccmission.0027a
	}
	border = GFX_event_normal_frame_religion
    is_triggered_only = yes
	
	trigger = {
		OR = {
			has_character_flag = kcc_inherited_missionaries
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
	}
	
	immediate = {
		kcc_clr_missionary_flags_effect = yes
		if = {
			limit = {
				has_character_flag = kcc_end_missionary_epic_success
			}
			clr_character_flag = kcc_end_missionary_epic_success
		}
		else_if = {
			limit = {
				has_character_flag = kcc_end_missionary_final_success
			}
			clr_character_flag = kcc_end_missionary_final_success
		}
		else_if = {
			limit = {
				has_character_flag = kcc_end_missionary_final_fail
			}
			clr_character_flag = kcc_end_missionary_final_fail
		}
		if = {
			limit = {
				has_character_flag = kcc_inherited_missionaries
			}
			character_event = { id = kccmission.0023 years = 5 }
			set_variable = { which = kcc_missionary_progress value = 0 }
			clr_character_flag = kcc_inherited_missionaries
		}
		else = {
			character_event = { id = kccmission.0023 years = 25 }
			set_variable = { which = kcc_missionary_progress value = 0 }
		}
	}
	
	option = {
		name = {
			text = EVTOPT_kccmission.0027a
			trigger = { has_secret_religion = no }
		}
		name = {
			text = EVTOPT_kccmission.0027b
			trigger = {
				has_secret_religion = yes
				secret_religion = FROM
			}
		}
		name = {
			text = EVTOPT_kccmission.0027c
			trigger = {
				has_secret_religion = yes
				NOT = { secret_religion = FROM }
			}
		}
		if = {
			limit = {
				has_character_modifier = chinese_missionaries_good
			}
			remove_character_modifier = chinese_missionaries_good
		}
		else = {
			remove_character_modifier = chinese_missionaries_bad
		}
	}
}

# Cancel missionaries if not a King or Emperor, or if too far from China
character_event = {
	id = kccmission.0028
	has_dlc = "Jade Dragon"
	picture = GFX_evt_hiding_from_pursuers
	desc = {
		trigger = {
			AND = {
				NOT = {
					any_realm_province = {
						OR = {
							region = custom_eastern_access
							region = world_india
						}
					}
				}
				NOT = {
					has_game_rule = {
						name = chinese_interactions
						value = all
					}
				}
			}
		}
		text = EVTDESC_kccmission.0028a
		picture = GFX_evt_diplomat_hf
	}
	desc = {
		trigger = {
			OR = {
				NOT = { primary_title = { higher_real_tier_than = DUKE } }
				is_landed = no
			}
		}
		text = EVTDESC_kccmission.0028b
	}
	border = GFX_event_normal_frame_religion
    is_triggered_only = yes
	
	trigger = {
		OR = {
			has_character_flag = kcc_inherited_missionaries
			has_character_modifier = chinese_missionaries_good
			has_character_modifier = chinese_missionaries_bad
		}
		OR = {
			AND = {
				NOT = {
					any_realm_province = {
						OR = {
							region = custom_eastern_access
							region = world_india
						}
					}
				}
				NOT = {
					has_game_rule = {
						name = chinese_interactions
						value = all
					}
				}
			}
			NOT = { primary_title = { higher_real_tier_than = DUKE } }
			is_landed = no
		}
	}
	
	immediate = {
		if = {
			limit = {
				current_heir = {
					NOR = {
						has_character_modifier = chinese_missionaries_good
						has_character_modifier = chinese_missionaries_bad
					}
					any_realm_province = {
						OR = {
							region = custom_eastern_access
							region = world_india
						}
					}
					primary_title = { higher_real_tier_than = DUKE }
					OR = {
						independent = yes
						AND = {
							is_powerful_vassal = yes
							top_liege = { religion = ROOT }
						}
					}
					religion = ROOT
				}
			}
			current_heir = {
				if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 11.5 } } }
					set_variable = { which = kcc_missionary_progress value = 11.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 10.5 } } }
					set_variable = { which = kcc_missionary_progress value = 10.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 9.5 } } }
					set_variable = { which = kcc_missionary_progress value = 9.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 8.5 } } }
					set_variable = { which = kcc_missionary_progress value = 8.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 7.5 } } }
					set_variable = { which = kcc_missionary_progress value = 7.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 6.5 } } }
					set_variable = { which = kcc_missionary_progress value = 6.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 5.5 } } }
					set_variable = { which = kcc_missionary_progress value = 5.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 4.5 } } }
					set_variable = { which = kcc_missionary_progress value = 4.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 3.5 } } }
					set_variable = { which = kcc_missionary_progress value = 3.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 2.5 } } }
					set_variable = { which = kcc_missionary_progress value = 2.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 1.5 } } }
					set_variable = { which = kcc_missionary_progress value = 1.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = 0.5 } } }
					set_variable = { which = kcc_missionary_progress value = 0.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = -0.5 } } }
					set_variable = { which = kcc_missionary_progress value = -0.5 }
				}
				else_if = {
					limit = { ROOT = { check_variable = { which = kcc_missionary_progress value = -1.5 } } }
					set_variable = { which = kcc_missionary_progress value = -1.5 }
				}
				else = {
					set_variable = { which = kcc_missionary_progress value = -2.5 }
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_starving_peasants } }
					random_list = {
						50 = { set_character_flag = kcc_starving_peasants }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_chinese_bandits } }
					random_list = {
						50 = { set_character_flag = kcc_chinese_bandits }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_confucian_debate } }
					random_list = {
						50 = { set_character_flag = kcc_confucian_debate }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_faked_miracle } }
					random_list = {
						50 = { set_character_flag = kcc_faked_miracle }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_peasant_architecture } }
					random_list = {
						50 = { set_character_flag = kcc_peasant_architecture}
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_grieving_parent } }
					random_list = {
						50 = { set_character_flag = kcc_grieving_parent }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_holy_translation } }
					random_list = {
						50 = { set_character_flag = kcc_holy_translation }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_convert_admin } }
					random_list = {
						50 = { set_character_flag = kcc_convert_admin }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_convert_money } }
					random_list = {
						50 = { set_character_flag = kcc_convert_money }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_pious_display } }
					random_list = {
						50 = { set_character_flag = kcc_pious_display }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_scapegoat } }
					random_list = {
						50 = { set_character_flag = kcc_scapegoat }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_imperial_examination } }
					random_list = {
						50 = { set_character_flag = kcc_imperial_examination }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_drunken_brawl } }
					random_list = {
						50 = { set_character_flag = kcc_drunken_brawl }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_sinful_locals } }
					random_list = {
						50 = { set_character_flag = kcc_sinful_locals }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_mingled_soldiers } }
					random_list = {
						50 = { set_character_flag = kcc_mingled_soldiers }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_officer_meeting } }
					random_list = {
						50 = { set_character_flag = kcc_officer_meeting }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_traditionalists } }
					random_list = {
						50 = { set_character_flag = kcc_traditionalists }
						50 = {}
					}
				}
				if = {
					limit = { ROOT = { has_character_flag = kcc_asian_pilgrim } }
					random_list = {
						50 = { set_character_flag = kcc_asian_pilgrim }
						50 = {}
					}
				}
				letter_event = { id = kccmission.0025 days = 5 }
			}
		}
		else = {
			kcc_clr_missionary_flags_effect = yes
			if = {
				limit = {
					has_character_flag = kcc_end_missionary_epic_success
				}
				clr_character_flag = kcc_end_missionary_epic_success
			}
			else_if = {
				limit = {
					has_character_flag = kcc_end_missionary_final_success
				}
				clr_character_flag = kcc_end_missionary_final_success
			}
			else_if = {
				limit = {
					has_character_flag = kcc_end_missionary_final_fail
				}
				clr_character_flag = kcc_end_missionary_final_fail
			}
			if = {
				limit = {
					has_character_flag = kcc_inherited_missionaries
				}
				clr_character_flag = kcc_inherited_missionaries
			}
			character_event = { id = kccmission.0023 years = 5 }
			set_variable = { which = kcc_missionary_progress value = 0 }
		}
	}
	
	option = {
		name= EVTOPT_kccmission.0028
		if = {
			limit = {
				has_character_modifier = chinese_missionaries_good
			}
			remove_character_modifier = chinese_missionaries_good
		}
		else_if = {
			limit = {
				has_character_modifier = chinese_missionaries_bad
			}
			remove_character_modifier = chinese_missionaries_bad
		}
	}
}

# Cleanup 1 if someone loses titles
character_event = {
	id = kccmission.0029
	has_dlc = "Jade Dragon"
    hide_window = yes
    is_triggered_only = yes
	
	trigger = {
		FROMFROM = {
			OR = {
				has_character_flag = kcc_inherited_missionaries
				has_character_modifier = chinese_missionaries_good
				has_character_modifier = chinese_missionaries_bad
			}
			OR = {
				NOT = {
					any_realm_province = {
						OR = {
							region = custom_eastern_access
							region = world_india
						}
					}
				}
				NOT = { primary_title = { higher_real_tier_than = DUKE } }
				is_landed = no
			}
		}
	}
	
	immediate = {
		FROMFROM = { character_event = { id = kccmission.0028 } }
	}
}

# Cleanup 2 if someone loses titles
character_event = {
	id = kccmission.0030
	has_dlc = "Jade Dragon"
    hide_window = yes
    is_triggered_only = yes
	
	trigger = {
		FROM = {
			OR = {
				has_character_flag = kcc_inherited_missionaries
				has_character_modifier = chinese_missionaries_good
				has_character_modifier = chinese_missionaries_bad
			}
			OR = {
				NOT = {
					any_realm_province = {
						OR = {
							region = custom_eastern_access
							region = world_india
						}
					}
				}
				NOT = { primary_title = { higher_real_tier_than = DUKE } }
				is_landed = no
			}
		}
	}
	
	immediate = {
		FROM = { character_event = { id = kccmission.0028 } }
	}
}

# Remove Religionbump flag
character_event = {
	id = kccmission.0031
	has_dlc = "Jade Dragon"
    hide_window = yes
    is_triggered_only = yes
	
	immediate = {
		clear_global_event_target = target_kcc_religion_bump
	}
}

# Remove Religionbump flag
character_event = {
	id = kccmission.0032
	has_dlc = "Jade Dragon"
	desc = EVTDESC_kccmission.0032
	picture = GFX_evt_pale_rider
	border = GFX_event_normal_frame_religion
    is_triggered_only = yes
	
	immediate = {
		set_character_flag = proselytized_in_china
		FROM = {
			save_event_target_as = portrait_target
		}
	}
	
	portrait = event_target:portrait_target
	
	option = { #Good riddance
		name = EVTOPT_kccmission.0032
		if = {
			limit = { has_character_modifier = chinese_missionaries_good }
			remove_character_modifier = chinese_missionaries_good
			prestige = 25
			piety = 25
		}
		else = {
			remove_character_modifier = chinese_missionaries_bad
		}
		hidden_tooltip = {
			character_event = { id = kccmission.0023 years = 5 }
			set_variable = { which = kcc_missionary_progress value = 0 }
		}
    }
}

# Immortality Cleanup
character_event = {
	id = kccmission.0033
	has_dlc = "Jade Dragon"
    hide_window = yes
    is_triggered_only = yes
	
	trigger = {
		trait = immortal
		had_character_flag = {
			flag = proselytized_in_china
			years >= 50
		}
	}
	
	immediate = {
		clr_character_flag = proselytized_in_china
	}
}