def canBlizzard(self, pPlot, bNew):
iFrozen = gc.getInfoTypeForString('CIVILIZATION_FROZEN')
iBlizzard = gc.getInfoTypeForString('FEATURE_BLIZZARD')
if pPlot.isNone() == False:
#General rules, always followed for both movement and creation
if pPlot.isPeak():
return False
if pPlot.getFeatureType() != -1:
return False
if pPlot.isWater():
return False
#If we're creating a new blizzard, apply extra restrictions:
if bNew == true:
if pPlot.getOwner() != -1:
if (gc.getPlayer(pPlot.getOwner()).getCivilizationType() != iFrozen):
return False
if pPlot.getOwner() == -1:
return False
if pPlot.isCity():
return False
iNumBlizzards = 0
for iX in range(pPlot.getX()-1, pPlot.getX()+2, 1):
for iY in range(pPlot.getY()-1, pPlot.getY()+2, 1):
pRange = CyMap().plot(iX, iY)
if pRange.getFeatureType() == iBlizzard:
iNumBlizzards += 1
if iNumBlizzards > self.iMaxBlizzardsInRange:
return false
return [COLOR="Red"]True[/COLOR]