je_heavenly_kingdom_main = {
	icon = "gfx/interface/icons/event_icons/event_protest.dds"

	is_shown_when_inactive = {
	exists= c:MCH
		THIS = c:MCH
	}

	possible = {
		is_subject = no
		year > 1851
								custom_tooltip = {
			text = id_heavenly_kingdom_main_tooltip
			hidden_trigger = {
			NOT = {	has_global_variable = id_heavenly_kingdom_off }
				
				}
			}
	}

	immediate = {
	
			random_subject_or_below = {
			limit = {
			is_player = no
			OR = {
				has_diplomatic_pact = { who = root type = id_buzhengshi }
				has_diplomatic_pact = { who = root type = id_zongdu } 
				has_diplomatic_pact = { who = root type = id_dujun }
				has_diplomatic_pact = { who = root type = vassal }
				}
			}
			
					random_scope_state = {
			save_scope_as = missionary_state
			add_modifier = {
				name = missionary_schools_hospitals
				months = normal_modifier_time
			}
			convert_population = {
				target = rel:protestant value = 0.05
			}
			add_modifier = {
				name = god_worshippers
				months = short_modifier_time
			}
		}

		}

		trigger_event = {
			id = heavenly.2
		}
	}

	on_monthly_pulse = {
		random_events = {
			5 = 0
			1 = heavenly.3
		}
	}

	complete = {
		NOT = { this = c:MCH}
		}

	fail = {
		year > 1852
						custom_tooltip = {
			text = id_heavenly_kingdom_main_tooltip
			hidden_trigger = {
			NOT = {	has_global_variable = id_heavenly_kingdom_off }
				
				}
			}
		
		
	}

	on_fail = {
		trigger_event = {
			id = heavenly.4
		}
	}

	weight = 10000
	should_be_pinned_by_default = yes
}

je_taiping = {
	icon = "gfx/interface/icons/event_icons/event_military.dds"

	complete = {
		custom_tooltip = {
			text = taiping_destroyed
			hidden_trigger = {
				NOT = {
					exists = c:TPG
				}
			}
		}
	}

	on_complete = {
		trigger_event = { id = heavenly.5 days = 0 }
	}

	fail = {
		exists = c:TPG
		has_truce_with = c:TPG
	}

	on_fail = {
		if = {
			limit = { has_journal_entry = je_warlord_china }
			post_notification = warlord_china_explosion_point_add
			change_variable = {
				name = china_warlord_explosion
				add = 1
			}
		}
	}

	weight = 1000
	should_be_pinned_by_default = yes

	inheritable = no
}
