mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-16 18:59:15 +07:00
Barbarians don't move/attack on the turn of their spawning (#1719)
* Barbarians don't move/attack on the turn of their spawning
* Revert "Barbarians don't move/attack on the turn of their spawning"
This reverts commit b088fb8c
* Better implementation
Co-authored-by: dumichno <57294813+dumichno@users.noreply.github.com>
This commit is contained in:
@ -73,7 +73,6 @@ class GameInfo {
|
||||
currentPlayerIndex = (currentPlayerIndex+1) % civilizations.size
|
||||
if(currentPlayerIndex==0){
|
||||
turns++
|
||||
if (turns % 10 == 0 && !gameParameters.noBarbarians) placeBarbarians()
|
||||
}
|
||||
thisPlayer = civilizations[currentPlayerIndex]
|
||||
thisPlayer.startTurn()
|
||||
@ -82,8 +81,14 @@ class GameInfo {
|
||||
switchTurn()
|
||||
|
||||
while(thisPlayer.playerType==PlayerType.AI){
|
||||
if(thisPlayer.isBarbarian() || !thisPlayer.isDefeated())
|
||||
if(thisPlayer.isBarbarian() || !thisPlayer.isDefeated()) {
|
||||
NextTurnAutomation().automateCivMoves(thisPlayer)
|
||||
|
||||
// Placing barbarians after their turn
|
||||
if (thisPlayer.isBarbarian()
|
||||
&& !gameParameters.noBarbarians
|
||||
&& turns % 10 == 0) placeBarbarians()
|
||||
}
|
||||
switchTurn()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user