blood_gathering_mechanic = {
	alert_icon_gfx = GFX_alerticons_government_mechanics
	alert_icon_index = 18
	available = {
		has_dlc = "Winds of Change"
	}

	powers = {
		blood = {
			show_before_interactions = yes
			gui = blood_gathering_gov_mech
			max = 100
			min = 0
			base_monthly_growth = 0.0
			is_good = yes
			scaled_modifier = {
				trigger = {
					NOT = {
						has_country_flag = azt_tezcatlipoca_deity
						has_country_flag = azt_quetzacoatl_deity
						has_country_flag = azt_tlaloc_deity
					}
				}
				modifier = {
					land_morale = 0.15
					manpower_in_own_culture_provinces = 0.25
					manpower_in_accepted_culture_provinces = 0.25
				}
			}
			scaled_modifier = {
				trigger = {
					has_country_flag = azt_tezcatlipoca_deity
				}
				modifier = {
					core_creation = -0.25
					ae_impact = -0.15
				}
			}
			scaled_modifier = {
				trigger = {
					has_country_flag = azt_tlaloc_deity
				}
				modifier = {
					development_cost_in_primary_culture = -0.25
					build_cost = -0.25
				}
			}
			scaled_modifier = {
				trigger = {
					has_country_flag = azt_quetzacoatl_deity
				}
				modifier = {
					global_unrest = -3.5
					global_missionary_strength = 0.035
				}
			}
			scaled_modifier = {
				trigger = {
					has_country_flag = azt_blood_buffs_flag
				}
				modifier = {
					church_loyalty_modifier = 0.25
					technology_cost = -0.10
				}
			}
		}
	}
	interactions = {
		praise_patron_deity = {		
			icon = GFX_praise_patron_deity_interaction
			effect = {
				
				custom_tooltip = SEPERATOR_TOOLTIP
			
				country_event = { id = flavor_azt.24 }
			}
			cooldown_years = 10
			cost_type = blood
			cost = 10
			ai_chance = {
				factor = 1	
			}
		}
		
		hold_religious_festival = {		
			icon = GFX_hold_religious_festival_interaction
			effect = {
				add_doom = -10
				
				if = {
					limit = {
						has_country_flag = azt_tezcatlipoca_deity
					}
					
					add_country_modifier = {
						name = azt_toxcatl_festival
						duration = 3650
					}
					
					add_adm_power = 50
					
					add_estate_loyalty = {
						estate = estate_church
						loyalty = 10
					}
				}
				else_if = {
					limit = {
						has_country_flag = azt_quetzacoatl_deity
					}
					
					add_country_modifier = {
						name = azt_etzalcualiztli_festival
						duration = 3650
					}
					
					if = {
						limit = {
							primitives = yes
						}
						define_advisor = {
							type = inquisitor
							skill = 3
							cost_multiplier = 0.5
						}
						
						add_splendor = 100
					}
					else = {
						change_government_reform_progress = 50
					}
					
					add_estate_loyalty = {
						estate = estate_church
						loyalty = 10
					}
				}
				else_if = {
					limit = {
						has_country_flag = azt_tlaloc_deity
					}
					
					add_country_modifier = {
						name = azt_atlcahualo_festival
						duration = 3650
					}
					
					add_dip_power = 50
					
					custom_tooltip = SEPERATOR_TOOLTIP
					
					add_estate_loyalty = {
						estate = estate_burghers
						loyalty = 10
					}
				}
				else = {
					add_country_modifier = {
						name = azt_panquetzaliztli_festival
						duration = 3650
					}
					
					add_mil_power = 50
					
					custom_tooltip = SEPERATOR_TOOLTIP
					
					add_estate_loyalty = {
						estate = estate_nobles
						loyalty = 10
					}
				}
				
				custom_tooltip = SEPERATOR_TOOLTIP
				
				custom_tooltip = AZT_FESTIVAL_REWARD_CHANGES_WITH_PATRON_DEITY
				
				if = {
					limit = {
						has_country_flag = azt_festival_inquisitor_flag
					}
					define_advisor = {
						type = inquisitor
						skill = 3
						cost_multiplier = 0.5
					}
				}
				
				hidden_effect = {
					change_variable = {
						which = AztFestivalsHeldVar
						value = 1
					}
				}
			}
			cooldown_years = 10
			cost_type = blood
			cost = 25
			ai_chance = {
				factor = 1	
			}
		}
	
        blood_letting = {		
			icon = GFX_blood_letting_interaction
			trigger = {
			
			}
			effect = {
				
				custom_tooltip = SEPERATOR_TOOLTIP
				
				add_country_modifier = {
					name = azt_bloodletting_practise
					duration = 3650
				}
				
				add_government_power = {
					mechanic_type = blood_gathering_mechanic
					power_type = blood
					value = 15
				}
			}
			cooldown_years = 10
			ai_chance = {
				factor = 0	
			}
		}
	}
}