Add great general generation, overview screen and free pickup.

This commit is contained in:
Duan Tao 2018-12-26 18:42:22 +08:00
parent c3e8563bf2
commit 7478215353
5 changed files with 397 additions and 385 deletions

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

View file

@ -96,6 +96,7 @@ class Battle(val gameInfo:GameInfo) {
var amountToAdd = amount
if(thisCombatant.getCivilization().policies.isAdopted("Military Tradition")) amountToAdd = (amountToAdd * 1.5f).toInt()
thisCombatant.unit.promotions.XP += amountToAdd
thisCombatant.getCivilization().greatPeople.greatGeneralPoints += amountToAdd
}
if(attacker.isMelee()){

View file

@ -177,6 +177,10 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){
greatPeopleTable.add(greatPersonPoints[entry.key]!!.toInt().toString()+"/"+pointsToGreatPerson)
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()
return greatPeopleTable
}

View file

@ -18,7 +18,7 @@ class GreatPersonPickerScreen : PickerScreen() {
closeButton.isVisible=false
rightSideButton.setText("Choose a free great person")
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)