if (iCivic1 == 6): #vassalage
if (pPlayer.getCurrentEra() == 2): #Bonus in medieval, Penalty in others
iNewBaseStability += 3
else:
iNewBaseStability -= 3
#print("iNewBaseStability civic single 1",iNewBaseStability, iPlayer)
if (iCivic0 == 2): #Theocracy
if (pPlayer.getCurrentEra() >= 4): #Penalty in industrial or later
iNewBaseStability -= 5
if (iCivic4 == 21): #Pantheon
if (pPlayer.getCurrentEra() <= 1): #Bonus in classical and ancient, penalty in others
iNewBaseStability += 3
else:
iNewBaseStability -= 3
if (iCivic1 == 8): #Representation
if (pPlayer.getCurrentEra() >= 4): #Bonus in industrial or later
iNewBaseStability += 3
if (iCivic1 == 7): #Absolutism #threshold=5, cap=-7
if (pPlayer.getNumCities() <= 5):
iNewBaseStability += 5
else:
iNewBaseStability += max(-7,(5 - pPlayer.getNumCities()))
#print("iNewBaseStability civic single 2",iNewBaseStability, iPlayer)
# if (iCivic0 == 2): #represent
# iNewBaseStability += max(-7,2*(3 - pPlayer.getNumCities()))
# #print("iNewBaseStability civic single 3",iNewBaseStability, iPlayer)
if (iCivic0 == 4): #Republic
iNewBaseStability += max(-5,5 - pPlayer.getNumCities()) #threshold=5, cap=-5
if (iCivic2 == 13): #Totalitarianism
iNewBaseStability += min(10, pPlayer.getNumCities()/5) #slightly counterbalances the effect of number of cities (below)
#print("iNewBaseStability civic single 4",iNewBaseStability, iPlayer)
if (iCivic0 == 3): #Autocracy
iNewBaseStability += 3*teamPlayer.getAtWarCount(True)
#print("iNewBaseStability civic single 5",iNewBaseStability, iPlayer)
if (iCivic0 == 0): #Tyranny
if (self.getStability(iPlayer) < -60):
self.setStability(iPlayer, self.getStability(iPlayer)+20)
#print("iNewBaseStability civic first column 1",iNewBaseStability, iPlayer)
if (iCivic0 == 1): #Hereditary Rule
if (self.getStability(iPlayer) < -50):
self.setStability(iPlayer, -50)
#print("iNewBaseStability civic first column 2",iNewBaseStability, iPlayer)
# if (iCivic0 == 2): #representation
# if (self.getStability(iPlayer) > 30):
# iNewBaseStability += 5
# #print("iNewBaseStability civic first column 3",iNewBaseStability, iPlayer)
if (iCivic0 == 2): #Theocracy
if (self.getStability(iPlayer) < -30):
self.setStability(iPlayer, -30)
if (iCivic0 == 3): #Autocracy
if (self.getStability(iPlayer) < -60):
self.setStability(iPlayer, self.getStability(iPlayer)+30)
#print("iNewBaseStability civic first column 4",iNewBaseStability, iPlayer)
if (iCivic0 == 4): #Republic
if (self.getStability(iPlayer) > 30):
iNewBaseStability += 5
#print("iNewBaseStability civic first column 5",iNewBaseStability, iPlayer)
if (iCivic1 == 9): #Parliament
if (self.getStability(iPlayer) > 50):
iNewBaseStability += 5
if (teamPlayer.isHasTech(con.iDemocracy)):
if (iCivic1 == 9): #Parliament
iNewBaseStability += 3
#print("iNewBaseStability universal suffrage",iNewBaseStability, iPlayer)
# if (iCivic2 != 14): #emancipation
# iNewBaseStability -= 3
# #print("iNewBaseStability emancipation",iNewBaseStability, iPlayer)
if (teamPlayer.isHasTech(con.iLiberalism)):
if (not (iCivic2 == 14 or iCivic2 == 12)): #not Capitalism or Socialism
iNewBaseStability -= 3
#print("iNewBaseStability free speech",iNewBaseStability, iPlayer)
if (teamPlayer.isHasTech(con.iConstitution)):
if (iCivic0 != 4): #Republic
iNewBaseStability -= 3
#print("iNewBaseStability free speech",iNewBaseStability, iPlayer)
if (teamPlayer.isHasTech(con.iMasonry) and not teamPlayer.isHasTech(con.iDemocracy)):
if (iCivic3 == 16): #Serfdom
iNewBaseStability += 3
#print("iNewBaseStability slavery",iNewBaseStability, iPlayer)
if (iCivic3 == 15): #Self-sufficiency
if (teamPlayer.isHasTech(con.iEconomics)):
iNewBaseStability -= 5
#print("iNewBaseStability decentralization",iNewBaseStability, iPlayer)
self.setParameter(iPlayer, iParCivics3, False, iNewBaseStability - iTempCivicThreshold)