mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-20 09:17:47 +07:00
Can no longer gift city states with gold you don't have
This commit is contained in:
parent
1f498f3fa6
commit
2e16a96c4d
@ -2528,7 +2528,7 @@
|
||||
French:"Pas cette fois."
|
||||
}
|
||||
|
||||
"Excellent!":{ // AI statement after we accept a trade they proposed
|
||||
"Excellent!":{ // AI statement after we accept a trade they proposed, and when we meet a city state
|
||||
Italian:"Eccellente!"
|
||||
Simplified_Chinese:"好极了!和和气气才是生财之道。"
|
||||
French:"Excellent!"
|
||||
@ -2552,6 +2552,9 @@
|
||||
Simplified_Chinese:"我们的关系:"
|
||||
}
|
||||
|
||||
"We have encountered the City-State of [name]!":{ // e.g. the Cultured city state of Vienna
|
||||
}
|
||||
|
||||
// Friendship declaration flavor texts
|
||||
"Declare Friendship ([numberOfTurns] turns)":{
|
||||
Italian:"Dichiarazione di Amicizia ([numberOfTurns] turni)"
|
||||
|
@ -21,8 +21,8 @@ android {
|
||||
applicationId "com.unciv.app"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 28
|
||||
versionCode 241
|
||||
versionName "2.16.5"
|
||||
versionCode 242
|
||||
versionName "2.16.6"
|
||||
}
|
||||
|
||||
// Had to add this crap for Travis to build, it wanted to sign the app
|
||||
|
@ -79,10 +79,10 @@ class DiplomacyScreen:CameraStageBaseScreen() {
|
||||
return tradeTable
|
||||
}
|
||||
|
||||
fun giveGoldGift(otherCiv: CivilizationInfo) {
|
||||
fun giveGoldGift(otherCiv: CivilizationInfo, giftAmount: Int) {
|
||||
val currentPlayerCiv = UnCivGame.Current.gameInfo.getCurrentPlayerCivilization()
|
||||
currentPlayerCiv.gold -= 100
|
||||
otherCiv.getDiplomacyManager(currentPlayerCiv).influence += 10
|
||||
currentPlayerCiv.gold -= giftAmount
|
||||
otherCiv.getDiplomacyManager(currentPlayerCiv).influence += giftAmount/10
|
||||
rightSideTable.clear()
|
||||
rightSideTable.add(getCityStateDiplomacyTable(otherCiv))
|
||||
}
|
||||
@ -112,9 +112,10 @@ class DiplomacyScreen:CameraStageBaseScreen() {
|
||||
diplomacyTable.addSeparator()
|
||||
|
||||
val giftButton = TextButton("Give 100 gold".tr(), skin)
|
||||
giftButton.onClick{ giveGoldGift(otherCiv) }
|
||||
val giftAmount = 100
|
||||
giftButton.onClick{ giveGoldGift(otherCiv,giftAmount ) }
|
||||
diplomacyTable.add(giftButton).row()
|
||||
if (currentPlayerCiv.gold < 1) giftButton.disable()
|
||||
if (currentPlayerCiv.gold < giftAmount ) giftButton.disable()
|
||||
|
||||
val diplomacyManager = currentPlayerCiv.getDiplomacyManager(otherCiv)
|
||||
|
||||
|
@ -47,8 +47,9 @@ class AlertPopup(val worldScreen: WorldScreen, val popupAlert: PopupAlert): Popu
|
||||
val translatedNation = civ.getTranslatedNation()
|
||||
if (civ.isCityState()) {
|
||||
addLeaderName(translatedNation)
|
||||
addGoodSizedLabel("Type : " + civ.getCityStateType()).row()
|
||||
add(getCloseButton("A pleasure to meet you."))
|
||||
val cityStateType = civ.getCityStateType()
|
||||
addGoodSizedLabel("We have encountered the City-State of [${translatedNation.getNameTranslation()}]!").row()
|
||||
add(getCloseButton("Excellent!"))
|
||||
} else {
|
||||
addLeaderName(translatedNation)
|
||||
addGoodSizedLabel(translatedNation.introduction).row()
|
||||
|
Loading…
Reference in New Issue
Block a user