mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 15:01:09 -04:00
update
This commit is contained in:
commit
68cfe8de2b
@ -715,7 +715,8 @@
|
|||||||
culture:3,
|
culture:3,
|
||||||
isWonder:true,
|
isWonder:true,
|
||||||
uniques:["Defensive buildings in all cities are 25% more effective"],
|
uniques:["Defensive buildings in all cities are 25% more effective"],
|
||||||
requiredTech:"Railroad"
|
requiredTech:"Railroad",
|
||||||
|
quote:"'The Law is a fortress on a hill that armies cannot take or floods wash away.' –- The Prophet Muhammed"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Neuschwanstein",
|
name:"Neuschwanstein",
|
||||||
|
@ -440,7 +440,7 @@
|
|||||||
startIntroPart2: "Grande cancelliere Bismarck, il popolo tedesco guarda a te per vivere nuovi giorni di gloria. Forte è la sua determinazione affinché tu, l'amato Cancelliere di Ferro, torni a guidare la nazione ancora una volta. Sceglierai di dominare con il suangue e l'acciaio o patrocinerai le arti e l'industria? Riuscirai a plasmare una civiltà in grado di superare la prova del tempo?"
|
startIntroPart2: "Grande cancelliere Bismarck, il popolo tedesco guarda a te per vivere nuovi giorni di gloria. Forte è la sua determinazione affinché tu, l'amato Cancelliere di Ferro, torni a guidare la nazione ancora una volta. Sceglierai di dominare con il suangue e l'acciaio o patrocinerai le arti e l'industria? Riuscirai a plasmare una civiltà in grado di superare la prova del tempo?"
|
||||||
|
|
||||||
declaringWar:"Lascia che tu lo sappia: tu sei un nemico della Germania e come tale vai combattuto. Che Dio abbia pietà di te, perché io non ne avrò."
|
declaringWar:"Lascia che tu lo sappia: tu sei un nemico della Germania e come tale vai combattuto. Che Dio abbia pietà di te, perché io non ne avrò."
|
||||||
attacked:"Ho sconfitto nemici dieci volte più potennti di te. Tu ne sarai solo un altro per gli storici!"
|
attacked:"Ho sconfitto nemici dieci volte più potenti di te. Tu ne sarai solo un altro per gli storici!"
|
||||||
defeated:"Eravamo gli augusti e i gloriosi... ma no, non importa. Hai vinto. Possa il tuo regno essere più pacifico di quanto fosse il mio."
|
defeated:"Eravamo gli augusti e i gloriosi... ma no, non importa. Hai vinto. Possa il tuo regno essere più pacifico di quanto fosse il mio."
|
||||||
introduction:"Guten tag. Nel nome del grande popolo tedesco, vi diamo il benvenuto."
|
introduction:"Guten tag. Nel nome del grande popolo tedesco, vi diamo il benvenuto."
|
||||||
|
|
||||||
|
@ -420,6 +420,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
"Show autosaves":{
|
"Show autosaves":{
|
||||||
|
Italian:"Mostra autosalvataggi"
|
||||||
Simplified_Chinese:"显示自动存档"
|
Simplified_Chinese:"显示自动存档"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -444,6 +445,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
"Copy saved game to clipboard":{//this button exsits in "Load game",it means that we have a "saved game" file, so we can copy its data to clipboard.
|
"Copy saved game to clipboard":{//this button exsits in "Load game",it means that we have a "saved game" file, so we can copy its data to clipboard.
|
||||||
|
Italian:"Copia salvataggio su appunti"
|
||||||
Simplified_Chinese:"复制游戏存档到剪贴板"
|
Simplified_Chinese:"复制游戏存档到剪贴板"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -575,5 +575,9 @@
|
|||||||
"[nation] agreed to stop settling cities near us!": {
|
"[nation] agreed to stop settling cities near us!": {
|
||||||
Italian:"[nation] ha promesso di smettere di fondare città vicino a noi!"
|
Italian:"[nation] ha promesso di smettere di fondare città vicino a noi!"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"[nation] refused to stop settling cities near us!": {
|
||||||
|
Italian:"[nation] ha rifiutato di smettere di fondare città vicino a noi!"
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1272,14 +1272,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
"Bombard":{
|
"Bombard":{
|
||||||
|
Italian:"Bombarda"
|
||||||
Simplified_Chinese:"轰击"
|
Simplified_Chinese:"轰击"
|
||||||
}
|
}
|
||||||
|
|
||||||
"Captured!":{
|
"Captured!":{
|
||||||
|
Italian:"Cattura!"
|
||||||
Simplified_Chinese:"可被俘虏!"
|
Simplified_Chinese:"可被俘虏!"
|
||||||
}
|
}
|
||||||
|
|
||||||
"defence vs ranged":{
|
"defence vs ranged":{
|
||||||
|
Italian:"difesa contro unità da tiro"
|
||||||
Simplified_Chinese:"对方攻击类型为远程"
|
Simplified_Chinese:"对方攻击类型为远程"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ class Constants{
|
|||||||
val unitActionSleep = "Sleep"
|
val unitActionSleep = "Sleep"
|
||||||
val unitActionAutomation = "automation"
|
val unitActionAutomation = "automation"
|
||||||
val unitActionExplore = "Explore"
|
val unitActionExplore = "Explore"
|
||||||
|
val futureTech = "Future Tech"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -231,7 +231,8 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun addFoodBuildingChoice() {
|
private fun addFoodBuildingChoice() {
|
||||||
val foodBuilding = buildableNotWonders.filter { it.isStatRelated(Stat.Food) } // only stat related in unique
|
val foodBuilding = buildableNotWonders.filter { it.isStatRelated(Stat.Food)
|
||||||
|
|| it.getBaseBuilding().name == "Aqueduct" || it.getBaseBuilding().name == "Medical Lab"} // only stat related in unique
|
||||||
.minBy { it.cost }
|
.minBy { it.cost }
|
||||||
if (foodBuilding != null) {
|
if (foodBuilding != null) {
|
||||||
var modifier = 1f
|
var modifier = 1f
|
||||||
|
@ -174,7 +174,7 @@ class NextTurnAutomation{
|
|||||||
|
|
||||||
val tech: Technology
|
val tech: Technology
|
||||||
if (researchableTechs.isEmpty()) { // no non-researched techs available, go for future tech
|
if (researchableTechs.isEmpty()) { // no non-researched techs available, go for future tech
|
||||||
civInfo.tech.techsToResearch.add("Future Tech")
|
civInfo.tech.techsToResearch.add(Constants.futureTech)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@ package com.unciv.logic.city
|
|||||||
import com.badlogic.gdx.graphics.Color
|
import com.badlogic.gdx.graphics.Color
|
||||||
import com.unciv.Constants
|
import com.unciv.Constants
|
||||||
import com.unciv.logic.automation.ConstructionAutomation
|
import com.unciv.logic.automation.ConstructionAutomation
|
||||||
|
import com.unciv.logic.civilization.AlertType
|
||||||
|
import com.unciv.logic.civilization.PopupAlert
|
||||||
import com.unciv.models.gamebasics.Building
|
import com.unciv.models.gamebasics.Building
|
||||||
import com.unciv.models.gamebasics.GameBasics
|
import com.unciv.models.gamebasics.GameBasics
|
||||||
import com.unciv.models.gamebasics.tr
|
import com.unciv.models.gamebasics.tr
|
||||||
@ -192,6 +194,7 @@ class CityConstructions {
|
|||||||
inProgressConstructions.remove(currentConstruction)
|
inProgressConstructions.remove(currentConstruction)
|
||||||
|
|
||||||
if (construction is Building && construction.isWonder) {
|
if (construction is Building && construction.isWonder) {
|
||||||
|
cityInfo.civInfo.popupAlerts.add(PopupAlert(AlertType.WonderBuilt, construction.name))
|
||||||
for (civ in cityInfo.civInfo.gameInfo.civilizations) {
|
for (civ in cityInfo.civInfo.gameInfo.civilizations) {
|
||||||
if (civ.exploredTiles.contains(cityInfo.location))
|
if (civ.exploredTiles.contains(cityInfo.location))
|
||||||
civ.addNotification("[$currentConstruction] has been built in [${cityInfo.name}]", cityInfo.location, Color.BROWN)
|
civ.addNotification("[$currentConstruction] has been built in [${cityInfo.name}]", cityInfo.location, Color.BROWN)
|
||||||
|
@ -10,6 +10,7 @@ enum class AlertType{
|
|||||||
CitiesSettledNearOtherCiv,
|
CitiesSettledNearOtherCiv,
|
||||||
DemandToStopSettlingCitiesNear,
|
DemandToStopSettlingCitiesNear,
|
||||||
CitySettledNearOtherCivDespiteOurPromise,
|
CitySettledNearOtherCivDespiteOurPromise,
|
||||||
|
WonderBuilt
|
||||||
}
|
}
|
||||||
|
|
||||||
class PopupAlert {
|
class PopupAlert {
|
||||||
|
@ -2,6 +2,7 @@ package com.unciv.logic.civilization
|
|||||||
|
|
||||||
|
|
||||||
import com.badlogic.gdx.graphics.Color
|
import com.badlogic.gdx.graphics.Color
|
||||||
|
import com.unciv.Constants
|
||||||
import com.unciv.logic.map.RoadStatus
|
import com.unciv.logic.map.RoadStatus
|
||||||
import com.unciv.models.gamebasics.GameBasics
|
import com.unciv.models.gamebasics.GameBasics
|
||||||
import com.unciv.models.gamebasics.tech.Technology
|
import com.unciv.models.gamebasics.tech.Technology
|
||||||
@ -43,11 +44,14 @@ class TechManager {
|
|||||||
var techCost = GameBasics.Technologies[techName]!!.cost.toFloat()
|
var techCost = GameBasics.Technologies[techName]!!.cost.toFloat()
|
||||||
techCost *= civInfo.getDifficulty().researchCostModifier
|
techCost *= civInfo.getDifficulty().researchCostModifier
|
||||||
techCost *= civInfo.gameInfo.gameParameters.gameSpeed.getModifier()
|
techCost *= civInfo.gameInfo.gameParameters.gameSpeed.getModifier()
|
||||||
|
techCost *= 1 + (civInfo.cities.size -1 ) * 0.02f // each city increases tech cost by 2%, as per https://civilization.fandom.com/wiki/Science_(Civ5)
|
||||||
return techCost.toInt()
|
return techCost.toInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun currentTechnology(): Technology? = currentTechnologyName()?.let {
|
fun currentTechnology(): Technology? {
|
||||||
GameBasics.Technologies[it]
|
val currentTechnologyName = currentTechnologyName()
|
||||||
|
if (currentTechnologyName == null) return null
|
||||||
|
return GameBasics.Technologies[currentTechnologyName]
|
||||||
}
|
}
|
||||||
|
|
||||||
fun currentTechnologyName(): String? {
|
fun currentTechnologyName(): String? {
|
||||||
@ -86,7 +90,7 @@ class TechManager {
|
|||||||
val techNameToCheck = checkPrerequisites.pop()
|
val techNameToCheck = checkPrerequisites.pop()
|
||||||
// future tech can have been researched even when we're researching it,
|
// future tech can have been researched even when we're researching it,
|
||||||
// so...if we skip it we'll end up with 0 techs in the "required techs", which will mean that we don't have annything to research. Yeah.
|
// so...if we skip it we'll end up with 0 techs in the "required techs", which will mean that we don't have annything to research. Yeah.
|
||||||
if (techNameToCheck!="Future Tech" &&
|
if (techNameToCheck!=Constants.futureTech &&
|
||||||
(isResearched(techNameToCheck) || prerequisites.contains(techNameToCheck)) )
|
(isResearched(techNameToCheck) || prerequisites.contains(techNameToCheck)) )
|
||||||
continue //no need to add or check prerequisites
|
continue //no need to add or check prerequisites
|
||||||
val techToCheck = GameBasics.Technologies[techNameToCheck]
|
val techToCheck = GameBasics.Technologies[techNameToCheck]
|
||||||
@ -116,7 +120,7 @@ class TechManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun addTechnology(techName:String) {
|
fun addTechnology(techName:String) {
|
||||||
if(techName!="Future Tech")
|
if(techName!= Constants.futureTech)
|
||||||
techsToResearch.remove(techName)
|
techsToResearch.remove(techName)
|
||||||
|
|
||||||
val previousEra = civInfo.getEra()
|
val previousEra = civInfo.getEra()
|
||||||
|
@ -38,6 +38,7 @@ class Building : NamedStats(), IConstruction{
|
|||||||
var xpForNewUnits=0
|
var xpForNewUnits=0
|
||||||
var replaces:String?=null
|
var replaces:String?=null
|
||||||
var uniqueTo:String?=null
|
var uniqueTo:String?=null
|
||||||
|
var quote:String?=null
|
||||||
|
|
||||||
// Uniques
|
// Uniques
|
||||||
private var providesFreeBuilding: String? = null
|
private var providesFreeBuilding: String? = null
|
||||||
|
@ -4,6 +4,7 @@ import com.badlogic.gdx.Gdx
|
|||||||
import com.badlogic.gdx.graphics.Color
|
import com.badlogic.gdx.graphics.Color
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Label
|
import com.badlogic.gdx.scenes.scene2d.ui.Label
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane
|
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane
|
||||||
|
import com.unciv.Constants
|
||||||
import com.unciv.UnCivGame
|
import com.unciv.UnCivGame
|
||||||
import com.unciv.logic.civilization.CivilizationInfo
|
import com.unciv.logic.civilization.CivilizationInfo
|
||||||
import com.unciv.logic.civilization.TechManager
|
import com.unciv.logic.civilization.TechManager
|
||||||
@ -121,11 +122,13 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo, centerOnTech: Tec
|
|||||||
private fun setButtonsInfo() {
|
private fun setButtonsInfo() {
|
||||||
for (techName in techNameToButton.keys) {
|
for (techName in techNameToButton.keys) {
|
||||||
val techButton = techNameToButton[techName]!!
|
val techButton = techNameToButton[techName]!!
|
||||||
when {
|
techButton.color = when {
|
||||||
civTech.isResearched(techName) && techName!="Future Tech" -> techButton.color = researchedTechColor
|
civTech.isResearched(techName) && techName != Constants.futureTech -> researchedTechColor
|
||||||
tempTechsToResearch.isNotEmpty() && tempTechsToResearch.first() == techName -> techButton.color = currentTechColor
|
// if we're here to pick a free tech, show the current tech like the rest of the researchables so it'll be obvious what we can pick
|
||||||
tempTechsToResearch.contains(techName) -> techButton.color = queuedTechColor
|
tempTechsToResearch.firstOrNull() == techName && !isFreeTechPick -> currentTechColor
|
||||||
else -> techButton.color = Color.BLACK
|
researchableTechs.contains(techName) && !civTech.isResearched(techName) -> researchableTechColor
|
||||||
|
tempTechsToResearch.contains(techName) -> queuedTechColor
|
||||||
|
else -> Color.BLACK
|
||||||
}
|
}
|
||||||
//the tech that can be selected to research immediately should be always researchableTechColor, it's very good when we pick a free tech.
|
//the tech that can be selected to research immediately should be always researchableTechColor, it's very good when we pick a free tech.
|
||||||
if (researchableTechs.contains(techName)&&!civTech.isResearched(techName)) techButton.color = researchableTechColor
|
if (researchableTechs.contains(techName)&&!civTech.isResearched(techName)) techButton.color = researchableTechColor
|
||||||
@ -140,7 +143,7 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo, centerOnTech: Tec
|
|||||||
text += " (" + tempTechsToResearch.indexOf(techName) + ")"
|
text += " (" + tempTechsToResearch.indexOf(techName) + ")"
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!civTech.isResearched(techName) || techName=="Future Tech")
|
if (!civTech.isResearched(techName) || techName== Constants.futureTech)
|
||||||
text += "\r\n" + turnsToTech[techName] + " {turns}".tr()
|
text += "\r\n" + turnsToTech[techName] + " {turns}".tr()
|
||||||
|
|
||||||
techButton.text.setText(text)
|
techButton.text.setText(text)
|
||||||
@ -166,7 +169,7 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo, centerOnTech: Tec
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (civTech.isResearched(tech.name) && tech.name != "Future Tech") {
|
if (civTech.isResearched(tech.name) && tech.name != Constants.futureTech) {
|
||||||
rightSideButton.setText("Pick a tech".tr())
|
rightSideButton.setText("Pick a tech".tr())
|
||||||
rightSideButton.disable()
|
rightSideButton.disable()
|
||||||
setButtonsInfo()
|
setButtonsInfo()
|
||||||
|
@ -5,10 +5,9 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
|||||||
import com.unciv.logic.civilization.AlertType
|
import com.unciv.logic.civilization.AlertType
|
||||||
import com.unciv.logic.civilization.CivilizationInfo
|
import com.unciv.logic.civilization.CivilizationInfo
|
||||||
import com.unciv.logic.civilization.PopupAlert
|
import com.unciv.logic.civilization.PopupAlert
|
||||||
|
import com.unciv.models.gamebasics.GameBasics
|
||||||
import com.unciv.models.gamebasics.tr
|
import com.unciv.models.gamebasics.tr
|
||||||
import com.unciv.ui.utils.addSeparator
|
import com.unciv.ui.utils.*
|
||||||
import com.unciv.ui.utils.onClick
|
|
||||||
import com.unciv.ui.utils.toLabel
|
|
||||||
import com.unciv.ui.worldscreen.optionstable.PopupTable
|
import com.unciv.ui.worldscreen.optionstable.PopupTable
|
||||||
|
|
||||||
class AlertPopup(val worldScreen: WorldScreen, val popupAlert: PopupAlert): PopupTable(worldScreen){
|
class AlertPopup(val worldScreen: WorldScreen, val popupAlert: PopupAlert): PopupTable(worldScreen){
|
||||||
@ -95,6 +94,18 @@ class AlertPopup(val worldScreen: WorldScreen, val popupAlert: PopupAlert): Popu
|
|||||||
addGoodSizedLabel("We noticed your new city near our borders, despite your promise. This will have....implications.").row()
|
addGoodSizedLabel("We noticed your new city near our borders, despite your promise. This will have....implications.").row()
|
||||||
add(getCloseButton("Very well."))
|
add(getCloseButton("Very well."))
|
||||||
}
|
}
|
||||||
|
AlertType.WonderBuilt -> {
|
||||||
|
val wonder = GameBasics.Buildings[popupAlert.value]!!
|
||||||
|
addGoodSizedLabel(wonder.name)
|
||||||
|
addSeparator()
|
||||||
|
val centerTable = Table()
|
||||||
|
val wonderText = if(wonder.quote!=null) wonder.quote!! else ""
|
||||||
|
centerTable.add(wonderText.toLabel().apply { setWrap(true) }).width(worldScreen.stage.width/3)
|
||||||
|
centerTable.add(ImageGetter.getConstructionImage(wonder.name).surroundWithCircle(100f)).pad(20f)
|
||||||
|
centerTable.add(wonder.getShortDescription().toLabel().apply { setWrap(true) }).width(worldScreen.stage.width/3)
|
||||||
|
add(centerTable).row()
|
||||||
|
add(getCloseButton("Close"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
open()
|
open()
|
||||||
worldScreen.alertPopupIsOpen = true
|
worldScreen.alertPopupIsOpen = true
|
||||||
|
@ -246,7 +246,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
|
|
||||||
val researchableTechs = GameBasics.Technologies.values.filter { !civInfo.tech.isResearched(it.name) && civInfo.tech.canBeResearched(it.name) }
|
val researchableTechs = GameBasics.Technologies.values.filter { !civInfo.tech.isResearched(it.name) && civInfo.tech.canBeResearched(it.name) }
|
||||||
if (civInfo.tech.currentTechnology() == null && researchableTechs.isEmpty())
|
if (civInfo.tech.currentTechnology() == null && researchableTechs.isEmpty())
|
||||||
civInfo.tech.techsToResearch.add("Future Tech")
|
civInfo.tech.techsToResearch.add(Constants.futureTech)
|
||||||
|
|
||||||
if (civInfo.tech.currentTechnology() == null) {
|
if (civInfo.tech.currentTechnology() == null) {
|
||||||
val buttonPic = Table()
|
val buttonPic = Table()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user