mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 22:00:24 +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
|
currentPlayerIndex = (currentPlayerIndex+1) % civilizations.size
|
||||||
if(currentPlayerIndex==0){
|
if(currentPlayerIndex==0){
|
||||||
turns++
|
turns++
|
||||||
if (turns % 10 == 0 && !gameParameters.noBarbarians) placeBarbarians()
|
|
||||||
}
|
}
|
||||||
thisPlayer = civilizations[currentPlayerIndex]
|
thisPlayer = civilizations[currentPlayerIndex]
|
||||||
thisPlayer.startTurn()
|
thisPlayer.startTurn()
|
||||||
@ -82,8 +81,14 @@ class GameInfo {
|
|||||||
switchTurn()
|
switchTurn()
|
||||||
|
|
||||||
while(thisPlayer.playerType==PlayerType.AI){
|
while(thisPlayer.playerType==PlayerType.AI){
|
||||||
if(thisPlayer.isBarbarian() || !thisPlayer.isDefeated())
|
if(thisPlayer.isBarbarian() || !thisPlayer.isDefeated()) {
|
||||||
NextTurnAutomation().automateCivMoves(thisPlayer)
|
NextTurnAutomation().automateCivMoves(thisPlayer)
|
||||||
|
|
||||||
|
// Placing barbarians after their turn
|
||||||
|
if (thisPlayer.isBarbarian()
|
||||||
|
&& !gameParameters.noBarbarians
|
||||||
|
&& turns % 10 == 0) placeBarbarians()
|
||||||
|
}
|
||||||
switchTurn()
|
switchTurn()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user