tr_mt_mysticism_adopt = { # Alt for agenda: earlier bonus/opener gives pylons / radio towers like the werediran. Construct a "pylon" network to induce effects on worlds. Also holdings. Also could have events that spread chaos and/or "infects" leaders.
	unlocks_agenda = agenda_MT_mystic_ritual # Ritual that may or may not summon an elder god or call forth energies from the great beyond to devour your worlds. Idea: While agenda is active, gain energy whenever a ship dies. When launched, all enemies you are at war with gets blown up
	modifier = {
		intel_encryption_add = 2
	}
	# Agenda = Gives nothing. When finished, give a random leader the mystic trait. They gain insanely increased xp as well as upkeep as they near insanity. Once they reach level 10 they either ascend or become a shroud monster
	#custom_tooltip = tr_mt_mysticism_adopt_desc
	# Idea: use on_emergency_ftl to spawn a wormhole (if none exists already) connecting the systems (then lock it). It lasts for 5 years
}

# 
tr_mt_mysticism_finish = {
	#custom_tooltip = tr_mt_mysticism_finish_desc # Unlocks edicts which cost zro, astral threads and dark matter # Old: Perform a ritual to increase production and happiness. Has a chance of causing great damage Alt: Perform ritual to open a rift
	modifier = {
		counter_intel_gain_speed = -0.75
		ascension_perks_add = 1
	}
}

# +1 cloaking strength
tr_mt_mysticism_shroud = {

	modifier = {
		ship_cloaking_strength_add = 2
	}
	
	tradition_swap = {
		name = tr_mt_mysticism_shroud_no_cloaking
		inherit_icon = yes
		trigger = {
			has_first_contact_dlc = no
		}
		modifier = {
			intel_encryption_add = 2
		}
		weight = {
			factor = 1
		}
	}

	ai_weight = {
		factor = 1000
	}
}

# Election cost -50% # Tradition swap for shadow council: +1 codebreaking # Alt: 
## New effect: 
tr_mt_mysticism_elections = {
	
	modifier = {
		espionage_hostile_operation_difficulty_add = 2
	}
	
	tradition_swap = {
		inherit_name = yes
		inherit_icon = yes
		trigger = {
			has_astral_planes_dlc = yes
		}
		modifier = {
			espionage_hostile_operation_difficulty_add = 2
			dimensional_lock_duration_mult = 0.15
		}
		weight = {
			factor = 1
		}
	}

	ai_weight = {
		factor = 1000
	}
}

# difficulty operations / Alt: Some leaders gain a mystic trait. They may die. They may also go crazy.
## Actually, scrap this whole leader-thing and use it for the werediran event chain instead.
### Actually, keep the leaders, but their effect is now: Speeds up rituals by +50%
#### Is now Mystic Ritual
tr_mt_mysticism_messenger = {
	
	possible = {
		has_tradition = tr_mt_mysticism_shroud
		has_tradition = tr_mt_mysticism_elections
	}
	
	modifier = {
		ship_emergency_ftl_min_days_mult = -0.5
		fleet_mia_time_mult = -0.2
	}
	
	#custom_tooltip = tr_mt_mysticism_messenger_desc
	
	#triggered_modifier = {
	#	potential = { always = yes }
	#	all_technology_research_speed = 0.02
	#	mult = mt_mystics_ascended
	#}

	ai_weight = {
		factor = 1000
	}
}

# Gain access to the mystic ritual agenda
tr_mt_mysticism_hardening = {
	#custom_tooltip = tr_mt_mysticism_hardening_desc
	possible = {
		has_tradition = tr_mt_mysticism_synthesis
		has_tradition = tr_mt_mysticism_elections
	}
	
	modifier = {
		ship_shield_hardening_add = 0.25
		ship_armor_hardening_add = 0.25
	}

	ai_weight = {
		factor = 1000
	}
}

# Change to: When uncloaking a fleet
tr_mt_mysticism_synthesis = {

	custom_tooltip = tr_mt_mysticism_synthesis_desc

	tradition_swap = {
		name = tr_mt_mysticism_synthesis_no_cloaking
		inherit_icon = yes
		inherit_effects = no
		trigger = {
			has_first_contact_dlc = no
		}
		modifier = {
			ship_sensor_range_add = 2
		}
		weight = {
			factor = 1
		}
	}

	#tradition_swap = {
	#	name = tr_mt_mysticism_zro_synthesis
	#	inherit_icon = yes
	#	inherit_effects = no
	#	trigger = {
	#		species = {
	#			has_psionic_species_trait = yes
	#		}
	#	}
	#	modifier = {
	#		planet_researchers_sr_zro_produces_add = 0.1
	#	}
	#	weight = {
	#		factor = 1
	#	}
	#}
	#
	#tradition_swap = {
	#	name = tr_mt_mysticism_zro_sacrifice
	#	inherit_icon = yes
	#	inherit_effects = no
	#	trigger = {
	#		is_death_cult_empire = yes
	#		species = {
	#			has_psionic_species_trait = yes
	#		}
	#	}
	#	custom_tooltip = tr_mt_mysticism_zro_sacrifice_desc
	#	weight = {
	#		factor = 10
	#	}
	#}

	ai_weight = {
		factor = 1000
	}
}
