﻿@holding_illustration_western = "gfx/interface/illustrations/holding_types/palace_western.dds"
@holding_illustration_mena = "gfx/interface/illustrations/holding_types/palace_mena.dds"
@holding_illustration_india = "gfx/interface/illustrations/holding_types/palace_indian.dds"
@holding_illustration_mediterranean = "gfx/interface/illustrations/holding_types/palace_mediterranean.dds"
@holding_illustration_norse = "gfx/interface/illustrations/holding_types/palace_norse.dds"
@holding_illustration_iberian = "gfx/interface/illustrations/holding_types/palace_iberian.dds"

# Palace holding main building
# The Palace has:
# 	- Good tax income
#	- Good Levies
#	- Good Garrinson
#	- Great Fort level
#	- Reduce danger (same as other holdings)
#	- Small Piety Gain
#	- Small Renown Gain
palace_01 = {
	effect_desc = palace_effect_desc

	# Building triggers
	can_construct_potential = {
		barony_cannot_construct_holding = no
		global_var:magister_character ?= {
			regula_has_palace_holding = no
		}
		scope:holder = { is_regula_trigger = yes }
	}

	can_construct = {
		culture = {
			has_innovation = innovation_city_planning
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		building_requirement_tribal_holding_in_county = yes
	}

	# Gameplay values
	construction_time = slow_construction_time
	cost_gold = palace_tier_1_cost
	next_building = palace_02

	levy = good_building_levy_tier_2
	max_garrison = good_building_max_garrison_tier_2
	garrison_reinforcement_factor = building_garrison_reinforcement_factor_tier_2
	province_modifier = {
		# Good tax income
		monthly_income = good_building_tax_tier_2
		# Good Fort level
		fort_level = great_building_fort_level_tier_2
		# Reduce Danger
		travel_danger = -10
	}

	character_modifier = {
		monthly_piety = 0.5
		monthly_dynasty_prestige = 0.25
	}

	# flag = palace

	# Icon
	type_icon = "icon_building_palace.dds"

	# Set Palace as capital and give bonus piety/renown for building
	on_complete = {
		county.holder = {
			add_piety = 500
			dynasty = {
				add_dynasty_prestige = 1000
			}
			trigger_event = regula_initialize_event.1040
		}
	}
	
	# AI can't build this
	ai_value = 0

	# Art
	### WESTERN ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 0 } }
	}

	### INDIAN ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { indian_building_gfx }
	}

	### MENA ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mena_building_gfx }
	}

	### MEDITERRANEAN ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mediterranean_building_gfx }
	}

	### FP1 Norse ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		requires_dlc_flag = the_northern_lords
		illustration = @holding_illustration_norse
		soundeffect = { soundeffect = "event:/DLC/FP1/SFX/Ambience/Urban/norse_castle_tier_01" }
		graphical_cultures = { norse_building_gfx }
	}

	### FP2 Iberian ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		requires_dlc_flag = the_fate_of_iberia
		illustration = @holding_illustration_iberian
		soundeffect = { soundeffect = "event:/DLC/FP2/SFX/Ambience/Urban/iberian_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { iberian_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
}

palace_02 = {
	effect_desc = palace_effect_desc

	# Building triggers
	can_construct = {
		culture = {
			has_innovation = innovation_manorialism
		}
	}

	# Gameplay values
	construction_time = slow_construction_time
	cost_gold = palace_tier_2_cost
	next_building = palace_03

	levy = good_building_levy_tier_4
	max_garrison = good_building_max_garrison_tier_4
	garrison_reinforcement_factor = building_garrison_reinforcement_factor_tier_4
	province_modifier = {
		# Good tax income
		monthly_income = good_building_tax_tier_4
		# Good Fort level
		fort_level = great_building_fort_level_tier_4
		# Reduce Danger
		travel_danger = -12
	}

	character_modifier = {
		monthly_piety = 1
		monthly_dynasty_prestige = 0.5
	}

	# flag = palace
	
	# AI can't build this
	ai_value = 0

	# Art
	### WESTERN ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 0 } }
	}

	### INDIAN ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { indian_building_gfx }
	}

	### MENA ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mena_building_gfx }
	}

	### MEDITERRANEAN ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mediterranean_building_gfx }
	}

	### FP1 Norse ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		requires_dlc_flag = the_northern_lords
		illustration = @holding_illustration_norse
		soundeffect = { soundeffect = "event:/DLC/FP1/SFX/Ambience/Urban/norse_castle_tier_01" }
		graphical_cultures = { norse_building_gfx }
	}

	### FP2 Iberian ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		requires_dlc_flag = the_fate_of_iberia
		illustration = @holding_illustration_iberian
		soundeffect = { soundeffect = "event:/DLC/FP2/SFX/Ambience/Urban/iberian_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { iberian_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
}

