Alrik2002
Warlord
Ok. I´ve tried to change the Bell Rock Lighthouse. For the code in OnCityAcquired, I´m unsure how to deal with pPlayer2. I´ve tried this (added/changed parts in red):
Should that be ok?
Code:
## Bell Rock LighthouseStart ##
if pCity.getNumActiveBuilding(gc.getInfoTypeForString("BUILDING_BELL_ROCK_LIGHTHOUSE")):
for x in xrange (pCity.getX() - 1, pCity.getX() +2):
for y in xrange (pCity.getY() - 1, pCity.getY() +2):
pPlot = CyMap().plot(x,y)
pPlot.changeVisibilityCount(iTeam, -1, 0)
[COLOR="Red"]for iPlayerX in xrange(gc.getMAX_CIV_PLAYERS()):
pPlayerX = gc.getPlayer(iPlayerX)
if pPlayerX.isAlive() and pPlayerX.getTeam() == iTeam:[/COLOR]
(loopCity, iter) = pPlayer[COLOR="Red"]X[/COLOR].firstCity(false)
while(loopCity):
if loopCity.isCoastal(10):
for x in xrange (loopCity.getX() - 1, loopCity.getX() +2):
for y in xrange (loopCity.getY() - 1, loopCity.getY() +2):
pPlot = CyMap().plot(x,y)
pPlot.changeVisibilityCount(iTeam, -1, 0)
(loopCity, iter) = pPlayer[COLOR="Red"]X[/COLOR].nextCity(iter, false)
[COLOR="Red"]for iPlayerX2 in xrange(gc.getMAX_CIV_PLAYERS()):
pPlayerX2 = gc.getPlayer(iPlayerX2)
if pPlayerX2.isAlive() and pPlayerX2.getTeam() == iTeam:[/COLOR]
(loopCity, iter) = pPlayer[COLOR="Red"]X[/COLOR]2.firstCity(false)
while(loopCity):
if loopCity.isCoastal(10):
for x in xrange (loopCity.getX() - 1, loopCity.getX() +2):
for y in xrange (loopCity.getY() - 1, loopCity.getY() +2):
pPlot = CyMap().plot(x,y)
pPlot.changeVisibilityCount(iTeam2, 1, 0)
(loopCity, iter) = pPlayer[COLOR="Red"]X[/COLOR]2.nextCity(iter, false)
else:
if p[COLOR="Red"]Team[/COLOR].getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_BELL_ROCK_LIGHTHOUSE")) == 1:
for x in xrange (pCity.getX() - 1, pCity.getX() +2):
for y in xrange (pCity.getY() - 1, pCity.getY() +2):
pPlot = CyMap().plot(x,y)
pPlot.changeVisibilityCount(iTeam, -1, 0)
if p[COLOR="Red"]Team[/COLOR]2.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_BELL_ROCK_LIGHTHOUSE")) == 1:
for x in xrange (pCity.getX() - 1, pCity.getX() +2):
for y in xrange (pCity.getY() - 1, pCity.getY() +2):
pPlot = CyMap().plot(x,y)
pPlot.changeVisibilityCount(iTeam2, 1, 0)
Should that be ok?