﻿# Called from code after history generation
# Empty scope
on_game_start = {
	on_actions = {
		agot_hf_on_game_start
	}
}

agot_hf_on_game_start = {
	effect = {
		### House Generation
		every_living_character = {
			limit = {
				is_human = yes
				has_dynasty = yes
			}
			trigger_event = agot_hf_new_house_name_generation_events.0002
		}
		### Barony CoA
		every_ruler = {
			#Setup CoA
			if = {
				limit = {
					exists = house
					is_landed = yes
					highest_held_title_tier = tier_barony
					agot_is_valid_dyn_coa_target = yes
				}
				trigger_event = agot_hf_generic_events.0003
			}
		}
		### Secret Parent Setup
		if = { # Daeron Targaryen
			limit = { character:Targaryen_91 ?= { is_alive = yes } }
			character:Targaryen_91 = {
				random = {
					chance = 15
					set_real_father = character:Targaryen_89
				}
			}
		}
	}
}