def reqSpring(caster):
pPlot = caster.plot()
pPlayer = gc.getPlayer(caster.getOwner())
bFlames = false
iX = pPlot.getX()
iY = pPlot.getY()
for iiX in range(iX-1, iX+2, 1):
for iiY in range(iY-1, iY+2, 1):
pPlot2 = CyMap().plot(iiX,iiY)
if pPlot2.getFeatureType() == gc.getInfoTypeForString('FEATURE_FLAMES') or pPlot2.getImprovementType() == gc.getInfoTypeForString('IMPROVEMENT_SMOKE'):
bFlames = true
if bFlames == False:
if pPlot.getTerrainType() != gc.getInfoTypeForString('TERRAIN_DESERT'):
return False
if pPlot.getFeatureType() == gc.getInfoTypeForString('FEATURE_FLOOD_PLAINS'):
return False
if pPlayer.isHuman() == False:
if caster.getOwner() != pPlot.getOwner():
return False
if pPlayer.isHuman() == False:
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_INFERNAL'):
return False
return True
def spellSpring(caster):
pPlot = caster.plot()
if (pPlot.getTerrainType() == gc.getInfoTypeForString('TERRAIN_DESERT') and pPlot.getFeatureType() != gc.getInfoTypeForString('FEATURE_FLOOD_PLAINS')):
pPlot.setTerrainType(gc.getInfoTypeForString('TERRAIN_PLAINS'),True,True)
iX = pPlot.getX()
iY = pPlot.getY()
for iiX in range(iX-1, iX+2, 1):
for iiY in range(iY-1, iY+2, 1):
pPlot2 = CyMap().plot(iiX,iiY)
if pPlot2.getFeatureType() == gc.getInfoTypeForString('FEATURE_FLAMES'):
pPlot2.setFeatureType(-1, -1)
if pPlot2.getImprovementType() == gc.getInfoTypeForString('IMPROVEMENT_SMOKE'):
pPlot2.setImprovementType(-1)