Paramander and metal promotions issue
Issue #93
resolved
After the change in #83, paramanders can get two different metal promotions.
Comments (3)
-
reporter -
reporter # Paramander with metal weapons fix if unit.getUnitType() == gc.getInfoTypeForString('UNIT_PARAMANDER'): iBronze = gc.getInfoTypeForString('PROMOTION_BRONZE_WEAPONS') iIron = gc.getInfoTypeForString('PROMOTION_IRON_WEAPONS') iMithril = gc.getInfoTypeForString('PROMOTION_MITHRIL_WEAPONS') if pCity.hasBonus(gc.getInfoTypeForString('BONUS_MITHRIL'): unit.setHasPromotion(iBronze, False) unit.setHasPromotion(iIron, False) unit.setHasPromotion(iMithril, True) else: unit.setHasPromotion(iBronze, False) unit.setHasPromotion(iIron, True) unit.setHasPromotion(iMithril, False)
-
reporter - changed status to resolved
- Log in to comment
Since the DLL code that handles weapons seems to be messing up when a unit starts with a metal weapon promotion (probably because it is being run before the unit actually gets its free promotions), it may be better to handle Paramander metal weapons in python code in CvEventManager.py (onUnitBuilt). This function would take care of fixing the messed up metal weapon promotions for Paramanders if they are built in a city.