#
# 	Custom loc for setting names and descs of wonders and upgrades
#
#	GetWonderName ................................... Fancy Name! Use to set/update the name of a Wonder
# 	GetWonderAdjCap ................................. An adjective for the Wonder, eg. "Great", "Bloody"
# 	GetWonderAdj .................................... An adjective for the Wonder, eg. "great", "bloody"
#	GetWonderTypeShortCap ........................... Building type: "Cathedral", "Pyramid", or "Harbor"
#	GetWonderTypeShort .............................. Building type: "cathedral", "pyramid", or "harbor"
#	GetWonderFluffNounCap ........................... Use with an 'of', to read things like "of <Shadows>"
#

#	GetWonderDesc ................................... Fancy Desc! Use to set/update the desc of a Wonder
#	GetWonderAgeDesc ................................
# 	GetWonderPurpose ................................
# 	GetRandomUpgradeDesc ............................



# A Fancy Name! Use this to set/update the name of a wonder (probably best done via on_actions after completing a stage or upgrade)
defined_text = {
	name = GetWonderName

	use_first_valid = yes # (Defaults to no)

	######### Very rare...
	text = {
		trigger = {
			wonder_stage = 3
			NOT = {
				has_wonder = wonder_statue_ruler
			}
			OR = {
				has_wonder_flag = wonder_name_5			
				has_wonder_flag = wonder_name_6
				has_wonder_flag = wonder_name_7
			}
		}
		localisation_key = String_special_wonder_name # The Devils Workshop, The Citadel of Horrors etc
	}

	#### Edge cases ...
	text = { #Statue
		trigger = {
			has_wonder = wonder_statue_ruler
			wonder_stage = 3
		}
		localisation_key = String_adj_statue_wonder_type_in_location
	}
	text = { #Statue
		trigger = {
			has_wonder = wonder_statue_ruler
			wonder_stage = 2
			NOT = {
				wonder_stage = 4
			}
		}
		localisation_key = String_adj_statue_wonder_type
	}
	text = { #Statue
		trigger = {
			has_wonder = wonder_statue_ruler
		}
		localisation_key = String_statue_wonder_type
	}

	### Regular...
	text = {
		trigger = {
			wonder_stage = 3
			NOT = {
				has_game_rule = {
					name = supernatural_events
					value = off
				}
				has_wonder = wonder_statue_ruler
			}
			OR = {
				has_wonder_flag = wonder_name_5			
				has_wonder_flag = wonder_name_6
			}
		}
		localisation_key = String_adj_wondertype_of_noun # Grand Cathedral of Light/Bloody Palace of Shadows, etc
	}
	text = {
		trigger = {
			wonder_stage = 3
			NOT = {
				has_wonder = wonder_statue_ruler
			}
			OR = {
				has_wonder_flag = wonder_name_2
				has_wonder_flag = wonder_name_3
				has_wonder_flag = wonder_name_4
				has_wonder_flag = wonder_name_5			
				has_wonder_flag = wonder_name_6
			}
		}
		localisation_key = String_adj_wondertype_of_location # Grand Cathedral of Paris/Bloody Palace of Stockholm, etc
	}
	text = {
		trigger = {
			NOT = {
				wonder_stage = 2
				has_wonder = wonder_statue_ruler
			}
			OR = {
				has_wonder_flag = wonder_name_1
				has_wonder_flag = wonder_name_2
				has_wonder_flag = wonder_name_3
			}
		}
		localisation_key = String_location_wondertype # Stockholm Cathedral/Paris University, etc
	}
	#In case it cannot find anything...
    fallback_text = {
        localisation_key = String_location_wondertype # Simplest version
    }
}

defined_text = { #special wonders
	name = GetSpecialWonderName

	text = {
		trigger = {
			has_wonder_flag = holy_building
			any_upgrade_on_wonder = {
				count = 2
				has_wonder_upgrade_flag = scary
			}
		}
		localisation_key = String_the_evil_god_names_workshop
	}
	text = {
		trigger = {
			any_upgrade_on_wonder = {
				count = 3
				has_wonder_upgrade_flag = decorative
			}
		}
		localisation_key = String_jewel_of_the_province
	}

	fallback_text = {
		localisation_key = String_adj_wondertype_of_noun # The 'regular' high level one
	}
}


