[to_xp]Gekko
QCT junkie
Crusade got fixed so that it doesn't spawn demagogs from enclaves. but Rally also needs the same fix, if you search for "spellrally" in cvspellinterface.py you'll find the code that needs editing. here's the corrected code for convenience:
there's actually another fix that could be applied here as well, one by Denev that prevents demagogs spawning on the same tile as an enemy unit. search for "doCrusade" in customfunctions.py and you'll find it
Spoiler :
Code:
def spellRally(caster):
iOwner = caster.getOwner()
pPlayer = gc.getPlayer(iOwner)
iDemagog = gc.getInfoTypeForString('UNIT_DEMAGOG')
iTown = gc.getInfoTypeForString('IMPROVEMENT_TOWN')
iVillage = gc.getInfoTypeForString('IMPROVEMENT_VILLAGE')
iCount = 0
for i in range (CyMap().numPlots()):
pPlot = CyMap().plotByIndex(i)
if pPlot.getOwner() == iOwner:
if pPlot.isCity():
newUnit = pPlayer.initUnit(iDemagog, pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_THE_ASHEN_VEIL'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_THE_ASHEN_VEIL'));
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_THE_ORDER'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_THE_ORDER'));
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_FELLOWSHIP_OF_LEAVES'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_FELLOWSHIP_OF_LEAVES'));
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_RUNES_OF_KILMORPH'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_RUNES_OF_KILMORPH'));
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_OCTOPUS_OVERLORDS'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_OCTOPUS_OVERLORDS'));
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_THE_EMPYREAN'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_THE_EMPYREAN'));
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_COUNCIL_OF_ESUS'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_COUNCIL_OF_ESUS'));
if pPlot.getImprovementType() == iTown :
pCity = pPlot.getWorkingCity()
newUnit = pPlayer.initUnit(iDemagog, pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_THE_ASHEN_VEIL'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_THE_ASHEN_VEIL'));
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_THE_ORDER'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_THE_ORDER'));
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_FELLOWSHIP_OF_LEAVES'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_FELLOWSHIP_OF_LEAVES'));
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_RUNES_OF_KILMORPH'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_RUNES_OF_KILMORPH'));
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_OCTOPUS_OVERLORDS'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_OCTOPUS_OVERLORDS'));
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_THE_EMPYREAN'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_THE_EMPYREAN'));
if pPlayer.getStateReligion() == gc.getInfoTypeForString ('RELIGION_COUNCIL_OF_ESUS'):
newUnit.setReligion (gc.getInfoTypeForString ('RELIGION_COUNCIL_OF_ESUS'));
pPlot.setImprovementType(iVillage)
there's actually another fix that could be applied here as well, one by Denev that prevents demagogs spawning on the same tile as an enemy unit. search for "doCrusade" in customfunctions.py and you'll find it
