Pazyryk
Deity
- Joined
- Jun 13, 2008
- Messages
- 3,584
I noticed that the spell sactify does not give credit for Armageddon reduction to the casting civilization. The problem is the use of CyGame().changeGlobalCounter(iChange) rather than pPlayer.changeGlobalCounterContrib(iChange)
Change this to the following to give credit for Amageddon changes:
Other places that this occurs:
spellPeace
spellPeaceSevenPines
spellRobGrave
onSetPlayerAlive
onImprovementDestroyed (Necrototem ...senario only?)
Code:
def spellSanctify(caster):
pPlot = caster.plot()
if pPlot.getFeatureType() == gc.getInfoTypeForString('FEATURE_FALLOUT'):
pPlot.setFeatureType(-1, -1)
if pPlot.getFeatureType() == gc.getInfoTypeForString('FEATURE_HAUNTED_LANDS'):
pPlot.setFeatureType(-1, -1)
if pPlot.getImprovementType() == gc.getInfoTypeForString('IMPROVEMENT_CITY_RUINS'):
pPlot.setImprovementType(-1)
CyGame().changeGlobalCounter(-1)
if pPlot.getImprovementType() == gc.getInfoTypeForString('IMPROVEMENT_HAUNTED_RUINS'):
pPlot.setImprovementType(-1)
CyGame().changeGlobalCounter(-1)
if pPlot.getImprovementType() == gc.getInfoTypeForString('IMPROVEMENT_GRAVEYARD'):
pPlot.setImprovementType(-1)
CyGame().changeGlobalCounter(-1)
pPlayer = gc.getPlayer(caster.getOwner())
newUnit = pPlayer.initUnit(gc.getInfoTypeForString('UNIT_EINHERJAR'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
...
Change this to the following to give credit for Amageddon changes:
Code:
def spellSanctify(caster):
pPlot = caster.plot()
pPlayer = gc.getPlayer(caster.getOwner())
if pPlot.getFeatureType() == gc.getInfoTypeForString('FEATURE_FALLOUT'):
pPlot.setFeatureType(-1, -1)
if pPlot.getFeatureType() == gc.getInfoTypeForString('FEATURE_HAUNTED_LANDS'):
pPlot.setFeatureType(-1, -1)
if pPlot.getImprovementType() == gc.getInfoTypeForString('IMPROVEMENT_CITY_RUINS'):
pPlot.setImprovementType(-1)
pPlayer.changeGlobalCounterContrib(-1)
if pPlot.getImprovementType() == gc.getInfoTypeForString('IMPROVEMENT_HAUNTED_RUINS'):
pPlot.setImprovementType(-1)
pPlayer.changeGlobalCounterContrib(-1)
if pPlot.getImprovementType() == gc.getInfoTypeForString('IMPROVEMENT_GRAVEYARD'):
pPlot.setImprovementType(-1)
pPlayer.changeGlobalCounterContrib(-1)
newUnit = pPlayer.initUnit(gc.getInfoTypeForString('UNIT_EINHERJAR'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
...
Other places that this occurs:
spellPeace
spellPeaceSevenPines
spellRobGrave
onSetPlayerAlive
onImprovementDestroyed (Necrototem ...senario only?)