################### Available Wonders #############################
#### 5. LEARNING
# 5A. Grand University ............	wonder_university
# 5B. Grand Library................ wonder_library
###################################################################

##################################################
################# 5. LEARNING ####################
##################################################

# 5A. Grand University
wonder_university = {
	picture = GFX_wonder_strip_university

	potential = {
		is_nomadic = no

		trigger_if = {
			limit = { religion_group = pagan_group }
			is_not_unreformed_pagan_trigger = yes
		}
	}

	active = {
		trigger_if = {
			limit = { religion_group = pagan_group }
			ROOT = { is_not_unreformed_pagan_trigger = yes }
		}
	}

	flags = {
		inspires_learning
		cost_high
		gives_artifact
		gives_artifact_book
	}

	available_upgrades = {
		# UNIQUE:
		upgrade_great_seminars
		upgrade_wing_of_diplomacy
		upgrade_wing_of_martial
		upgrade_wing_of_stewardship
		upgrade_wing_of_intrigue
		upgrade_wing_of_learning
		upgrade_guardian_of_knowledge

		upgrade_historical_mural

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

	stage = {
		allow = {
			FROMFROMFROM = {
				TECH_CULTURE_FLEX >= 3
				TECH_LEGALISM >= 3
			}
		}

		build_time = 350
		gold_cost_flat = 1500
		gold_cost_ticking = 3
		restore_time = 150
		loot_time = 20
		restore_cost_flat = 400
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
			culture_techpoints = 0.05
		}

		owner_modifier = {
			monthly_character_prestige = 0.1
		}
	}

	stage = {
		allow = {
			FROMFROMFROM = {
				TECH_CULTURE_FLEX >= 3
				TECH_LEGALISM >= 3
			}
		}

		build_time = 300
		gold_cost_flat = 1000
		gold_cost_ticking = 3
		restore_time = 200
		loot_time = 20
		restore_cost_flat = 500
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
			culture_techpoints = 0.05
		}

		owner_modifier = {
			monthly_character_prestige = 0.1
		}
	}

	stage = {
		allow = {
			FROMFROMFROM = {
				TECH_CULTURE_FLEX >= 3
				TECH_LEGALISM >= 3
			}
		}

		build_time = 300
		gold_cost_flat = 1000
		gold_cost_ticking = 3
		restore_time = 200
		loot_time = 6
		restore_cost_flat = 500
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
			culture_techpoints = 0.05
		}

		owner_modifier = {
			monthly_character_prestige = 0.1
		}
	}

	stage = {
		allow = {
			FROMFROMFROM = {
				TECH_CULTURE_FLEX >= 3
				TECH_LEGALISM >= 3
			}
		}

		build_time = 300
		gold_cost_flat = 1000
		gold_cost_ticking = 3
		restore_time = 200
		loot_time = 2
		restore_cost_flat = 500
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
			culture_techpoints = 0.05
			military_techpoints = 0.02
			economy_techpoints = 0.02
		}

		owner_modifier = {
			monthly_character_prestige = 0.1
		}
	}
}

# 5B. Grand Library
wonder_library = {
	picture = GFX_wonder_strip_library

	potential = {
		is_nomadic = no

		trigger_if = {
			limit = { religion_group = pagan_group }
			ROOT = { is_not_unreformed_pagan_trigger = yes }
		}
	}

	active = {
		trigger_if = {
			limit = { religion_group = pagan_group }
			ROOT = { is_not_unreformed_pagan_trigger = yes }
		}
	}

	flags = {
		inspires_learning
		cost_high
		gives_artifact
		gives_artifact_bells
	}

	available_upgrades = {
		# UNIQUE:
		upgrade_collection_drama
		upgrade_collection_architecture
		upgrade_collection_math
		upgrade_collection_history
		upgrade_collection_science
		upgrade_scribe_room
		upgrade_keeper_of_tomes

		upgrade_historical_mural

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

	stage = {
		allow = {
		}

		build_time = 320
		gold_cost_flat = 2000
		gold_cost_ticking = 3
		restore_time = 150
		loot_time = 20
		restore_cost_flat = 400
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
			culture_techpoints = 0.05
		}

		owner_modifier = {
			monthly_character_prestige = 0.1
		}
	}

	stage = {
		allow = {
		}

		build_time = 320
		gold_cost_flat = 1000
		gold_cost_ticking = 3
		restore_time = 200
		loot_time = 20
		restore_cost_flat = 500
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
			culture_techpoints = 0.05
		}

		owner_modifier = {
			monthly_character_prestige = 0.2
		}
	}

	stage = {
		allow = {
		}

		build_time = 320
		gold_cost_flat = 1000
		gold_cost_ticking = 3
		restore_time = 200
		loot_time = 6
		restore_cost_flat = 500
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
			tech_growth_modifier_culture = 0.25
		}

		owner_modifier = {
			monthly_character_prestige = 0.3
		}
	}

	stage = {
		allow = {
		}

		build_time = 320
		gold_cost_flat = 1000
		gold_cost_ticking = 3
		restore_time = 200
		loot_time = 2
		restore_cost_flat = 500
		restore_cost_ticking = 2
		upgrade_slots = 2

		local_modifier = {
			tech_growth_modifier_economy = 0.25
			tech_growth_modifier_military = 0.25
		}

		owner_modifier = {
			monthly_character_prestige = 0.4
		}
	}
}