def onUnitPillage(self, argsList):
'Unit pillages a plot'
pUnit, iImprovement, iRoute, iOwner = argsList
iPlotX = pUnit.getX()
iPlotY = pUnit.getY()
pPlot = CyMap().plot(iPlotX, iPlotY)
# Legion
iSlave = gc.getInfoTypeForString('UNIT_SLAVE')
if eTeam.isHasTech(gc.getInfoTypeForString('TECH_LEGION')):
i = 3
for i in range( i > CyGame().getSorenRandNum(4, "Create Slaves")):
spawnUnit = pPlayer.initUnit(iSlave, UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
# End Legion
if (not self.__LOG_UNITPILLAGE):
return
CvUtil.pyPrint("Player %d's %s pillaged improvement %d and route %d at plot at (%d, %d)"
%(iOwner, PyInfo.UnitInfo(pUnit.getUnitType()).getDescription(), iImprovement, iRoute, iPlotX, iPlotY))