palace_03 = {
	effect_desc = palace_effect_desc

	# Building triggers
	can_construct = {
		culture = {
			has_innovation = innovation_windmills
		}
	}

	# Gameplay values
	construction_time = slow_construction_time
	cost_gold = palace_tier_3_cost
	next_building = palace_04

	levy = good_building_levy_tier_6
	max_garrison = good_building_max_garrison_tier_6
	garrison_reinforcement_factor = building_garrison_reinforcement_factor_tier_6
	province_modifier = {
		# Good tax income
		monthly_income = good_building_tax_tier_6
		# Good Fort level
		fort_level = great_building_fort_level_tier_6
		# Reduce Danger
		travel_danger = -14
	}

	character_modifier = {
		monthly_piety = 2
		monthly_dynasty_prestige = 0.75
	}

	# flag = palace
	
	# AI can't build this
	ai_value = 0

	# Art
	### WESTERN ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 0 } }
	}

	### INDIAN ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { indian_building_gfx }
	}

	### MENA ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mena_building_gfx }
	}

	### MEDITERRANEAN ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mediterranean_building_gfx }
	}

	### FP1 Norse ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		requires_dlc_flag = the_northern_lords
		illustration = @holding_illustration_norse
		soundeffect = { soundeffect = "event:/DLC/FP1/SFX/Ambience/Urban/norse_castle_tier_01" }
		graphical_cultures = { norse_building_gfx }
	}

	### FP2 Iberian ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		requires_dlc_flag = the_fate_of_iberia
		illustration = @holding_illustration_iberian
		soundeffect = { soundeffect = "event:/DLC/FP2/SFX/Ambience/Urban/iberian_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { iberian_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
}

palace_04 = {
	effect_desc = palace_effect_desc

	# Building triggers
	can_construct = {
		culture = {
			has_innovation = innovation_cranes
		}
	}

	# Gameplay values
	construction_time = slow_construction_time
	cost_gold = palace_tier_4_cost

	levy = good_building_levy_tier_8
	max_garrison = good_building_max_garrison_tier_8
	garrison_reinforcement_factor = building_garrison_reinforcement_factor_tier_8
	province_modifier = {
		# Good tax income
		monthly_income = good_building_tax_tier_8
		# Good Fort level
		fort_level = great_building_fort_level_tier_8
		# Reduce Danger
		travel_danger = -16
	}

	character_modifier = {
		monthly_piety = 3
		monthly_dynasty_prestige = 1
	}

	# flag = palace
	
	# AI can't build this
	ai_value = 0

	# Art
	### WESTERN ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_western
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/western_castle" soundparameter = { "Tier" = 0 } }
	}

	### INDIAN ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_india
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/indian_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { indian_building_gfx }
	}

	### MENA ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_mena
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mena_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mena_building_gfx }
	}

	### MEDITERRANEAN ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		illustration = @holding_illustration_mediterranean
		soundeffect = { soundeffect = "event:/SFX/Ambience/3DMapEmitters/Holdings/Castle/mediterranean_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { mediterranean_building_gfx }
	}

	### FP1 Norse ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		requires_dlc_flag = the_northern_lords
		illustration = @holding_illustration_norse
		soundeffect = { soundeffect = "event:/DLC/FP1/SFX/Ambience/Urban/norse_castle_tier_01" }
		graphical_cultures = { norse_building_gfx }
	}

	### FP2 Iberian ###
	asset = {
		type = pdxmesh
		name = "building_special_palace_of_aachen_mesh"
		requires_dlc_flag = the_fate_of_iberia
		illustration = @holding_illustration_iberian
		soundeffect = { soundeffect = "event:/DLC/FP2/SFX/Ambience/Urban/iberian_castle" soundparameter = { "Tier" = 0 } }
		graphical_cultures = { iberian_building_gfx }
		graphical_regions = { graphical_mediterranean }
	}
}