Opera
Deity
- Joined
- Sep 21, 2008
- Messages
- 4,643
Code:
def checkIsComplete(pCaster):
pPlot = pCaster.plot()
iBanung = gc.getInfoTypeForString('UNIT_BANUNG_THE_BLIND')
iNga = gc.getInfoTypeForString('UNIT_NGA_EYE_EATER')
if pCaster.getUnitType() == iNga:
for i in range(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if (pCaster.getOwner() == pUnit.getOwner and pUnit.getUnitType() == iBanung):
pCaster.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LONELY_NGA'), false)
pCaster.setHasPromotion(gc.getInfoTypeForString('PROMOTION_COMPLETE_NGA'), true)
if pCaster.getUnitType() == iBanung:
for i in range(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if (pCaster.getOwner() == pUnit.getOwner and pUnit.getUnitType() == iNga):
pCaster.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LONELY_BANUNG'), false)
pCaster.setHasPromotion(gc.getInfoTypeForString('PROMOTION_COMPLETE_BANUNG'), true)
def checkIsLonely(pCaster):
pPlot = pCaster.plot()
iBanung = gc.getInfoTypeForString('UNIT_BANUNG_THE_BLIND')
iNga = gc.getInfoTypeForString('UNIT_NGA_EYE_EATER')
bLonely = true
if pCaster.getUnitType() == iNga:
for i in range(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if (pCaster.getOwner() == pUnit.getOwner and pUnit.getUnitType() == iBanung):
bLonely = false
if bLonely == true:
pCaster.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LONELY_NGA'), true)
pCaster.setHasPromotion(gc.getInfoTypeForString('PROMOTION_COMPLETE_NGA'), false)
if pCaster.getUnitType() == iBanung:
for i in range(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if (pCaster.getOwner() == pUnit.getOwner and pUnit.getUnitType() == iNga):
bLonely = false
if bLonely == true:
pCaster.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LONELY_BANUNG'), true)
pCaster.setHasPromotion(gc.getInfoTypeForString('PROMOTION_COMPLETE_BANUNG'), false)
