def reqSpring(caster):
pPlot = caster.plot()
pPlayer = gc.getPlayer(caster.getOwner())
bFlames = false
iSciCiv = gc.getInfoTypeForString('CIVILIZATION_SCIONS')
iCiv = pPlayer.getCivilizationType()
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
iOasis = gc.getInfoTypeForString('FEATURE_OASIS')
iX = caster.getX()
iY = caster.getY()
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_MALAKIM'):
for iiX in range(iX-1, iX+2, 1):
for iiY in range(iY-1, iY+2, 1):
pPlot = CyMap().plot(iiX,iiY)
if not pPlot.isNone():
iFeature = pPlot.getFeatureType()
if iFeature == iOasis:
return False
pPlot = caster.plot()
if bFlames == False:
if pPlot.getImprovementType() == gc.getInfoTypeForString('IMPROVEMENT_SWAMP'):
return False
if pPlot.getFeatureType() == gc.getInfoTypeForString('FEATURE_FLOOD_PLAINS'):
if not iCiv == iSciCiv:
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
if pPlot.getImprovementType() != -1 and (gc.getImprovementInfo(pPlot.getImprovementType()).isUnique() == true) :
return false
if (pPlot.isCity () == True) and (pPlot.getTerrainType() == gc.getInfoTypeForString('TERRAIN_MARSH')):
return false
return True
def spellSpring(caster):
pPlot = caster.plot()
pPlayer = gc.getPlayer(caster.getOwner())
iCiv = pPlayer.getCivilizationType ()
iTerrain = pPlot.getTerrainType()
if iTerrain == gc.getInfoTypeForString('TERRAIN_DESERT'):
pPlot.setTerrainType(gc.getInfoTypeForString('TERRAIN_PLAINS'),True,True)
elif iTerrain == gc.getInfoTypeForString('TERRAIN_PLAINS'):
pPlot.setTerrainType(gc.getInfoTypeForString('TERRAIN_GRASS'),True,True)
elif iTerrain == gc.getInfoTypeForString('TERRAIN_GRASS'):
pPlot.setTerrainType(gc.getInfoTypeForString('TERRAIN_MARSH'),True,True)
elif iTerrain == gc.getInfoTypeForString('TERRAIN_FIELDS_OF_PERDITION'):
pPlot.setTerrainType(gc.getInfoTypeForString('TERRAIN_SHALLOWS'),True,True)
elif iTerrain == gc.getInfoTypeForString('TERRAIN_TUNDRA'):
pPlot.setTerrainType(gc.getInfoTypeForString('TERRAIN_MARSH'),True,True)
elif iTerrain == gc.getInfoTypeForString('TERRAIN_MARSH') and (iCiv == iLizCiv1 or iCiv == iLizCiv2) :
pPlot.setImprovementType(gc.getInfoTypeForString('IMPROVEMENT_SWAMP'))
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)