# An adjective for the Wonder, eg. "Great", "Bloody"
#Great, Grand, Holy, Magnificent, Glorious, Bloody, Fortified, Royal, Grand Royal, Silent
#Golden, Iron, Towering, Looming, Divine, Verdant, Soaring, Hallowed, Ancient, Old
defined_text = {
	name = GetWonderAdjCap

	use_first_valid = yes # (Defaults to no)

	text = {
		trigger = {
			wonder_stage = 4
			wonder_age = 300
		}
		localisation_key = String_Ancient
	}
	text = {
		trigger = {
			wonder_stage = 4
			num_of_wonder_upgrades = 5
		}
		localisation_key = String_Glorious
	}
	text = {
		trigger = {
			num_of_wonder_upgrades = 5
			OR = {
				AND = {
					has_wonder = wonder_garden
					wonder_stage = 2
				}
				OR = {
					any_upgrade_on_wonder = { has_wonder_upgrade_flag = decorative }
					any_upgrade_on_wonder = { has_wonder_upgrade_flag = valuable }
				}
			}
		}
		localisation_key = String_Magnificent
	}
	text = {
		trigger = {
			wonder_stage = 2
			num_of_wonder_upgrades = 6
			any_upgrade_on_wonder = {
				has_wonder_upgrade = upgrade_spikes
			}
			any_upgrade_on_wonder = {
				count = 2
				has_wonder_upgrade_flag = scary
			}
		}
		localisation_key = String_Bloody
	}
	text = {
		trigger = {
			wonder_stage = 3
			num_of_wonder_upgrades = 5
			OR = {
				has_wonder = wonder_fortress
				any_upgrade_on_wonder = {
					has_wonder_upgrade_flag = defensive
					NOT = { has_wonder_upgrade_flag = decorative } #it can't be "Bells"
				}
			}
		}
		localisation_key = String_Iron
	}
	text = {
		trigger = {
			wonder_stage = 2
			num_of_wonder_upgrades = 4
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = defensive
				NOT = { has_wonder_upgrade_flag = decorative } #it can't be "Bells"
			}
		}
		localisation_key = String_Fortified
	}
	text = {
		trigger = {
			owner = { higher_tier_than = DUKE }
			wonder_stage = 2
			has_wonder = wonder_palace
		}
		localisation_key = String_Royal
	}
	text = {
		trigger = {
			owner = { higher_tier_than = DUKE }
			wonder_stage = 4
			has_wonder = wonder_palace
		}
		localisation_key = String_Grand_Royal
	}
	text = {
		trigger = {
			wonder_stage = 2
			OR = {
				AND = {
					has_wonder = wonder_mausoleum
					wonder_stage = 3
				}
				AND = {
					any_upgrade_on_wonder = {
						count = 2
						has_wonder_upgrade_flag = scary
					}
				}
			}
		}
		localisation_key = String_Silent
	}
	text = {
		trigger = {
			wonder_stage = 2
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = golden
			}
			num_of_wonder_upgrades = 4
		}
		localisation_key = String_Golden
	}
	text = {
		trigger = {
			wonder_stage = 3
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = nature
			}
			num_of_wonder_upgrades = 3
		}
		localisation_key = String_Verdant
	}	
	text = {
		trigger = {
			NOT = { has_wonder = wonder_underground_city }
			wonder_stage = 2
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = towering
			}
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = scary
			}
			num_of_wonder_upgrades = 3
		}
		localisation_key = String_Looming
	}
	text = {
		trigger = {
			NOT = { has_wonder = wonder_underground_city }
			wonder_stage = 3
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = towering
			}
			num_of_wonder_upgrades = 3
		}
		localisation_key = String_Soaring
	}
	text = {
		trigger = {
			has_wonder_flag = holy_building
			wonder_stage = 3
			num_of_wonder_upgrades = 8
		}
		localisation_key = String_Hallowed
	}	
	text = {
		trigger = {
			wonder_stage = 3
			num_of_wonder_upgrades = 3
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = holy #currently only on the relic tomb
			}
			OR = {
				has_wonder = wonder_mosque
				has_wonder = wonder_synagogue
				has_wonder = wonder_temple_pagan
				has_wonder = wonder_temple_buddhist
				has_wonder = wonder_temple_hindu			
			}
		}
		localisation_key = String_Divine
	}
	text = {
		trigger = {
			wonder_stage = 2
			num_of_wonder_upgrades = 3
			has_wonder_flag = holy_building
		}
		localisation_key = String_Holy
	}
	text = {
		trigger = {
			wonder_stage = 1
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = towering
			}
		}
		localisation_key = String_Towering
	}
	text = {
		trigger = { wonder_stage = 3 }
		localisation_key = String_Grand
	}
	text = {
		trigger = { wonder_stage = 1 }
		localisation_key = String_Great
	}
	text = {
		trigger = {
			wonder_age = 100
			NOT = { wonder_age = 200 }
		}
		localisation_key = String_Old
	}
	
	#In case it cannot find anything...
    fallback_text = {
        localisation_key = String_Cool #placeholder, to find errors
    }
}

