#calling_example = {
#	potential = { }						# Whether the calling can be picked for the given country (can be empty)
#	first_tier = 1						# The tiers of this calling will begin at this tier (optional, default CALLINGS_TIER_MIN)
#	tier = {							# Calling tier (add as much as required)
#		attunement = 100				# Attunement given towards the patron (must be >0)
#		trigger = { }					# If the conditions are all true, completes the calling (daily checked) (cannot be empty if no counter)
#		counter = { }					# Objectives to complete the calling (can be empty)
#	}
#}
#
# Three localizations needed:
#	- calling_example (name of the calling)
#	- calling_example_desc (flavor text for the calling)
#	- calling_example_tierX_trigger_desc (text simplifying the trigger conditions, not needed when the trigger is empty)

calling_warmonger = {
	tier = {
		attunement = @calling_attunement_tier1

		trigger = {
			has_country_flag = "entered_war_as_attacker"
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		trigger = {
			has_country_flag = "entered_war_as_attacker"
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		trigger = {
			has_country_flag = "entered_war_as_attacker"
		}
	}
}

calling_build_armies = {
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_build_army = {
				max = 10
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_build_army = {
				max = 20
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_build_army = {
				max = 30
			}
		}
	}
}

calling_pass_resolution_galcom = {
	potential = {
		is_homicidal = no
	}

	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_pass_resolution_galcom = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_pass_resolution_galcom = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_pass_resolution_galcom = {
				max = 1
			}
		}
	}
}

calling_establish_commercial_pact = {
	potential = {
		is_gestalt = no
		is_homicidal = no
	}

	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_establish_trade_agreement = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_establish_trade_agreement = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_establish_trade_agreement = {
				max = 1
			}
		}
	}
}

calling_establish_research_agreement = {
	potential = {
		is_homicidal = no
	}

	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_establish_research_agreement = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_establish_research_agreement = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_establish_research_agreement = {
				max = 1
			}
		}
	}
}

calling_establish_migration_treaty = {
	potential = {
		is_nomadic = no
		is_gestalt = no
		is_homicidal = no
	}

	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_establish_migration_treaty = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_establish_migration_treaty = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_establish_migration_treaty = {
				max = 1
			}
		}
	}
}

calling_establish_defensive_pact = {
	potential = {
		has_federation = no
		is_homicidal = no
	}

	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_establish_defensive_pact = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_establish_defensive_pact = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_establish_defensive_pact = {
				max = 1
			}
		}
	}
}

calling_upgrade_buildings = {
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_upgrade_building = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_upgrade_building = {
				max = 3
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_upgrade_building = {
				max = 5
			}
		}
	}
}

calling_planetary_ascension = {
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_ascend_planet = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_ascend_planet = {
				max = 2
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_ascend_planet = {
				max = 3
			}
		}
	}
}

calling_construct_district = {
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_construct_district = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_construct_district = {
				max = 2
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_construct_district = {
				max = 3
			}
		}
	}
}

calling_construct_buildings = {
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_build_building = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_build_building = {
				max = 2
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_build_building = {
				max = 3
			}
		}
	}
}

calling_clear_blocker = {
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_clear_blocker = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_clear_blocker = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_clear_blocker = {
				max = 1
			}
		}
	}
}

calling_establish_colony = {
	potential = {
		is_nomadic = no
	}
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_establish_colony = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_establish_colony = {
				max = 2
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_establish_colony = {
				max = 3
			}
		}
	}
}

calling_terraform_planet = {
	potential = {
		is_nomadic = no
	}
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_terraform_planet = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_terraform_planet = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_terraform_planet = {
				max = 1
			}
		}
	}
}

calling_finish_megastructure = {
	first_tier = 3

	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_finish_megastructure = {
				max = 1
			}
		}
	}
}

calling_launch_agenda = {
	first_tier = 3

	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_early_launch_agenda = {
				max = 1
			}
		}
	}
}

calling_complete_arc_site = {
	potential = { has_astral_planes_dlc = no }
	first_tier = 3

	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_complete_arc_site = {
				max = 1
			}
		}
	}
}

calling_complete_arc_rift = {
	potential = { has_astral_planes_dlc = yes }
	first_tier = 3

	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_complete_arc_site_or_rift = {
				max = 1
			}
		}
	}
}

calling_research_special_project = {
	first_tier = 3

	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_research_project = {
				max = 1
			}
		}
	}

	on_start = {
		random_list = {
			33 = {
				enable_special_project = {
					name = physics_technology_CALLING_PROJECT
				}
			}
			33 = {
				enable_special_project = {
					name = society_technology_CALLING_PROJECT
				}
			}
			33 = {
				enable_special_project = {
					name = engineering_technology_CALLING_PROJECT
				}
			}
		}
	}

	on_dismissed = {
		if = {
			limit = { has_special_project = physics_technology_CALLING_PROJECT }
			abort_special_project = {
				type = physics_technology_CALLING_PROJECT
			}
		}
		else_if = {
			limit = { has_special_project = society_technology_CALLING_PROJECT }
			abort_special_project = {
				type = society_technology_CALLING_PROJECT
			}
		}
		else = {
			limit = { has_special_project = engineering_technology_CALLING_PROJECT }
			abort_special_project = {
				type = engineering_technology_CALLING_PROJECT
			}
		}
	}
}

calling_build_research_lab = {
	first_tier = 3

	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_build_research_lab = {
				max = 2
			}
		}
	}
}

calling_claim_systems = {
	potential = {
		is_homicidal = no
		is_nomadic = no
	}

	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_claim_system = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_claim_system = {
				max = 3
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_claim_system = {
				max = 5
			}
		}
	}
}

calling_harvest_systems = {
	potential = {
		is_nomadic = yes
	}

	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_harvest_system = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_harvest_system = {
				max = 3
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_harvest_system = {
				max = 5
			}
		}
	}
}

calling_conquer_planet = {
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_conquer_planet = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_conquer_planet = {
				max = 2
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_conquer_planet = {
				max = 3
			}
		}
	}
}

calling_build_ships = {
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_build_ship_size_mult = {
				max = 250
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_build_ship_size_mult = {
				max = 375
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_build_ship_size_mult = {
				max = 500
			}
		}
	}
}

calling_grow_pops = {
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_grow_pop = {
				max = 1500
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_grow_pop = {
				max = 3000
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_grow_pop = {
				max = 5000
			}
		}
	}
}

calling_construct_outposts = {
	potential = {
		is_nomadic = no
	}
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_construct_outpost = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_construct_outpost = {
				max = 2
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_construct_outpost = {
				max = 3
			}
		}
	}
}

calling_construct_waystations = {
	potential = {
		is_nomadic = yes
	}
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_construct_waystations = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_construct_waystations = {
				max = 2
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_construct_waystations = {
				max = 3
			}
		}
	}
}

calling_apply_pops_template = {
	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_apply_pop_template_tier1 = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_apply_pop_template_tier2 = {
				max = 1
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_apply_pop_template_tier3 = {
				max = 1
			}
		}
	}
}

calling_clone_space_fauna_naval_capacity = {
	potential = {
		has_grand_archive_dlc = yes
		has_technology = tech_alien_cloning
	}

	tier = {
		attunement = @calling_attunement_tier1

		counter = {
			po_clone_space_fauna_naval_capacity = {
				max = 10
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier2

		counter = {
			po_clone_space_fauna_naval_capacity = {
				max = 25
			}
		}
	}
	tier = {
		attunement = @calling_attunement_tier3

		counter = {
			po_clone_space_fauna_naval_capacity = {
				max = 50
			}
		}
	}
}
