Advertisement
Guest User

Untitled

a guest
May 24th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 KB | None | 0 0
  1. def doPlanarGateChance(self, iPlayer, pCity):
  2.     gc          = CyGlobalContext()
  3.     game        = CyGame()
  4.     if iPlayer == -1:
  5.         pPlayer = gc.getPlayer(game.getActivePlayer())
  6.     else:
  7.         pPlayer = gc.getPlayer(iPlayer)
  8.     iMult = 1
  9.     iAC = game.getGlobalCounter()
  10.     if iAC >= 10:
  11.         iMult += 0.15
  12.     if iAC >= 20:
  13.         iMult += 0.15
  14.     if iAC >= 30:
  15.         iMult += 0.15
  16.     if iAC >= 40:
  17.         iMult += 0.15
  18.     if iAC >= 50:
  19.         iMult += 0.15
  20.     if iAC >= 60:
  21.         iMult += 0.15
  22.     if iAC >= 70:
  23.         iMult += 0.15
  24.     if iAC >= 80:
  25.         iMult += 0.15
  26.     if iAC >= 90:
  27.         iMult += 0.15
  28.     if iAC == 100:
  29.         iMult += 0.15
  30.    
  31.     iPlanarGateChance = (self.Defines["Planar Gate"] * iMult)
  32.     iPlanarGateChance = scaleInverse(iPlanarGateChance)
  33.    
  34.     pCity.setCityCounter(iPlanarGateChance)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement