Resolved #2914 - Can no longer exploit but to 'skip' promotions

This commit is contained in:
Yair Morgenstern 2020-08-01 23:13:59 +03:00
parent b4708b05b3
commit 4985d077af
3 changed files with 4 additions and 5 deletions

View file

@ -133,7 +133,7 @@ class PolicyManager {
"Free [] appears" -> {
val unitName = effect.getPlaceholderParameters()[0]
if (hasCapital && (unitName != Constants.settler || !civInfo.isOneCityChallenger()))
civInfo.placeUnitNearTile(civInfo.getCapital().location, unitName)
civInfo.addUnit(unitName, civInfo.getCapital())
}
"Gain a free policy" -> freePolicies++
"Empire enters golden age" ->

View file

@ -39,7 +39,7 @@ class GreatPersonPickerScreen(val civInfo:CivilizationInfo) : PickerScreen() {
}
rightSideButton.onClick(UncivSound.Choir) {
civInfo.placeUnitNearTile(civInfo.cities[0].location, theChosenOne!!.name)
civInfo.addUnit(theChosenOne!!.name, civInfo.getCapital())
civInfo.greatPeople.freeGreatPeople--
UncivGame.Current.setWorldScreen()
}

View file

@ -59,12 +59,11 @@ class PromotionPickerScreen(val unit: MapUnit) : PickerScreen() {
selectPromotionButton.add(promotion.name.toLabel()).pad(10f).padRight(20f)
selectPromotionButton.touchable = Touchable.enabled
selectPromotionButton.onClick {
selectedPromotion = promotion
rightSideButton.setText(promotion.name.tr())
if(canBePromoted && isPromotionAvailable && !unitHasPromotion && canChangeState)
rightSideButton.enable()
else rightSideButton.disable()
selectedPromotion = promotion
rightSideButton.setText(promotion.name.tr())
descriptionLabel.setText(promotion.getDescription(promotionsForUnitType))
}