xienwolf
Deity
If there is one it should be in the Callback Defines, Assets/XML
void CyCity::setBuildingCommerceChange(int /*BuildingClassTypes*/ eBuildingClass, int /*CommerceTypes*/ eCommerce, int iChange)
def spellEdgeOfExtinction(caster):
gc.getGame().changeScenarioCounter(CyGame().getGameTurn())
message = "Debug Counter: %d" %(gc.getGame().getScenarioCounter())
CyInterface().addImmediateMessage(message,"")
for iPlayer in range(gc.getMAX_PLAYERS()):
pPlayer2 = gc.getPlayer(iPlayer)
if pPlayer2.isAlive():
if pPlayer2.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_NGOMELE'):
if pPlayer2.isFeatAccomplished(FeatTypes.FEAT_GLOBAL_SPELL) == True:
iCurrentTurn = CyGame().getGameTurn()
iElapsed = iCurrentTurn - gc.getGame().getScenarioCounter()
iDuration = 20
if CyGame().getGameSpeedType() == gc.getInfoTypeForString('GAMESPEED_QUICK'):
iDuration = iDuration / 3 * 2
if CyGame().getGameSpeedType() == gc.getInfoTypeForString('GAMESPEED_EPIC'):
iDuration = iDuration * 3 / 2
if CyGame().getGameSpeedType() == gc.getInfoTypeForString('GAMESPEED_MARATHON'):
iDuration = iDuration * 3
if iElapsed < iDuration:
for iProm in range(gc.getNumPromotionInfos()):
if pLoser.isHasPromotion(iProm):
if gc.getPromotionInfo(iProm).isRace():
iX = pLoser.getX()
iY = pLoser.getY()
for iiX in range(iX-3,iX+4,1):
for iiY in range(iY-3,iY+4,1):
pPlot = CyMap().plot(iiX, iiY)
for iUnitLoop in range(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(iUnitLoop)
if pUnit.isHasPromotion(iProm):
pUnit.doDamage(40, 95, pWinner, gc.getInfoTypeForString('DAMAGE_PHYSICAL'), false)
iRnd = CyGame().getSorenRandNum(1000, "Domino")
if iRnd == 1:
pUnit.kill(True, 0)
if gc.getGame().getScenarioCounter() != 0:
iTurnCasted = gc.getGame().getScenarioCounter()
iCurrentTurn = CyGame().getGameTurn()
iElapsed = iCurrentTurn - iTurnCasted
iDuration = 20
if CyGame().getGameSpeedType() == gc.getInfoTypeForString('GAMESPEED_QUICK'):
iDuration = iDuration / 3 * 2
if CyGame().getGameSpeedType() == gc.getInfoTypeForString('GAMESPEED_EPIC'):
iDuration = iDuration * 3 / 2
if CyGame().getGameSpeedType() == gc.getInfoTypeForString('GAMESPEED_MARATHON'):
iDuration = iDuration * 3
if iElapsed < iDuration:
iCountSpecial += 1
iRemaining = iDuration - iElapsed
szBuffer = u"<font=2>"
szName = "EdgeOfExtinctionTag"
szBuffer = szBuffer + localText.getColorText("TXT_KEY_MESSAGE_EDGE_OF_EXTINCTION", (iRemaining, ()), gc.getInfoTypeForString("COLOR_RED"))
szBuffer = szBuffer + "</font>"
screen.setText( szName, "Background", szBuffer, CvUtil.FONT_RIGHT_JUSTIFY, xResolution - 12, yCoord - ((iCount + iCountSpecial) * iBtnHeight), -0.3, FontTypes.SMALL_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
screen.show( szName )
if CyGame().getWBMapScript():
szName = "GoalTag"
screen.hide( szName )
szName = "CutLosersTag"
screen.hide( szName )
szName = "DifficultyTag"
screen.hide( szName )
szName = "HighToLowTag"
screen.hide( szName )
szName = "DisableProductionTag"
screen.hide( szName )
szName = "DisableResearchTag"
screen.hide( szName )
szName = "DisableSpellcastingTag"
screen.hide( szName )
# Ngomele start
szName = "EdgeOfExtinctionTag"
screen.hide( szName )
# Ngomele end