for (pLoopDeal = GC.getGameINLINE().firstDeal(&iLoop); pLoopDeal != NULL; pLoopDeal = GC.getGameINLINE().nextDeal(&iLoop))
{
if (((GET_PLAYER(pLoopDeal->getFirstPlayer()).getTeam() == getID()) && (GET_PLAYER(pLoopDeal->getSecondPlayer()).getTeam() == eTeam)) ||
((GET_PLAYER(pLoopDeal->getFirstPlayer()).getTeam() == eTeam) && (GET_PLAYER(pLoopDeal->getSecondPlayer()).getTeam() == getID())))
{
pLoopDeal->kill();
}
}
def onBeginPlayerTurn(self, argsList):
'Called at the beginning of a players turn'
iGameTurn, iPlayer = argsList
## Test ##
if iGameTurn %10 == 8:
pPlayer = gc.getPlayer(iPlayer)
if pPlayer.isHuman():
iTeam = pPlayer.getTeam()
pTeam = gc.getTeam(iTeam)
for iTeamX in xrange(gc.getMAX_CIV_TEAMS()):
pTeamX = gc.getTeam(iTeamX)
if pTeamX.isAlive() and iTeamX != iTeam:
pTeam.declareWar(iTeamX, true, -1)
## Test ##
def onTechAcquired(self, argsList):
'Tech Acquired'
iTechType, iTeam, iPlayer, bAnnounce = argsList
# Note that iPlayer may be NULL (-1) and not a refer to a player object
## Test ##
if iTechType == gc.getInfoTypeForString("TECH_ECOLOGY"):
pTeam = gc.getTeam(iTeam)
for iTeamX in xrange(gc.getMAX_CIV_TEAMS()):
pTeamX = gc.getTeam(iTeamX)
if pTeamX.isAlive() and iTeamX != iTeam:
pTeam.declareWar(iTeamX, true, -1)
## Test ##
<!--
<MovieArtInfo>
<Type>ART_DEF_MOVIE_LEONARDO</Type>
<Path>Art/Movies/Wonders/Leonardos_Workshop.bik</Path>
</MovieArtInfo>
-->
Assert Failed
File: CvXMLLoadUtilitySet.cpp
Line: 1364
Expression: bSuccess
Message:
char szLog[256];
sprintf(szLog, "SetGlobalClassInfo (%s)", szTagName);
PROFILE(szLog);
logMsg(szLog);
// if we successfully locate the tag name in the xml file
if (gDLL->getXMLIFace()->LocateNode(m_pFXml, szTagName))
{
// loop through each tag
do
{
SkipToNextVal(); // skip to the next non-comment node
T* pClassInfo = new T;
FAssert(NULL != pClassInfo);
if (NULL == pClassInfo)
{
break;
}
bool bSuccess = pClassInfo->read(this);
[COLOR="Red"]FAssert(bSuccess);[/COLOR]
if (!bSuccess)
{
delete pClassInfo;
break;
}
<UnitClassUpgrades>
<UnitClassUpgrade>
<UnitClassUpgradeType>UNITCLASS_CUIRASSIER</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
</UnitClassUpgrades>
Normally in XML I comment out like this:
[...]
Is there any other/better way to comment out things in xml? Or is it ok like this?