# General descriptor. Note that it contains some words using initial vowel (be careful with grammar errors like "a ancient temple")
defined_text = {
	name = GetWonderAdj
	
	use_first_valid = yes # (Defaults to no)

	text = {
		trigger = {
			wonder_stage = 4
			wonder_age = 300
		}
		localisation_key = String_ancient
	}
	text = {
		trigger = {
			wonder_stage = 4
			num_of_wonder_upgrades = 5
		}
		localisation_key = String_glorious
	}
	text = {
		trigger = {
			num_of_wonder_upgrades = 5
			OR = {
				AND = {
					has_wonder = wonder_garden
					wonder_stage = 2
				}
				OR = {
					any_upgrade_on_wonder = { has_wonder_upgrade_flag = decorative }
					any_upgrade_on_wonder = { has_wonder_upgrade_flag = valuable }
				}
			}
		}
		localisation_key = String_magnificent
	}
	text = {
		trigger = {
			wonder_stage = 2
			num_of_wonder_upgrades = 6
			any_upgrade_on_wonder = {
				has_wonder_upgrade = upgrade_spikes
			}
			any_upgrade_on_wonder = {
				count = 2
				has_wonder_upgrade_flag = scary
			}
		}
		localisation_key = String_bloody
	}
	text = {
		trigger = {
			wonder_stage = 3
			num_of_wonder_upgrades = 5
			OR = {
				has_wonder = wonder_fortress
				any_upgrade_on_wonder = {
					has_wonder_upgrade_flag = defensive
					NOT = { has_wonder_upgrade_flag = decorative } #it can't be "Bells"
				}
			}
		}
		localisation_key = String_iron
	}
	text = {
		trigger = {
			wonder_stage = 2
			num_of_wonder_upgrades = 4
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = defensive
				NOT = { has_wonder_upgrade_flag = decorative } #it can't be "Bells"
			}
		}
		localisation_key = String_fortified
	}
	text = {
		trigger = {
			owner = { higher_tier_than = DUKE }
			wonder_stage = 2
			has_wonder = wonder_palace
		}
		localisation_key = String_royal
	}
	text = {
		trigger = {
			owner = { higher_tier_than = DUKE }
			wonder_stage = 4
			has_wonder = wonder_palace
		}
		localisation_key = String_grand_royal
	}
	text = {
		trigger = {
			wonder_stage = 2
			OR = {
				AND = {
					has_wonder = wonder_mausoleum
					wonder_stage = 3
				}
				AND = {
					any_upgrade_on_wonder = {
						count = 2
						has_wonder_upgrade_flag = scary
					}
				}
			}
		}
		localisation_key = String_silent
	}
	text = {
		trigger = {
			wonder_stage = 2
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = golden
			}
			num_of_wonder_upgrades = 4
		}
		localisation_key = String_golden
	}
	text = {
		trigger = {
			wonder_stage = 3
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = nature
			}
			num_of_wonder_upgrades = 3
		}
		localisation_key = String_verdant
	}	
	text = {
		trigger = {
			wonder_stage = 2
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = towering
			}
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = scary
			}
			num_of_wonder_upgrades = 3
		}
		localisation_key = String_looming
	}
	text = {
		trigger = {
			wonder_stage = 3
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = towering
			}
			num_of_wonder_upgrades = 3
		}
		localisation_key = String_soaring
	}
	text = {
		trigger = {
			has_wonder_flag = holy_building
			wonder_stage = 3
			num_of_wonder_upgrades = 8
		}
		localisation_key = String_hallowed
	}	
	text = {
		trigger = {
			wonder_stage = 3
			num_of_wonder_upgrades = 3
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = holy #currently only on the relic tomb
			}
			OR = {
				has_wonder = wonder_mosque
				has_wonder = wonder_synagogue
				has_wonder = wonder_temple_pagan
				has_wonder = wonder_temple_buddhist
				has_wonder = wonder_temple_hindu			
			}
		}
		localisation_key = String_divine
	}
	text = {
		trigger = {
			wonder_stage = 2
			num_of_wonder_upgrades = 3
			has_wonder_flag = holy_building
		}
		localisation_key = String_holy
	}
	text = {
		trigger = {
			wonder_stage = 1
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = towering
			}
		}
		localisation_key = String_towering
	}
	text = {
		trigger = { wonder_stage = 3 }
		localisation_key = String_grand
	}
	text = {
		trigger = { wonder_stage = 1 }
		localisation_key = String_great
	}
	text = {
		trigger = {
			wonder_age = 100
			NOT = { wonder_age = 200 }
		}
		localisation_key = String_old
	}

	#In case it cannot find anything...
    fallback_text = {
        localisation_key = String_Cool #placeholder, to find errors
    }
}


defined_text = {
	name = GetWonderTypeShortCap # Basically, what kind of building this is: "Cathedral", or "Pyramid", or "Harbor"

	use_first_valid = yes # (Defaults to no)

	text = {
		trigger = { has_wonder = wonder_cathedral }
		localisation_key = String_Cathedral
	}
	text = {
		trigger = { has_wonder = wonder_mosque }
		localisation_key = String_Mosque
	}
	text = {
		trigger = { has_wonder = wonder_synagogue }
		localisation_key = String_Synagogue
	}
	text = {
		trigger = {
			OR = {
				has_wonder = wonder_temple_pagan
				has_wonder = wonder_temple_hindu
				has_wonder = wonder_temple_buddhist
			}
		}
		localisation_key = String_Temple
	}
	text = {
		trigger = { has_wonder = wonder_statue_ruler }
		localisation_key = String_Statue
	}
	text = {
		trigger = { has_wonder = wonder_statue_ruler }
		localisation_key = String_Colossus
	}
	text = {
		trigger = { has_wonder = wonder_statue_horse }
		localisation_key = String_Statue
	}
	text = {
		trigger = { has_wonder = wonder_statue_horse }
		localisation_key = String_Stallion
	}
	text = {
		trigger = { has_wonder = wonder_statue_horse }
		localisation_key = String_Mare
	}
	text = {
		trigger = {
			has_wonder = wonder_fortress
			wonder_stage = 6
		}
		localisation_key = String_Citadel
	}
	text = {
		trigger = {
			has_wonder = wonder_fortress
			num_of_wonder_upgrades = 4
			any_wonder_upgrade = {
				has_wonder_upgrade = upgrade_garden_inner
			}
		}
		localisation_key = String_Castle
	}
	text = {
		trigger = {
			has_wonder = wonder_fortress
			wonder_stage = 3
		}
		localisation_key = String_Keep
	}
	text = {
		trigger = { has_wonder = wonder_fortress }
		localisation_key = String_Fortress
	}
	text = {
		trigger = { has_wonder = wonder_underground_city }
		localisation_key = String_Underground_City
	}
	text = {
		trigger = { 
			has_wonder = wonder_wall
			wonder_stage = 3
			num_of_wonder_upgrades = 4
		}
		localisation_key = String_Shield
	}
	text = {
		trigger = { has_wonder = wonder_wall }
		localisation_key = String_Walls
	}
	text = {
		trigger = { has_wonder = wonder_harbor }
		localisation_key = String_Harbor
	}
	text = {
		trigger = { has_wonder = wonder_lighthouse }
		localisation_key = String_Lighthouse
	}
	text = {
		trigger = { has_wonder = wonder_amphitheater }
		localisation_key = String_Amphitheater
	}
	text = {
		trigger = { has_wonder = wonder_palace }
		localisation_key = String_Palace
	}
	text = {
		trigger = { has_wonder = wonder_garden }
		localisation_key = String_Garden
	}
	text = {
		trigger = { has_wonder = wonder_university }
		localisation_key = String_University
	}
	text = {
		trigger = { has_wonder = wonder_library }
		localisation_key = String_Library 
	}
	text = {
		trigger = { has_wonder = wonder_mausoleum }
		localisation_key = String_Mausoleum
	}
	text = {
		trigger = { has_wonder = wonder_pagan_stones }
		localisation_key = String_Monolith
	}	
	text = {
		trigger = {
			OR = {
				has_wonder = wonder_pyramid
				has_wonder = wonder_pyramid_giza
				has_wonder = wonder_aztec_pyramid
			}
		}
		localisation_key = String_Pyramid
	}
	text = {
		trigger = { has_wonder = wonder_pagan_stones_stonehenge }
		localisation_key = String_Stonehenge
	}
	text = {
		trigger = { has_wonder = wonder_mausoleum_halicarnassus }
		localisation_key = wonder_mausoleum_halicarnassus
	}
	text = {
		trigger = { has_wonder = wonder_lighthouse_alexandria }
		localisation_key = wonder_lighthouse_alexandria
	}
	text = {
		trigger = { has_wonder = wonder_temple_hindu_konark }
		localisation_key = wonder_temple_hindu_konark
	}
	text = {
		trigger = { has_wonder = wonder_apostolic_palace }
		localisation_key = wonder_apostolic_palace
	}
	text = {
		trigger = { has_wonder = wonder_house_of_wisdom }
		localisation_key = wonder_house_of_wisdom
	}
	text = {
		trigger = { has_wonder = wonder_underground_city_petra }
		localisation_key = wonder_underground_city_petra
	}
	text = {
		trigger = { has_wonder = wonder_cathedral_notre_dame }
		localisation_key = String_Cathedral
	}
	
	#In case it cannot find anything...
    fallback_text = {
        localisation_key = String_Great_Work
    }
}

# Without cap, for unceremonious speak (try to avoid a/an, or "amphitheater" will mess up):
defined_text = {
	name = GetWonderTypeShort # Basically, what kind of building this is: "cathedral", or "pyramid", or "harbor"

	use_first_valid = yes # (Defaults to no)

	text = {
		trigger = { has_wonder = wonder_cathedral }
		localisation_key = String_cathedral
	}
	text = {
		trigger = { has_wonder = wonder_mosque }
		localisation_key = String_mosque
	}
	text = {
		trigger = { has_wonder = wonder_synagogue }
		localisation_key = String_synagogue
	}
	text = {
		trigger = {
			OR = {
				has_wonder = wonder_temple_pagan
				has_wonder = wonder_temple_hindu
				has_wonder = wonder_temple_buddhist
				has_wonder = wonder_temple_hindu_konark
			}
		}
		localisation_key = String_temple
	}
	text = {
		trigger = { has_wonder = wonder_statue_ruler }
		localisation_key = String_statue
	}
	text = {
		trigger = { has_wonder = wonder_statue_horse }
		localisation_key = String_statue
	}
	text = {
		trigger = {
			has_wonder = wonder_fortress
			wonder_stage = 6
		}
		localisation_key = String_citadel
	}
	text = {
		trigger = {
			has_wonder = wonder_fortress
			num_of_wonder_upgrades = 4
			any_wonder_upgrade = {
				has_wonder_upgrade = upgrade_garden_inner
			}
		}
		localisation_key = String_castle
	}
	text = {
		trigger = {
			has_wonder = wonder_fortress
			wonder_stage = 3
		}
		localisation_key = String_keep
	}
	text = {
		trigger = { has_wonder = wonder_fortress }
		localisation_key = String_fortress
	}
	text = {
		trigger = { has_wonder = wonder_underground_city }
		localisation_key = String_underground_city
	}
	text = {
		trigger = { has_wonder = wonder_wall }
		localisation_key = String_walls
	}
	text = {
		trigger = { has_wonder = wonder_harbor }
		localisation_key = String_harbor
	}
	text = {
		trigger = { has_wonder = wonder_lighthouse }
		localisation_key = String_lighthouse
	}
	text = {
		trigger = { has_wonder = wonder_amphitheater }
		localisation_key = String_amphitheater
	}
	text = {
		trigger = {
			OR = {
				has_wonder = wonder_palace
				has_wonder = wonder_apostolic_palace
			}
		}
		localisation_key = String_palace
	}
	text = {
		trigger = { has_wonder = wonder_garden }
		localisation_key = String_garden
	}
	text = {
		trigger = {
			OR = {
				has_wonder = wonder_university
				has_wonder = wonder_house_of_wisdom
			}
		}
		localisation_key = String_university
	}
	text = {
		trigger = { has_wonder = wonder_library }
		localisation_key = String_library
	}
	text = {
		trigger = {
			OR = {
				has_wonder = wonder_mausoleum
				has_wonder = wonder_mausoleum_halicarnassus
			}
		}
		localisation_key = String_mausoleum
	}
	text = {
		trigger = {
			OR = {
				has_wonder = wonder_pyramid
				has_wonder = wonder_pyramid_giza
				has_wonder = wonder_aztec_pyramid
			}
		}
		localisation_key = String_pyramid
	}
	text = {
		trigger = { has_wonder = wonder_pagan_stones }
		localisation_key = String_monolith
	}
	text = {
		trigger = { has_wonder = wonder_pagan_stones_stonehenge }
		localisation_key = String_stone_formation
	}
	text = {
		trigger = { has_wonder = wonder_underground_city_petra }
		localisation_key = String_underground_city
	}
	text = {
		trigger = { has_wonder = wonder_cathedral_notre_dame }
		localisation_key = String_cathedral
	}
	
	#In case it cannot find anything...
    fallback_text = {
        localisation_key = String_great_work
    }
}

#Shadows, Light, Secrets, Death, Pain, Screams, Romance, Treasures, holy

