#####################################################################
############################ INDEX ##################################
#####################################################################
### ANYONE ADDING UPGRADES(features): Keep this updated, please!
###
### Template:
###
###		upgrade_example_name
###			picture = GFX_upgrade_icon_crates
###			show_in_history = yes
###			allow = { }
###			potential = { }
###			active = { }
###			flags = { }
###			build_time = 20
###			gold_cost_flat = 450
###			gold_cost_ticking = 1
###			local_modifier = { }
###			owner_modifier = { }
###		}
###

# Note: Names are reference points, but likely displayed differently in game
# Upgrades are referred to as "features" in game
# Scopes: ROOT is the character, FROM is the upgrade, FROMFROM the wonder, and FROMFROMFROM the province.

################### Available Upgrades ###########################

#### GENERIC
# Great Roads ..................... upgrade_roads
# Watchtower Network ..............	upgrade_watchtower_network
# Spikes .......................... upgrade_spikes
# Tower ........................... upgrade_tower
# Hypocausts ...................... upgrade_hypocausts
# Heating Pipes ................... upgrade_heating_pipes
# Retinue ......................... upgrade_retinue
# Torture Chamber ................. upgrade_torture_chamber
# Road Tolls ...................... upgrade_road_tolls 
# Mural ........................... upgrade_historical_mural
# Tavern .......................... upgrade_tavern

#### CATHEDRAL
# Gargoyles ....................... upgrade_gargoyles
# Grand Bells ..................... upgrade_bells
# Stained Glass Window ............ upgrade_stained_glass_window
# Relic Tomb ...................... upgrade_relic_tomb
# Grand Basilica .................. upgrade_grand_basilica
# Catacombs ....................... upgrade_catacombs
# Giant Cross ..................... upgrade_giant_cross
# Golden Bells .................... upgrade_bells_golden

#### TEMPLE
# God Statue ...................... upgrade_statue_god
# Temple Guards ................... upgrade_temple_guards
# Sacrificial Altar ............... upgrade_sacrificial_altar
# Sacred Grove .................... upgrade_sacred_grove
# Prophecy Rooms .................. upgrade_prophecy_rooms
# Walled Paved Precinct ........... upgrade_temple_precinct
# Inner Sanctuary ................. upgrade_inner_sanctuary
# Custodian of the Temple ......... upgrade_custodian_of_temple

#### MOSQUE
# Minaret ......................... upgrade_minaret
# Open Courtyard .................. upgrade_open_courtyard
# Dome ............................ upgrade_dome
# Hanging Lamps ................... upgrade_lamps_hanging
# Soup Kitchen .................... upgrade_soup_kitchen
# School .......................... upgrade_school_mosque
# Hostel for travelers ............ upgrade_hostel
# Custodian of the Mosque ......... upgrade_custodian_of_the_mosque

#### SYNAGOGUE
# The Tallest Building ............ upgrade_tallest_building
# Outer Wall and Open Garden ...... upgrade_garden_outer
# Torah Ark ....................... upgrade_holy_ark
# Elaborate Decorations ........... upgrade_decorations
# Choir Rooms ..................... upgrade_choir_rooms
# School .......................... upgrade_school_synagogue

#### BUDDHIST TEMPLE
# Chaitya-Grihas .................. upgrade_chaitya-grihas
# Gompa ........................... upgrade_gompa
# Bodhi Tree ...................... upgrade_bodhi_tree
# Cave Complex .................... upgrade_cave_complex
# Vihara .......................... upgrade_vihara
# School .......................... upgrade_school_buddhist
# Relic Stupa ..................... upgrade_relic_stupa
# Object Stupa .................... upgrade_object_stupa
# Commemorative Stupa ............. upgrade_commerative_stupa
# Symbolic Stupa .................. upgrade_symbolic_stupa
# Votive Stupa .................... upgrade_votive_stupa

#### HINDU TEMPLE
# Gopuram ......................... upgrade_high_gopura
# Shikara ......................... upgrade_shikhara
# Mandapa ......................... upgrade_mandapa
# Temple Complex .................. upgrade_temple_complex
# Calai ........................... upgrade_school_hindu
# Hospital ........................ upgrade_hospital_hindu

