#
# 	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)

	text = { # Unique name (Constantinople)
		trigger = {
			has_wonder = wonder_city_of_wonders_byz
		}
		localisation_key = wonder_city_of_wonders_byz
	}
	text = { # Unique name (Roma)
		trigger = {
			has_wonder = wonder_city_of_wonders_roma
		}
		localisation_key = wonder_city_of_wonders_roma
	}
	text = { # Unique name (Jerusalem)
		trigger = {
			has_wonder = wonder_city_of_wonders_jeru
		}
		localisation_key = wonder_city_of_wonders_jeru
	}

	######### Very rare...
	text = {
		trigger = {
			wonder_stage = 3
			NOT = {
				has_wonder_flag = statue
			}
			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_flag = statue
			wonder_stage = 3
		}
		localisation_key = String_adj_statue_wonder_type_in_location
	}
	text = { #Statue
		trigger = {
			has_wonder_flag = statue
			wonder_stage = 2
			NOT = {
				wonder_stage = 4
			}
		}
		localisation_key = String_adj_statue_wonder_type
	}
	text = { #Statue
		trigger = {
			has_wonder_flag = statue
		}
		localisation_key = String_statue_wonder_type
	}

	### Regular...
	text = {
		trigger = {
			wonder_stage = 3
			NOT = {
				has_game_rule = {
					name = supernatural_events
					value = off
				}
				has_wonder_flag = statue
			}
			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_flag = statue
			}
			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_flag = statue
			}
			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_flag = magnificent
					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_flag = bloody
			}
			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_flag = can_be_iron
				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_flag = royal
		}
		localisation_key = String_Royal
	}
	text = {
		trigger = {
			owner = { higher_tier_than = DUKE }
			wonder_stage = 4
			has_wonder_flag = royal
		}
		localisation_key = String_Grand_Royal
	}
	text = {
		trigger = {
			wonder_stage = 2
			OR = {
				AND = {
					has_wonder_flag = silent
					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_flag = underground }
			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_flag = underground }
			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
			}
			has_wonder_flag = holy_building
		}
		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_flag = magnificent
					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_flag = bloody
			}
			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_flag = can_be_iron
				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_flag = royal
		}
		localisation_key = String_royal
	}
	text = {
		trigger = {
			owner = { higher_tier_than = DUKE }
			wonder_stage = 4
			has_wonder_flag = royal
		}
		localisation_key = String_grand_royal
	}
	text = {
		trigger = {
			wonder_stage = 2
			OR = {
				AND = {
					has_wonder_flag = silent
					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
			}
			has_wonder_flag = holy_building
		}
		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_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_pagan_stones_stonehenge }
		localisation_key = String_Stonehenge
	}
	text = {
		trigger = { has_wonder_flag = cathedral }
		localisation_key = String_Cathedral
	}
	text = {
		trigger = { has_wonder_flag = mosque }
		localisation_key = String_Mosque
	}
	text = {
		trigger = { has_wonder_flag = synagogue }
		localisation_key = String_Synagogue
	}
	text = {
		trigger = { has_wonder_flag = temple }
		localisation_key = String_Temple
	}
	text = {
		trigger = { has_wonder_flag = statue }
		localisation_key = String_Statue
	}
	text = {
		trigger = { has_wonder_flag = colossus }
		localisation_key = String_Colossus
	}
	text = {
		trigger = { has_wonder_flag = horse }
		localisation_key = String_Stallion
	}
	text = {
		trigger = { has_wonder_flag = horse }
		localisation_key = String_Mare
	}
	text = {
		trigger = {
			has_wonder_flag = bastion
			wonder_stage = 6
		}
		localisation_key = String_Citadel
	}
	text = {
		trigger = {
			has_wonder_flag = bastion
			num_of_wonder_upgrades = 4
			has_wonder_upgrade_flag = turns_bastion_into_castle
		}
		localisation_key = String_Castle
	}
	text = {
		trigger = {
			has_wonder_flag = bastion
			wonder_stage = 3
		}
		localisation_key = String_Keep
	}
	text = {
		trigger = { has_wonder_flag = bastion }
		localisation_key = String_Fortress
	}
	text = {
		trigger = { has_wonder_flag = underground_city }
		localisation_key = String_Underground_City
	}
	text = {
		trigger = { 
			has_wonder_flag = can_be_shield
			wonder_stage = 3
			num_of_wonder_upgrades = 4
		}
		localisation_key = String_Shield
	}
	text = {
		trigger = { has_wonder_flag = walls }
		localisation_key = String_Walls
	}
	text = {
		trigger = { has_wonder_flag = harbor }
		localisation_key = String_Harbor
	}
	text = {
		trigger = { has_wonder_flag = lighthouse }
		localisation_key = String_Lighthouse
	}
	text = {
		trigger = { has_wonder_flag = amphitheater }
		localisation_key = String_Amphitheater
	}
	text = {
		trigger = { has_wonder_flag = palace }
		localisation_key = String_Palace
	}
	text = {
		trigger = { has_wonder_flag = garden }
		localisation_key = String_Garden
	}
	text = {
		trigger = { has_wonder_flag = university }
		localisation_key = String_University
	}
	text = {
		trigger = { has_wonder_flag = library }
		localisation_key = String_Library
	}
	text = {
		trigger = { has_wonder_flag = mausoleum }
		localisation_key = String_Mausoleum
	}
	text = {
		trigger = { has_wonder_flag = monolith }
		localisation_key = String_Monolith
	}	
	text = {
		trigger = { has_wonder_flag = pyramid }
		localisation_key = String_Pyramid
	}
	text = {
		trigger = { 
			uses_dynamic_name_cow_trigger = yes
			wonder_stage = 1
			NOT = { wonder_stage = 3 }
		}
		localisation_key = String_cow_City1
	}
	text = {
		trigger = { 
			uses_dynamic_name_cow_trigger = yes
			wonder_stage = 3
			NOT = { wonder_stage = 6 }
		}
		localisation_key = String_cow_City2
	}
	text = {
		trigger = { 
			uses_dynamic_name_cow_trigger = yes
			wonder_stage = 6
			NOT = { wonder_stage = 9 }
		}
		localisation_key = String_cow_City3
	}
	text = {
		trigger = { 
			uses_dynamic_name_cow_trigger = yes
			OR = {
				wonder_stage = 9
				wonder_stage = 10
			}
		}
		localisation_key = String_cow_City4
	}
	text = {
		trigger = { has_wonder = wonder_city_of_wonders_byz }
		localisation_key = String_cow_byz_Basileuousa
	}
	text = {
		trigger = { has_wonder = wonder_city_of_wonders_roma }
		localisation_key = String_cow_roma_Eternal
	}
	text = {
		trigger = { has_wonder = wonder_city_of_wonders_jeru }
		localisation_key = String_cow_jeru_Holy
	}
	
	#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_flag = cathedral }
		localisation_key = String_cathedral
	}
	text = {
		trigger = { has_wonder_flag = mosque }
		localisation_key = String_mosque
	}
	text = {
		trigger = { has_wonder_flag = synagogue }
		localisation_key = String_synagogue
	}
	text = {
		trigger = { has_wonder_flag = temple }
		localisation_key = String_temple
	}
	text = {
		trigger = { has_wonder_flag = statue }
		localisation_key = String_statue
	}
	text = {
		trigger = {
			has_wonder_flag = bastion
			wonder_stage = 6
		}
		localisation_key = String_citadel
	}
	text = {
		trigger = {
			has_wonder_flag = bastion
			num_of_wonder_upgrades = 4
			has_wonder_upgrade_flag = turns_bastion_into_castle
		}
		localisation_key = String_castle
	}
	text = {
		trigger = {
			has_wonder_flag = bastion
			wonder_stage = 3
		}
		localisation_key = String_keep
	}
	text = {
		trigger = { has_wonder_flag = bastion }
		localisation_key = String_fortress
	}
	text = {
		trigger = { has_wonder_flag = underground_city }
		localisation_key = String_underground_city
	}
	text = {
		trigger = { has_wonder_flag = walls }
		localisation_key = String_walls
	}
	text = {
		trigger = { has_wonder_flag = harbor }
		localisation_key = String_harbor
	}
	text = {
		trigger = { has_wonder_flag = lighthouse }
		localisation_key = String_lighthouse
	}
	text = {
		trigger = { has_wonder_flag = amphitheater }
		localisation_key = String_amphitheater
	}
	text = {
		trigger = { has_wonder_flag = palace }
		localisation_key = String_palace
	}
	text = {
		trigger = { has_wonder_flag = garden }
		localisation_key = String_garden
	}
	text = {
		trigger = { has_wonder_flag = university }
		localisation_key = String_university
	}
	text = {
		trigger = { has_wonder_flag = library }
		localisation_key = String_library
	}
	text = {
		trigger = { has_wonder_flag = mausoleum }
		localisation_key = String_mausoleum
	}
	text = {
		trigger = { has_wonder_flag = pyramid }
		localisation_key = String_pyramid
	}
	text = {
		trigger = { has_wonder_flag = monolith }
		localisation_key = String_monolith
	}
	text = {
		trigger = { has_wonder_flag = stone_formation }
		localisation_key = String_stone_formation
	}
	text = {
		trigger = {
			has_city_of_wonders_trigger = yes
		}
		localisation_key = String_cow_city
	}
	
	#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 City of Wonders (Constantinople)
			has_wonder = wonder_city_of_wonders_byz
		}
		localisation_key = wonder_city_of_wonders_byz_desc
	}
	text = {
		trigger = { #For City of Wonders (Roma)
			has_wonder = wonder_city_of_wonders_roma
		}
		localisation_key = wonder_city_of_wonders_roma_desc
	}
	text = {
		trigger = { #For City of Wonders (Alexandria)
			has_wonder = wonder_city_of_wonders_alex
		}
		localisation_key = wonder_city_of_wonders_alex_desc
	}
	text = {
		trigger = { #For City of Wonders (Antioch)
			has_wonder = wonder_city_of_wonders_anti
		}
		localisation_key = wonder_city_of_wonders_anti_desc
	}
	text = {
		trigger = { #For City of Wonders (Jerusalem)
			has_wonder = wonder_city_of_wonders_jeru
		}
		localisation_key = wonder_city_of_wonders_jeru_desc
	}
	text = {
		trigger = { #For City of Wonders (Babylon/Baghdad)
			has_wonder = wonder_city_of_wonders_baby
		}
		localisation_key = wonder_city_of_wonders_baby_desc
	}
	text = {
		trigger = { #for baby wonders (adds upgrade mention)
			has_wonder_upgrade = yes
			NOT = { num_of_wonder_upgrades = 3 }
			NOT = { wonder_age = 15 }
			NOT = {
				has_city_of_wonders_trigger = yes
			}
		}
		localisation_key = String_Wonder_Desc00
	}
	text = { #for wonders that build no upgrades, but stages instead: no upgrade addendum
		trigger = {
			has_wonder_upgrade = no
			NOT = {
				has_city_of_wonders_trigger = yes
			}
		}
		localisation_key = String_Wonder_Desc01
	}
	text = { #Variant 1: mentions an upgrade
		trigger = { 
			num_of_wonder_upgrades = 2 
			NOT = {
				has_city_of_wonders_trigger = yes
			}
		}
		localisation_key = String_Wonder_Desc02
	}
	text = { #Variant 2: mentions an upgrade
		trigger = { 
			num_of_wonder_upgrades = 5 
			NOT = {
				has_city_of_wonders_trigger = yes
			}
		}
		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
	}

	text = {
		trigger = {
			wonder_age = 400
		}
		localisation_key = String_ancient
	}
	#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 = { has_wonder_flag = brings_people_together }
		localisation_key = String_brought_people_together
	}
	text = {
		trigger = { has_wonder_flag = protective }
		localisation_key = String_lent_its_protection
	}
	text = {
		trigger = { has_wonder_flag = protective }
		localisation_key = String_shielded_its_people
	}
	text = {
		trigger = { has_wonder_flag = impressive_curiosity }
		localisation_key = String_been_impressive_curiosity
	}
	text = {
		trigger = { has_wonder_flag = inspires_wonder }
		localisation_key = String_inspired_wonder
	}
	text = {
		trigger = { has_wonder_flag = attracts_traffic }
		localisation_key = String_been_bringing_traffic
	}
	text = {
		trigger = { has_wonder_flag = aids_maritime }
		localisation_key = String_been_aiding_maritime_matters
	}
	text = {
		trigger = { has_wonder_flag = lighthouse }
		localisation_key = String_been_guiding_ships_to_port
	}
	text = {
		trigger = { has_wonder_flag = tourist_attraction }
		localisation_key = String_tourist_attraction
	}
	text = {
		trigger = {
			has_wonder_flag = center_of_leisure
			wonder_stage = 2
		}
		localisation_key = String_center_of_leisure
	}
	text = {
		trigger = { has_wonder_flag = source_of_veneration }
		localisation_key = String_source_of_veneration
	}
	text = {
		trigger = { has_wonder_flag = impressive_feat_of_architecture }
		localisation_key = String_impressive_feat_of_architecture
	}
	text = {
		trigger = { has_wonder_flag = inspires_imagination }
		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_flag = hot_spot_for_gossip }
		localisation_key = String_hot_spot_for_gossip
	}
	text = {
		trigger = { has_wonder_flag = house_of_envy }
		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_promise_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 = {
			has_wonder_upgrade_flag = is_plural
			OR = {
				has_wonder_upgrade_flag = statues
				has_wonder_upgrade_flag = gargoyles
			}
		}
		localisation_key = String_statues_keep_demons_away
	}
	text = {
		trigger = {
			has_wonder_flag = is_singular
			has_wonder_upgrade_flag = grand_dome
		}
		localisation_key = String_dome_is_second_sky
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = is_singular
			has_wonder_upgrade_flag = special_garden
		}
		localisation_key = String_said_to_be_the_envy_of_gardeners
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = brings_comfort_to_pet_owners
		}
		localisation_key = String_brings_comfort_to_pet_owners
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = lends_moral_support
		}
		localisation_key = String_lends_moral_support
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = scary
			has_wonder_upgrade_flag = is_singular
		}
		localisation_key = String_keeps_people_on_their_toes
	}
	text = {
		trigger = {
			has_wonder_upgrade_flag = improves_accessibility
		}
		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_flag = signals_expected_obedience
		}
		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_flag = brings_in_cash
			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
	}

	fallback_text = {
		localisation_key = String_most_recently_added
	}
}



