﻿###| Harthgate Character Story Events, [Godric af Cantware = ID:135_jute_godric_cantware], for Lords of Wessex |###

###| Credits |###

#: Developed by Edgar Harthgate

###| End of Credits |###

###| Table of Contents |###							###| Status |###    ###| Quick Link |###

#: Character Story = Godric af Cantware				#: Complete			character_story_godric_af_cantware
#: End of Table of Contents

###| Character Story | Godric af Cantware |###			###| Status |###	###| character_story_godric_af_cantware |###

#: character_story_godric_af_cantware_low.0001			#: Complete

###| End of Table of Contents |###

###| Character Story | Godric af Cantware |###    ###| character_story_godric_af_cantware |###

namespace = character_story_godric_af_cantware_low

character_story_godric_af_cantware_low.0001 = {

	scope = none
	hidden = yes

	immediate = {
		if = {
			limit = { current_date = 867.1.1 }
			character:135_jute_godric_cantware = {
				if = {
					limit = { 
						character:135_jute_godric_cantware = { 
							is_alive = yes
							is_ai = no
						}
					}
					character:135_jute_godric_cantware = { save_scope_as = character_story_actor }
					character:146_jute_hrefna_cantware = { save_scope_as = character_story_adventurer }
					character:142_jute_godwin_cantware = { save_scope_as = character_story_son }
					trigger_event = { id = character_story_godric_af_cantware_low.0002 }
				}
			}
		}
	}

}

