mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 01:39:40 +07:00
Add great general generation, overview screen and free pickup.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 830 KiB After Width: | Height: | Size: 833 KiB |
@ -96,6 +96,7 @@ class Battle(val gameInfo:GameInfo) {
|
|||||||
var amountToAdd = amount
|
var amountToAdd = amount
|
||||||
if(thisCombatant.getCivilization().policies.isAdopted("Military Tradition")) amountToAdd = (amountToAdd * 1.5f).toInt()
|
if(thisCombatant.getCivilization().policies.isAdopted("Military Tradition")) amountToAdd = (amountToAdd * 1.5f).toInt()
|
||||||
thisCombatant.unit.promotions.XP += amountToAdd
|
thisCombatant.unit.promotions.XP += amountToAdd
|
||||||
|
thisCombatant.getCivilization().greatPeople.greatGeneralPoints += amountToAdd
|
||||||
}
|
}
|
||||||
|
|
||||||
if(attacker.isMelee()){
|
if(attacker.isMelee()){
|
||||||
|
@ -177,6 +177,10 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){
|
|||||||
greatPeopleTable.add(greatPersonPoints[entry.key]!!.toInt().toString()+"/"+pointsToGreatPerson)
|
greatPeopleTable.add(greatPersonPoints[entry.key]!!.toInt().toString()+"/"+pointsToGreatPerson)
|
||||||
greatPeopleTable.add(greatPersonPointsPerTurn[entry.key]!!.toInt().toString()).row()
|
greatPeopleTable.add(greatPersonPointsPerTurn[entry.key]!!.toInt().toString()).row()
|
||||||
}
|
}
|
||||||
|
val pointsForGreatGeneral = playerCivInfo.greatPeople.greatGeneralPoints.toInt().toString()
|
||||||
|
val pointsForNextGreatGeneral = playerCivInfo.greatPeople.pointsForNextGreatGeneral.toInt().toString()
|
||||||
|
greatPeopleTable.add("Great General".tr())
|
||||||
|
greatPeopleTable.add(pointsForGreatGeneral+"/"+pointsForNextGreatGeneral).row()
|
||||||
greatPeopleTable.pack()
|
greatPeopleTable.pack()
|
||||||
return greatPeopleTable
|
return greatPeopleTable
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ class GreatPersonPickerScreen : PickerScreen() {
|
|||||||
closeButton.isVisible=false
|
closeButton.isVisible=false
|
||||||
rightSideButton.setText("Choose a free great person")
|
rightSideButton.setText("Choose a free great person")
|
||||||
for (unit in GameBasics.Units.values
|
for (unit in GameBasics.Units.values
|
||||||
.filter { it.name in GreatPersonManager().statToGreatPersonMapping.values})
|
.filter { it.name in GreatPersonManager().statToGreatPersonMapping.values || it.name == "Great General"})
|
||||||
{
|
{
|
||||||
val button = Button(skin)
|
val button = Button(skin)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user