defined_text = {
	name = GetMythologicalBeast

	use_first_valid = yes # Defaults to no

	text = {
		trigger = { has_wonder_flag = has_sphinx }
		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 = {
			wonder = { is_using_ocean_background_trigger = yes }
		}
		localisation_key = string_coast
	}
	text = {
		trigger = {
			terrain = forest
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_forest
	}
	text = {
		trigger = {
			terrain = hills
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_hills
	}
	text = {
		trigger = {
			terrain = mountain
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_mountains
	}
	text = {
		trigger = {
			terrain = plains
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_plains
	}
	text = {
		trigger = {
			terrain = farmlands
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_farmlands
	}
	text = {
		trigger = {
			terrain = steppe
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_steppe
	}
	text = {
		trigger = {
			terrain = desert
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_desert
	}
	text = {
		trigger = {
			terrain = jungle
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_jungle
	}
	text = {
		trigger = {
			terrain = arctic
			wonder = { 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 = {
			wonder = { is_using_ocean_background_trigger = yes }
		}
		localisation_key = string_On
	}
	text = {
		trigger = {
			terrain = forest
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_In
	}
	text = {
		trigger = {
			terrain = hills
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_In
	}
	text = {
		trigger = {
			terrain = mountain
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_In
	}
	text = {
		trigger = {
			terrain = plains
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_On
	}
	text = {
		trigger = {
			terrain = farmlands
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_On
	}
	text = {
		trigger = {
			terrain = steppe
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_On
	}
	text = {
		trigger = {
			terrain = desert
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_In
	}
	text = {
		trigger = {
			terrain = jungle
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_In
	}
	text = {
		trigger = {
			terrain = arctic
			wonder = { is_using_ocean_background_trigger = no }
		}
		localisation_key = string_In
	}
	fallback_text = {
		localisation_key = string_In
	}
}



### 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
#	}
#}
#