#### UNIVERSITY
# Great Seminars .................. upgrade_great_seminars
# Wing of Diplomacy ............... upgrade_wing_of_diplomacy
# Wing of Strategy ................ upgrade_wing_of_martial
# Wing of Finance ................. upgrade_wing_of_stewardship
# Wing of Secrets ................. upgrade_wing_of_intrigue
# Wing of Learning ................ upgrade_wing_of_learning
# Guardian of Knowledge ........... upgrade_guardian_of_knowledge

#### STATUE
# Gold Plating .................... upgrade_plating_gold
# Silver Plating .................. upgrade_plating_silver
# Bronze Plating .................. upgrade_plating_bronze
# Statues of Family ............... upgrade_statues_family
# Golden crown .................... upgrade_golden_crown
# Watcher of Giants ............... upgrade_watcher_of_giants

#### STATUE OF HORSE
# Great Stable .................... upgrade_stable
# Animal Statues .................. upgrade_statues_animals
# Horse Graveyard ................. upgrade_horse_graveyard

#### GREAT HARBOR
# Cothon .......................... upgrade_cothon
# Piers ........................... upgrade_piers
# Harbor Office ................... upgrade_office_harbor
# Lighthouse ...................... upgrade_lighthouse
# Military Wharf .................. upgrade_military_wharf
# Master of the Tides ............. upgrade_master_of_tides

#### GREAT LIGHTHOUSE
# Treasure Chamber ................ upgrade_treasure_chamber
# Giant Banners ................... upgrade_giant_banners
# Custodian of the Lighthouse ..... upgrade_lighthouse_custodian
# Royal Apartments ................ upgrade_royal_apartments

#### MAUSOLEUM
# Statues of the Dead ............. upgrade_statues_dead
# Eternal Flame ................... upgrade_eternal_flame
# Unmarked Tombs .................. upgrade_unmarked_tombs
# Quadriga Statue ................. upgrade_quadriga_statue
# Keeper of the Dead .............. upgrade_keeper_of_the_dead

#### AMPHITHEATER
# Naval Spectacle ................. upgrade_naval_spectacle
# Animal Cages .................... upgrade_animal_cages
# Hippodrome/Circus ............... upgrade_hippodrome
# Training Academy ................ upgrade_training_academy
# Theater Stage ................... upgrade_theater_stage
# Master of the Game .............. upgrade_master_of_the_games

#### GARDENS
# Fountains ....................... upgrade_fountains
# Fountain of youth ............... upgrade_fountain_of_youth
# Hanging Gardens ................. upgrade_hanging_gardens
# Secluded Groves ................. upgrade_secluded_groves
# Hidden Burial Area .............. upgrade_hidden_burial
# Poisonous Flowers ............... upgrade_poisonous_flowers
# Herb Garden ..................... upgrade_herb_garden
# Statues ......................... upgrade_statues_garden
# Vineyard ........................ upgrade_vineyard
# Pet Graveyard ................... upgrade_pet_graveyard

#### FORTRESS
# Armory .......................... upgrade_armory
# Watch Tower ..................... upgrade_watch_tower
# Vault  .......................... upgrade_vault
# Pit Moat ........................ upgrade_moat_pit
# Spike Moat ...................... upgrade_moat_spike
# Water Moat ...................... upgrade_moat_water
# Moat of Bones ................... upgrade_moat_bones
# Hidden Passageways .............. upgrade_hidden_passageways
# Inner Garden .................... upgrade_garden_inner
# Dueling Room .................... upgrade_dueling_room

#### Mercantile Walls
# Sea Walls ....................... upgrade_walls_sea
# Studded Bastions ................ upgrade_studded_bastions
# Strategic Exclaves .............. upgrade_strategic_exclaves
# Soaring Fortresses .............. upgrade_soaring_fortresses
# Hidden Gates .................... upgrade_hidden_gates
# Gatehouse-Forts ................. upgrade_gatehouse_forts
# Staged Killing Fields ........... upgrade_killing_fields
# Deep Defense Architecture ....... upgrade_deep_defense_architecture
# Artificial Islands .............. upgrade_artificial_islands
# Wall Walker ..................... upgrade_wall_walker

#### UNDERGROUND CITY
# Dungeon ......................... upgrade_dungeon
# Natural Caves ................... upgrade_caves_natural
# Travel Tunnels .................. upgrade_tunnels_travel
# Precious metal mine ............. upgrade_metal_mine_precious
# Guardian of the Deep............. upgrade_guardian_of_the_deep

