Paolo80
Chieftain
- Joined
- Dec 20, 2019
- Messages
- 85
Hi guys,
I did a scenario and I would want to prevent teams to declare war until a certain turn.
e.g. Until the 19th turn no team can declare war to each other. After the 19th turn every team can declare war to each other.
I wrote this code, but it only force a team to make peace with other but it doesn't prevent a team to declare war. So every team can declare war to other teams for one turn.
How could I do?
I did a scenario and I would want to prevent teams to declare war until a certain turn.
e.g. Until the 19th turn no team can declare war to each other. After the 19th turn every team can declare war to each other.
I wrote this code, but it only force a team to make peace with other but it doesn't prevent a team to declare war. So every team can declare war to other teams for one turn.
Code:
def onBeginPlayerTurn(self, argsList):
'Called at the beginning of a players turn'
iGameTurn, iPlayer = argsList
if iGameTurn < 19:
for i in range(4):
for j in range(4):
eTeam = gc.getTeam(i)
if i == j:
j = j + 1
else:
eTeam.makePeace(j)
How could I do?