character_story_godric_af_cantware_low.0002 = {

	title = character_story_godric_af_cantware_low.0002.t
	desc = character_story_godric_af_cantware_low.0002.desc
	type = character_event
	
	left_portrait = {
		character = scope:character_story_adventurer
		animation = personality_content
	}
	
	center_portrait = {
		character = scope:character_story_actor
		animation = thinking
	}

	right_portrait = {
		character = scope:character_story_son
		animation = personality_bold
	}
	
	theme = realm
	
	option = {	###| character_story_godric_af_cantware_low_option_adventurer_landed |###    ###|: Makes the [character_story_adventurer] the designated heir for the [character_story_actor].
	
		name = character_story_godric_af_cantware_low.0002.a
		
		show_as_tooltip = {
		
			custom_tooltip = character_story_godric_af_cantware_low.0002.tt.a
			
			create_title_and_vassal_change = {										#: Defines the potential change in status of a title or title holder.
				type = stepped_down
				save_scope_as = abdicate_realm_and_titles
			}
			
			title:c_sussex = {														#: Defines the effect of the potential change in status of a title or title holder
				change_title_holder = {
					holder = scope:character_story_adventurer
					change = scope:abdicate_realm_and_titles
				}
			}
			
			resolve_title_and_vassal_change = scope:abdicate_realm_and_titles		#: Resolves the defined potential change in status of a title or title holder.
			
			scope:character_story_adventurer = {									#: Defines a potential change in relationship between [character_story_adventurer] and [character_story_son].
				set_relation_friend = scope:character_story_son
				set_house = house:dynasty_jute_house_hrafnsongur
				add_gold = 100
				add_prestige = 250
			}
			
			scope:character_story_actor = {											#: Defines a potential change in [player_character] for the [player] in control of [character_story_actor] and a change in employment.
				set_player_character = scope:character_story_adventurer
				#: set_employer = scope:character_story_adventurer
			}
		}
		
		hidden_effect = {
		
			scope:character_story_actor = {											#: Defines the creation of a [list] and the scope of the listed characters.
				every_courtier = { add_to_list = previous_court }
			}
			
			create_title_and_vassal_change = {										#: Defines a change in status of a title or title holder.
				type = stepped_down
				save_scope_as = abdicate_realm_and_titles
			}
			
			title:c_sussex = {														#: Defines the effect of the change in status of a title or title holder
				change_title_holder = {
					holder = scope:character_story_adventurer
					change = scope:abdicate_realm_and_titles
				}
			}
			
			resolve_title_and_vassal_change = scope:abdicate_realm_and_titles		#: Resolves the defined change in status of a title or title holder.
			
			scope:character_story_adventurer = {									#: Defines a change in relationship between [character_story_adventurer] and [character_story_son].
				set_relation_friend = scope:character_story_son
				set_house = house:dynasty_jute_house_hrafnsongur
				add_gold = 100
				add_prestige = 250
			}
			
			every_in_list = {														#: Defines a change in [employer] for all characters listed within the defined [list].
				list = previous_court
				set_employer = scope:character_story_adventurer
			}
			
			scope:character_story_actor = {											#: Defines a change in [player_character] for the [player] in control of [character_story_actor] and moves them into their court.
				set_player_character = scope:character_story_adventurer
				set_employer = scope:character_story_adventurer
			}
		}
	
	}
	
	option = { ###| character_story_godric_af_cantware_low_option_adventurer_adventurer |###    ###|: Creates an Adventurer Camp with the [character_story_adventurer] as the leader and switches to the [character_story_adventurer]. Will be hidden if not a valid option.

		name = character_story_godric_af_cantware_low.0002.b
		
		trigger = { has_dlc_feature = roads_to_power }
		
		show_as_tooltip = {
		
			custom_tooltip = character_story_godric_af_cantware_low.0002.tt.b
			
			create_title_and_vassal_change = {
				type = created
				save_scope_as = create_adventurer_camp
			}
			
			title:d_adventurer_camp_hrafnsongur = {
				change_title_holder = {
					holder = scope:character_story_adventurer
					change = scope:create_adventurer_camp
				}
			}
			
			resolve_title_and_vassal_change = scope:create_adventurer_camp	
			
			scope:character_story_adventurer = {
				set_relation_friend = scope:character_story_son
				set_house = house:dynasty_jute_house_hrafnsongur
				change_government = landless_adventurer_government
				add_gold = 250
				add_prestige = 400
				domicile = {
					change_provisions = {
						value = {
							value = 0
							add = scope:character_story_adventurer.domicile.max_provisions
							subtract = scope:character_story_adventurer.domicile.provisions
						}
					}
				}
			}
			
			scope:character_story_actor = {
				set_player_character = scope:character_story_adventurer
			}
		}
		
		hidden_effect = {
			
			create_title_and_vassal_change = {
				type = created
				save_scope_as = create_adventurer_camp
			}
			
			title:d_adventurer_camp_hrafnsongur = {
				change_title_holder = {
					holder = scope:character_story_adventurer
					change = scope:create_adventurer_camp
				}
			}
			
			resolve_title_and_vassal_change = scope:create_adventurer_camp	
			
			scope:character_story_adventurer = {
				set_relation_friend = scope:character_story_son
				set_house = house:dynasty_jute_house_hrafnsongur
				change_government = landless_adventurer_government
				add_gold = 250
				add_prestige = 400
				domicile = {
					change_provisions = {
						value = {
							value = 0
							add = scope:character_story_adventurer.domicile.max_provisions
							subtract = scope:character_story_adventurer.domicile.provisions
						}
					}
				}
			}
			
			scope:character_story_actor = {
				set_player_character = scope:character_story_adventurer
			}
		}
	
	}
	
	option = {	###| character_story_godric_af_cantware_low_option_son_landed |###    ###|:[DEFAULT]: Makes the [character_story_son] the designated heir for the [character_story_actor].

		name = character_story_godric_af_cantware_low.0002.c
		
		show_as_tooltip = {
		
			custom_tooltip = character_story_godric_af_cantware_low.0002.tt.c
			
			#create_title_and_vassal_change = {										#: Defines the potential change in status of a title or title holder.
			#	type = stepped_down
			#	save_scope_as = abdicate_realm_and_titles
			#}
			
			#title:c_sussex = {														#: Defines the effect of the potential change in status of a title or title holder
			#	change_title_holder = {
			#		holder = scope:character_story_son
			#		change = scope:abdicate_realm_and_titles
			#	}
			#}
			
			#resolve_title_and_vassal_change = scope:abdicate_realm_and_titles		#: Resolves the defined potential change in status of a title or title holder.
			
			scope:character_story_son = {											#: Defines a potential change in relationship between [character_story_son] and [character_story_adventurer].
				set_relation_friend = scope:character_story_adventurer
			}
			
			#scope:character_story_actor = {											#: Defines a potential change in [player_character] for the [player] in control of [character_story_actor].
			#	set_player_character = scope:character_story_son
			#}
		}
		
		hidden_effect = {
			
			#create_title_and_vassal_change = {										#: Defines a change in status of a title or title holder.
			#	type = stepped_down
			#	save_scope_as = abdicate_realm_and_titles
			#}
			
			#title:c_sussex = {														#: Defines the effect of the change in status of a title or title holder
			#	change_title_holder = {
			#		holder = scope:character_story_son
			#		change = scope:abdicate_realm_and_titles
			#	}
			#}
			
			#resolve_title_and_vassal_change = scope:abdicate_realm_and_titles		#: Resolves the defined change in status of a title or title holder.
			
			scope:character_story_son = {											#: Defines a change in relationship between [character_story_son] and [character_story_adventurer].
				set_relation_friend = scope:character_story_adventurer
			}
			
			#scope:character_story_actor = {											#: Defines a change in [player_character] for the [player] in control of [character_story_actor].
			#	set_player_character = scope:character_story_son
			#}
		}
	
	}
}