﻿#I clearly have gone beyond the original scope of this mod. Bad. I need to add events to the VANILLA pools first, to reduce event spam.
random_yearly_playable_pulse = {
	on_actions = {
		
		
		enfp_stress
		enfp_fallback
		enfp_army
		enfp_bastard
		
	}
}




#when a title changes hands. I can work on these when the rest of pools arent barren
on_title_gain = {
	on_actions = {
		#enfp_administrative_succession
		#enfp_feudal_succession
	}
}

#Historically, byzantium in part fell because it tore itself apart in constant civil wars. This is very poorly modeled in game, they just keep expanding and expanding. Lets try to fix that by adding complications when the empire changes hands.
enfp_administrative_succession = {
	trigger = {
	has_government = administrative_government
	is_independent_ruler = yes
	}
	
	events = {
		
		delay = { days = { 5 25 } }
		enfp_administrative_succession.0001

	}

}

enfp_feudal_succession = {
	trigger = {
	has_government = feudal_government
	is_independent_ruler = yes
	}
	
	random_events = {
		
		delay = { days = { 5 25 } }
		

	}

}






# these are the random events that fire when you start a hunt
hunt_random_pulse = {
	random_events = {
		500 = enfp_hunt.0001 # "Natural Ability" — your bastard son proves to be a rather astute hunter, and gets prowess, martial, and a good congenital trait
	}
}



#Meet Peers Activity Events
playdate_event_selection = {
	random_events = {
		500 = enfp_bastard.0004 # "Odd One Out," a kid at your playdate cant help but refer to your unfortunate status as a bastard 
	}
}

# these are in the pool when you press the hold court button
hold_court_event_selection = {
	random_events = {
		500 = enfp_court.0001 # "Courtly Sensibilities" a courtly vassal is ticked off you have a bastard child
	}
}

# These compete with most of the standard events in the game.
on_yearly_events = {
	random_events = {
		300 = enfp_family.0001 # "Unworthy Spouse" — your bad traited spouse is embarrassed at their low status
		100 = enfp_family.0003 # "Family Drama," your close family members get into a fight
		100 = enfp_family.0004 # Family Drama Variant," your close family members get into a fight so bad they become nemeses
		150 = enfp_family.0005 # Family Drama but from the perspective of the player
		100 = enfp_family.0006 # Family Drama for kids!
		100 = enfp_family.0007 # "Why Are They Fighting?" two of your older family members become rivals when you are a child
		5 = enfp_family.0008 # "Barren Loins," your spouse becomes totally infertile
		5 = enfp_family.0009 # "Barren Loins," YOU become totally infertile
		500 = enfp_bastard.0001 # "A Bastard at Court" get rid of your bastard child or face troubles from zealous vassals
		500 = enfp_bastard.0005 # "Bad Blood," your bastard child gets into a fight with one of your close family members
		500 = hold_council.0001 # "A Matter of Coin" Steward has ideas to get you money
		200 = enfp_bastard.0002 # "The Weight of Bastardy" you feel guilty about being a legitimized bastard ruler, or a bastard 
	
	}
}

# Events added to the yearly laamp (landless adventurer) pool
ep3_yearly_events_laamps = {
	random_events = {
		
	}
}

 # events for when you are in an army or leading one, might need to split this up later as the list grows
enfp_army = {
	 #I want to avoid on_actions like these and just put stuff in vanilla pools where I can. This is an exception.
	trigger = {
		OR = { 
		is_commanding_army = yes
		is_in_army = yes
		}

	}
	random_events = {
		chance_to_happen = 10 #dont spam
		
		100 = enfp_traits.0001 # "Craven: "The Better Part of Valor," you gain stress as a craven character because you are leading an army or are in one
		100 = enfp_traits.0002 # "Brave: In Your Element" lose stress if you are in an army or leading one

	}
}




#events that can trigger when you stay within a certain stress level, influenced by traits. (Yeah, dont make these in the future, these are shit)
enfp_stress = {
	trigger = {
		stress_level >=1

	}
	random_events = {
		chance_to_happen = 10
		delay = { days = { 2 54 } }

	
	100 = enfp_stress.0001 #Crisis of Faith, as a zealous character, your stress causes you to rethink your devotion.
	100 = enfp_stress.0001 #Crisis of Faith but as a cynical character
	
	}
}


