mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 23:40:01 +07:00
Spawn multiple great people if eligible (#10833)
* Spawn multiple great people if eligible * Fix referrence to outdated dev environment
This commit is contained in:
@ -59,9 +59,12 @@ class TurnManager(val civInfo: Civilization) {
|
|||||||
// Generate great people at the start of the turn,
|
// Generate great people at the start of the turn,
|
||||||
// so they won't be generated out in the open and vulnerable to enemy attacks before you can control them
|
// so they won't be generated out in the open and vulnerable to enemy attacks before you can control them
|
||||||
if (civInfo.cities.isNotEmpty()) { //if no city available, addGreatPerson will throw exception
|
if (civInfo.cities.isNotEmpty()) { //if no city available, addGreatPerson will throw exception
|
||||||
val greatPerson = civInfo.greatPeople.getNewGreatPerson()
|
var greatPerson = civInfo.greatPeople.getNewGreatPerson()
|
||||||
if (greatPerson != null && civInfo.gameInfo.ruleset.units.containsKey(greatPerson))
|
while (greatPerson != null) {
|
||||||
civInfo.units.addUnit(greatPerson)
|
if (civInfo.gameInfo.ruleset.units.containsKey(greatPerson))
|
||||||
|
civInfo.units.addUnit(greatPerson)
|
||||||
|
greatPerson = civInfo.greatPeople.getNewGreatPerson()
|
||||||
|
}
|
||||||
civInfo.religionManager.startTurn()
|
civInfo.religionManager.startTurn()
|
||||||
if (civInfo.isLongCountActive())
|
if (civInfo.isLongCountActive())
|
||||||
MayaCalendar.startTurnForMaya(civInfo)
|
MayaCalendar.startTurnForMaya(civInfo)
|
||||||
|
Reference in New Issue
Block a user