Azurian
The Azurian
Have you made a Pedia screen for Buildings that shows what buildings a building upgrades from and what it upgrades to? Similiar to the the Technology Pedia screen that shows tech prereqs and what the Tech leads to?
I official request a Building version, you will be a godsend.
I think you can shrink the Building preview for space.
Even Leads To us enough. The template modified would be the Caveman 2 Cosmos Building Pediatric Screen.
All I'm asking is:
Requires :
Leads to:
I think 2 or 3 icons showing is enough lol.
Refer to the other thread... already done lol
## Catacombs Start ##
iPlayer2 = pLoser.getOwner()
pPlayer2 = gc.getPlayer(iPlayer2)
if pPlayer2.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_CATACOMBS")) == 1:
pPlot2 = pLoser.plot()
if pPlot2.isCity() and pPlot2.getOwner() == iPlayer2:
obsoleteTech = gc.getBuildingInfo(gc.getInfoTypeForString("BUILDING_CATACOMBS")).getObsoleteTech()
pTeam2 = gc.getTeam(pPlayer2.getTeam())
if pTeam2.isHasTech(obsoleteTech) == false or obsoleteTech == -1:
if pLoser.getUnitCombatType() != -1 and pLoser.getDomainType() == gc.getInfoTypeForString("DOMAIN_LAND"):
if CyGame().getSorenRandNum(10, "die together") < int(pWinner.getDamage()/25):
pWinner.setDamage(100, False)
CyInterface().addMessage(iPlayer2,true,20,CyTranslator().getText("TXT_MASS_BURIAL",(pWinner.getName(),pLoser.getName(),)),'',0,'',-1,-1,-1, true,true)
CyInterface().addMessage(pWinner.getOwner(),true,20,CyTranslator().getText("TXT_MASS_BURIAL",(pWinner.getName(),pLoser.getName(),)),'',0,'',-1,-1,-1, true,true)
## Catacombs End ##
def getBuildingCostMod(self, argsList):
iPlayer, iCityID, iBuilding = argsList
pPlayer = gc.getPlayer(iPlayer)
pCity = pPlayer.getCity(iCityID)
pTeam = gc.getTeam(pPlayer.getTeam())
iCostMod = -1 # Any value > 0 will be used
Discount = 0
## Apadana Palace Start ##
if [COLOR="Red"]pTeam[/COLOR].getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_APADANA_PALACE")) == 1:
obsoleteTech = gc.getBuildingInfo(gc.getInfoTypeForString("BUILDING_APADANA_PALACE")).getObsoleteTech()
if gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == false or obsoleteTech == -1:
capital = pPlayer.getCapitalCity()
if capital.getNumActiveBuilding(iBuilding) == 1 and not pCity.isCapital():
return 80
## Platyping Wonders End ##
return iCostMod
## Great Mosque of Djenne Start ##
if bSuccess:
pPlayer = gc.getPlayer(pUnit.getOwner())
if pPlayer.getBuildingClassCount(gc.getInfoTypeForString([COLOR="Red"]"BUILDING_THE_GREAT_MOSQUE"[/COLOR])):
(loopCity, iter) = pPlayer.firstCity(false)
while(loopCity):
if loopCity.getNumActiveBuilding(gc.getInfoTypeForString("BUILDING_THE_GREAT_MOSQUE")):
pNewUnit = pPlayer.initUnit(pUnit.getUnitType(), loopCity.getX(), loopCity.getY(), UnitAITypes.UNITAI_MISSIONARY, DirectionTypes.NO_DIRECTION)
pNewUnit.finishMoves()
break
(loopCity, iter) = pPlayer.nextCity(iter, false)
## Great Mosque of Djenne End ##
## AI Entity Start ##
if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_AI_ENTITY")) == 1:
if CyGame().getSorenRandNum(25, "Rampage") == 0:
pPlayer.changeAnarchyTurns(5)
if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_GREAT_WALL")) == 0:
bPlayer = gc.getPlayer(gc.getBARBARIAN_PLAYER())
(loopCity, iter) = pPlayer.firstCity(false)
while(loopCity):
for x in range(loopCity.getX() - 1, loopCity.getX() + 2):
for y in range(loopCity.getY() - 1, loopCity.getY() + 2):
pPlot = CyMap().plot(x,y)
if not pPlot.isWater() and not pPlot.isCity() and not pPlot.isImpassable():
if CyGame().getSorenRandNum(3, "Rampage") == 0:
for i in range(3):
pNewUnit = bPlayer.initUnit(gc.getInfoTypeForString("UNIT_ASSAULT_MECH"), x, y, UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)
(loopCity, iter) = pPlayer.nextCity(iter, false)
CyInterface().addMessage(iPlayer,true,15,CyTranslator().getText("TXT_AI_RAMPAGE",()),'',0,'',-1,-1,-1, true,true)
Troublesome.
In short:
onEndGameTurn:
1) Loop through all teams, if one of them has AI Entity, do step 2
2) Loop through all players, if team has great wall or AI Entity, ignore this team
3) Else, loop through all cities, spawn barbs.
## AI Entity Start ##
if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_AI_ENTITY")) == 1:
if CyGame().getSorenRandNum(2, "Rampage") == 0:
for iPlayerX in xrange(gc.getMAX_CIV_PLAYERS()):
pPlayerX = gc.getPlayer(iPlayerX)
if pPlayerX.isAlive() and iPlayerX != pPlayer:
pPlayerX.changeAnarchyTurns(5)
if pPlayerX.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_GREAT_WALL")) == 0:
bPlayer = gc.getPlayer(gc.getBARBARIAN_PLAYER())
(loopCity, iter) = pPlayerX.firstCity(false)
while(loopCity):
for x in range(loopCity.getX() - 1, loopCity.getX() + 2):
for y in range(loopCity.getY() - 1, loopCity.getY() + 2):
pPlot = CyMap().plot(x,y)
if not pPlot.isWater() and not pPlot.isCity() and not pPlot.isImpassable():
if CyGame().getSorenRandNum(3, "Rampage") == 0:
for i in range(3):
pNewUnit = bPlayer.initUnit(gc.getInfoTypeForString("UNIT_ASSAULT_MECH"), x, y, UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)
(loopCity, iter) = pPlayerX.nextCity(iter, false)
CyInterface().addMessage(iPlayer,true,15,CyTranslator().getText("TXT_AI_RAMPAGE",()),'',0,'',-1,-1,-1, true,true)