Kael
Deity
I tested the following and it works:
The big change was that that before the unit was being init'ed on PlayerY instead of pLPlayer.
Code:
pLPlayer = gc.getPlayer(pLoser.getOwner())
iDiseased = gc.getInfoTypeForString('PROMOTION_DISEASED')
iPlagued = gc.getInfoTypeForString('PROMOTION_PLAGUED')
iDiseasedCorpse = gc.getInfoTypeForString('UNIT_DISEASED_CORPSE')
if (pLPlayer.getCivics(gc.getInfoTypeForString('CIVICOPTION_COMPASSION')) == gc.getInfoTypeForString('CIVIC_SACRIFICE_THE_WEAK')):
if pLoser.isHasPromotion(iDiseased) or pLoser.isHasPromotion(iPlagued):
if (pLoser.getUnitType() != iDiseasedCorpse):
if CyGame().getSorenRandNum(100, "Maniac") <= 33:
pPlot = cf.FFHFindClearPlot(pLoser, -1)
if pPlot != -1:
newUnit = pLPlayer.initUnit(iDiseasedCorpse, pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI)
CyInterface().addMessage(pWinner.getOwner(),True,25,'A Diseased Corpse arises from our slain enemies.','AS2D_DISCOVERBONUS',1,'Art/Interface/Buttons/Units/Diseasedcorpse.dds',ColorTypes(8),pPlot.getX(),pPlot.getY(),True,True)
CyInterface().addMessage(pLoser.getOwner(),True,25,'A Diseased Corpse arises from the battlefield.','AS2D_DISCOVERBONUS',1,'Art/Interface/Buttons/Units/Diseasedcorpse.dds',ColorTypes(8),pPlot.getX(),pPlot.getY(),True,True)
newUnit.finishMoves()
The big change was that that before the unit was being init'ed on PlayerY instead of pLPlayer.