###################################
# JAPAN CAREER EVENTS
###################################
namespace = tgp_japan_career

### EVENT LIST ####################################################################
## 0001 - Intro in 1066
## 0002 - Intro in 1178
###################################################################################

# Intro Event - Who are you playing as and what is your situation
# Also acts as an introduction when you start playing in Japan
tgp_japan_career.0001 = {
	type = character_event
    window = big_event_window
	title = tgp_japan_career.0001.t
	desc = {
		desc = tgp_japan_career.0001.desc
		first_valid =  {
			triggered_desc = {
                trigger = { has_title = title:k_chrysanthemum_throne } #is tenno
                desc = tgp_japan_career.0001.tenno_desc
            }
			triggered_desc = {
				trigger = { has_title = title:e_japan } #is kampaku
				desc = tgp_japan_career.0001.kampaku_desc
			}
            triggered_desc = {
                trigger = { government_has_flag = government_is_japan_feudal } #is soryo
                desc = tgp_japan_career.0001.soryo_desc
            }
            triggered_desc = {
                trigger = { government_has_flag = government_is_japan_administrative } #is ritsuryo
                desc = tgp_japan_career.0001.ritsuryo_desc
            }           
		}
        desc = tgp_japan_career.0001.desc_2
	}
	theme = diplomacy
	override_icon = {
		trigger = { government_has_flag = government_is_japan_feudal }
		reference ="gfx/interface/icons/event_types/type_war.dds"
	}
	override_header_background = {
		trigger = { government_has_flag = government_is_japan_feudal } 
		reference = "gfx/interface/window_event/event_header_red.dds"
	}
	override_background = {
            trigger = {
            has_title = title:k_chrysanthemum_throne
        }
        reference = tgp_garden_asia
    }
	override_background = {
        trigger = {
			has_title = title:e_japan
		}
		reference = tgp_study_japan
	}
	override_background = {
        trigger = {
            government_has_flag = government_is_japan_feudal
		}
		reference = tgp_crossroad_inn_asia
	}
    override_background = {
            trigger = {
            government_has_flag = government_is_japan_administrative
        }
        reference = bedchamber
    }

       
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
                government_has_flag = government_is_japan_feudal #Soryo ruler should have their sword out
			}
			animation = inspect_weapon 
		}
		animation = chancellor
	}

	right_portrait = {
		character = player_heir
		triggered_animation = {
			trigger = {
                government_has_flag = government_is_japan_feudal #Soryo ruler should have their sword out
			}
			animation = horse_archer_aggressive
			camera = camera_event_scheme_vs_left_look_left
		}
		animation = holding_scrolls
	}
	
	trigger = {
        has_tgp_dlc_trigger = yes
        government_is_japanese_trigger = yes  
	}

	immediate = {
		# Scopes
		save_scope_as = new_ruler
		house ?= { save_scope_as = ruler_family }
		top_liege = { save_scope_as = kampaku }
        player_heir ?= { save_scope_as = heir }
	}

	option = {
		name = tgp_japan_career.0001.a
		add_character_modifier = {
			modifier = tgp_japan_peace_modifier
			years = 20
		}
	}

	option = {
		name = tgp_japan_career.0001.b
		add_character_modifier = {
			modifier = tgp_japan_war_modifier
			years = 20
		}
	}
}
