mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 21:03:15 -04: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:
parent
32ba55b2fe
commit
762af74b61
@ -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()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user