xienwolf
Deity
Shouldn't work. gc.getBARBARIAN_PLAYER will give you an INT, not a Pointer. So you'd need gc.getPlayer(gc.getBARBARIAN_PLAYER) to be able to check equality. Or at least ought to.
for iPlayer in range(gc.getMAX_PLAYERS()):
pOtherPlayer = gc.getPlayer(iPlayer)
eOtherTeam = TeamTypes(pOtherPlayer.getTeam())
if (pOtherPlayer.isAlive()):
[b]if pOtherPlayer != gc.getPlayer(gc.getBARBARIAN_PLAYER()):[/b]
if gc.getTeam(pPlayer.getTeam()).isHasMet(eOtherTeam):
listPlayers.append(pOtherPlayer)
pCity = listPlayers[iGift].getCapitalCity()
Code:[b]if pOtherPlayer != gc.getPlayer(gc.getBARBARIAN_PLAYER()):[/b]
for iPlayer in range(gc.getMAX_CIV_PLAYERS()):
You should use : /snip/
def MIT0(pCaster):
if CyGame().getSorenRandNum(100, "Check") <= 50:
for iPlayer in range(gc.getMAX_CIV_PLAYERS()):
pPlayer = gc.getPlayer(iPlayer)
if (pPlayer.isAlive()):
if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_SCIONS'):
pCity = pPlayer.getCapitalCity()
newUnit = pPlayer.initUnit(gc.getInfoTypeForString('UNIT_MIT0'), pCity.getX(), pCity.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
else:
listPlayers = []
for iPlayer in range(gc.getMAX_CIV_PLAYERS()):
pPlayer = gc.getPlayer(iPlayer)
eOtherTeam = TeamTypes(pPlayer.getTeam())
if (pPlayer.isAlive()):
if gc.getTeam(pPlayer.getTeam()).isHasMet(eOtherTeam):
listPlayers.append(pPlayer)
iGift = CyGame().getSorenRandNum(len(listPlayers) * 1, "Gift")
pCity = listPlayers[iGift].getCapitalCity()
pPlayer = listPlayers[iGift]
newUnit = pPlayer.initUnit(gc.getInfoTypeForString('UNIT_MIT0'), pCity.getX(), pCity.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
Sending the kill command on the unit cleans it up, if that is what you mean?
<Alignment>ALIGNMENT_NEUTRAL</Alignment>
<AlignmentBest>ALIGNMENT_GOOD</AlignmentBest>
<AlignmentWorst>ALIGNMENT_EVIL</AlignmentWorst>
<ReligionWeightModifiers>
<ReligionWeightModifier>
<ReligionType>RELIGION_THE_EMPYREAN</ReligionType>
<iWeightModifier>-100</iWeightModifier>
</ReligionWeightModifier>
<ReligionWeightModifier>
<ReligionType>RELIGION_THE_ORDER</ReligionType>
<iWeightModifier>-100</iWeightModifier>
</ReligionWeightModifier>
</ReligionWeightModifiers>
There's no file called CyInfos.h, DLL export I believe is for exposing functions to the exe and getTier is exposed to python in CyInfoInterface1.cpp.
if (GC.getSpellInfo(eSpell).getBuildingClassOwnedPrereq() != NO_BUILDINGCLASS)
{
if (GET_PLAYER(getOwnerINLINE()).getBuildingClassCount((BuildingClassTypes)GC.getSpellInfo(eSpell).getBuildingClassOwnedPrereq()))
{
return false;
}
}
if (GC.getSpellInfo(eSpell).getBuildingClassOwnedPrereq() != NO_BUILDINGCLASS)
{
if (GET_PLAYER(getOwnerINLINE()).getBuildingClassCount((BuildingClassTypes)GC.getSpellInfo(eSpell).getBuildingClassOwnedPrereq())[COLOR="Lime"] == 0[/COLOR])
{
return false;
}
}