Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def doPlanarGateChance(self, iPlayer, pCity):
- gc = CyGlobalContext()
- game = CyGame()
- iX = pCity.getX()
- iY = pCity.getY()
- getPlot = CyMap().plot
- if iPlayer == -1:
- pPlayer = gc.getPlayer(game.getActivePlayer())
- else:
- pPlayer = gc.getPlayer(iPlayer)
- iMult = 1
- iHell = 0
- iAC = game.getGlobalCounter()
- if iAC >= 10:
- iMult += 0.15
- if iAC >= 20:
- iMult += 0.15
- if iAC >= 30:
- iMult += 0.15
- if iAC >= 40:
- iMult += 0.15
- if iAC >= 50:
- iMult += 0.15
- if iAC >= 60:
- iMult += 0.15
- if iAC >= 70:
- iMult += 0.15
- if iAC >= 80:
- iMult += 0.15
- if iAC >= 90:
- iMult += 0.15
- if iAC == 100:
- iMult += 0.15
- for iiX,iiY in BFC:
- pLoopPlot = getPlot(iX+iiX,iY+iiY)
- if not pLoopPlot.isNone():
- iTerrain = pLoopPlot.getTerrainType()
- if iTerrain.isHell():
- iHell += 1
- if iHell != 0:
- iMult += iHell * 0.05
- iPlanarGateChance = (self.Defines["Planar Gate"] * iMult)
- iPlanarGateChance = scaleInverse(iPlanarGateChance)
- pCity.setCityCounter(iPlanarGateChance)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement