Code
852/// Establish postures for each dominance zone (taking into account last posture)853void CvTacticalAI::UpdatePostures()854{855 CvTacticalDominanceZone* pZone;856 AITacticalPosture eLastPosture, eNewPosture;857858 m_NewPostures.clear();859860 // Loop through all the zones we have this turn861 for(int iI = 0; iI < m_pMap->GetNumZones(); iI++)862 {863 pZone = m_pMap->GetZone(iI);864865 // Check to make sure we want to use this zone866 if(UseThisDominanceZone(pZone))867 {868 int iCityID = -1;869 if(pZone->GetClosestCity() != NULL)870 {871 iCityID = pZone->GetClosestCity()->GetID();872 }873874 eLastPosture = FindPosture(pZone);875 eNewPosture = SelectPosture(pZone, eLastPosture);876 m_NewPostures.push_back(CvTacticalPosture(pZone->GetOwner(), pZone->IsWater(), iCityID, eNewPosture));877878 if(GC.getLogging() && GC.getAILogging() && eNewPosture != AI_TACTICAL_POSTURE_NONE)879 {880 CvString szPostureMsg;881 szPostureMsg.Format("Zone ID: %d, ", pZone->GetDominanceZoneID());882 switch(eNewPosture)883 {884 case AI_TACTICAL_POSTURE_SIT_AND_BOMBARD:885 szPostureMsg += "Sit and Bombard";886 break;887 case AI_TACTICAL_POSTURE_ATTRIT_FROM_RANGE:888 szPostureMsg += "Attrit from Range";889 break;890 case AI_TACTICAL_POSTURE_EXPLOIT_FLANKS:891 szPostureMsg += "Exploit Flanks";892 break;893 case AI_TACTICAL_POSTURE_STEAMROLL:894 szPostureMsg += "Steamroll";895 break;896 case AI_TACTICAL_POSTURE_SURGICAL_CITY_STRIKE:897 szPostureMsg += "Surgical City Strike";898 break;899 case AI_TACTICAL_POSTURE_HEDGEHOG:900 szPostureMsg += "Hedgehog";901 break;902 case AI_TACTICAL_POSTURE_COUNTERATTACK:903 szPostureMsg += "Counterattack";904 break;905 case AI_TACTICAL_POSTURE_WITHDRAW:906 szPostureMsg += "Withdraw";907 break;908 case AI_TACTICAL_POSTURE_SHORE_BOMBARDMENT:909 szPostureMsg += "Shore Bombardment";910 break;911 }912 LogTacticalMessage(szPostureMsg);913 }914 }915 }916917 // New postures become current ones918 m_Postures.clear();919 m_Postures = m_NewPostures;920}