defined_text = {
	name = GetWonderFluffNounCap

	text = {
		trigger = { has_wonder_flag = is_temple }
		localisation_key = String_Shadows
	}
	text = {
		trigger = { has_wonder_flag = is_temple }
		localisation_key = String_Light
	}
	
	text = {
		trigger = { has_wonder_flag = is_temple }
		localisation_key = String_Secrets
	}
	text = {
		trigger = {any_upgrade_on_wonder = { has_wonder_upgrade_flag = body_stash } }
		localisation_key = String_Secrets
	}
	text = {
		trigger = {
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = scary
			}
		}
		localisation_key = String_Death
	}
	text = {
		trigger = {
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = scary
			}
		}
		localisation_key = String_Pain
	}

	text = {
		trigger = {
			any_upgrade_on_wonder = {
				has_wonder_upgrade_flag = scary
			}
		}
		localisation_key = String_Screams
	}

	text = {
		trigger = {
			any_upgrade_on_wonder = {
				count = 3 #to do Add more romantic places as this isnt currently possible
				has_wonder_upgrade_flag = romantic
			}
		}
		localisation_key = String_Romance
	}

	text = {
		trigger = {
			any_upgrade_on_wonder = {
				count = 2
				has_wonder_upgrade_flag = valuable
			}
		}
		localisation_key = String_Treasures
	}
	

	#In case it cannot find anything...
    fallback_text = {
        localisation_key = String_Wonder_Province
    }
}


# Used when updating the desc of a wonder.
defined_text = {
	name = GetWonderDesc
	#Dependent on event-targets: upgrade_00, upgrade_01 and upgrade_02
	text = {
		trigger = { #for baby wonders (adds upgrade mention)
			has_wonder_upgrade = yes
			NOT = { num_of_wonder_upgrades = 3 }
			NOT = { wonder_age = 15 }
		}
		localisation_key = String_Wonder_Desc00
	}
	text = { #for wonders that build no upgrades, but stages instead: no upgrade addendum
		trigger = {
			has_wonder_upgrade = no
		}
		localisation_key = String_Wonder_Desc01
	}
	text = { #Variant 1: mentions an upgrade
		trigger = { num_of_wonder_upgrades = 2 }
		localisation_key = String_Wonder_Desc02
	}
	text = { #Variant 2: mentions an upgrade
		trigger = { num_of_wonder_upgrades = 5 }
		localisation_key = String_Wonder_Desc03
	}
}

defined_text = {
	name = GetWonderAgeDesc

	text = {
		trigger = { NOT = { wonder_age = 1 } }
		localisation_key = String_months
	}
	text = {
		trigger = {
			wonder_age = 1
			NOT = { wonder_age = 20 }
		}
		localisation_key = String_years
	}
	text = {
		trigger = {
			wonder_age = 20
			NOT = { wonder_age = 100 }
		}
		localisation_key = String_decades
	}
	text = {
		trigger = {
			wonder_age = 80
			NOT = { wonder_age = 100 }
		}
		localisation_key = String_almost_a_century
	}
	text = {
		trigger = {
			wonder_age = 100
			NOT = { wonder_age = 150 }
		}
		localisation_key = String_ages
	}
	text = {
		trigger = {
			wonder_age = 100
			NOT = { wonder_age = 150 }
		}
		localisation_key = String_more_than_a_hundred_years
	}
	text = {
		trigger = {
			wonder_age = 250
		}
		localisation_key = String_hundreds_of_years
	}
	text = {
		trigger = {
			wonder_age = 250
		}
		localisation_key = String_as_long_as_anyone_can_remember
	}
	text = {
		trigger = {
			wonder_age = 250
		}
		localisation_key = String_centuries
	}
	text = {
		trigger = {
			wonder_age = 350
		}
		localisation_key = String_time_immemorial
	}

	#In case it cannot find anything...
    fallback_text = {
        localisation_key = String_a_long_time
    }
}


defined_text = {
	name = GetWonderPurpose
	# Needs to be in a wonder scope!
	# All in past tense! Eg. <the wonder has> "inspired scholars and hardworking students" <for years>

	text = {
		trigger = { has_wonder_flag = inspires_piety }
		localisation_key = String_inspired_pious
	}
	text = {
		trigger = { has_wonder_flag = inspires_piety }
		localisation_key = String_safe_haven_for_lost_souls
	}
	text = {
		trigger = { has_wonder_flag = inspires_piety }
		localisation_key = String_a_place_of_comfort_for_believers
	}
	text = {
		trigger = {
			OR = {
				has_wonder = wonder_cathedral
				has_wonder = wonder_temple_pagan
			}
		}
		localisation_key = String_brought_people_together
	}
	text = {
		trigger = { has_wonder = wonder_fortress }
		localisation_key = String_lent_its_protection
	}
	text = {
		trigger = {
			OR = {
				has_wonder = wonder_fortress
				has_wonder = wonder_wall
			}
		}
		localisation_key = String_shielded_its_people
	}
	text = {
		trigger = { has_wonder = wonder_underground_city }
		localisation_key = String_been_impressive_curiosity
	}
	text = {
		trigger = { has_wonder = wonder_underground_city }
		localisation_key = String_inspired_wonder
	}
	text = {
		trigger = { has_wonder = wonder_harbor }
		localisation_key = String_been_bringing_traffic
	}
	text = {
		trigger = { has_wonder = wonder_lighthouse }
		localisation_key = String_been_aiding_maritime_matters
	}
	text = {
		trigger = { has_wonder = wonder_lighthouse }
		localisation_key = String_been_guiding_ships_to_port
	}
	text = {
		trigger = { has_wonder = wonder_amphitheater }
		localisation_key = String_tourist_attraction
	}
	text = {
		trigger = {
			has_wonder = wonder_garden
			wonder_stage = 2
		}
		localisation_key = String_center_of_leisure
	}
	text = {
		trigger = { has_wonder = wonder_mausoleum }
		localisation_key = String_source_of_veneration
	}
	text = {
		trigger = { has_wonder = wonder_pyramid }
		localisation_key = String_impressive_feat_of_architecture
	}
	text = {
		trigger = { has_wonder = wonder_pagan_stones }
		localisation_key = String_inspired_imagination
	}
	text = {
		trigger = {
			has_wonder_flag = inspires_relaxing
		}
		localisation_key = String_eased_the_burden
	}
	text = {
		trigger = {
			has_wonder_flag = inspires_contentedness
		}
		localisation_key = String_improved_lives
	}
	text = {
		trigger = { has_wonder = wonder_palace }
		localisation_key = String_hot_spot_for_gossip
	}
	text = {
		trigger = { has_wonder = wonder_palace }
		localisation_key = String_house_of_envy
	}
	text = {
		trigger = { has_wonder_flag = inspires_greatness }
		localisation_key = String_encouraged_greatness_1
	}
	text = {
		trigger = { has_wonder_flag = inspires_greatness }
		localisation_key = String_encouraged_greatness_2
	}
	text = {
		trigger = {
			has_wonder_flag = inspires_learning
		}
		localisation_key = String_inspired_students
	}
	text = {
		trigger = {
			OR = {
				has_wonder_flag = inspires_learning
				any_upgrade_on_wonder = {
					has_wonder_upgrade_flag = inspires_learning
					wonder_upgrade_age = 100
				}
			}
		}
		localisation_key = String_encouraged_learning
	}
	fallback_text = {
		localisation_key = String_inspired_wonder
	}
}

defined_text = {
	name = GetRandomUpgradeDesc
	# Needs to be in an upgrade scope!
	# Present tense: Eg. <The> "[upgradeName] are said to keep demons at bay".
	text = {
		trigger = {
			has_wonder_upgrade_flag = scary
			has_wonder_upgrade_flag = is_singular
		}
		localisation_key = String_upgrade_sends_chills
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = scary
			has_wonder_upgrade_flag = is_plural
		}
		localisation_key = String_upgrade_send_chills
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = defensive
			has_wonder_upgrade_flag = is_singular
		}
		localisation_key = String_upgrade_promises_safety
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = defensive
			has_wonder_upgrade_flag = is_plural
		}
		localisation_key = String_upgrade_promises_safety
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = decorative
			has_wonder_upgrade_flag = is_singular
		}
		localisation_key = String_upgrade_is_a_work_of_art
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = decorative
			has_wonder_upgrade_flag = is_plural
		}
		localisation_key = String_upgrade_are_beautifully_made
	}
	text = {
		trigger = {
			OR = {
				has_wonder_upgrade_flag = statues
				has_wonder_upgrade = upgrade_gargoyles
			}
		}
		localisation_key = String_statues_keep_demons_away
	}
	text = {
		trigger = {
			has_wonder_upgrade = upgrade_dome
		}
		localisation_key = String_dome_is_second_sky
	}
	text = {
		trigger = {
			has_wonder_upgrade = upgrade_herb_garden
		}
		localisation_key = String_said_to_be_the_envy_of_gardeners
	}
	text = {
		trigger = {
			has_wonder_upgrade = upgrade_pet_graveyard
		}
		localisation_key = String_brings_comfort_to_pet_owners
	}
	text = {
		trigger = {
			has_wonder_upgrade = upgrade_watch_tower
		}
		localisation_key = String_lends_moral_support
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = scary
			has_wonder_upgrade_flag = is_singular
			OR = {
				has_wonder_upgrade = upgrade_moat_water
				has_wonder_upgrade = upgrade_moat_water
			}
		}
		localisation_key = String_keeps_people_on_their_toes
	}
	text = {
		trigger = {
			has_wonder_upgrade = upgrade_roads
		}
		localisation_key = String_improves_accessibility
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = defensive
			NOT = { has_wonder_upgrade_flag = decorative }
		}
		localisation_key = String_contribute_to_heightened_security
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = heating
		}
		localisation_key = String_bring_luxury_during_colder_seasons
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = entertainment
		}
		localisation_key = String_acts_as_entertainment
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = towering
		}
		localisation_key = String_can_be_seen_from_far_away
	}
	text = {
		trigger = {
			has_wonder_upgrade = upgrade_torture_chamber
		}
		localisation_key = String_signals_expected_obedience
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = produces_alcohol
			has_wonder_upgrade_flag = is_singular
		}
		localisation_key = String_rumored_to_be_the_best
	}
	text = {
		trigger = {
			has_wonder_upgrade = upgrade_road_tolls
			has_wonder_upgrade_flag = is_plural
		}
		localisation_key = String_bring_in_cash
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = air_bnb
		}
		localisation_key = String_offers_relaxation
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = contemplative
		}
		localisation_key = String_inspires_awe
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = body_stash
		}
		localisation_key = String_remains_a_rumor
	}

	fallback_text = {
		localisation_key = String_most_recently_added
	}
}



