@advancedCost = 5000
@advancedBiomassCost = 2500

###################
## FROM VOLCANIC ##
###################

terraform_link = {
	from = "pc_volcanic"
	to = "pc_tropical"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 3600
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		should_show_standard_terraforming = yes
	}

	condition = {
		has_technology = "tech_volcanic_terraforming"
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 2
			should_terraform_trigger = {
				CLASS_FROM = pc_volcanic
				CLASS_TO = pc_tropical
			}
		}
	}
}

terraform_link = {
	from = "pc_volcanic"
	to = "pc_continental"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 3600
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		should_show_standard_terraforming = yes
	}

	condition = {
		has_technology = "tech_volcanic_terraforming"
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 2
			should_terraform_trigger = {
				CLASS_FROM = pc_volcanic
				CLASS_TO = pc_continental
			}
		}
	}
}

terraform_link = {
	from = "pc_volcanic"
	to = "pc_ocean"

	resources = {
		category = terraforming_ocean
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 5000
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		should_show_standard_terraforming = yes
	}

	condition = {
		has_technology = "tech_volcanic_terraforming"
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 2
			should_terraform_trigger = {
				CLASS_FROM = pc_volcanic
				CLASS_TO = pc_ocean
			}
		}
		modifier = {
			factor = 4
			has_aquatic_trait = yes
		}
	}
}

terraform_link = {
	from = "pc_volcanic"
	to = "pc_arctic"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 3600
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		should_show_standard_terraforming = yes
	}

	condition = {
		has_technology = "tech_volcanic_terraforming"
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 2
			should_terraform_trigger = {
				CLASS_FROM = pc_volcanic
				CLASS_TO = pc_arctic
			}
		}
	}
}

terraform_link = {
	from = "pc_volcanic"
	to = "pc_tundra"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 3600
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		should_show_standard_terraforming = yes
	}

	condition = {
		has_technology = "tech_volcanic_terraforming"
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 2
			should_terraform_trigger = {
				CLASS_FROM = pc_volcanic
				CLASS_TO = pc_tundra
			}
		}
	}
}

terraform_link = {
	from = "pc_volcanic"
	to = "pc_alpine"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 3600
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		should_show_standard_terraforming = yes
	}

	condition = {
		has_technology = "tech_volcanic_terraforming"
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 2
			should_terraform_trigger = {
				CLASS_FROM = pc_volcanic
				CLASS_TO = pc_alpine
			}
		}
	}
}

terraform_link = {
	from = "pc_volcanic"
	to = "pc_arid"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 1800
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		should_show_standard_terraforming = yes
	}

	condition = {
		has_technology = "tech_volcanic_terraforming"
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 1
			should_terraform_trigger = {
				CLASS_FROM = pc_volcanic
				CLASS_TO = pc_arid
			}
		}
	}
}

terraform_link = {
	from = "pc_volcanic"
	to = "pc_savannah"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 1800
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		should_show_standard_terraforming = yes
	}

	condition = {
		has_technology = "tech_volcanic_terraforming"
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 1
			should_terraform_trigger = {
				CLASS_FROM = pc_volcanic
				CLASS_TO = pc_savannah
			}
		}
	}
}

terraform_link = {
	from = "pc_volcanic"
	to = "pc_desert"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 1000
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		should_show_standard_terraforming = yes
	}

	condition = {
		has_technology = "tech_volcanic_terraforming"
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 1
			should_terraform_trigger = {
				CLASS_FROM = pc_volcanic
				CLASS_TO = pc_desert
			}
		}
	}
}

#################
## TO VOLCANIC ##
#################

terraform_link = {
	from = "pc_tundra"
	to = "pc_volcanic"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 3600
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		exists = owner
		has_country_flag = allow_terraforming_into_volcanic
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 2
			should_terraform_trigger = {
				CLASS_FROM = pc_tundra
				CLASS_TO = pc_volcanic
			}
		}
	}
}

terraform_link = {
	from = "pc_arctic"
	to = "pc_volcanic"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 3600
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		exists = owner
		has_country_flag = allow_terraforming_into_volcanic
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 2
			should_terraform_trigger = {
				CLASS_FROM = pc_arctic
				CLASS_TO = pc_volcanic
			}
		}
	}
}

terraform_link = {
	from = "pc_continental"
	to = "pc_volcanic"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 3600
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		exists = owner
		has_country_flag = allow_terraforming_into_volcanic
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 2
			should_terraform_trigger = {
				CLASS_FROM = pc_continental
				CLASS_TO = pc_volcanic
			}
		}
	}
}

terraform_link = {
	from = "pc_tropical"
	to = "pc_volcanic"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 3600
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		exists = owner
		has_country_flag = allow_terraforming_into_volcanic
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 2
			should_terraform_trigger = {
				CLASS_FROM = pc_tropical
				CLASS_TO = pc_volcanic
			}
		}
	}
}

terraform_link = {
	from = "pc_ocean"
	to = "pc_volcanic"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 5000
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		exists = owner
		has_country_flag = allow_terraforming_into_volcanic
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 2
			should_terraform_trigger = {
				CLASS_FROM = pc_ocean
				CLASS_TO = pc_volcanic
			}
		}
	}
}

terraform_link = {
	from = "pc_alpine"
	to = "pc_volcanic"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 3600
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		exists = owner
		has_country_flag = allow_terraforming_into_volcanic
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 2
			should_terraform_trigger = {
				CLASS_FROM = pc_alpine
				CLASS_TO = pc_volcanic
			}
		}
	}
}

terraform_link = {
	from = "pc_savannah"
	to = "pc_volcanic"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 1800
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		exists = owner
		has_country_flag = allow_terraforming_into_volcanic
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 1
			should_terraform_trigger = {
				CLASS_FROM = pc_savannah
				CLASS_TO = pc_volcanic
			}
		}
	}
}

terraform_link = {
	from = "pc_arid"
	to = "pc_volcanic"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 1800
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		exists = owner
		has_country_flag = allow_terraforming_into_volcanic
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 1
			should_terraform_trigger = {
				CLASS_FROM = pc_arid
				CLASS_TO = pc_volcanic
			}
		}
	}
}

terraform_link = {
	from = "pc_desert"
	to = "pc_volcanic"

	resources = {
		category = terraforming
		inline_script = {
			script = terraform/triggered_costs
			ENERGY_COST = @advancedCost
			BIOMASS_COST = @advancedBiomassCost
		}
	}

	duration = 1000
	inline_script = { script = terraform/wilderness_biomass }
	potential = {
		exists = owner
		has_country_flag = allow_terraforming_into_volcanic
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 1
			should_terraform_trigger = {
				CLASS_FROM = pc_desert
				CLASS_TO = pc_volcanic
			}
		}
	}
}