#### ROYAL PALACE
# Fancy Throne Room ............... upgrade_throne_fancy
# Trap Door ....................... upgrade_trap_door
# Royal Bed Chamber ............... upgrade_royal_bedchamber
# Throne of Skulls ................ upgrade_skull_throne
# Throne of Gold .................. upgrade_golden_throne
# Royal Custodian ................. upgrade_royal_custodian

#### STONEHENGE
# Runestones ...................... upgrade_runestones
# More stones ..................... upgrade_more_stones
# Custodian of the Stone .......... upgrade_stone_custodian

#### GRAND LIBRARY
# Poetry and Drama Collection ..... upgrade_collection_drama
# Architecture Collection ......... upgrade_collection_architecture
# History Collection .............. upgrade_collection_history
# Natural Sciences Collection ..... upgrade_collection_science
# Math and Philosophy Collection .. upgrade_collection_math
# Scribe Room ..................... upgrade_scribe_room
# Keeper of the Tomes ............. upgrade_keeper_of_tomes

#### PYRAMID
# Extra Pyramids .................. upgrade_extra_pyramids
# Sphinx/Beast .................... upgrade_mythological_beast
# Hidden Room ..................... upgrade_hidden_room
# Necropolis ...................... upgrade_necropolis
# Lime Stone Casing ............... upgrade_lime_stone_casing
# Traps ........................... upgrade_traps
# Overseer of Rites ............... upgrade_overseer_of_rites


#### ZIGGURAT
# Royal Apartments ................ upgrade_royal_apartments
# Strategic Exclaves .............. upgrade_strategic_exclaves
# Overseer of Rites ............... upgrade_overseer_of_rites
# Giant Banners ................... upgrade_giant_banners
# Scribe Room ..................... upgrade_scribe_room
# Mural ........................... upgrade_historical_mural



upgrade_temple_guards_ziggurat = { 
	picture = GFX_upgrade_icon_equipment
	
	potential = { religion_group = ishtarian_group }
	allow = { 
		FROMFROM = { 
			has_wonder_upgrade = upgrade_temple_precinct_ziggurat 
		} 
	}
	active = { 
		FROMFROM = { 
			has_wonder_upgrade = upgrade_temple_precinct_ziggurat 
		} 
		active = { religion_group = ishtarian_group }
	}
	
	flags = {
		defensive
		#unit
		is_plural
	}
	build_time = 24
	gold_cost_flat = 450
	gold_cost_ticking = 1
	owner_modifier = {
		arrest_chance_modifier = 0.1
		global_revolt_risk = -0.025
	}
	local_modifier = {
		local_revolt_risk = -0.05
	}
}

upgrade_temple_precinct_ziggurat = { 
	picture = GFX_upgrade_icon_crates

	potential = { religion_group = ishtarian_group }
	allow = {

	}
	active = { religion_group = ishtarian_group }

	flags = {
		is_singular
	}
	build_time = 24
	gold_cost_flat = 450
	gold_cost_ticking = 1
	owner_modifier = {
		same_religion_opinion = 2
		church_opinion = 5
	}
}

upgrade_mythological_beast_ziggurat = { 
	picture = GFX_upgrade_icon_crates
	
	potential = { religion = ishtarian }
	allow = { 
		FROMFROM = { 
			has_wonder_upgrade = upgrade_temple_precinct_ziggurat 
		} 
	}
	active = { 
		FROMFROM = { 
			has_wonder_upgrade = upgrade_temple_precinct_ziggurat 
		} 
		active = { religion = ishtarian }
	}
	
	flags = {
		is_plural
	}
	build_time = 24
	gold_cost_flat = 450
	gold_cost_ticking = 1
	owner_modifier = {
		proud_opinion = 5
		same_religion_opinion = 2
	}
}

upgrade_hanging_gardens_ziggurat = {
	picture = GFX_upgrade_icon_roses_white
	
	potential = { religion_group = ishtarian_group }
	allow = {
		FROMFROM = { wonder_stage = 2 }
	}
	active = { }

	flags = {
		is_plural
	}
	build_time = 24
	gold_cost_flat = 450
	gold_cost_ticking = 1
	owner_modifier = {
		monthly_character_prestige = 0.1
		gardener_opinion = 5
		poet_opinion = 5
		land_organisation = 0.05
	}
	local_modifier = {
		local_tax_modifier = 0.10
	}
}
