namespace = yl_summon

narrative_event = {
	id = yl_summon.1
	desc = EVTDESC_ylsummon10
	picture = caravan
	title = ylsummon_title
	is_triggered_only = yes 
	option = { 
		name = EVTOPTylsummon
		hidden_tooltip = {
			hs_summonhero_effect = yes
			if = {
				limit = {any_player = {trait = hs_summoner}}
				any_player = {character_event = {id = yl_summon.100}}
			}
		}
	}
}

character_event = {
	id = yl_summon.100
	desc = EVTDESC_ylsummon100
	picture = GFX_evt_coronation

	is_triggered_only = yes
	option = {
		name = EVTOPTylsummon100
	}
}
narrative_event = {
	id = yl_summon.999
	desc = EVTDESC_ylsummon10
	picture = caravan
	title = ylsummon_title
	ai = no
	
	is_triggered_only = yes 
	
	option = { 
		name = HSsummonfive
		set_variable = { which = hscount value = 5 }		
	}
	option = { 
		name = HSsummonten
		set_variable = { which = hscount value = 10 }		
	}
	option = { 
		name = HSsummon15
		set_variable = { which = hscount value = 15 }		
	}
	option = { 
		name = HSsummon20
		set_variable = { which = hscount value = 20 }		
	}
	
	after = {
		while = {
			limit = {
				check_variable = {
					which = hscount
					value = 1
				}
			}    
			subtract_variable = {
				which = hscount
				value = 1
			}
			hs_summonhero_effect = yes
		}
		set_variable = { which = hscount value = 0 }
	}
}