je_pol_king_maximilian = {
	icon = "gfx/interface/icons/event_icons/event_portrait.dds"

	complete = {
		custom_tooltip = {
			text = pol_maximilian_died
			c:POL = {
				ruler = {
					NOT = { has_variable = is_maximilian_jagiello }
				}
			}
		}
	}

	on_complete = {
		custom_tooltip = pol_east_withdraws
		if = {
			limit = {
				exists = c:POL
				c:POL = ROOT
			}
			trigger_event = { id = poland.10 }
		}
		if = {
			limit = {
				exists = c:POL
				c:POL = ROOT
			}
			remove_modifier = diplomatic_plays_blocked
		}
	}

	on_monthly_pulse = {
		effect = {
			if = {
				limit = {
					exists = c:POL
					c:POL = ROOT
					ruler = { has_variable = is_maximilian_jagiello }
					year >= 1839
				}
				ruler = { kill_character = yes }
			}
			if = {
				limit = {
					exists = c:POL
					c:POL = ROOT
					ruler = { has_variable = is_maximilian_jagiello }
					year >= 1837
				}
				random_list = {
					11 = { }
					1 = {
						ruler = { kill_character = yes }
					}
				}
			}
		}
	}

	invalid = {
		OR = {
			NOT = {
				exists = c:POL
			}
		}
	}

	weight = 10

	should_be_pinned_by_default = yes
}
