Mazatl: Feedback, and general questions

You can cannibalize that from the original spring code... Have to check for an improvement, since that's technically what flames are.

Unless you made major changes in FF recently of which I am not aware, Flames are Features, not Improvements. Smoke is an Improvement.
 
Does anyone else think the Lizards could use bodypaint, as well as a separation of various lizard races?

Like Iguana, Chameleon, and Komodo ... instead of all skinks/anoles.

not as separate promos, just the art.
 
Since Valkrionn was kind enough to point out my flawed python attempt... :p


Here is a fixed version. Even has the swamp functionality for lizards.


Code:
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)
 
Eh, I knew one of them was an improvement. :lol:

But yeah, that looks right. :goodjob: Your original code would have put out fires, but only if you were on a tile that could be sprung.


Only problem with the new version is that it shows Spring as valid to cast while standing on a Marsh...which is really only true if you are a lizard.

I might take a stab at fixing that, but not a major issue.
 
Back
Top Bottom