#####################
# Machine Age Edicts
#####################

@Edict1Cost = 20
@Edict2Cost = 25
@Edict3Cost = 30
@HiveMegaAlloys = 15

@EdictDuration = -1

legislative_chorus = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	edict_lock_in_months = 180
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_democratic_authority = yes
		has_country_flag = cyber_individualist
	}

	modifier = {
		council_agenda_progress_speed = 0.25
		council_agenda_finishing_effect_duration_mult = 0.25
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

self_preservation_override = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_democratic_authority = yes
		has_country_flag = cyber_collectivist
	}

	modifier = {
		cyborg_pop_bonus_workforce_mult = 0.2
		logistic_growth_mult = -0.1
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

battle_royale = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_oligarchic_authority = yes
		has_country_flag = cyber_individualist
	}

	modifier = {
		pop_cat_specialist_bonus_workforce_mult = 0.15
		pop_cat_worker_bonus_workforce_mult = 0.15
		pop_cat_specialist_happiness = -0.15
		pop_cat_worker_happiness = -0.15
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

stately_acclaim = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_oligarchic_authority = yes
		has_country_flag = cyber_collectivist
	}

	allow = {
		hidden_trigger = {
			has_extorted_faction = yes
		}
		custom_tooltip = edict_stately_acclaim_requirements_tt
	}

	modifier = {
		custom_tooltip = "edict_stately_acclaim_tt"
		show_only_custom_tooltip = no
	}

	ai_weight = {
		weight = 1
	}
}

self_indictment_protocol = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_dictatorial_authority = yes
		has_country_flag = cyber_individualist
	}

	modifier = {
		planet_crime_add = -30
		planet_stability_add = 4
		pop_cyborg_happiness = 0.15
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

love_letter_virus = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_dictatorial_authority = yes
		has_country_flag = cyber_collectivist
		is_nomadic = no
	}

	modifier = {
		planet_resettlement_unemployed_mult = 1.00
		pop_resettlement_cost_mult = -0.15
		pop_cyborg_happiness = 0.15
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

love_letter_virus_nomad = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_dictatorial_authority = yes
		has_country_flag = cyber_collectivist
		is_nomadic = yes
	}

	modifier = {
		pop_cyborg_happiness = 0.15
	}

	ai_weight = {
		weight = 0
	}
}

levied_experience = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_imperial_authority = yes
		has_country_flag = cyber_individualist
	}

	modifier = {
		leader_trait_selection_options_add = 1
		negative_traits_country = -1
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

neurocasted_spectacles = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	edict_lock_in_months = 12

	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_imperial_authority = yes
		has_country_flag = cyber_collectivist
	}

	modifier = {
		# See the Cyberdome building for modifiers.
		# Also see the inline script on_all_capital_buildings.txt
		custom_tooltip = edict_neurocasted_spectacles_effect
	}

	allow = {
		custom_tooltip = {
			fail_text = "requires_cyberdome"
			owner.capital_scope = {
				has_building = building_cyberdome
			}
		}
	}

	ai_weight = {
		weight = 0
	}
}

customer_insights = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_megacorp = yes
		has_country_flag = cyber_individualist
	}

	modifier = {
		planet_branch_offices_cost_mult = -0.25
		branch_office_value_mult = 0.10
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

rolling_updates = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_megacorp = yes
		has_country_flag = cyber_collectivist
	}

	modifier = {
		intel_encryption_add = 1
		intel_decryption_add = 1
		planet_pops_consumer_goods_upkeep_mult = -0.15
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

subsidized_identity_backups = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		has_country_flag = edict_subsidized_identity_backups
	}

	modifier = {
		# See the leader_trait_synthetic for modifiers.
		custom_tooltip = edict_subsidized_identity_backups_effect
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

optimized_identity_creation = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		has_country_flag = edict_optimized_identity_creation
	}

	modifier = {
		planet_pop_assembly_mult = 0.10
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

# Hive Authority Swap Edicts
hive_mind_outreach = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_hive_empire = yes
		has_country_flag = cyber_hive_volitional
	}

	modifier = {
		ship_speed_mult = 0.15
		diplomacy_influence_upkeep_mult = -0.50
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

hive_hyper_stimulants = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_hive_empire = yes
		has_country_flag = cyber_hive_integrated
	}

	modifier = {
		ship_evasion_mult = 0.10
		pop_cat_simple_drone_bonus_workforce_mult = 0.25
		pop_cat_complex_drone_bonus_workforce_mult = -0.1
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

hive_mega_construction = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	edict_lock_in_months = 180
	resources = {
		category = edicts
		cost = {
			alloys = @HiveMegaAlloys
			multiplier = value:edict_size_effect
		}
		upkeep = {
			alloys = @HiveMegaAlloys
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		OR = {
			has_country_flag = cyber_hive_integrated
			has_country_flag = cyber_hive_volitional
		}
	}


	modifier = {
		megastructure_build_speed_mult = 0.50
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

#Unlocked by Driven Assimilator - Memory Aggregator
aggregated_memory = {
	length = @EdictDuration
	icon = "GFX_edict_type_policy"

	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	modifier = {
		council_agenda_progress_speed = 0.15
		councilor_exp_gain = 0.10
	}

	potential = {
		has_country_flag = driven_memory_aggregator
		has_machine_age_dlc = yes
	}
}

#Unlocked by Driven Assimilator - Neural Chorus
choral_harmony = {
	length = @EdictDuration
	icon = "GFX_edict_type_policy"

	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	modifier = {
		cyborg_pop_bonus_workforce_mult = 0.10
	}

	potential = {
		has_country_flag = driven_neural_chorus
		has_machine_age_dlc = yes
	}
}

#Cybernetic Creed Advanced Edicts
cybernetic_creed_construction_edict = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	edict_lock_in_months = 180
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_cyber_creed_advanced_government = yes
		has_country_flag = cybernetic_creed_construction
	}

	modifier = {
		planet_building_build_speed_mult = 0.25
		foundry_jobs_bonus_workforce_mult = 0.10
		artisan_jobs_bonus_workforce_mult = 0.10
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

cybernetic_creed_war_edict = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	edict_lock_in_months = 180
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_cyber_creed_advanced_government = yes
		has_country_flag = cybernetic_creed_war
	}

	modifier = {
		country_naval_cap_mult = 0.1
		ship_fire_rate_mult = 0.1
		army_attack_damage_mult = 0.1
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

cybernetic_creed_research_edict = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	edict_lock_in_months = 180
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_cyber_creed_advanced_government = yes
		has_country_flag = cybernetic_creed_research
	}

	modifier = {
		num_tech_alternatives_add = 1
		researcher_jobs_bonus_workforce_mult = 0.1
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

cybernetic_creed_construction_labor = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	edict_lock_in_months = 180
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_cyber_creed_advanced_government = yes
		has_country_flag = cybernetic_creed_labor
	}

	modifier = {
		planet_jobs_worker_produces_mult = 0.2
		planet_jobs_upkeep_mult = -0.1
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

cybernetic_creed_general_edict = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	edict_lock_in_months = 180
	resources = {
		category = edicts
		cost = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
		upkeep = {
			unity = @Edict2Cost
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		is_cyber_creed_advanced_government = yes
		has_country_flag = cybernetic_creed_general
	}

	modifier = {
		cyborg_pop_bonus_workforce_mult = 0.1
		pop_happiness = 0.1
		planet_stability_add = 2
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

# Nanotech Tradition Edicts
nanotech_naval_augmentation = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	edict_lock_in_months = 180
	resources = {
		category = edicts
		cost = {
			nanites = 2500
			multiplier = value:edict_size_effect
		}
		upkeep = {
			nanites = 5
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		has_tradition = tr_nanotech_5
	}

	modifier = {
		country_naval_cap_mult = 0.25
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

nanotech_alloy_augmentation = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	edict_lock_in_months = 180
	resources = {
		category = edicts
		cost = {
			nanites = 2500
			multiplier = value:edict_size_effect
		}
		upkeep = {
			nanites = 5
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		has_tradition = tr_nanotech_5
	}


	modifier = {
		country_alloys_produces_mult = 0.15
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}

nanotech_energy_augmentation = {
	length = @EdictDuration
	icon = "GFX_edict_type_time"
	edict_lock_in_months = 180
	resources = {
		category = edicts
		cost = {
			nanites = 2500
			multiplier = value:edict_size_effect
		}
		upkeep = {
			nanites = 5
			multiplier = value:edict_size_effect
		}
	}

	potential = {
		has_tradition = tr_nanotech_5
	}


	modifier = {
		country_energy_produces_mult = 0.25
	}

	allow = {
	}

	ai_weight = {
		weight = 0
	}
}
