namespace = Plus

#reserved: Plus.3651 to Plus.3750

#######################################
# IMPERIAL GERMAN EVENTS
# Written by Zeress
#######################################

character_event = { # Clarify to player what this option does exactly
	id = Plus.3651
	desc = EVTDESC_Plus_3651
	picture = GFX_evt_council
	
	is_triggered_only = yes
	hide_from = yes
	
	option = {
		name = EVTOPTA_Plus_3651 # Over time they will agree

		any_playable_ruler = {
			limit = { capital_scope = { region = world_europe } }
			narrative_event = { id = Plus.3653 }
		}
	}
}

character_event = { # Attempt to convert vassals?
	id = Plus.3652
	desc = EVTDESC_Plus_3652
	picture = GFX_evt_council

	is_triggered_only = yes
	hide_from = yes

	option = {  # Attempt to impose Edict 
		name = EVTOPTA_Plus_3652 # My will be so

		hidden_tooltip = { 
			any_vassal = {
				limit = { 
					higher_tier_than = BARON
					german_cultures_no_imperial_german_trigger = yes
				}
				letter_event = { id = Plus.3654 }
			} 
		}
	}

	option = {
		name = EVTOPTB_Plus_3652 # Perhaps not yet

		clr_character_flag = attempted_imp_german_conversion
	}	
}

narrative_event = { # Imperial German has appeared
	id = Plus.3653
	title = EVTNAME_Plus_3653
	desc = {
		trigger = { is_liege_or_above = FROM }
		text = EVTDESCA_Plus_3653
	}
	desc = {
		trigger = { NOT = { is_liege_or_above = FROM } }
		text = EVTDESCB_Plus_3653
	}
	picture = GFX_evt_imperial_german_edict
	border = GFX_event_narrative_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = I_SEE
	}
}

letter_event = { # Kaisers attempts to convert vassal
	id = Plus.3654
	desc = EVTDESC_Plus_3654
	
	is_triggered_only = yes

	option = {
		name = EVTOPTA_Plus_3654 # I accept

		ai_chance = {
			factor = 10
			
			modifier = {
				factor = 10
				ROOT = { owes_favor_to = FROM }
			}
			
			modifier = {
				factor = 2
				opinion = { who = liege value = 75 }
			}

			modifier = {
				factor = 0
				NOT = { opinion = { who = liege value = -50 } }
			}
		}
		
		if = {
			limit = { owes_favor_to = FROM }
			remove_favor = FROM
		}
		culture = imperial_german
		any_courtier = {
			limit = {
				is_ruler = no
				prisoner = no
				german_cultures_no_imperial_german_trigger = yes
			}
			culture = imperial_german
		}
		
		FROM = { letter_event = { id = Plus.3655 } } # Inform of unchallenged acceptance
	}		

	option = {
		name = EVTOPTB_Plus_3654 # I accept reluctantly

		ai_chance = {
			factor = 10
		}
		
		culture = imperial_german
		
		any_child = {
			limit = {
				NOT = { age = 16 }
				at_location = PREV
			}
			culture = imperial_german
		}
		
		FROM = { letter_event = { id = Plus.3656 } } # Inform of reluctant acceptance
	}	
	
	option = {
		name = EVTOPTC_Plus_3654 # I accept in exchange for a favor

		ai_chance = {
			factor = 10

			modifier = {
				factor = 1.5
				NOT = { opinion = { who = liege value = 0 } }
				opinion = { who = liege value = -75 }
			}
		}
		FROM = { letter_event = { id = Plus.3657 } }
	}
	
	option = {
		name = EVTOPTD_Plus_3654 # I refuse

		ai_chance = {
			factor = 10
			
			modifier = {
				factor = 2
				NOT = { opinion = { who = liege value = -75 } }
			}

			modifier = {
				factor = 0
				NOT = { opinion = { who = liege value = 75 } }
			}
		}
		
		opinion = { # Angered by demand
			who = FROM
			months = 160
			modifier = refused_imperial_edict_liege
		}
		reverse_opinion = { # Liege angered by refusal
			who = FROM
			months = 160
			modifier = refused_imperial_edict_vassal
		}
	}
}

letter_event = { # Kaiser is informed of unchallenged acceptance
	id = Plus.3655
	desc = EVTDESC_Plus_3655
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTA_Plus_3655 # Excellent 
	}
}

letter_event = { # Kaiser is informed of reluctant acceptance
	id = Plus.3656
	desc = EVTDESC_Plus_3656
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTA_Plus_3656 # Good
	}
}

letter_event = { # Kaiser is informed of acceptance in exchange for a favor
	id = Plus.3657
	desc = EVTDESC_Plus_3657
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTA_Plus_3657 # Fair Enough
		
		trigger = {
			FROM = { NOT = { owes_favor_to = ROOT } }
		}
		
		FROM = {
			culture = imperial_german

			add_favor = PREV
			
			any_child = {
				limit = {
					NOT = { age = 16 }
					at_location = PREV
				}
				culture = imperial_german
			}
			letter_event = { id = Plus.3658 } # Vassal is informed of usage or generation of a favor
		}
	}
	
	option = { 
		name = EVTOPTA_Plus_3657 # Fair Enough
		
		trigger = {
			FROM = { owes_favor_to = ROOT }
		}
		
		FROM = {
			remove_favor = ROOT
			culture = imperial_german
			
			any_child = {
				limit = {
					NOT = { age = 16 }
					at_location = PREV
				}
				culture = imperial_german
			}
			letter_event = { id = Plus.3658 } # Vassal is informed of usage or generation of a favor
		}
	}	
	
	option = { 
		name = EVTOPTB_Plus_3657 # Not even for a favor

		FROM = {
			opinion = { # Angered by demand
				who = PREV
				months = 160
				modifier = refused_imperial_edict_liege
			}
			reverse_opinion = { # Liege angered by refusal
				who = PREV
				months = 160
				modifier = refused_imperial_edict_vassal
			}
			letter_event = { id = Plus.3659 }
		}
	}	
}

letter_event = { # Vassal is informed of usage or generation of a favor
	id = Plus.3658
	desc = EVTDESC_Plus_3658
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTA_Plus_3657 # Fair Enough
	}
}

letter_event = { # Vassal is informed of refusal of a favor
	id = Plus.3659
	desc = EVTDESC_Plus_3659
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTA_Plus_3659 # Problematic...
		
		tooltip = {
			opinion = { # Angered by demand
				who = FROM
				months = 160
				modifier = refused_imperial_edict_liege
			}
			reverse_opinion = { # Liege angered by refusal
				who = FROM
				months = 160
				modifier = refused_imperial_edict_vassal
			}
		}		
	}
}