コード例 #1
0
    def drawContents(self):

        screen = self.getScreen()
        self.deleteAllWidgets()

        BUTTON_SIZE = 48

        # +++ 1 +++ Units with trade routes
        lTradeUnitsLand = [
            gc.getInfoTypeForString("UNIT_TRADE_MERCHANT"),
            gc.getInfoTypeForString("UNIT_CARAVAN")
        ]
        lTradeUnitsSea = [
            gc.getInfoTypeForString("UNIT_TRADE_MERCHANTMAN"),
            gc.getInfoTypeForString("UNIT_GAULOS"),
            gc.getInfoTypeForString("UNIT_CARVEL_TRADE")
        ]

        list1 = []
        list2 = []

        pPlayer = gc.getPlayer(CyGame().getActivePlayer())
        (unit, pIter) = pPlayer.firstUnit(False)
        while unit:
            if unit.getUnitType() in lTradeUnitsLand:
                if int(CvUtil.getScriptData(unit, ["autA"], 0)):
                    list1.append(unit)
            elif unit.getUnitType() in lTradeUnitsSea:
                if int(CvUtil.getScriptData(unit, ["autA"], 0)):
                    list2.append(unit)

            (unit, pIter) = pPlayer.nextUnit(pIter, False)

        # Zeige zuerst Landeinheiten, danach Schiffe
        lHandelseinheiten = list1 + list2

        iY = 80
        i = 0

        iRange = len(lHandelseinheiten)
        if iRange == 0:
            szText = localText.getText("TXT_KEY_TRADE_ADVISOR_INFO2", ())
            screen.setLabel("Label1_"+str(i), "Background", u"<font=3>" + szText + u"</font>", CvUtil.FONT_LEFT_JUSTIFY, 100, iY+20, 0.0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
        else:
            for j in xrange(iRange):
                pUnit = lHandelseinheiten[j]

                screen.addPanel( "PanelBG_"+str(i), u"", u"", True, False, 40, iY, 935, 51, PanelStyles.PANEL_STYLE_MAIN_BLACK25 )
                iY += 4

                # Button unit
                screen.setImageButton("L1_"+str(i), pUnit.getButton(), 50, iY, BUTTON_SIZE, BUTTON_SIZE, WidgetTypes.WIDGET_GENERAL, 1, pUnit.getID())

                # Unit name
                szText = pUnit.getName()
                screen.setLabel("L2_"+str(i), "Background", u"<font=3>" + szText + u"</font>", CvUtil.FONT_LEFT_JUSTIFY, 100, iY+5, 0.0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )

                # Unit load
                szText = localText.getText("TXT_UNIT_INFO_BAR_5", ()) + u" "
                iValue1 = CvUtil.getScriptData(pUnit, ["b"], -1)
                if iValue1 != -1:
                    sBonusDesc = gc.getBonusInfo(iValue1).getDescription()
                    iBonusChar = gc.getBonusInfo(iValue1).getChar()
                    szText += localText.getText("TXT_UNIT_INFO_BAR_4", (iBonusChar,sBonusDesc))
                else:
                    szText += localText.getText("TXT_KEY_NO_BONUS_STORED", ())

                screen.setLabel("L3_"+str(i), "Background", u"<font=3>" + szText + u"</font>", CvUtil.FONT_LEFT_JUSTIFY, 100, iY+24, 0.0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )

                # City 1
                iCityX = int(CvUtil.getScriptData(pUnit, ["autX1"], -1))
                iCityY = int(CvUtil.getScriptData(pUnit, ["autY1"], -1))
                tmpPlot = CyMap().plot(iCityX, iCityY)
                if tmpPlot and not tmpPlot.isNone() and tmpPlot.isCity():
                    szText = tmpPlot.getPlotCity().getName()
                    if tmpPlot.getOwner() == CyGame().getActivePlayer(): iTmpX = 470
                    else: iTmpX = 500
                    screen.setLabel("L4_"+str(i), "Background", u"<font=3>" + szText + u"</font>", CvUtil.FONT_RIGHT_JUSTIFY, iTmpX, iY+5, 0.0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
                if tmpPlot.getOwner() != -1:
                    iCiv = gc.getPlayer(tmpPlot.getOwner()).getCivilizationType()
                    # Flagge
                    if tmpPlot.getOwner() == CyGame().getActivePlayer():
                      screen.addFlagWidgetGFC("L5_"+str(i), 480, iY, 24, 54, tmpPlot.getOwner(), WidgetTypes.WIDGET_FLAG, tmpPlot.getOwner(), -1)
                    # Civ-Button
                    else:
                      screen.setImageButton("L5_"+str(i), gc.getCivilizationInfo(iCiv).getButton(), 476, iY+24, 24, 24, WidgetTypes.WIDGET_PEDIA_JUMP_TO_CIV, iCiv, -1)
                    szText = gc.getPlayer(tmpPlot.getOwner()).getCivilizationDescription(0)
                    screen.setLabel("L6_"+str(i), "Background", u"<font=2>" + szText + u"</font>", CvUtil.FONT_RIGHT_JUSTIFY, 470, iY+28, 0.0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_PEDIA_JUMP_TO_CIV, iCiv, -1 )

                # Button Bonus 1
                iBonus = CvUtil.getScriptData(pUnit, ["autB1"], -1)
                if iBonus != -1:
                    screen.setImageButton("L7_"+str(i), gc.getBonusInfo(iBonus).getButton(), 510, iY, BUTTON_SIZE, BUTTON_SIZE, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BONUS, iBonus, -1)

                # Buttons Arrow to left
                screen.setImageButton("L8_"+str(i), "Art/Interface/Buttons/arrow_left.tga", 580, iY+9, 32, 32, WidgetTypes.WIDGET_GENERAL, -1, -1)

                # Promotion Escort / Begleitschutz
                iPromo = gc.getInfoTypeForString("PROMOTION_SCHUTZ")
                if pUnit.isHasPromotion(iPromo):
                    screen.setImageButton("L14_"+str(i), gc.getPromotionInfo(iPromo).getButton(), 615, iY+9, 32, 32, WidgetTypes.WIDGET_PEDIA_JUMP_TO_PROMOTION, iPromo, -1)

                # Button Arrow to right
                screen.setImageButton("L9_"+str(i), "Art/Interface/Buttons/arrow_right.tga", 650, iY+9, 32, 32, WidgetTypes.WIDGET_GENERAL, -1, -1)

                # Button Bonus 2
                iBonus = CvUtil.getScriptData(pUnit, ["autB2"], -1)
                if iBonus != -1:
                    screen.setImageButton("L10_"+str(i), gc.getBonusInfo(iBonus).getButton(), 700, iY, BUTTON_SIZE, BUTTON_SIZE, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BONUS, iBonus, -1)

                # City 2
                iCityX = int(CvUtil.getScriptData(pUnit, ["autX2"], -1))
                iCityY = int(CvUtil.getScriptData(pUnit, ["autY2"], -1))
                tmpPlot = CyMap().plot(iCityX,iCityY)
                if tmpPlot and not tmpPlot.isNone() and tmpPlot.isCity():
                    szText = tmpPlot.getPlotCity().getName()
                    if tmpPlot.getOwner() == CyGame().getActivePlayer():
                        iTmpX = 790
                    else:
                        iTmpX = 760
                    screen.setLabel("L11_"+str(i), "Background", u"<font=3>" + szText + u"</font>", CvUtil.FONT_LEFT_JUSTIFY, iTmpX, iY+5, 0.0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
                if tmpPlot.getOwner() != -1:
                    iCiv = gc.getPlayer(tmpPlot.getOwner()).getCivilizationType()
                    # Flagge
                    if tmpPlot.getOwner() == CyGame().getActivePlayer():
                      screen.addFlagWidgetGFC("L12_"+str(i), 756, iY, 24, 54, tmpPlot.getOwner(), WidgetTypes.WIDGET_FLAG, tmpPlot.getOwner(), -1)
                    # Civ-Button
                    else:
                      screen.setImageButton("L12_"+str(i), gc.getCivilizationInfo(iCiv).getButton(), 760, iY+24, 24, 24, WidgetTypes.WIDGET_PEDIA_JUMP_TO_CIV, iCiv, -1)
                    szText = gc.getPlayer(tmpPlot.getOwner()).getCivilizationDescription(0)
                    screen.setLabel("L13_"+str(i), "Background", u"<font=2>" + szText + u"</font>", CvUtil.FONT_LEFT_JUSTIFY, 790, iY+28, 0.0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_PEDIA_JUMP_TO_CIV, iCiv, -1 )

                # Cancel Button
                screen.setImageButton("L15_"+str(i), ArtFileMgr.getInterfaceArtInfo("INTERFACE_TRADE_AUTO_STOP").getPath(), 900, iY, BUTTON_SIZE, BUTTON_SIZE, WidgetTypes.WIDGET_GENERAL, 748, pUnit.getID())

                # ----
                i += 1
                iY += 60
コード例 #2
0
def onEndPlayerTurn(iPlayer, iGameTurn):

    # Kelten erheben sich in der Po-Ebene
    if iGameTurn == 13:
        if iPlayer == iRome and gc.getPlayer(iPlayer).isHuman():

            # 1. barb. Einheiten bei Placentia
            # Plot für die Landungseinheiten
            lPlots = [
                CyMap().plot(47, 66),
                CyMap().plot(48, 66),
                CyMap().plot(49, 66)
            ]
            Landungsplot = getRandomPlot(lPlots)

            # Einheiten erstellen
            LNewUnits = [
                gc.getInfoTypeForString("UNIT_CELTIC_GALLIC_WARRIOR"),
                gc.getInfoTypeForString("UNIT_SCHILDTRAEGER"),
                gc.getInfoTypeForString("UNIT_SKIRMISHER"),
                gc.getInfoTypeForString("UNIT_HORSEMAN_CELTIC")
            ]
            for i in LNewUnits:
                pUnit = gc.getPlayer(gc.getBARBARIAN_PLAYER()).initUnit(
                    i, Landungsplot.getX(), Landungsplot.getY(),
                    UnitAITypes.UNITAI_ATTACK, DirectionTypes.DIRECTION_SOUTH)
                pUnit.setExperience(2, -1)

            # Ping
            CyInterface().doPing(Landungsplot.getX(), Landungsplot.getY(),
                                 iPlayer)

            # 2. barb. Einheiten bei Ravenna
            # Plot für die Landungseinheiten
            lPlots = [
                CyMap().plot(53, 67),
                CyMap().plot(53, 57),
                CyMap().plot(53, 65)
            ]
            Landungsplot = getRandomPlot(lPlots)

            # Einheiten erstellen
            LNewUnits = [
                gc.getInfoTypeForString("UNIT_CELTIC_GALLIC_WARRIOR"),
                gc.getInfoTypeForString("UNIT_SCHILDTRAEGER"),
                gc.getInfoTypeForString("UNIT_SKIRMISHER"),
                gc.getInfoTypeForString("UNIT_HORSEMAN_CELTIC")
            ]
            for i in LNewUnits:
                pUnit = gc.getPlayer(gc.getBARBARIAN_PLAYER()).initUnit(
                    i, Landungsplot.getX(), Landungsplot.getY(),
                    UnitAITypes.UNITAI_ATTACK, DirectionTypes.DIRECTION_SOUTH)
                pUnit.setExperience(2, -1)

            # Ping
            CyInterface().doPing(Landungsplot.getX(), Landungsplot.getY(),
                                 iPlayer)

            # Meldung an den Spieler
            popupInfo = CyPopupInfo()
            popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
            popupInfo.setText(CyTranslator().getText(
                "TXT_KEY_MESSAGE_2NDPUNICWAR_2", ("", )))
            popupInfo.addPopup(iPlayer)

    # 2. Schlacht von Lilybaeum, Angriff Karthago auf Sizilien
    if iGameTurn == 19:
        if iPlayer == iRome and gc.getPlayer(iPlayer).isHuman():

            # Plot für die Schiffe
            lPlots = [
                CyMap().plot(51, 45),
                CyMap().plot(51, 46),
                CyMap().plot(51, 47)
            ]
            Schiffsplot = getRandomPlot(lPlots)

            # Schiffe erstellen
            LNewUnits = [gc.getInfoTypeForString("UNIT_QUADRIREME")]
            for i in LNewUnits:
                for _ in range(4):
                    pUnit = gc.getPlayer(iCarthago).initUnit(
                        i, Schiffsplot.getX(), Schiffsplot.getY(),
                        UnitAITypes.UNITAI_ASSAULT_SEA,
                        DirectionTypes.DIRECTION_SOUTH)
                    pUnit.setExperience(2, -1)
                    pUnit.setHasPromotion(
                        gc.getInfoTypeForString("PROMOTION_COMBAT1"), True)
                    pUnit.setHasPromotion(
                        gc.getInfoTypeForString("PROMOTION_COMBAT2"), True)

            # Meldung an den Spieler
            popupInfo = CyPopupInfo()
            popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
            popupInfo.setText(CyTranslator().getText(
                "TXT_KEY_MESSAGE_2NDPUNICWAR_3", ("", )))
            popupInfo.addPopup(iPlayer)
            CyCamera().JustLookAtPlot(Schiffsplot)

    # Schlacht von Cissa, Römer landen in Iberien
    if iGameTurn == 23:
        if iPlayer == iCarthago and gc.getPlayer(iPlayer).isHuman():

            # Plot für die Landungseinheiten
            lPlots = [
                CyMap().plot(19, 52),
                CyMap().plot(19, 53),
                CyMap().plot(20, 53)
            ]
            Landungsplot = getRandomPlot(lPlots)
            # Plot für die Schiffe
            lPlots = [
                CyMap().plot(20, 52),
                CyMap().plot(21, 52),
                CyMap().plot(21, 53)
            ]
            Schiffsplot = getRandomPlot(lPlots)

            # Schiffe erstellen
            LNewUnits = [
                gc.getInfoTypeForString("UNIT_QUADRIREME"),
                gc.getInfoTypeForString("UNIT_TRIREME")
            ]
            for i in LNewUnits:
                for _ in range(2):
                    pUnit = gc.getPlayer(iRome).initUnit(
                        i, Schiffsplot.getX(), Schiffsplot.getY(),
                        UnitAITypes.UNITAI_ASSAULT_SEA,
                        DirectionTypes.DIRECTION_SOUTH)
                    pUnit.setExperience(2, -1)
                    pUnit.setHasPromotion(
                        gc.getInfoTypeForString("PROMOTION_COMBAT1"), True)
                    pUnit.setHasPromotion(
                        gc.getInfoTypeForString("PROMOTION_CORVUS1"), True)

            # Einheiten erstellen
            LNewUnits = [
                gc.getInfoTypeForString("UNIT_TRIARII"),
                gc.getInfoTypeForString("UNIT_PRINCIPES"),
                gc.getInfoTypeForString("UNIT_PRINCIPES"),
                gc.getInfoTypeForString("UNIT_HASTATI"),
                gc.getInfoTypeForString("UNIT_HASTATI"),
                gc.getInfoTypeForString("UNIT_SKIRMISHER_ROME"),
                gc.getInfoTypeForString("UNIT_SKIRMISHER_ROME")
            ]
            for i in LNewUnits:
                pUnit = gc.getPlayer(iRome).initUnit(
                    i, Landungsplot.getX(), Landungsplot.getY(),
                    UnitAITypes.UNITAI_ATTACK, DirectionTypes.DIRECTION_SOUTH)
                pUnit.setExperience(2, -1)

            # Meldung an den Spieler
            popupInfo = CyPopupInfo()
            popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
            popupInfo.setText(CyTranslator().getText(
                "TXT_KEY_MESSAGE_2NDPUNICWAR_4", ("", )))
            popupInfo.addPopup(iPlayer)
            CyCamera().JustLookAtPlot(Landungsplot)

    # Rom erobert Sagunt (Plot: 20,50)
    if iGameTurn == 30:
        if iPlayer == iCarthago and gc.getPlayer(iPlayer).isHuman() and CyMap(
        ).plot(20, 50).getOwner() == iCarthago:

            # Plot für die Landungseinheiten
            lPlots = [CyMap().plot(19, 51), CyMap().plot(20, 49)]
            Landungsplot = getRandomPlot(lPlots)
            # Plot für die Schiffe
            lPlots = [
                CyMap().plot(20, 49),
                CyMap().plot(20, 50),
                CyMap().plot(20, 51)
            ]
            Schiffsplot = getRandomPlot(lPlots)

            # Schiffe erstellen
            LNewUnits = [
                gc.getInfoTypeForString("UNIT_QUADRIREME"),
                gc.getInfoTypeForString("UNIT_TRIREME")
            ]
            for i in LNewUnits:
                for _ in range(2):
                    pUnit = gc.getPlayer(iRome).initUnit(
                        i, Schiffsplot.getX(), Schiffsplot.getY(),
                        UnitAITypes.UNITAI_ASSAULT_SEA,
                        DirectionTypes.DIRECTION_SOUTH)
                    pUnit.setExperience(2, -1)
                    pUnit.setHasPromotion(
                        gc.getInfoTypeForString("PROMOTION_COMBAT1"), True)
                    pUnit.setHasPromotion(
                        gc.getInfoTypeForString("PROMOTION_CORVUS1"), True)

            # Einheiten erstellen
            LNewUnits = [
                gc.getInfoTypeForString("UNIT_TRIARII"),
                gc.getInfoTypeForString("UNIT_PRINCIPES"),
                gc.getInfoTypeForString("UNIT_PRINCIPES"),
                gc.getInfoTypeForString("UNIT_HASTATI"),
                gc.getInfoTypeForString("UNIT_HASTATI"),
                gc.getInfoTypeForString("UNIT_SKIRMISHER_ROME"),
                gc.getInfoTypeForString("UNIT_SKIRMISHER_ROME")
            ]
            for i in LNewUnits:
                pUnit = gc.getPlayer(iRome).initUnit(
                    i, Landungsplot.getX(), Landungsplot.getY(),
                    UnitAITypes.UNITAI_ATTACK, DirectionTypes.DIRECTION_SOUTH)
                pUnit.setExperience(2, -1)

            # Meldung an den Spieler
            popupInfo = CyPopupInfo()
            popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
            popupInfo.setText(CyTranslator().getText(
                "TXT_KEY_MESSAGE_2NDPUNICWAR_5", ("", )))
            popupInfo.addPopup(iPlayer)
            CyCamera().JustLookAtPlot(Landungsplot)

    # iberische Städte rebellieren gegen Karthago
    # barb. Einheiten in Iberien
    if iGameTurn == 38:
        if iPlayer == iCarthago and gc.getPlayer(iPlayer).isHuman():

            LNewUnits = [
                gc.getInfoTypeForString("UNIT_SCHILDTRAEGER_IBERIA"),
                gc.getInfoTypeForString("UNIT_SPEARMAN"),
                gc.getInfoTypeForString("UNIT_SKIRMISHER_ROME"),
                gc.getInfoTypeForString("UNIT_CELTIBERIAN_CAVALRY")
            ]

            # Plot für die Landungseinheiten
            lPlots = [
                CyMap().plot(14, 50),
                CyMap().plot(14, 51),
                CyMap().plot(14, 52)
            ]
            Landungsplot = getRandomPlot(lPlots)
            for i in LNewUnits:
                pUnit = gc.getPlayer(gc.getBARBARIAN_PLAYER()).initUnit(
                    i, Landungsplot.getX(), Landungsplot.getY(),
                    UnitAITypes.UNITAI_ATTACK, DirectionTypes.DIRECTION_SOUTH)
                pUnit.setExperience(2, -1)

            # Plot für die Landungseinheiten
            lPlots = [
                CyMap().plot(8, 43),
                CyMap().plot(9, 42),
                CyMap().plot(9, 43)
            ]
            Landungsplot = getRandomPlot(lPlots)
            for i in LNewUnits:
                pUnit = gc.getPlayer(gc.getBARBARIAN_PLAYER()).initUnit(
                    i, Landungsplot.getX(), Landungsplot.getY(),
                    UnitAITypes.UNITAI_ATTACK, DirectionTypes.DIRECTION_SOUTH)
                pUnit.setExperience(2, -1)

            # Meldung an den Spieler
            popupInfo = CyPopupInfo()
            popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
            popupInfo.setText(CyTranslator().getText(
                "TXT_KEY_MESSAGE_2NDPUNICWAR_6", ("", )))
            popupInfo.addPopup(iPlayer)
            CyCamera().JustLookAtPlot(Landungsplot)

    # Capua verbündet sich mit Hannibal
    # Capua wird barbarisch (Plot: 58, 58)
    # Bedinung: Capua = römisch + Rom u. Karthago im Krieg
    if iGameTurn == 50:
        if iPlayer == iRome and gc.getPlayer(iPlayer).isHuman():
            pPlot = CyMap().plot(58, 58)
            if pPlot.getOwner() == iRome and gc.getTeam(
                    gc.getPlayer(iCarthago)).isAtWar(gc.getPlayer(iRome)):

                # Stadt wird barbarisch + Einheiten
                PAE_City.doRenegadeCity(pPlot.getPlotCity(),
                                        gc.getBARBARIAN_PLAYER(), None)

                LNewUnits = [
                    gc.getInfoTypeForString("UNIT_REBELL"),
                    gc.getInfoTypeForString("UNIT_REFLEX_ARCHER"),
                    gc.getInfoTypeForString("UNIT_SAMNIT")
                ]
                for i in LNewUnits:
                    pUnit = gc.getPlayer(gc.getBARBARIAN_PLAYER()).initUnit(
                        i, pPlot.getX(), pPlot.getY(),
                        UnitAITypes.UNITAI_CITY_DEFENSE,
                        DirectionTypes.DIRECTION_SOUTH)
                    pUnit.setExperience(2, -1)
                    pUnit.setHasPromotion(
                        gc.getInfoTypeForString("PROMOTION_CITY_GARRISON1"),
                        True)

                # Meldung an den Spieler
                popupInfo = CyPopupInfo()
                popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
                popupInfo.setText(CyTranslator().getText(
                    "TXT_KEY_MESSAGE_2NDPUNICWAR_9", ("", )))
                popupInfo.addPopup(iPlayer)
                CyCamera().JustLookAtPlot(pPlot)

    # Schlacht von Cornus, Punier landen auf Sardinien
    if iGameTurn == 56:
        if iPlayer == iRome and gc.getPlayer(iPlayer).isHuman():

            # Plot für die Landungseinheiten
            lPlots = [
                CyMap().plot(44, 52),
                CyMap().plot(45, 51),
                CyMap().plot(45, 52)
            ]
            Landungsplot = getRandomPlot(lPlots)
            # Plot für die Schiffe
            lPlots = [
                CyMap().plot(43, 51),
                CyMap().plot(43, 52),
                CyMap().plot(43, 53)
            ]
            Schiffsplot = getRandomPlot(lPlots)

            # Schiffe erstellen
            LNewUnits = [
                gc.getInfoTypeForString("UNIT_QUADRIREME"),
                gc.getInfoTypeForString("UNIT_TRIREME")
            ]
            for i in LNewUnits:
                for _ in range(2):
                    pUnit = gc.getPlayer(iRome).initUnit(
                        i, Schiffsplot.getX(), Schiffsplot.getY(),
                        UnitAITypes.UNITAI_ASSAULT_SEA,
                        DirectionTypes.DIRECTION_SOUTH)
                    pUnit.setExperience(2, -1)
                    pUnit.setHasPromotion(
                        gc.getInfoTypeForString("PROMOTION_COMBAT1"), True)
                    pUnit.setHasPromotion(
                        gc.getInfoTypeForString("PROMOTION_COMBAT2"), True)

            # Einheiten erstellen
            LNewUnits = [
                gc.getInfoTypeForString("UNIT_CARTH_SACRED_BAND_OFFICER"),
                gc.getInfoTypeForString("UNIT_SPEARMAN_CARTHAGE"),
                gc.getInfoTypeForString("UNIT_SPEARMAN_CARTHAGE"),
                gc.getInfoTypeForString("UNIT_REBELL"),
                gc.getInfoTypeForString("UNIT_REBELL"),
                gc.getInfoTypeForString("UNIT_SKIRMISHER"),
                gc.getInfoTypeForString("UNIT_SKIRMISHER")
            ]
            for i in LNewUnits:
                pUnit = gc.getPlayer(iRome).initUnit(
                    i, Landungsplot.getX(), Landungsplot.getY(),
                    UnitAITypes.UNITAI_ATTACK, DirectionTypes.DIRECTION_SOUTH)
                pUnit.setExperience(2, -1)

            # Meldung an den Spieler
            popupInfo = CyPopupInfo()
            popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
            popupInfo.setText(CyTranslator().getText(
                "TXT_KEY_MESSAGE_2NDPUNICWAR_10", ("", )))
            popupInfo.addPopup(iPlayer)
            CyCamera().JustLookAtPlot(Landungsplot)

    # Massinissa schickt Truppen nach Iberien
    # ost-num. Truppen in Karthago-Nova
    # Bedingung: Ost-Numider Vasall von Karthago + Rom und Karthago im Krieg
    if iGameTurn == 85:
        if iPlayer == iCarthago or iPlayer == iRome:
            iMessana = 3
            iTeamCarthago = gc.getPlayer(iCarthago).getTeam()
            iTeamMessana = gc.getPlayer(iMessana).getTeam()
            pTeamMessana = gc.getTeam(iTeamMessana)
            if pTeamMessana.isVassal(iTeamCarthago) and gc.getTeam(
                    gc.getPlayer(iCarthago)).isAtWar(gc.getPlayer(iRome)):

                # Plot für die Einheiten
                Landungsplot = CyMap().plot(19, 46)

                if iPlayer == iCarthago:
                    # Einheiten erstellen
                    LNewUnits = [
                        gc.getInfoTypeForString("UNIT_HORSEMAN_NUMIDIA")
                    ]

                    for i in LNewUnits:
                        for _ in range(4):
                            pUnit = gc.getPlayer(iMessana).initUnit(
                                i, Landungsplot.getX(), Landungsplot.getY(),
                                UnitAITypes.UNITAI_ATTACK,
                                DirectionTypes.DIRECTION_SOUTH)
                            pUnit.setExperience(2, -1)

                # Meldung an den Spieler
                popupInfo = CyPopupInfo()
                popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
                popupInfo.setText(CyTranslator().getText(
                    "TXT_KEY_MESSAGE_2NDPUNICWAR_12", ("", )))
                popupInfo.addPopup(iPlayer)
                CyCamera().JustLookAtPlot(Landungsplot)

    # Hannibal erobert Tarent
    # Tarent wird barbarisch
    # Bedinung: Tarent = römisch + Rom u. Karthago im Krieg
    if iGameTurn == 90:
        if iPlayer == iRome:
            pPlot = CyMap().plot(62, 53)
            if pPlot.getOwner() == iRome and gc.getTeam(
                    gc.getPlayer(iRome)).isAtWar(gc.getPlayer(iCarthago)):

                # Stadt wird barbarisch + Einheiten
                PAE_City.doRenegadeCity(pPlot.getPlotCity(),
                                        gc.getBARBARIAN_PLAYER(), None)

                LNewUnits = [
                    gc.getInfoTypeForString("UNIT_REBELL"),
                    gc.getInfoTypeForString("UNIT_REFLEX_ARCHER"),
                    gc.getInfoTypeForString("UNIT_HOPLIT")
                ]
                for i in LNewUnits:
                    pUnit = gc.getPlayer(gc.getBARBARIAN_PLAYER()).initUnit(
                        i, pPlot.getX(), pPlot.getY(),
                        UnitAITypes.UNITAI_CITY_DEFENSE,
                        DirectionTypes.DIRECTION_SOUTH)
                    pUnit.setExperience(2, -1)
                    pUnit.setHasPromotion(
                        gc.getInfoTypeForString("PROMOTION_CITY_GARRISON1"),
                        True)

                # Meldung an den Spieler
                popupInfo = CyPopupInfo()
                popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
                popupInfo.setText(CyTranslator().getText(
                    "TXT_KEY_MESSAGE_2NDPUNICWAR_13", ("", )))
                popupInfo.addPopup(iPlayer)
                CyCamera().JustLookAtPlot(pPlot)

    # Unruhen in Rom
    if iGameTurn == 110:
        if iPlayer == iRome:
            pCity = gc.getPlayer(iPlayer).getCapitalCity()

            PAE_City.doCityRevolt(pCity, 4)

            # Meldung an den Spieler
            popupInfo = CyPopupInfo()
            popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
            popupInfo.setText(CyTranslator().getText(
                "TXT_KEY_MESSAGE_2NDPUNICWAR_14", ("", )))
            popupInfo.addPopup(iPlayer)
            CyCamera().JustLookAtPlot(pCity.plot())

    # Schlacht von Neu-Karthago, Römer greifen Stadt an
    # röm. Schiffe + Einheiten bei Neu-Karthago (Plot: 19,46)
    # Bedingung: Neu-Karthago = karth. + Rom und Karthago im Krieg
    if iGameTurn == 125:
        if iPlayer == iCarthago:
            pPlot = CyMap().plot(19, 46)  # TXT_KEY_CITY_NAME_CARTHAGO_NOVO
            if pPlot.getOwner() == iCarthago and gc.getTeam(
                    gc.getPlayer(iCarthago)).isAtWar(gc.getPlayer(iRome)):

                # Plot für die Landungseinheiten
                lPlots = [
                    CyMap().plot(18, 45),
                    CyMap().plot(19, 45),
                    CyMap().plot(19, 47)
                ]
                Landungsplot = getRandomPlot(lPlots)
                # Plot für die Schiffe
                lPlots = [
                    CyMap().plot(20, 45),
                    CyMap().plot(20, 46),
                    CyMap().plot(20, 47)
                ]
                Schiffsplot = getRandomPlot(lPlots)

                # Schiffe erstellen
                LNewUnits = [
                    gc.getInfoTypeForString("UNIT_QUADRIREME"),
                    gc.getInfoTypeForString("UNIT_TRIREME")
                ]
                for i in LNewUnits:
                    for _ in range(2):
                        pUnit = gc.getPlayer(iRome).initUnit(
                            i, Schiffsplot.getX(), Schiffsplot.getY(),
                            UnitAITypes.UNITAI_ASSAULT_SEA,
                            DirectionTypes.DIRECTION_SOUTH)
                        pUnit.setExperience(2, -1)
                        pUnit.setHasPromotion(
                            gc.getInfoTypeForString("PROMOTION_COMBAT1"), True)
                        pUnit.setHasPromotion(
                            gc.getInfoTypeForString("PROMOTION_CORVUS1"), True)

                # Einheiten erstellen
                LNewUnits = [
                    gc.getInfoTypeForString("UNIT_TRIARII"),
                    gc.getInfoTypeForString("UNIT_PRINCIPES"),
                    gc.getInfoTypeForString("UNIT_PRINCIPES"),
                    gc.getInfoTypeForString("UNIT_HASTATI"),
                    gc.getInfoTypeForString("UNIT_HASTATI"),
                    gc.getInfoTypeForString("UNIT_SKIRMISHER_ROME"),
                    gc.getInfoTypeForString("UNIT_SKIRMISHER_ROME")
                ]
                for i in LNewUnits:
                    pUnit = gc.getPlayer(iRome).initUnit(
                        i, Landungsplot.getX(), Landungsplot.getY(),
                        UnitAITypes.UNITAI_ATTACK,
                        DirectionTypes.DIRECTION_SOUTH)
                    pUnit.setExperience(2, -1)

                pUnit = gc.getPlayer(iRome).initUnit(
                    gc.getInfoTypeForString("UNIT_LEGION_TRIBUN"),
                    Landungsplot.getX(), Landungsplot.getY(),
                    UnitAITypes.UNITAI_ATTACK, DirectionTypes.DIRECTION_SOUTH)
                pUnit.setExperience(2, -1)
                pUnit.setHasPromotion(
                    gc.getInfoTypeForString("PROMOTION_COMBAT1"), True)
                pUnit.setName("Publius Cornelius Scipio")

                # Meldung an den Spieler
                popupInfo = CyPopupInfo()
                popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
                popupInfo.setText(CyTranslator().getText(
                    "TXT_KEY_MESSAGE_2NDPUNICWAR_15", ("", )))
                popupInfo.addPopup(iPlayer)
                CyCamera().JustLookAtPlot(Landungsplot)

    # Schlacht am Metaurus (Ost-Italien) Hasdrubal Barca
    # karthag. Einheiten in Italien
    # Stadt (Ariminum) = römisch + Rom und Karthago im Krieg
    if iGameTurn == 150:
        if iPlayer == iRome:
            pPlot = CyMap().plot(54, 62)  # Florentia
            if pPlot.getOwner() == iRome and gc.getTeam(
                    gc.getPlayer(iRome)).isAtWar(gc.getPlayer(iCarthago)):

                # Plot für die Landungseinheiten
                lPlots = [
                    CyMap().plot(55, 64),
                    CyMap().plot(54, 64),
                    CyMap().plot(55, 63)
                ]
                Landungsplot = getRandomPlot(lPlots)

                # Einheiten erstellen
                LNewUnits = [
                    gc.getInfoTypeForString("UNIT_CARTH_SACRED_BAND_OFFICER"),
                    gc.getInfoTypeForString("UNIT_SPEARMAN_CARTHAGE"),
                    gc.getInfoTypeForString("UNIT_SPEARMAN_CARTHAGE"),
                    gc.getInfoTypeForString("UNIT_SCHILDTRAEGER_IBERIA"),
                    gc.getInfoTypeForString("UNIT_SCHILDTRAEGER_IBERIA"),
                    gc.getInfoTypeForString("UNIT_CELTIC_GALLIC_WARRIOR"),
                    gc.getInfoTypeForString("UNIT_CELTIC_GALLIC_WARRIOR")
                ]

                for i in LNewUnits:
                    pUnit = gc.getPlayer(iCarthago).initUnit(
                        i, Landungsplot.getX(), Landungsplot.getY(),
                        UnitAITypes.UNITAI_ATTACK,
                        DirectionTypes.DIRECTION_SOUTH)
                    pUnit.setExperience(2, -1)
                    pUnit.setHasPromotion(
                        gc.getInfoTypeForString("PROMOTION_COMBAT1"), True)
                    pUnit.setHasPromotion(
                        gc.getInfoTypeForString("PROMOTION_COMBAT2"), True)

                pUnit = gc.getPlayer(iCarthago).initUnit(
                    gc.getInfoTypeForString(
                        "UNIT_MOUNTED_SACRED_BAND_CARTHAGE"),
                    Landungsplot.getX(), Landungsplot.getY(),
                    UnitAITypes.UNITAI_ATTACK, DirectionTypes.DIRECTION_SOUTH)
                pUnit.setExperience(2, -1)
                pUnit.setHasPromotion(
                    gc.getInfoTypeForString("PROMOTION_COMBAT1"), True)
                pUnit.setHasPromotion(
                    gc.getInfoTypeForString("PROMOTION_COMBAT2"), True)
                pUnit.setHasPromotion(
                    gc.getInfoTypeForString("PROMOTION_LEADER"), True)
                pUnit.setHasPromotion(
                    gc.getInfoTypeForString("PROMOTION_LEADERSHIP"), True)
                pUnit.setHasPromotion(
                    gc.getInfoTypeForString("PROMOTION_FLANKING1"), True)
                pUnit.setHasPromotion(
                    gc.getInfoTypeForString("PROMOTION_FORM_FLANKENSCHUTZ"),
                    True)
                pUnit.setName("Hasdrubal Barca")

                # Meldung an den Spieler
                popupInfo = CyPopupInfo()
                popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
                popupInfo.setText(CyTranslator().getText(
                    "TXT_KEY_MESSAGE_2NDPUNICWAR_17", ("", )))
                popupInfo.addPopup(iPlayer)
                CyCamera().JustLookAtPlot(Landungsplot)

    # Rom landet in Afrika bei Utica
    if iGameTurn == 183:
        if iPlayer == iCarthago and not gc.getPlayer(iRome).isHuman():
            if gc.getTeam(gc.getPlayer(iCarthago)).isAtWar(
                    gc.getPlayer(iRome)):

                # Plot für die Landungseinheiten
                lPlots = [
                    CyMap().plot(40, 40),
                    CyMap().plot(41, 40),
                    CyMap().plot(41, 41)
                ]
                Landungsplot = getRandomPlot(lPlots)
                # Plot für die Schiffe
                lPlots = [
                    CyMap().plot(40, 42),
                    CyMap().plot(41, 42),
                    CyMap().plot(42, 42)
                ]
                Schiffsplot = getRandomPlot(lPlots)

                # Schiffe erstellen
                LNewUnits = [
                    gc.getInfoTypeForString("UNIT_QUADRIREME"),
                    gc.getInfoTypeForString("UNIT_TRIREME")
                ]
                for i in LNewUnits:
                    for _ in range(2):
                        pUnit = gc.getPlayer(iRome).initUnit(
                            i, Schiffsplot.getX(), Schiffsplot.getY(),
                            UnitAITypes.UNITAI_ASSAULT_SEA,
                            DirectionTypes.DIRECTION_SOUTH)
                        pUnit.setExperience(2, -1)
                        pUnit.setHasPromotion(
                            gc.getInfoTypeForString("PROMOTION_COMBAT1"), True)
                        pUnit.setHasPromotion(
                            gc.getInfoTypeForString("PROMOTION_CORVUS1"), True)

                # Einheiten erstellen
                LNewUnits = [
                    gc.getInfoTypeForString("UNIT_TRIARII"),
                    gc.getInfoTypeForString("UNIT_PRINCIPES"),
                    gc.getInfoTypeForString("UNIT_PRINCIPES"),
                    gc.getInfoTypeForString("UNIT_HASTATI"),
                    gc.getInfoTypeForString("UNIT_HASTATI"),
                    gc.getInfoTypeForString("UNIT_SKIRMISHER_ROME"),
                    gc.getInfoTypeForString("UNIT_SKIRMISHER_ROME")
                ]
                for i in LNewUnits:
                    pUnit = gc.getPlayer(iRome).initUnit(
                        i, Landungsplot.getX(), Landungsplot.getY(),
                        UnitAITypes.UNITAI_ATTACK,
                        DirectionTypes.DIRECTION_SOUTH)
                    pUnit.setExperience(2, -1)
                    pUnit.setHasPromotion(
                        gc.getInfoTypeForString("PROMOTION_COMBAT1"), True)

                # Meldung an den Spieler
                popupInfo = CyPopupInfo()
                popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
                popupInfo.setText(CyTranslator().getText(
                    "TXT_KEY_MESSAGE_2NDPUNICWAR_20", ("", )))
                popupInfo.addPopup(iPlayer)
                CyCamera().JustLookAtPlot(Landungsplot)