namespace = RGT
# character_event = {
	# id = RGT.2000
	
	# only_rulers = yes
	# is_triggered_only = yes
	# hide_window = yes
	# trigger = {
		# has_minor_title = title_regent
		# liege = {
			# trait = no_authority
		# }
	# }
	# immediate = {
		# liege = {
			# remove_trait = no_authority
		# }
	# }
# }

# character_event = {
	# id = RGT.1000
	
	# only_rulers = yes
	# is_triggered_only = yes
	# hide_window = yes

	# immediate = {
		# liege ={
			# add_trait = no_authority
		# }
		
		# if = {
			# limit = {
				# is_councillor = no
			# }
			# liege = {
				# job_chancellor = {
					# remove_title = job_chancellor
				# }
			# }
			# give_job_title = job_chancellor
		# }
		
		# give_minor_title = title_regent
		# liege = {
			# opinion = {
				# modifier = op_rv_captor
				# who = ROOT
				# months = 12
			# }
		# }
	# }
# }

character_event = {
	id = RGT.98
	
	only_rulers = yes
	is_triggered_only = yes
	hide_window = yes
	trigger = {
		any_vassal = {
			has_minor_title = title_appointed_regent
			is_councillor = no
		}
		
	}
	immediate = {
		job_chancellor = {
			remove_title = job_chancellor
		}

		any_vassal = {
			limit = {
				has_minor_title = title_appointed_regent
				is_councillor = no
			}
			give_job_title = job_chancellor
		}
	}
}

character_event = {
	id = RGT.99
	
	is_triggered_only = yes
	hide_window = yes
	immediate = {
		FROM = {character_event = {id = RGT.100 days = 1}}
	}
}

#Regency: Vassal gets approval, makes move.
character_event = {
	id = RGT.100
	desc = RGT100
	picture = GFX_evt_council
	
	is_triggered_only = yes
	
	option = {
		ai_chance = {
			factor = 100
		}
		name = EVTOPTA61124
		random_list = {
			50 = {
				modifier = {
					factor = 0.9
					NOT = {plot_power = 1.0}
				}
				modifier = {
					factor = 0.9
					NOT = {plot_power = 0.8}
				}
				modifier = {
					factor = 0.9
					NOT = {plot_power = 0.7}
				}
				modifier = {
					factor = 0.9
					NOT = {plot_power = 0.6}
				}
				modifier = {
					factor = 0.9
					NOT = {plot_power = 0.5}
				}
				modifier = {
					factor = 0.9
					NOT = {plot_power = 0.4}
				}
				modifier = {
					factor = 0.9
					NOT = {plot_power = 0.3}
				}
				modifier = {
					factor = 0.9
					NOT = {plot_power = 0.2}
				}
				modifier = {
					factor = 0.9
					NOT = {plot_power = 0.1}
				}
				modifier = {
					factor = 0.7
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = intrigue
							value = 5
						}
					}
				}
				modifier = {
					factor = 0.7
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = intrigue
							value = 10
						}
					}
				}
				modifier = {
					factor = 0.7
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = intrigue
							value = 15
						}
					}
				}
				modifier = {
					factor = 0.7
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = intrigue
							value = 20
						}
					}
				}
				modifier = {
					factor = 0.7
					FROM = {
						attribute_diff = {
							character = ROOT
							attribute = intrigue
							value = 25
						}
					}
				}
				character_event = {	id = 61125 tooltip = EVTTOOLTIP61125 }
			}
			50 = {
				
				modifier = {
					factor = 0.9
					plot_power = 1.1
				}
				modifier = {
					factor = 0.9
					plot_power = 1.2
				}
				modifier = {
					factor = 0.9
					plot_power = 1.3
				}
				modifier = {
					factor = 0.9
					plot_power = 1.4
				}
				modifier = {
					factor = 0.9
					plot_power = 1.5
				}
				modifier = {
					factor = 0.9
					plot_power = 1.6
				}
				modifier = {
					factor = 0.9
					plot_power = 1.7
				}
				modifier = {
					factor = 0.9
					plot_power = 1.8
				}
				modifier = {
					factor = 0.9
					plot_power = 1.9
				}
				modifier = {
					factor = 0.9
					plot_power = 2.0
				}
				modifier = {
					factor = 0.5
					plot_power = 2.5
				}
				modifier = {
					factor = 0.5
					plot_power = 3.0
				}
				modifier = {
					factor = 0.7
					attribute_diff = {
						character = FROM
						attribute = intrigue
						value = 5
					}
				}
				modifier = {
					factor = 0.7
					attribute_diff = {
						character = FROM
						attribute = intrigue
						value = 10
					}
				}
				modifier = {
					factor = 0.7
					attribute_diff = {
						character = FROM
						attribute = intrigue
						value = 15
					}
				}
				modifier = {
					factor = 0.7
					attribute_diff = {
						character = FROM
						attribute = intrigue
						value = 20
					}
				}
				modifier = {
					factor = 0.7
					attribute_diff = {
						character = FROM
						attribute = intrigue
						value = 25
					}
				}
				character_event = {	id = 61127 tooltip = EVTTOOLTIP61127 }
			}
		}
	}

	option = {
		ai_chance = {
			factor = 0
		}
		name = RGT100B #Abort!
	}
}


