AttackonJot_Titan
Chieftain
- Joined
- Aug 9, 2020
- Messages
- 46
It's still demanding I put the code in SpellInterface...
def enterThePlane(pCaster):
pPlayer = gc.getPlayer(pCaster.getOwner())
if pCaster.isHasPromotion(getInfoType('PROMOTION_PLANESWALKER')) == True:
newUnit = pPlayer.initUnit(pCaster.getUnitType(), pCaster.getX(), pCaster.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
for iProm in range(gc.getNumPromotionInfos()):
if (pCaster.isHasPromotion(iProm) and not gc.getPromotionInfo(iProm).isEquipment()):
iPromCount = pCaster.countHasPromotion(iProm)
for i in xrange(iPromCount):
newUnit.setHasPromotion(iProm, True)
newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ASTRAL_PLANE'), True)
newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_PLANESWALKER'), False)
newUnit.setLevel(pCaster.getLevel())
newUnit.setExperienceTimes100(pCaster.getExperienceTimes100(), -1)
newUnit.setDamage(95, -1)
calling it with <PythonOnDeath> in UnitInfos
def enterThePlane(pCaster):
pPlayer = gc.getPlayer(pCaster.getOwner())
if pCaster.isHasPromotion(getInfoType('PROMOTION_PLANESWALKER')) == True:
newUnit = pPlayer.initUnit(pCaster.getUnitType(), pCaster.getX(), pCaster.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
for iProm in range(gc.getNumPromotionInfos()):
if (pCaster.isHasPromotion(iProm) and not gc.getPromotionInfo(iProm).isEquipment()):
iPromCount = pCaster.countHasPromotion(iProm)
for i in xrange(iPromCount):
newUnit.setHasPromotion(iProm, True)
newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ASTRAL_PLANE'), True)
newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_PLANESWALKER'), False)
newUnit.setLevel(pCaster.getLevel())
newUnit.setExperienceTimes100(pCaster.getExperienceTimes100(), -1)
newUnit.setDamage(95, -1)
calling it with <PythonOnDeath> in UnitInfos