# TODO: Localization and adjust events that reference the event-built baronies to refer to this instead
wonder_third_temple = {
	picture = GFX_wonder_strip_jewish_temple
	allow_construction = no # Built by event
	show_model = no

	potential = {
		FROMFROMFROM = {
			county = { title = c_jerusalem }
		}
	}

	active = {
		ROOT = {
			religion_group = jewish_group
		}
	}

	flags = {
		holy_building
		inspires_piety
		is_destructible
		cost_medium
	}

	available_upgrades = {
		# UNIQUE:
		upgrade_tallest_building
		upgrade_garden_outer
		upgrade_holy_ark
		upgrade_decorations
		upgrade_choir_rooms
		upgrade_school_synagogue

		# OTHER:
		upgrade_roads
		upgrade_watchtower_network
		upgrade_spikes
		upgrade_tower
		upgrade_hypocausts
		upgrade_heating_pipes
		upgrade_retinue
		upgrade_road_tolls
		upgrade_tavern
	}

	stage = {
		allow = {}

		build_time = 325
		gold_cost_flat = 2000
		gold_cost_ticking = 3
		restore_time = 150
		loot_time = 6
		restore_cost_flat = 500
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
		}

		owner_modifier = {
			monthly_character_prestige = 0.05
			monthly_character_piety = 0.1
		}
	}

	stage = {
		allow = {}

		build_time = 375
		gold_cost_flat = 2200
		gold_cost_ticking = 5
		restore_time = 200
		loot_time = 6
		restore_cost_flat = 500
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
		}

		owner_modifier = {
			monthly_character_piety = 0.1
			monthly_character_prestige = 0.1
		}
	}

	stage = {
		allow = {}

		build_time = 375
		gold_cost_flat = 2400
		gold_cost_ticking = 5
		restore_time = 200
		loot_time = 6
		restore_cost_flat = 500
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
		}

		owner_modifier = {
			monthly_character_piety = 0.2
			monthly_character_prestige = 0.1
		}
	}

	stage = {
		allow = {}

		build_time = 325
		gold_cost_flat = 2600
		gold_cost_ticking = 5
		restore_time = 200
		loot_time = 2
		restore_cost_flat = 500
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
		}

		owner_modifier = {
			monthly_character_piety = 0.2
			monthly_character_prestige = 0.2
		}
	}
}

wonder_luxor_temple = {
	picture = GFX_wonder_strip_jewish_temple
	allow_construction = no # Pre-built in history only
	show_model = no

	potential = {
		FROMFROMFROM = {
			county = { title = c_asyut }
		}
	}

	active = {
		ROOT = {
			religion_openly_egyptian_or_reformed_trigger = yes
		}
	}

	flags = {
		holy_building
		inspires_piety
		is_destructible
		cost_high
	}

	available_upgrades = {
		# UNIQUE:
		upgrade_mythological_beast
		upgrade_hidden_room
		upgrade_sacrificial_altar
		upgrade_lime_stone_casing
		upgrade_traps
		upgrade_overseer_of_rites

		# OTHER:
		upgrade_roads
		upgrade_watchtower_network
		upgrade_spikes
		upgrade_tower
		upgrade_hypocausts
		upgrade_heating_pipes
		upgrade_retinue
		upgrade_road_tolls
		upgrade_tavern
	}

	stage = {
		allow = {
		}

		build_time = 400
		gold_cost_flat = 3000
		gold_cost_ticking = 5
		restore_time = 150
		loot_time = 200
		restore_cost_flat = 400
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
		}

		owner_modifier = {
			monthly_character_prestige = 0.2
			monthly_character_piety = 0.1
		}
	}

	stage = {
		allow = {
		}

		build_time = 450
		gold_cost_flat = 3500
		gold_cost_ticking = 5
		restore_time = 200
		loot_time = 200
		restore_cost_flat = 500
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
		}

		owner_modifier = {
			monthly_character_prestige = 0.3
			monthly_character_piety = 0.1
		}
	}

	stage = {
		allow = {
		}

		build_time = 500
		gold_cost_flat = 4000
		gold_cost_ticking = 5
		restore_time = 200
		loot_time = 20
		restore_cost_flat = 500
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
			local_revolt_risk = -0.005
		}

		owner_modifier = {
			monthly_character_prestige = 0.3
			monthly_character_piety = 0.2
		}
	}

	stage = {
		allow = {
		}

		build_time = 550
		gold_cost_flat = 4500
		gold_cost_ticking = 5
		restore_time = 200
		loot_time = 20
		restore_cost_flat = 500
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
			local_revolt_risk = -0.005
		}

		owner_modifier = {
			monthly_character_prestige = 0.4
			same_religion_opinion = 2
			monthly_character_piety = 0.2
		}
	}
}
