[DLL]Fix for Venice puppeting own capital

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,730
Location
Near Portsmouth, UK
If Venice loses and then recaptures their capital, they will puppet it and not "liberate" it. The following code fixes this issue in CvPlayer.cpp

Code:
#if defined(MOD_BUGFIX_VENICE_PUPPETS_CAPITAL)
      // Venice MUST liberate their own capital
      if (GetPlayerTraits()->IsNoAnnexing() && pNewCity->getX() == GetOriginalCapitalX() && pNewCity->getY() == GetOriginalCapitalY())
      {
        if (iCaptureGold > 0 || iCaptureCulture > 0 || iCaptureGreatWorks > 0) {
          if (iCaptureCulture == 0 && iCaptureGreatWorks == 0) {
            strBuffer = GetLocalizedText("TXT_KEY_POPUP_GOLD_CITY_CAPTURE", iCaptureGold, pNewCity->getNameKey());
          } else {
            strBuffer = GetLocalizedText("TXT_KEY_POPUP_GOLD_AND_CULTURE_CITY_CAPTURE", iCaptureGold, iCaptureCulture, iCaptureGreatWorks, pNewCity->getNameKey());
          }
          GC.GetEngineUserInterface()->AddCityMessage(0, pNewCity->GetIDInfo(), GetID(), true, GC.getEVENT_MESSAGE_TIME(), strBuffer);
        }
      }
      else
#endif

      // AI decides what to do with a City
      if(!isHuman())
        ...
 
Back
Top Bottom