character_event = {
	id = RGT.200
	desc = EVTDESC61000
	
	picture = GFX_evt_council
	border = GFX_event_normal_frame_economy
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA61000 # Embezzle
		liege = { wealth = -50 }
		wealth = 50
		random_list = {
			50 = {
				# Got away with it!
			}
			40 = {
				liege = { character_event = { id = 61001 days = 4 tooltip = EVTTOOLTIP61001 } } # Liege suspects
				if = {
					limit = { NOT = { has_job_title = job_treasurer }  }
					liege = { job_treasurer = { character_event = { id = 61002 days = 4 tooltip = EVTTOOLTIP61002 } } } # The Steward suspects
				}
			}
			10 = {
				liege = { character_event = { id = 61003 days = 4 tooltip = EVTTOOLTIP61003 } } # Liege has proof
				if = {
					limit = { NOT = { has_job_title = job_treasurer }  }
					liege = { job_treasurer = { character_event = { id = 61004 days = 4 tooltip = EVTTOOLTIP61004 } } } # The Steward has proof
				}
			}
		}
	}
}


character_event = {
	id = RGT.300
	desc = EVTDESC61100
	picture = GFX_evt_lunatic
	border = GFX_event_normal_frame_economy
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA61100 #Grab holding.
		liege = {
			character_event = {	id = 61101 tooltip = EVTTOOLTIP61101 }
		}
	}
}



character_event = {
	id = RGT.400
	desc = EVTDESC61105
	picture = GFX_evt_lunatic
	border = GFX_event_normal_frame_economy
	
	is_triggered_only = yes
	
		
	option = {
		name = EVTOPTA61105 #Give the money.
		ROOT = { piety = 30 }
		liege = {
			character_event = {	id = 61106 tooltip = EVTTOOLTIP61106 }
		}
	}

}



character_event = {
	id = RGT.500
	desc = EVTDESC61300
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes

	option = {
		name = EVTOPTA61300
		liege = {
			random_demesne_title = {
				limit = {
					tier = KING
					OR = {
						has_law = crown_authority_1
						has_law = crown_authority_2
						has_law = crown_authority_3
						has_law = crown_authority_4
					}
					ROOT = {
						primary_title = {
							kingdom = {
								title = PREVPREVPREV
							}
						}
					}
				}
				if = {
					limit = { has_law = crown_authority_1 }
					add_law = crown_authority_0
				}
				if = {
					limit = { has_law = crown_authority_2 }
					add_law = crown_authority_1
				}
				if = {
					limit = { has_law = crown_authority_3 }
					add_law = crown_authority_2
				}
				if = {
					limit = { has_law = crown_authority_4 }
					add_law = crown_authority_3
				}
			}
			hidden_tooltip = {
				character_event = { id = 61301 }
			}
		}
	}

}