noobyproblem def cannotfoundcity -> defeated on gamestart

Ploeperpengel

academic precarity
Joined
Feb 2, 2006
Messages
4,748
Location
Berlin
I get defeated on gamestart with this. Can anyone help me to get this working?
Code:
    def cannotFoundCity(self,argsList):
	iPlayer, iPlotX, iPlotY = argsList
	pPlot = CyMap().plot(iPlotX,iPlotY)
#Ploep disallow dwarves founding cities on flatlands
	pPlayer = gc.getPlayer(iPlayer)
	if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_DWARVES') and pPlot.getTerrainType() != gc.getInfoTypeForString('TERRAIN_HILL'):
		return True
        return False 
#end modify
 
I don't know if this is the cause of the bug , but TERRAIN_HILL is for graphical only so pPlot.getTerrainType() will never be TERRAIN_HILL . Perhaps the game defeat you if you can't found a city anywhere you should try pPlot.getPlotType() != PlotTypes.PLOT_HILLS .

Tcho !


Edit : "not pPlot.isHills()" should be better than "pPlot.getPlotType() != PlotTypes.PLOT_HILLS" ( i even don't remember if this works )
 
Back
Top Bottom