defined_text = {
	name = GetMythologicalBeast

	use_first_valid = yes # Defaults to no

	text = {
		trigger = { has_wonder = wonder_pyramid_giza }
		localisation_key = String_Sphinx
	}
	fallback_text = {
		localisation_key = String_MythologicalBeast
	}
}


# Because the regular one probably does not need the water shenanigans... (GetTerrain, that is)
defined_text = { #Needs a province scope
	name = GetWonderTerrain
	
	use_first_valid = yes # Defaults to no

	text = {
		trigger = {
			is_using_ocean_background_trigger = yes
		}
		localisation_key = string_coast
	}
	text = {
		trigger = {
			terrain = forest
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_forest
	}
	text = {
		trigger = {
			terrain = hills
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_hills
	}
	text = {
		trigger = {
			terrain = mountain
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_mountains
	}
	text = {
		trigger = {
			terrain = plains
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_plains
	}
	text = {
		trigger = {
			terrain = farmlands
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_farmlands
	}
	text = {
		trigger = {
			terrain = steppe
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_steppe
	}
	text = {
		trigger = {
			terrain = desert
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_desert
	}
	text = {
		trigger = {
			terrain = jungle
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_jungle
	}
	text = {
		trigger = {
			terrain = arctic
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_arctic
	}
	fallback_text = {
		localisation_key = string_terrain
	}
}

defined_text = { ### Needs a province scope - USE ONLY TOGETHER WITH GetWonderTerrain! ###
	name = GetInOnWonderTerrainCap
	
	use_first_valid = yes # Defaults to no

	text = {
		trigger = {
			is_using_ocean_background_trigger = yes
		}
		localisation_key = string_On
	}
	text = {
		trigger = {
			terrain = forest
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_In
	}
	text = {
		trigger = {
			terrain = hills
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_In
	}
	text = {
		trigger = {
			terrain = mountain
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_In
	}
	text = {
		trigger = {
			terrain = plains
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_On
	}
	text = {
		trigger = {
			terrain = farmlands
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_On
	}
	text = {
		trigger = {
			terrain = steppe
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_On
	}
	text = {
		trigger = {
			terrain = desert
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_In
	}
	text = {
		trigger = {
			terrain = jungle
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_In
	}
	text = {
		trigger = {
			terrain = arctic
			is_using_ocean_background_trigger = no
		}
		localisation_key = string_In
	}
	fallback_text = {
		localisation_key = string_In
	}
}


defined_text = { 
	name = GetHagiaSophiaUse
	
	use_first_valid = yes # Defaults to no

	text = {
		trigger = {
			has_wonder_flag = Hagia_Sophia_orthodox_cult
			#always = yes
		}
		localisation_key = string_Hagia_Sophia_Orthodox
	}
	text = {
		trigger = {
			has_wonder_flag = Hagia_Sophia_catholic_cult
		}
		localisation_key = string_Hagia_Sophia_Latin
	}
	text = {
		trigger = {
			has_wonder_flag = Hagia_Sophia_muslim_cult
		}
		localisation_key = string_Hagia_Sophia_Muslim
	}


	fallback_text = {
		localisation_key = string_pride_of_constantinople
	}
}



### TEMPLATE
#defined_text = {
#	name = GetWonderAdj
#
#	use_first_valid = yes # Defaults to no
#
#	text = {
#		trigger = { has_wonder_upgrade = upgrade_spikes }
#		localisation_key = String_Bloody
#	}
#	text = {
#		trigger = { has_wonder_flag = is_temple }
#		localisation_key = String_temple
#	}
#}
#
