|
From: <imp...@us...> - 2007-03-30 04:15:11
|
Revision: 46
http://civ4ccp.svn.sourceforge.net/civ4ccp/?rev=46&view=rev
Author: impalerwrg
Date: 2007-03-29 21:15:10 -0700 (Thu, 29 Mar 2007)
Log Message:
-----------
Continued TR integration
Modified Paths:
--------------
CvGameCoreDLL/CvCity.cpp
CvGameCoreDLL/CvDLLWidgetData.cpp
CvGameCoreDLL/CvGame.cpp
CvGameCoreDLL/CvGameAI.cpp
CvGameCoreDLL/CvGameCoreDLL.depend
CvGameCoreDLL/CvGameCoreDLL.layout
CvGameCoreDLL/CvGameCoreDLL.vcproj
CvGameCoreDLL/CvGlobals.cpp
CvGameCoreDLL/CvPlayer.cpp
CvGameCoreDLL/CvPlayerAI.cpp
CvGameCoreDLL/CvTeam.cpp
CvGameCoreDLL/CvUnit.cpp
CvGameCoreDLL/CyEnumsInterface.cpp
CvGameCoreDLL/CyInfoInterface1.cpp
CvGameCoreDLL/CyInfoInterface2.cpp
CvGameCoreDLL/CyInfoInterface3.cpp
CvGameCoreDLL/CyPlayer.cpp
CvGameCoreDLL/CyPlayer.h
CvGameCoreDLL/CyPlot.cpp
CvGameCoreDLL/CyPlotInterface1.cpp
CvGameCoreDLL/CyTeam.cpp
CvGameCoreDLL/CyUnit.cpp
CvGameCoreDLL/CyUnitInterface1.cpp
Modified: CvGameCoreDLL/CvCity.cpp
===================================================================
--- CvGameCoreDLL/CvCity.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CvCity.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -7556,14 +7556,14 @@
int CvCity::getCommerceRate(CommerceTypes eIndex) const
{
FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
- FAssertMsg(eIndex < NUM_YIELD_TYPES, "eIndex expected to be < NUM_YIELD_TYPES");
+ FAssertMsg(eIndex < NUM_COMMERCE_TYPES, "eIndex expected to be < NUM_COMMERCE_TYPES");
return m_aiCommerceRate[eIndex] / 100;
}
int CvCity::getCommerceRateTimes100(CommerceTypes eIndex) const
{
FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
- FAssertMsg(eIndex < NUM_YIELD_TYPES, "eIndex expected to be < NUM_YIELD_TYPES");
+ FAssertMsg(eIndex < NUM_COMMERCE_TYPES, "eIndex expected to be < NUM_COMMERCE_TYPES");
return m_aiCommerceRate[eIndex];
}
Modified: CvGameCoreDLL/CvDLLWidgetData.cpp
===================================================================
--- CvGameCoreDLL/CvDLLWidgetData.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CvDLLWidgetData.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -145,11 +145,11 @@
szBuffer += gDLL->getText("TXT_KEY_ZOOM_CITY_HELP");
break;
- // < CDA Start >
+ // < CDA Widget by Lopez Start >
case WIDGET_ZOOM_CITY_CDA:
szBuffer += gDLL->getText("TXT_KEY_ZOOM_CITY_HELP");
break;
- // < CDA End >
+ // < CDA Widget End >
case WIDGET_END_TURN:
szBuffer += gDLL->getText("TXT_KEY_WIDGET_END_TURN");
@@ -790,7 +790,8 @@
case WIDGET_ZOOM_CITY:
break;
- // < CDA Start >
+
+ // < CDA Widget by Lopez Start >
case WIDGET_ZOOM_CITY_CDA:
{
CvPlayer& player = GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1);
@@ -803,7 +804,7 @@
}
}
break;
- // < CDA End >
+ // < CDA Widget End >
case WIDGET_HELP_TECH_PREPREQ:
case WIDGET_HELP_OBSOLETE:
@@ -1357,8 +1358,8 @@
{
CyArgsList argsList;
- // Start Change UniqueUnitForLeaders v1.0 by Impaler[WrG] 6/9/06
- // ORIGINAL CODE argsList.add(GC.getCivilizationInfo(GC.getGameINLINE().getActiveCivilizationType()).getCivilizationUnits(widgetDataStruct.m_iData1));
+ // < Unique Unit ForLeaders by Impaler[WrG] >
+ // ORIGINAL CODE argsList.add(GC.getCivilizationInfo(GC.getGameINLINE().getActiveCivilizationType()).getCivilizationUnits(widgetDataStruct.m_iData1));
argsList.add(GC.getLeaderHeadInfo(GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getLeaderType()).getUnitTypeByClass(GC.getGameINLINE().getActiveCivilizationType(), widgetDataStruct.m_iData1));
// End Change UniqueUnitForLeaders v1.0 by Impaler[WrG] 6/9/06
@@ -1868,12 +1869,13 @@
{
szBuffer += NEWLINE + gDLL->getText("TXT_KEY_ACTION_DESTROY_IMP", GC.getImprovementInfo(pMissionPlot->getImprovementType()).getTextKeyWide());
}
+ // < Route Pillage by Lopez Start >
}
- // < Route Pillage Start >
- // ORIGINAL CODE else if (pMissionPlot->getRouteType() != NO_ROUTE)
+ // ORIGINAL CODE else if (pMissionPlot->getRouteType() != NO_ROUTE)
else if (GC.getActionInfo(widgetDataStruct.m_iData1).getMissionType() == MISSION_PILLAGE_ROUTE)
{
if (pMissionPlot->getRouteType() != NO_ROUTE)
+ // < Route Pillage End >
{
szBuffer += NEWLINE + gDLL->getText("TXT_KEY_ACTION_DESTROY_IMP", GC.getRouteInfo(pMissionPlot->getRouteType()).getTextKeyWide());
}
@@ -1981,7 +1983,7 @@
}
}
- // Start Additional Spy Missions by Impaler[WrG]
+ // < Spy Missions by Impaler[WrG] >
else if (GC.getActionInfo(widgetDataStruct.m_iData1).getMissionType() == MISSION_THEFT)
{
pSelectedUnitNode = gDLL->getInterfaceIFace()->headSelectionListNode();
@@ -2118,7 +2120,7 @@
pSelectedUnitNode = gDLL->getInterfaceIFace()->nextSelectionListNode(pSelectedUnitNode);
}
}
- // End Addition by Impaler[WrG]
+ // < Spy Mission End >
else if (GC.getActionInfo(widgetDataStruct.m_iData1).getMissionType() == MISSION_FOUND)
{
@@ -2954,40 +2956,641 @@
void CvDLLWidgetData::parseContactCivHelp(CvWidgetDataStruct &widgetDataStruct, CvWString &szBuffer)
{
- // Do not execute this if we are trying to contact ourselves...
- if (widgetDataStruct.m_iData1 >= MAX_PLAYERS || GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1).getCivilizationType() == NO_CIVILIZATION)
+ // do not execute if player is out of range
+ PlayerTypes ePlayer = (PlayerTypes) widgetDataStruct.m_iData1;
+ if (ePlayer >= MAX_PLAYERS)
{
return;
}
- if (GC.getGameINLINE().getActivePlayer() == widgetDataStruct.m_iData1)
+
+ // do not execute if player is not a real civ
+ CvPlayer& kPlayer = GET_PLAYER(ePlayer);
+ if (kPlayer.getCivilizationType() == NO_CIVILIZATION)
{
+ return;
+ }
+
+ // make sure its empty to start
+ szBuffer = "";
+
+ TeamTypes eTeam = (TeamTypes) kPlayer.getTeam();
+ CvTeamAI& kTeam = GET_TEAM(eTeam);
+
+ PlayerTypes eActivePlayer = GC.getGameINLINE().getActivePlayer();
+ TeamTypes eActiveTeam = (TeamTypes) GET_PLAYER(eActivePlayer).getTeam();
+ CvTeamAI& kActiveTeam = GET_TEAM(eActiveTeam);
+
+ // if alt down and cheat on, show extra info
+ if (gDLL->altKey() && gDLL->getChtLvl() > 0)
+ {
+ // show everyones power for the active player
+ if (eActivePlayer == ePlayer)
+ {
+ for (int iI = 0; iI < MAX_PLAYERS; iI++)
+ {
+ CvPlayer& kLoopPlayer = GET_PLAYER((PlayerTypes)iI);
+ if (kLoopPlayer.isAlive())
+ {
+ CvTeam& kLoopTeam = GET_TEAM((TeamTypes) kLoopPlayer.getTeam());
+
+ szBuffer += CvWString::format(SETCOLR L"%s(%d): %d (%d) power" ENDCOLR, TEXT_COLOR("COLOR_HIGHLIGHT_TEXT"),
+ kLoopPlayer.getName(), kLoopPlayer.getTeam(), kLoopPlayer.getPower(), kLoopTeam.getDefensivePower());
+
+ // if in financial trouble, show that
+ if (kLoopPlayer.AI_isFinancialTrouble())
+ {
+ szBuffer += CvWString::format(SETCOLR L" ($$$)" ENDCOLR, TEXT_COLOR("COLOR_NEGATIVE_TEXT"));
+ }
+
+ szBuffer += NEWLINE;
+ }
+ }
+ }
+ // only should this one power if not active player
+ else
+ {
+ szBuffer += CvWString::format(SETCOLR L"%d (%d) power" ENDCOLR, TEXT_COLOR("COLOR_HIGHLIGHT_TEXT"), kPlayer.getPower(), kTeam.getPower(true));
+
+ // if in financial trouble, show that
+ if (kPlayer.AI_isFinancialTrouble())
+ {
+ szBuffer += CvWString::format(SETCOLR L" ($$$)" ENDCOLR, TEXT_COLOR("COLOR_NEGATIVE_TEXT"));
+ }
+
+ szBuffer += NEWLINE;
+ }
+
+ // skip a line
+ szBuffer += NEWLINE;
+
+ // show peace values
+ bool bHadAny = false;
+ bool bFirst = true;
+ for (int iTeamIndex = 0; iTeamIndex < MAX_TEAMS; iTeamIndex++)
+ {
+ TeamTypes eLoopTeam = (TeamTypes) iTeamIndex;
+ CvTeamAI& kLoopTeam = GET_TEAM(eLoopTeam);
+ if (eLoopTeam != eTeam && kLoopTeam.isAlive() && !kLoopTeam.isBarbarian())
+ {
+ if (kTeam.isAtWar(eLoopTeam))
+ {
+ if (bFirst)
+ {
+ szBuffer += CvWString::format(SETCOLR L"Current War:\n" ENDCOLR, TEXT_COLOR("COLOR_UNIT_TEXT"));
+ bFirst = false;
+ }
+
+ bHadAny = true;
+
+ WarPlanTypes eWarPlan = kTeam.AI_getWarPlan(eLoopTeam);
+ CvWString szWarplan;
+ // TODO GAMETEXT.getWarplanString(szWarplan, eWarPlan);
+
+ int iOtherValue = kTeam.AI_endWarVal(eLoopTeam);
+ int iTheirValue = kLoopTeam.AI_endWarVal(eTeam);
+
+ szBuffer += CvWString::format(SETCOLR L" %s " ENDCOLR SETCOLR L"(%d, %d)" ENDCOLR SETCOLR L" with %s " ENDCOLR SETCOLR L"(%d, %d)\n" ENDCOLR,
+ TEXT_COLOR((iOtherValue < iTheirValue) ? "COLOR_POSITIVE_TEXT" : "COLOR_NEGATIVE_TEXT"),
+ szWarplan.GetCString(),
+ TEXT_COLOR((iOtherValue < iTheirValue) ? "COLOR_POSITIVE_TEXT" : "COLOR_NEGATIVE_TEXT"),
+ iOtherValue, kTeam.AI_getWarSuccess(eLoopTeam),
+ TEXT_COLOR((iOtherValue < iTheirValue) ? "COLOR_POSITIVE_TEXT" : "COLOR_NEGATIVE_TEXT"),
+ kLoopTeam.getName().GetCString(),
+ TEXT_COLOR((iTheirValue < iOtherValue) ? "COLOR_POSITIVE_TEXT" : "COLOR_NEGATIVE_TEXT"),
+ iTheirValue, kLoopTeam.AI_getWarSuccess(eTeam));
+ }
+ }
+ }
+
+ // double space if had any war
+ if (bHadAny)
+ {
+ szBuffer += NEWLINE;
+ }
+
+ // show warplan values
+ bHadAny = false;
+ bFirst = true;
+ for (int iTeamIndex = 0; iTeamIndex < MAX_TEAMS; iTeamIndex++)
+ {
+ TeamTypes eLoopTeam = (TeamTypes) iTeamIndex;
+ CvTeamAI& kLoopTeam = GET_TEAM(eLoopTeam);
+ if (eLoopTeam != eTeam && kLoopTeam.isAlive() && !kLoopTeam.isBarbarian())
+ {
+ WarPlanTypes eWarPlan = kTeam.AI_getWarPlan(eLoopTeam);
+ if (!kTeam.isAtWar(eLoopTeam) && eWarPlan != NO_WARPLAN)
+ {
+ if (bFirst)
+ {
+ szBuffer += CvWString::format(SETCOLR L"Imminent War:\n" ENDCOLR, TEXT_COLOR("COLOR_UNIT_TEXT"));
+ bFirst = false;
+ }
+
+ bHadAny = true;
+
+ CvWString szWarplan;
+ // TODO GAMETEXT.getWarplanString(szWarplan, eWarPlan);
+ szBuffer += CvWString::format(SETCOLR L" %s (%d) with %s\n" ENDCOLR, TEXT_COLOR("COLOR_NEGATIVE_TEXT"),
+ szWarplan.GetCString(),
+ kTeam.AI_startWarVal(eLoopTeam),
+ kLoopTeam.getName().GetCString());
+
+ }
+ }
+ }
+
+ // double space if had any war plan
+ if (bHadAny)
+ {
+ szBuffer += NEWLINE;
+ }
+
+ // calculate war percentages
+ float fOverallWarPercentage = 0;
+ bool bAggressive = GC.getGameINLINE().isOption(GAMEOPTION_AGGRESSIVE_AI);
+
+ // team power (if agressive, we use higher value)
+ int iTeamPower = kTeam.getPower(true);
+ if (bAggressive)
+ {
+ iTeamPower *= 4;
+ iTeamPower /= 3;
+ }
+
+ bool bIsAnyCapitalAreaAlone = kTeam.AI_isAnyCapitalAreaAlone();
+
+ int iFinancialTroubleCount = 0;
+ int iDaggerCount = 0;
+ for (int iI = 0; iI < MAX_PLAYERS; iI++)
+ {
+ if (GET_PLAYER((PlayerTypes)iI).isAlive())
+ {
+ if (GET_PLAYER((PlayerTypes)iI).getTeam() == eTeam)
+ {
+ if (GET_PLAYER((PlayerTypes)iI).AI_isDoStrategy(AI_STRATEGY_DAGGER))
+ {
+ iDaggerCount++;
+ bAggressive = true;
+ }
+
+ if (GET_PLAYER((PlayerTypes)iI).AI_isFinancialTrouble())
+ {
+ iFinancialTroubleCount++;
+ }
+ }
+ }
+ }
+
+ // calculate unit spending for use in iTotalWarRandThreshold
+ int iNumMembers = kTeam.getNumMembers();
+ int iHighUnitSpendingPercent = 0;
+
+ for (iI = 0; iI < MAX_PLAYERS; iI++)
+ {
+ CvPlayerAI& kPlayer = GET_PLAYER((PlayerTypes) iI);
+ if (kPlayer.isAlive())
+ {
+ if (kPlayer.getTeam() == eTeam)
+ {
+ int iUnitSpendingPercent = (kPlayer.calculateUnitCost() * 100) / max(1, kPlayer.calculatePreInflatedCosts());
+ iHighUnitSpendingPercent += (max(0, iUnitSpendingPercent - 7) / 2);
+ }
+ }
+ }
+
+ iHighUnitSpendingPercent /= iNumMembers;
+
+ // calculate war threshold
+ int iTotalWarRandThreshold = iHighUnitSpendingPercent * (GC.getGameINLINE().isOption(GAMEOPTION_AGGRESSIVE_AI) ? 4 : 2);
+ iTotalWarRandThreshold /= 3;
+
+ // if random in this range is 0, we go to war of this type (so lower numbers are higher probablity)
+ // average of everyone on our team
+ int iMaxWarRand = kTeam.AI_maxWarRand();
+ int iLimitedWarRand = kTeam.AI_limitedWarRand();
+ int iDogpileWarRand = kTeam.AI_dogpileWarRand();
+
+ // we oppose war if half the non-dagger teammates in financial trouble
+ bool bFinancesOpposeWar = false;
+ if ((iFinancialTroubleCount - iDaggerCount) >= max(1, kTeam.getNumMembers() / 2 ))
+ {
+ // this can be overridden by by the pro-war booleans
+ bFinancesOpposeWar = true;
+ }
+
+ // if agressive, we may start a war to get money
+ bool bFinancesProMaxWar = false;
+ bool bFinancesProLimitedWar = false;
+ bool bFinancesProDogpileWar = false;
+ if (iFinancialTroubleCount > 0)
+ {
+ // do we like all out wars?
+ if (iDaggerCount > 0 || iMaxWarRand < 100)
+ {
+ bFinancesProMaxWar = true;
+ }
+
+ // do we like limited wars?
+ if (iLimitedWarRand < 100)
+ {
+ bFinancesProLimitedWar = true;
+ }
+
+ // do we like dogpile wars?
+ if (iDogpileWarRand < 100)
+ {
+ bFinancesProDogpileWar = true;
+ }
+ }
+ bool bFinancialProWar = (bFinancesProMaxWar || bFinancesProLimitedWar || bFinancesProDogpileWar);
+
+ // overall war check (quite frequently true)
+ if (bFinancialProWar || !bFinancesOpposeWar)
+ {
+ fOverallWarPercentage = (float) GC.getHandicapInfo(GC.getGameINLINE().getHandicapType()).getAIDeclareWarProb();
+
+ // if non-agressive, random based on number of cities (the more cities, the less war)
+ if (!(bAggressive || bFinancialProWar))
+ {
+ fOverallWarPercentage /= kTeam.getNumCities();
+ }
+ }
+
+ // we will put the values into an array, then sort it for display
+ int iBestPossibleMaxWarPass = MAX_INT;
+ struct CvStartWarInfo
+ {
+ int iStartWarValue;
+ int iNoWarAttitudeProb;
+ int iPossibleMaxWarPass;
+ bool bPossibleLimitedWar;
+ bool bPossibleDogpileWar;
+
+ bool bValid;
+ bool bIsLandTarget;
+ bool bIsAnyCapitalAreaAlone;
+ bool bAdjacentCheckPassed;
+ bool bIsMaxWarNearbyPowerRatio;
+ bool bIsMaxWarDistantPowerRatio;
+ } aStartWarInfo[MAX_TEAMS];
+
+ // first calculate all the values and put into array
+ for (int iTeamIndex = 0; iTeamIndex < MAX_TEAMS; iTeamIndex++)
+ {
+ aStartWarInfo[iTeamIndex].bValid = false;
+
+ TeamTypes eLoopTeam = (TeamTypes) iTeamIndex;
+ CvTeamAI& kLoopTeam = GET_TEAM(eLoopTeam);
+ if (eLoopTeam != eTeam && kLoopTeam.isAlive() && !kLoopTeam.isBarbarian())
+ {
+ WarPlanTypes eWarPlan = kTeam.AI_getWarPlan(eLoopTeam);
+ if (!kTeam.isAtWar(eLoopTeam) && (eWarPlan == NO_WARPLAN))
+ {
+ if (kTeam.canDeclareWar(eLoopTeam) && kTeam.isHasMet(eLoopTeam))
+ {
+ aStartWarInfo[iTeamIndex].bValid = true;
+
+ int iLoopTeamPower = kLoopTeam.getDefensivePower();
+ bool bIsLandTarget = kTeam.AI_isLandTarget(eLoopTeam);
+ aStartWarInfo[iTeamIndex].bIsLandTarget = bIsLandTarget;
+
+ int iNoWarAttitudeProb = kTeam.AI_noWarAttitudeProb(kTeam.AI_getAttitude(eLoopTeam));
+ aStartWarInfo[iTeamIndex].iNoWarAttitudeProb = iNoWarAttitudeProb;
+
+ // total war
+ aStartWarInfo[iTeamIndex].iPossibleMaxWarPass = MAX_INT;
+ if (iNoWarAttitudeProb < 100 && (bFinancesProMaxWar || !bFinancesOpposeWar))
+ {
+ int iNoWarChance = max(0, iNoWarAttitudeProb - (bAggressive ? 10 : 0) - (bFinancesProMaxWar ? 10 : 0));
+ if (iNoWarChance < 100)
+ {
+ bool bIsMaxWarNearbyPowerRatio = (iLoopTeamPower < ((iTeamPower * kTeam.AI_maxWarNearbyPowerRatio()) / 100));
+ bool bIsMaxWarDistantPowerRatio = (iLoopTeamPower < ((iTeamPower * kTeam.AI_maxWarDistantPowerRatio()) / 100));
+ aStartWarInfo[iTeamIndex].bIsMaxWarNearbyPowerRatio = bIsMaxWarNearbyPowerRatio;
+ aStartWarInfo[iTeamIndex].bIsMaxWarDistantPowerRatio = bIsMaxWarDistantPowerRatio;
+
+ bool bAdjacentCheckPassed = true;
+ int iMaxWarMinAdjacentPercent = kTeam.AI_maxWarMinAdjacentLandPercent();
+ if (iMaxWarMinAdjacentPercent > 0)
+ {
+ int iMinAdjacentPlots = ((kTeam.getTotalLand() * iMaxWarMinAdjacentPercent) / 100);
+ if (iMinAdjacentPlots > 0)
+ {
+ bAdjacentCheckPassed = (kTeam.AI_calculateAdjacentLandPlots(eLoopTeam) >= iMinAdjacentPlots);
+ }
+ }
+ aStartWarInfo[iTeamIndex].bAdjacentCheckPassed = bAdjacentCheckPassed;
+
+ // check to see which mass war pass, if any is valid for this loop team
+ int iPossibleMaxWarPass = MAX_INT;
+ if (bIsMaxWarNearbyPowerRatio && bAdjacentCheckPassed)
+ {
+ iPossibleMaxWarPass = 0;
+ }
+ else if (bIsMaxWarNearbyPowerRatio && (bIsLandTarget || bIsAnyCapitalAreaAlone))
+ {
+ iPossibleMaxWarPass = 1;
+ }
+
+ else if (bIsMaxWarDistantPowerRatio)
+ {
+ iPossibleMaxWarPass = 2;
+ }
+ aStartWarInfo[iTeamIndex].iPossibleMaxWarPass = iPossibleMaxWarPass;
+
+ // if this team is valid on a lower pass, then it is the best pass
+ if (iPossibleMaxWarPass < iBestPossibleMaxWarPass)
+ {
+ iBestPossibleMaxWarPass = iPossibleMaxWarPass;
+ }
+ }
+ }
+
+ // limited war
+ aStartWarInfo[iTeamIndex].bPossibleLimitedWar = false;
+ if (iNoWarAttitudeProb < 100 && (bFinancesProLimitedWar || !bFinancesOpposeWar))
+ {
+ int iNoWarChance = max(0, iNoWarAttitudeProb + 10 - (bAggressive ? 10 : 0) - (bFinancesProLimitedWar ? 10 : 0));
+ if (iNoWarChance < 100)
+ {
+ bool bIsLimitedPowerRatio = (iLoopTeamPower < ((iTeamPower * kTeam.AI_limitedWarPowerRatio()) / 100));
+ bool bIsAnyLoopTeamCapitalAreaAlone = kLoopTeam.AI_isAnyCapitalAreaAlone();
+
+ if (bIsLimitedPowerRatio && (bIsLandTarget || (bIsAnyCapitalAreaAlone && bIsAnyLoopTeamCapitalAreaAlone)))
+ {
+ aStartWarInfo[iTeamIndex].bPossibleLimitedWar = true;
+ }
+ }
+ }
+
+ // dogpile war
+ aStartWarInfo[iTeamIndex].bPossibleDogpileWar = false;
+ if (iNoWarAttitudeProb < 100 && (bFinancesProDogpileWar || !bFinancesOpposeWar))
+ {
+ int iNoWarChance = max(0, iNoWarAttitudeProb + 20 - (bAggressive ? 10 : 0) - (bFinancesProDogpileWar ? 10 : 0));
+ if (iNoWarChance < 100)
+ {
+ int iDogpilePower = 0;
+ for (int iTeamIndex2 = 0; iTeamIndex2 < MAX_CIV_TEAMS; iTeamIndex2++)
+ {
+ TeamTypes eDogpileLoopTeam = (TeamTypes) iTeamIndex2;
+ CvTeamAI& kDogpileLoopTeam = GET_TEAM(eDogpileLoopTeam);
+ if (kDogpileLoopTeam.isAlive())
+ {
+ if (eDogpileLoopTeam != eLoopTeam)
+ {
+ if (atWar(eDogpileLoopTeam, eLoopTeam))
+ {
+ iDogpilePower += kDogpileLoopTeam.getPower(false);
+ }
+ }
+ }
+ }
+
+ bool bIsDogpilePowerRatio = (((iLoopTeamPower * 3) / 2) < iDogpilePower);
+
+ if (bIsDogpilePowerRatio)
+ {
+ aStartWarInfo[iTeamIndex].bPossibleDogpileWar = true;
+ }
+ }
+ }
+
+ // if this team can have any war, calculate the start war value
+ aStartWarInfo[iTeamIndex].iStartWarValue = 0;
+ if (aStartWarInfo[iTeamIndex].iPossibleMaxWarPass < MAX_INT || aStartWarInfo[iTeamIndex].bPossibleLimitedWar || aStartWarInfo[iTeamIndex].bPossibleDogpileWar)
+ {
+ aStartWarInfo[iTeamIndex].iStartWarValue = kTeam.AI_startWarVal(eLoopTeam);
+ }
+ }
+ }
+ }
+ }
+
+ // display total war items, sorting the list
+ bHadAny = false;
+ bFirst = true;
+ int iBestValue;
+ int iLastValue = MAX_INT;
+ do
+ {
+ // find the highest value item left to do
+ iBestValue = 0;
+ for (int iTeamIndex = 0; iTeamIndex < MAX_TEAMS; iTeamIndex++)
+ {
+ if (aStartWarInfo[iTeamIndex].bValid && aStartWarInfo[iTeamIndex].iPossibleMaxWarPass < MAX_INT)
+ {
+ if (aStartWarInfo[iTeamIndex].iStartWarValue > iBestValue && aStartWarInfo[iTeamIndex].iStartWarValue < iLastValue)
+ {
+ iBestValue = aStartWarInfo[iTeamIndex].iStartWarValue;
+ }
+ }
+ }
+
+ // did we find one?
+ if (iBestValue > 0)
+ {
+ // setup for next loop
+ iLastValue = iBestValue;
+
+ // now display every team that has that value
+ for (int iTeamIndex = 0; iTeamIndex < MAX_TEAMS; iTeamIndex++)
+ {
+ if (aStartWarInfo[iTeamIndex].bValid && aStartWarInfo[iTeamIndex].iStartWarValue == iBestValue)
+ {
+ CvTeamAI& kLoopTeam = GET_TEAM((TeamTypes) iTeamIndex);
+
+ if (bFirst)
+ {
+ float fMaxWarPercentage = (fOverallWarPercentage * (iTotalWarRandThreshold + 1)) / iMaxWarRand;
+ szBuffer += CvWString::format(SETCOLR L"%.2f%% [%d/%d] Total War:\n" ENDCOLR, TEXT_COLOR("COLOR_UNIT_TEXT"), fMaxWarPercentage, (iTotalWarRandThreshold + 1), iMaxWarRand);
+ bFirst = false;
+ }
+
+ bHadAny = true;
+
+ int iNoWarChance = max(0, aStartWarInfo[iTeamIndex].iNoWarAttitudeProb - (bAggressive ? 10 : 0) - (bFinancesProMaxWar ? 10 : 0));
+ int iTeamWarPercentage = (100 - iNoWarChance);
+
+ if (aStartWarInfo[iTeamIndex].iPossibleMaxWarPass <= iBestPossibleMaxWarPass)
+ {
+ szBuffer += CvWString::format(SETCOLR L" %d%% %s war (%d) with %s\n" ENDCOLR, TEXT_COLOR("COLOR_ALT_HIGHLIGHT_TEXT"),
+ iTeamWarPercentage,
+ (aStartWarInfo[iTeamIndex].bIsLandTarget) ? L"land" : L"sea",
+ aStartWarInfo[iTeamIndex].iStartWarValue,
+ kLoopTeam.getName().GetCString());
+ }
+ else
+ {
+ szBuffer += CvWString::format(SETCOLR L" (%d%% %s war (%d) with %s [%s%s])\n" ENDCOLR, TEXT_COLOR("COLOR_HIGHLIGHT_TEXT"),
+ iTeamWarPercentage,
+ (aStartWarInfo[iTeamIndex].bIsLandTarget) ? L"land" : L"sea",
+ aStartWarInfo[iTeamIndex].iStartWarValue,
+ kLoopTeam.getName().GetCString(),
+ (iBestPossibleMaxWarPass == 0) ? ((aStartWarInfo[iTeamIndex].bIsMaxWarNearbyPowerRatio) ? L"not adjacent" : L"low power") : L"",
+ (iBestPossibleMaxWarPass == 1) ? ((aStartWarInfo[iTeamIndex].bIsMaxWarNearbyPowerRatio) ? L"not land" : L"low power") : L"");
+ }
+ }
+ }
+ }
+ }
+ while (iBestValue > 0);
+
+ // double space if had any war
+ if (bHadAny)
+ {
+ szBuffer += NEWLINE;
+ }
+
+ // display limited war items, sorting the list
+ bHadAny = false;
+ bFirst = true;
+ iLastValue = MAX_INT;
+ do
+ {
+ // find the highest value item left to do
+ iBestValue = 0;
+ for (int iTeamIndex = 0; iTeamIndex < MAX_TEAMS; iTeamIndex++)
+ {
+ if (aStartWarInfo[iTeamIndex].bValid && aStartWarInfo[iTeamIndex].bPossibleLimitedWar)
+ {
+ if (aStartWarInfo[iTeamIndex].iStartWarValue > iBestValue && aStartWarInfo[iTeamIndex].iStartWarValue < iLastValue)
+ {
+ iBestValue = aStartWarInfo[iTeamIndex].iStartWarValue;
+ }
+ }
+ }
+
+ // did we find one?
+ if (iBestValue > 0)
+ {
+ // setup for next loop
+ iLastValue = iBestValue;
+
+ // now display every team that has that value
+ for (int iTeamIndex = 0; iTeamIndex < MAX_TEAMS; iTeamIndex++)
+ {
+ if (aStartWarInfo[iTeamIndex].bValid && aStartWarInfo[iTeamIndex].iStartWarValue == iBestValue)
+ {
+ if (bFirst)
+ {
+ float fLimitedWarPercentage = fOverallWarPercentage / iLimitedWarRand;
+ szBuffer += CvWString::format(SETCOLR L"%.2f%% Limited War:\n" ENDCOLR, TEXT_COLOR("COLOR_UNIT_TEXT"), fLimitedWarPercentage);
+ bFirst = false;
+ }
+
+ bHadAny = true;
+
+ int iNoWarChance = max(0, aStartWarInfo[iTeamIndex].iNoWarAttitudeProb + 10 - (bAggressive ? 10 : 0) - (bFinancesProLimitedWar ? 10 : 0));
+ int iTeamWarPercentage = (100 - iNoWarChance);
+
+ szBuffer += CvWString::format(SETCOLR L" %d%% %s war (%d) with %s\n" ENDCOLR, TEXT_COLOR("COLOR_ALT_HIGHLIGHT_TEXT"),
+ iTeamWarPercentage,
+ (aStartWarInfo[iTeamIndex].bIsLandTarget) ? L"land" : L"sea",
+ aStartWarInfo[iTeamIndex].iStartWarValue,
+ GET_TEAM((TeamTypes) iTeamIndex).getName().GetCString());
+ }
+ }
+ }
+ }
+ while (iBestValue > 0);
+
+ // double space if had any war
+ if (bHadAny)
+ {
+ szBuffer += NEWLINE;
+ }
+
+ // display dogpile war items, sorting the list
+ bHadAny = false;
+ bFirst = true;
+ iLastValue = MAX_INT;
+ do
+ {
+ // find the highest value item left to do
+ iBestValue = 0;
+ for (int iTeamIndex = 0; iTeamIndex < MAX_TEAMS; iTeamIndex++)
+ {
+ if (aStartWarInfo[iTeamIndex].bValid && aStartWarInfo[iTeamIndex].bPossibleDogpileWar)
+ {
+ if (aStartWarInfo[iTeamIndex].iStartWarValue > iBestValue && aStartWarInfo[iTeamIndex].iStartWarValue < iLastValue)
+ {
+ iBestValue = aStartWarInfo[iTeamIndex].iStartWarValue;
+ }
+ }
+ }
+
+ // did we find one?
+ if (iBestValue > 0)
+ {
+ // setup for next loop
+ iLastValue = iBestValue;
+
+ // now display every team that has that value
+ for (int iTeamIndex = 0; iTeamIndex < MAX_TEAMS; iTeamIndex++)
+ {
+ if (aStartWarInfo[iTeamIndex].bValid && aStartWarInfo[iTeamIndex].iStartWarValue == iBestValue)
+ {
+ if (bFirst)
+ {
+ float fDogpileWarPercentage = fOverallWarPercentage / iDogpileWarRand;
+ szBuffer += CvWString::format(SETCOLR L"%.2f%% Dogpile War:\n" ENDCOLR, TEXT_COLOR("COLOR_UNIT_TEXT"), fDogpileWarPercentage);
+ bFirst = false;
+ }
+
+ bHadAny = true;
+
+ int iNoWarChance = max(0, aStartWarInfo[iTeamIndex].iNoWarAttitudeProb + 20 - (bAggressive ? 10 : 0) - (bFinancesProDogpileWar ? 10 : 0));
+ int iTeamWarPercentage = (100 - iNoWarChance);
+
+ szBuffer += CvWString::format(SETCOLR L" %d%% %s war (%d) with %s\n" ENDCOLR, TEXT_COLOR("COLOR_ALT_HIGHLIGHT_TEXT"),
+ iTeamWarPercentage,
+ (aStartWarInfo[iTeamIndex].bIsLandTarget) ? L"land" : L"sea",
+ aStartWarInfo[iTeamIndex].iStartWarValue,
+ GET_TEAM((TeamTypes) iTeamIndex).getName().GetCString());
+ }
+ }
+ }
+ }
+ while (iBestValue > 0);
+
+ // double space if had any war
+ if (bHadAny)
+ {
+ szBuffer += NEWLINE;
+ }
+ }
+
+ // Show score info instead if we are trying to contact ourselves...
+ if (eActivePlayer == ePlayer)
+ {
parseScoreHelp(widgetDataStruct, szBuffer);
return;
}
- szBuffer = gDLL->getText("TXT_KEY_MISC_CONTACT_LEADER", GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1).getNameKey(), GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1).getCivilizationShortDescription());
+ szBuffer += gDLL->getText("TXT_KEY_MISC_CONTACT_LEADER", kPlayer.getNameKey(), kPlayer.getCivilizationShortDescription());
- if (!(GET_TEAM(GC.getGameINLINE().getActiveTeam()).isHasMet(GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1).getTeam())))
+ if (!(kActiveTeam.isHasMet(eTeam)))
{
szBuffer += NEWLINE + gDLL->getText("TXT_KEY_MISC_HAVENT_MET_CIV");
}
else
{
- if (!(GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1).isHuman()))
+ if (!(kPlayer.isHuman()))
{
- if (!(GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1).AI_isWillingToTalk(GC.getGameINLINE().getActivePlayer())))
+ if (!(kPlayer.AI_isWillingToTalk(eActivePlayer)))
{
szBuffer += NEWLINE + gDLL->getText("TXT_KEY_MISC_REFUSES_TO_TALK");
}
szBuffer += NEWLINE;
- GAMETEXT.getAttitudeString(szBuffer, ((PlayerTypes)widgetDataStruct.m_iData1), GC.getGameINLINE().getActivePlayer());
+ GAMETEXT.getAttitudeString(szBuffer, ePlayer, eActivePlayer);
szBuffer += NEWLINE + gDLL->getText("TXT_KEY_MISC_CTRL_TRADE");
}
- if ((GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1).getTeam() != GC.getGameINLINE().getActiveTeam()) && !(GET_TEAM(GC.getGameINLINE().getActiveTeam()).isAtWar(GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1).getTeam())))
+ if (eTeam != eActiveTeam && !(kActiveTeam.isAtWar(eTeam)))
{
- if (GET_TEAM(GC.getGameINLINE().getActiveTeam()).canDeclareWar(GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1).getTeam()))
+ if (kActiveTeam.canDeclareWar(eTeam))
{
szBuffer += NEWLINE + gDLL->getText("TXT_KEY_MISC_ALT_DECLARE_WAR");
}
@@ -2998,7 +3601,7 @@
}
}
- if (GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1).isHuman())
+ if (kPlayer.isHuman())
{
// szBuffer += "\n(<SHIFT> to Send Chat Message)";
szBuffer += NEWLINE + gDLL->getText("TXT_KEY_MISC_SHIFT_SEND_CHAT");
@@ -3435,6 +4038,13 @@
if (pHeadSelectedCity != NULL)
{
szBuffer = gDLL->getText("TXT_KEY_MISC_FOOD_THRESHOLD", pHeadSelectedCity->getFood(), pHeadSelectedCity->growthThreshold());
+
+ // if chipotle and alt key down, show extra info
+ if (gDLL->altKey() && gDLL->getChtLvl() > 0)
+ {
+ szBuffer += NEWLINE;
+ GAMETEXT.setCityWorkMatrixString(szBuffer, pHeadSelectedCity);
+ }
}
}
@@ -3451,6 +4061,13 @@
{
szBuffer.Format(L"%s: %d/%d %c", pHeadSelectedCity->getProductionName(), pHeadSelectedCity->getProduction(), pHeadSelectedCity->getProductionNeeded(), GC.getYieldInfo(YIELD_PRODUCTION).getChar());
}
+
+ // if chipotle and alt key down, show extra info
+ if (gDLL->altKey() && gDLL->getChtLvl() > 0)
+ {
+ szBuffer += NEWLINE;
+ GAMETEXT.setCityWorkMatrixString(szBuffer, pHeadSelectedCity);
+ }
}
}
Modified: CvGameCoreDLL/CvGame.cpp
===================================================================
--- CvGameCoreDLL/CvGame.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CvGame.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -74,6 +74,8 @@
m_pReplayInfo = NULL;
+ maiShrineReligion[iI] = new int [GC.getNumReligionInfos()];
+
reset(NO_HANDICAP, true);
}
Modified: CvGameCoreDLL/CvGameAI.cpp
===================================================================
--- CvGameCoreDLL/CvGameAI.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CvGameAI.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -112,7 +112,7 @@
{
iValue *= GC.getUnitInfo(eUnit).getCombat();
- iValue *= ((((GC.getUnitInfo(eUnit).getFirstStrikes() * 2) + GC.getUnitInfo(eUnit).getChanceFirstStrikes()) * ((GC.getDefineINT("COMBAT_DAMAGE") * 2) / 5)) + 100);
+ iValue *= ((((GC.getUnitInfo(eUnit).getFirstStrikes() * 2) + GC.getUnitInfo(eUnit).getChanceFirstStrikes()) * (GC.getDefineINT("COMBAT_DAMAGE") / 5)) + 100);
iValue /= 100;
}
Modified: CvGameCoreDLL/CvGameCoreDLL.depend
===================================================================
--- CvGameCoreDLL/CvGameCoreDLL.depend 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CvGameCoreDLL.depend 2007-03-30 04:15:10 UTC (rev 46)
@@ -31258,7 +31258,7 @@
1173731816 c:\sdk\cccp dll\cymap.h
-1174759579 c:\sdk\cccp dll\cyplayer.h
+1174815782 c:\sdk\cccp dll\cyplayer.h
1174759495 c:\sdk\cccp dll\cyplot.h
@@ -31328,7 +31328,7 @@
1173731815 c:\sdk\cccp dll\cvfractal.h
-1173731816 c:\sdk\cccp dll\cvgameai.cpp
+1174816999 c:\sdk\cccp dll\cvgameai.cpp
"CvGameCoreDLL.h"
"CvGameAI.h"
"CvPlayerAI.h"
@@ -31670,7 +31670,7 @@
"CvGameAI.h"
"CvGlobals.h"
-1174206642 c:\sdk\cccp dll\cvteam.cpp
+1174816943 c:\sdk\cccp dll\cvteam.cpp
"CvGameCoreDLL.h"
"CvPlayerAI.h"
"CvDefines.h"
@@ -31709,7 +31709,7 @@
"CyArgsList.h"
"CvDLLPythonIFaceBase.h"
-1174757675 c:\sdk\cccp dll\cvunit.cpp
+1174764349 c:\sdk\cccp dll\cvunit.cpp
"CvGameCoreDLL.h"
"CvUnit.h"
"CvArea.h"
@@ -31854,7 +31854,7 @@
1173731815 c:\sdk\cccp dll\cydeal.h
-1173731815 c:\sdk\cccp dll\cyenumsinterface.cpp
+1174813056 c:\sdk\cccp dll\cyenumsinterface.cpp
"CvGameCoreDLL.h"
"CvEnums.h"
"CvGameCoreDLLUnDefNew.h"
@@ -31998,15 +31998,15 @@
"CyHallOfFameInfo.h"
"CyMap.h"
-1173731816 c:\sdk\cccp dll\cyinfointerface1.cpp
+1174814610 c:\sdk\cccp dll\cyinfointerface1.cpp
"CvGameCoreDLL.h"
"CvInfos.h"
-1173731815 c:\sdk\cccp dll\cyinfointerface2.cpp
+1174814711 c:\sdk\cccp dll\cyinfointerface2.cpp
"CvGameCoreDLL.h"
"CvInfos.h"
-1173731816 c:\sdk\cccp dll\cyinfointerface3.cpp
+1174814950 c:\sdk\cccp dll\cyinfointerface3.cpp
"CvGameCoreDLL.h"
"CvInfos.h"
@@ -32048,7 +32048,7 @@
"CyUnit.h"
"CyPlot.h"
-1173731816 c:\sdk\cccp dll\cyplayer.cpp
+1174815460 c:\sdk\cccp dll\cyplayer.cpp
"CvGameCoreDLL.h"
"CyPlayer.h"
"CyUnit.h"
@@ -32072,7 +32072,7 @@
"CySelectionGroup.h"
"CyArea.h"
-1173731815 c:\sdk\cccp dll\cyplot.cpp
+1174816070 c:\sdk\cccp dll\cyplot.cpp
"CvGameCoreDLL.h"
"CyPlot.h"
"CyCity.h"
@@ -32080,7 +32080,7 @@
"CyUnit.h"
"CvPlot.h"
-1173731815 c:\sdk\cccp dll\cyplotinterface1.cpp
+1174815990 c:\sdk\cccp dll\cyplotinterface1.cpp
"CvGameCoreDLL.h"
"CyPlot.h"
"CyCity.h"
@@ -32189,7 +32189,7 @@
"CvUnit.h"
"CvInfos.h"
-1173731815 c:\sdk\cccp dll\cyteam.cpp
+1174815927 c:\sdk\cccp dll\cyteam.cpp
"CvGameCoreDLL.h"
"CyTeam.h"
"CyArea.h"
@@ -32200,7 +32200,7 @@
"CyArea.h"
"CyTeam.h"
-1174760037 c:\sdk\cccp dll\cyunit.cpp
+1174816479 c:\sdk\cccp dll\cyunit.cpp
"CvGameCoreDLL.h"
"CyUnit.h"
"CyCity.h"
@@ -32213,7 +32213,7 @@
"CvDLLInterfaceIFaceBase.h"
"CvGlobals.h"
-1173731816 c:\sdk\cccp dll\cyunitinterface1.cpp
+1174815894 c:\sdk\cccp dll\cyunitinterface1.cpp
"CvGameCoreDLL.h"
"CyUnit.h"
"CyCity.h"
Modified: CvGameCoreDLL/CvGameCoreDLL.layout
===================================================================
--- CvGameCoreDLL/CvGameCoreDLL.layout 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CvGameCoreDLL.layout 2007-03-30 04:15:10 UTC (rev 46)
@@ -11,40 +11,46 @@
<Cursor position="3655" topLine="62"/>
</File>
<File name="CvCity.cpp" open="1" top="0">
- <Cursor position="269690" topLine="10489"/>
+ <Cursor position="7523" topLine="203"/>
</File>
<File name="CvCity.h" open="1" top="0">
<Cursor position="50800" topLine="980"/>
</File>
<File name="CvCityAI.cpp" open="1" top="0">
- <Cursor position="132311" topLine="4225"/>
+ <Cursor position="281749" topLine="9312"/>
</File>
<File name="CvCityAI.h" open="1" top="0">
<Cursor position="4693" topLine="123"/>
</File>
+ <File name="CvDLLWidgetData.cpp" open="1" top="0">
+ <Cursor position="94109" topLine="3017"/>
+ </File>
<File name="CvDeal.cpp" open="1" top="0">
<Cursor position="1783" topLine="48"/>
</File>
<File name="CvDefines.h" open="1" top="0">
- <Cursor position="785" topLine="0"/>
+ <Cursor position="817" topLine="0"/>
</File>
<File name="CvEnums.h" open="1" top="0">
<Cursor position="52776" topLine="0"/>
</File>
<File name="CvGame.cpp" open="1" top="0">
- <Cursor position="110230" topLine="4015"/>
+ <Cursor position="1955" topLine="50"/>
</File>
- <File name="CvGameCoreUtils.h" open="1" top="0">
+ <File name="CvGame.h" open="1" top="0">
+ <Cursor position="26238" topLine="556"/>
+ </File>
+ <File name="CvGameCoreUtils.h" open="1" top="1">
<Cursor position="27067" topLine="882"/>
</File>
<File name="CvGameTextMgr.cpp" open="1" top="0">
<Cursor position="64106" topLine="1882"/>
</File>
<File name="CvGameTextMgr.h" open="1" top="0">
- <Cursor position="12646" topLine="136"/>
+ <Cursor position="13592" topLine="130"/>
</File>
<File name="CvGlobals.cpp" open="1" top="0">
- <Cursor position="64379" topLine="2791"/>
+ <Cursor position="59850" topLine="2705"/>
</File>
<File name="CvGlobals.h" open="1" top="0">
<Cursor position="27563" topLine="741"/>
@@ -62,10 +68,10 @@
<Cursor position="13076" topLine="209"/>
</File>
<File name="CvPlayerAI.cpp" open="1" top="0">
- <Cursor position="337481" topLine="11512"/>
+ <Cursor position="334587" topLine="11419"/>
</File>
<File name="CvPlayerAI.h" open="1" top="0">
- <Cursor position="12172" topLine="303"/>
+ <Cursor position="12517" topLine="318"/>
</File>
<File name="CvPlot.cpp" open="1" top="0">
<Cursor position="44907" topLine="1916"/>
@@ -83,10 +89,10 @@
<Cursor position="107922" topLine="4112"/>
</File>
<File name="CvUnit.cpp" open="1" top="0">
- <Cursor position="287098" topLine="11138"/>
+ <Cursor position="198199" topLine="8309"/>
</File>
<File name="CvUnit.h" open="1" top="0">
- <Cursor position="37613" topLine="687"/>
+ <Cursor position="36809" topLine="667"/>
</File>
<File name="CvUnitAI.cpp" open="1" top="0">
<Cursor position="194136" topLine="9022"/>
@@ -130,7 +136,7 @@
<File name="CyInfoInterface1.cpp" open="1" top="0">
<Cursor position="14989" topLine="233"/>
</File>
- <File name="CyPlayer.h" open="1" top="1">
- <Cursor position="5616" topLine="118"/>
+ <File name="CyPlayer.h" open="1" top="0">
+ <Cursor position="4141" topLine="68"/>
</File>
</CodeBlocks_layout_file>
Modified: CvGameCoreDLL/CvGameCoreDLL.vcproj
===================================================================
--- CvGameCoreDLL/CvGameCoreDLL.vcproj 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CvGameCoreDLL.vcproj 2007-03-30 04:15:10 UTC (rev 46)
@@ -29,8 +29,8 @@
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CVGAMECOREDLL_EXPORTS"
MinimalRebuild="FALSE"
ExceptionHandling="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
BufferSecurityCheck="FALSE"
EnableFunctionLevelLinking="TRUE"
RuntimeTypeInfo="TRUE"
@@ -46,12 +46,13 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="boost_python-vc71-mt-gd-1_32.lib winmm.lib"
- OutputFile="../Warlords/Assets/CvGameCoreDLL_DEBUG.dll"
+ AdditionalDependencies="boost_python-vc71-mt-1_32.lib winmm.lib msvcprt.lib"
+ OutputFile="../Warlords/Assets/CvGameCoreDLL.dll"
LinkIncremental="2"
AdditionalLibraryDirectories="Python24\libs;"boost-1.32.0\libs\""
+ IgnoreDefaultLibraryNames="msvcprtd.lb"
GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/CvGameCoreDLL_DEBUG.pdb"
+ ProgramDatabaseFile="$(OutDir)/CvGameCoreDLL.pdb"
SubSystem="2"
ImportLibrary="$(OutDir)/CvGameCoreDLL.lib"
TargetMachine="1"/>
Modified: CvGameCoreDLL/CvGlobals.cpp
===================================================================
--- CvGameCoreDLL/CvGlobals.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CvGlobals.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -2738,13 +2738,11 @@
return it->second;
}
-
// < Suppressed Error for NONE value by Mexico Start >
if(strcmp(szType,"NONE")!=0)
{
CvString szError;
szError.Format("info type %s not found, Current XML file is: %s", szType, GC.getCurrentXMLFile().GetCString());
- FAssertMsg(strcmp(szType, "NONE")==0, szError.c_str());
gDLL->logMsg("xml.log", szError);
}
// < Supressed Error for NONE vale End >
Modified: CvGameCoreDLL/CvPlayer.cpp
===================================================================
--- CvGameCoreDLL/CvPlayer.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CvPlayer.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -13424,8 +13424,8 @@
CvCity* pLoopCity;
int iLoop;
- FAssertMsg(eIndex1 >= 0, "eIndex is expected to be non-negative (invalid Index)");
- FAssertMsg(eIndex2 < NUM_YIELD_TYPES, "eIndex is expected to be within maximum bounds (invalid Index)");
+ FAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");
+ FAssertMsg(eIndex < NUM_YIELD_TYPES, "eIndex is expected to be within maximum bounds (invalid Index)");
if (iChange != 0)
{
@@ -13451,8 +13451,8 @@
CvCity* pLoopCity;
int iLoop;
- FAssertMsg(eIndex1 >= 0, "eIndex is expected to be non-negative (invalid Index)");
- FAssertMsg(eIndex2 < NUM_COMMERCE_TYPES, "eIndex is expected to be within maximum bounds (invalid Index)");
+ FAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");
+ FAssertMsg(eIndex < NUM_COMMERCE_TYPES, "eIndex is expected to be within maximum bounds (invalid Index)");
if (iChange != 0)
{
Modified: CvGameCoreDLL/CvPlayerAI.cpp
===================================================================
--- CvGameCoreDLL/CvPlayerAI.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CvPlayerAI.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -65,6 +65,8 @@
m_aiGoldTradedTo = new int[MAX_PLAYERS];
m_aiAttitudeExtra = new int[MAX_PLAYERS];
+ m_aiFavoriteReligionCounter = new int[MAX_PLAYERS]; // < Favorite Religion by ??? >
+
m_abFirstContact = new bool[MAX_PLAYERS];
m_aaiContactTimer = new int*[MAX_PLAYERS];
@@ -1244,6 +1246,9 @@
case UNITAI_MERCHANT:
case UNITAI_ENGINEER:
case UNITAI_SPY:
+
+ case UNITAI_INQUISITOR; // < Inquisition by Lopez >
+
return DOMAIN_LAND;
break;
@@ -11451,9 +11456,7 @@
pStream->Read(MAX_PLAYERS, m_aiDifferentReligionCounter);
pStream->Read(MAX_PLAYERS, m_aiFavoriteCivicCounter);
- // < Favorite Religion Start >
- pStream->Read(MAX_PLAYERS, m_aiFavoriteReligionCounter);
- // < Favorite Religion End >
+ pStream->Read(MAX_PLAYERS, m_aiFavoriteReligionCounter); // < Favorite Religion by ??? >
pStream->Read(MAX_PLAYERS, m_aiBonusTradeCounter);
pStream->Read(MAX_PLAYERS, m_aiPeacetimeTradeValue);
@@ -11517,9 +11520,7 @@
pStream->Write(MAX_PLAYERS, m_aiDifferentReligionCounter);
pStream->Write(MAX_PLAYERS, m_aiFavoriteCivicCounter);
- // < Favorite Religion Start >
- pStream->Write(MAX_PLAYERS, m_aiFavoriteReligionCounter);
- // < Favorite Religion End >
+ pStream->Write(MAX_PLAYERS, m_aiFavoriteReligionCounter); // < Favorite Religion by ??? >
pStream->Write(MAX_PLAYERS, m_aiBonusTradeCounter);
pStream->Write(MAX_PLAYERS, m_aiPeacetimeTradeValue);
Modified: CvGameCoreDLL/CvTeam.cpp
===================================================================
--- CvGameCoreDLL/CvTeam.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CvTeam.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -79,7 +79,7 @@
SAFE_DELETE_ARRAY(m_abForcePeace);
SAFE_DELETE_ARRAY(m_abVassal);
- // <Tech Bonus Mod Start>
+ // <Tech Bonus Mod by Aussie Lurker Start>
SAFE_DELETE_ARRAY(m_aiYieldRateModifier);
SAFE_DELETE_ARRAY(m_aiCommerceRateModifier);
// <Tech Bonus Mod End>
@@ -174,17 +174,17 @@
m_aiTechShareCount[iI] = 0;
}
- // new Tech Bonus Rate Mod
+ // < Tech Bonus by Aussie Lurker Start >
for (iI = 0; iI < NUM_YIELD_TYPES; iI++)
{
m_aiYieldRateModifier[iI] = 0;
}
- // end
+ // < Tech Bonus End >
for (iI = 0; iI < NUM_COMMERCE_TYPES; iI++)
{
- m_aiCommerceRateModifier[iI] = 0; // Tech Bonus Rate Mod
m_aiCommerceFlexibleCount[iI] = 0;
+ m_aiCommerceRateModifier[iI] = 0; // < Tech Bonus by Aussie Lurker >
}
for (iI = 0; iI < NUM_DOMAIN_TYPES; iI++)
@@ -3629,6 +3629,8 @@
{
if (GET_PLAYER((PlayerTypes)iI).getTeam() == getID())
{
+ GET_PLAYER((PlayerTypes)iI).changeGlobalPandemicModifier(GC.getProjectInfo(eIndex).getGlobalPandemicModifier() * iChange); // < Pandemics by Mexico >
+
if (!(GET_PLAYER((PlayerTypes)iI).isHuman()))
{
bChangeProduction = false;
@@ -4480,26 +4482,11 @@
return;
}
- if (GC.getGameINLINE().isCircumnavigated())
+ if (!GC.getGameINLINE().circumnavigationAvailable())
{
return;
}
- if (GC.getDefineINT("CIRCUMNAVIGATE_FREE_MOVES") == 0)
- {
- return;
- }
-
- if (!(GC.getMapINLINE().isWrapXINLINE()) && !(GC.getMapINLINE().isWrapYINLINE()))
- {
- return;
- }
-
- if (GC.getMapINLINE().getLandPlots() > ((GC.getMapINLINE().numPlotsINLINE() * 2) / 3))
- {
- return;
- }
-
if (GC.getMapINLINE().isWrapXINLINE())
{
for (iX = 0; iX < GC.getMapINLINE().getGridWidthINLINE(); iX++)
@@ -4722,6 +4709,8 @@
GET_PLAYER((PlayerTypes)iI).changeAssets(GC.getTechInfo(eTech).getAssetValue() * iChange);
GET_PLAYER((PlayerTypes)iI).changePower(GC.getTechInfo(eTech).getPowerValue() * iChange);
GET_PLAYER((PlayerTypes)iI).changeTechScore(getTechScore(eTech) * iChange);
+
+ GET_PLAYER((PlayerTypes)iI).changeGlobalPandemicModifier(GC.getTechInfo(eTech).getGlobalPandemicModifier() * iChange); // < Pandemics by Mexico >
}
}
Modified: CvGameCoreDLL/CvUnit.cpp
===================================================================
--- CvGameCoreDLL/CvUnit.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CvUnit.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -10568,7 +10568,7 @@
void CvUnit::changeExtraInterceptionProbability(int iChange)
{
m_iExtraInterceptionProbability = (m_iExtraInterceptionProbability + iChange);
- FAssert(getInterceptionProbability() >= 0);
+ // FAssert(getInterceptionProbability() >= 0);
}
int CvUnit::getExtraEvasionProbability() const
@@ -10584,7 +10584,7 @@
void CvUnit::changeExtraEvasionProbability(int iChange)
{
m_iExtraEvasionProbability = (m_iExtraEvasionProbability + iChange);
- FAssert(getEvasionProbability() >= 0);
+ //FAssert(getEvasionProbability() >= 0);
}
// < Air Forces End >
Modified: CvGameCoreDLL/CyEnumsInterface.cpp
===================================================================
--- CvGameCoreDLL/CyEnumsInterface.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CyEnumsInterface.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -365,8 +365,9 @@
.value("WIDGET_GLOBELAYER_TOGGLE", WIDGET_GLOBELAYER_TOGGLE)
//----------------------------CCCP NEW------------------------------------
- .value("WIDGET_ZOOM_CITY_CDA", WIDGET_ZOOM_CITY_CDA) // Custom Domestic Advisor Widget>
+ .value("WIDGET_ZOOM_CITY_CDA", WIDGET_ZOOM_CITY_CDA) // < Custom Domestic Advisor Widget by Lopez >
+
.value("NUM_WIDGET_TYPES", NUM_WIDGET_TYPES)
;
@@ -809,6 +810,12 @@
.value("DENIAL_WORST_ENEMY", DENIAL_WORST_ENEMY)
.value("DENIAL_POWER_YOUR_ENEMIES", DENIAL_POWER_YOUR_ENEMIES)
.value("DENIAL_TOO_FAR", DENIAL_TOO_FAR)
+
+ //----------------------CCCP NEW-------------------------------------------
+
+ .value("DENIAL_FAVORITE_RELIGION", DENIAL_FAVORITE_RELIGION) // < Favorite Religion by ??? >
+
+
.value("NUM_DENIAL_TYPES", NUM_DENIAL_TYPES)
;
Modified: CvGameCoreDLL/CyInfoInterface1.cpp
===================================================================
--- CvGameCoreDLL/CyInfoInterface1.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CyInfoInterface1.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -100,10 +100,13 @@
//------------------------------CCCP NEW-------------------------------
- // <Tech Bonus Mod Start>
+ // <Tech Bonus Mod by Aussie Lurker Start>
.def("getYieldModifier", &CvTechInfo::getYieldModifier, "int (int i)")
.def("getCommerceModifier", &CvTechInfo::getCommerceModifier, "int (int i)")
// <Tech Bonus Mod End>
+
+ .def("getGlobalPandemicModifier", &CvTechInfo::getGlobalPandemicModifier, "int ()") // < Pandemics by Mexico >
+
;
python::class_<CvPromotionInfo, python::bases<CvInfoBase> >("CvPromotionInfo")
@@ -164,11 +167,11 @@
//--------------------------- CCCP NEW--------------------------------
- // < Air Forces Start >
+ // < Air Forces by Lopez Start >
.def("getAirRangeChange", &CvPromotionInfo::getAirRangeChange, "int ()")
.def("getInterceptionProbabilityChange", &CvPromotionInfo::getInterceptionProbabilityChange, "int ()")
.def("getEvasionProbabilityChange", &CvPromotionInfo::getEvasionProbabilityChange, "int ()")
- // < Air Forces End >
+ // < Air Forces End >
;
@@ -344,10 +347,27 @@
//--------------------------------CCCP NEW-----------------------------------------
- .def("isTheft", &CvUnitInfo::isTheft, "bool ()") // Additional Spy Missions by Impaler[WrG]
- .def("isEspionage", &CvUnitInfo::isEspionage, "bool ()") // Additional Spy Missions by Impaler[WrG]
- .def("isAssasinate", &CvUnitInfo::isAssasinate, "bool ()") // Additional Spy Missions by Impaler[WrG]
- .def("isInsurection", &CvUnitInfo::isInsurection, "bool ()") // Additional Spy Missions by Impaler[WrG]
+ .def("isTheft", &CvUnitInfo::isTheft, "bool ()") // < Spy Missions by Impaler[WrG] >
+ .def("isEspionage", &CvUnitInfo::isEspionage, "bool ()") // < Spy Missions by Impaler[WrG] >
+ .def("isAssasinate", &CvUnitInfo::isAssasinate, "bool ()") // < Spy Missions by Impaler[WrG] >
+ .def("isInsurection", &CvUnitInfo::isInsurection, "bool ()") // < Spy Missions by Impaler[WrG] >
+
+ .def("isFlying", &CvUnitInfo::isFlying, "bool ()") // < FlyingMod by RogerBacon >
+ .def("getEra", &CvUnitInfo::getEra, "int ()") // < Unit Era by Mexico >
+
+ .def("getPrereqAndBonuses", &CvUnitInfo::getPrereqAndBonuses, "int (int i)") // < Multi-Bonus Unit Requirement Start >
+
+ // < Building-class prereq for units by Mexico Start >
+ .def("isPrereqAndBuilding", &CvUnitInfo::isPrereqAndBuilding, "bool (int i)")
+ .def("isPrereqOrBuilding", &CvUnitInfo::isPrereqOrBuilding, "bool (int i)")
+ // < Building-class prereq for units End >
+
+ .def("isRemoveNonStateReligion", &CvUnitInfo::isRemoveNonStateReligion, "bool ()") // < Inquisition by Lopez >
+
+ .def("getPrereqCivic", &CvUnitInfo::getPrereqCivic, "int ()") // < Prereq Civics for Units by Lopez >
+
+ .def("getInterceptionLethality", &CvUnitInfo::getInterceptionLethality, "int ()") // < AirLethalityMod by Mongoose >
+
;
python::class_<CvSpecialUnitInfo, python::bases<CvInfoBase> >("CvSpecialUnitInfo")
@@ -426,7 +446,7 @@
//--------------------------------CCCP NEW--------------------------------------
- // < Changes Start >
+ // < Civics Balancer by Aussie Lurker Start >
.def("getStateReligionExtraHealth", &CvCivicInfo::getStateReligionExtraHealth, "int ()")
.def("getNonStateReligionExtraHealth", &CvCivicInfo::getNonStateReligionExtraHealth, "int ()")
.def("getTradeCommerceModifier", &CvCivicInfo::getTradeCommerceModifier, "int (int i)")
@@ -438,7 +458,9 @@
.def("getNonStateReligionCommerceModifier", &CvCivicInfo::getNonStateReligionCommerceModifier, "int (int i)")
.def("getBuildingYieldChanges", &CvCivicInfo::getBuildingYieldChanges, "int (int i, int j)")
.def("getBuildingCommerceChanges", &CvCivicInfo::getBuildingCommerceChanges, "int (int i, int j)")
- // < Changes End >
+ // < Civics Balancer End >
+
+ .def("getGlobalPandemicModifier", &CvCivicInfo::getGlobalPandemicModifier, "int ()") // < Pandemics by Mexico >
;
python::class_<CvUnitClassInfo, python::bases<CvInfoBase> >("CvUnitClassInfo")
@@ -596,14 +618,14 @@
.def("getArtInfo", &CvBuildingInfo::getArtInfo, python::return_value_policy<python::reference_existing_object>())
- //-------------------CCCP NEW------------------------
+ //---------------------------CCCP NEW-----------------------------
- //Start Addition LocalSpecialistYieldChange by Impaler[WrG]
+ // < Local Specialist Yield Change by Impaler[WrG] >
.def("getLocalSpecialistTypeYieldChange", &CvBuildingInfo::getLocalSpecialistYieldChange, "int (int i, int j)")
.def("getLocalSpecialistTypeCommerceChange", &CvBuildingInfo::getLocalSpecialistCommerceChange, "int (int i, int j)")
- //End Addition by Impaler[WrG]
+ // < Local Specialist Yield Change End >
- // < Building Resource Converter Start >
+ // < Building Resource Converter by Lopez Start >
.def("isBuildingOutputBonus", &CvBuildingInfo::isRequiredInputBonus, "bool (int i)")
.def("getRequiredInputBonusValue", &CvBuildingInfo::getRequiredInputBonusValue, "int (int i)")
.def("getRequiredInputBonusCount", &CvBuildingInfo::getRequiredInputBonusCount, "int ()")
@@ -611,6 +633,17 @@
.def("getBuildingOutputBonusValues", &CvBuildingInfo::getBuildingOutputBonusValues, "int (int i)")
.def("getBuildingOutputBonusCount", &CvBuildingInfo::getBuildingOutputBonusCount, "int ()")
// < Building Resource Converter End >
+
+ // < Building Civic Prereqs by Lopez Start >
+ .def("isPrereqCivic", &CvBuildingInfo::isPrereqCivic, "bool (int)")
+ .def("isInactiveWithoutCivicPrereqs", &CvBuildingInfo::isInactiveWithoutCivicPrereqs, "bool ()")
+ // < Building Civic Prereqs End >
+
+ // < Pandemics by Mexico Start >
+ .def("getPandemicModifier", &CvBuildingInfo::getPandemicModifier, "int ()")
+ .def("getGlobalPandemicModifier", &CvBuildingInfo::getGlobalPandemicModifier, "int ()")
+ // < Pandemics by Mexico End >
+
;
python::class_<CvSpecialBuildingInfo, python::bases<CvInfoBase> >("CvSpecialBuildingInfo")
Modified: CvGameCoreDLL/CyInfoInterface2.cpp
===================================================================
--- CvGameCoreDLL/CyInfoInterface2.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CyInfoInterface2.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -90,7 +90,7 @@
//---------------------------CCCP NEW--------------------------
- .def("isTotalVictory", &CvVictoryInfo::isTotalVictory, "bool ()") // Mastery Victory by Sevo
+ .def("isTotalVictory", &CvVictoryInfo::isTotalVictory, "bool ()") // < Mastery Victory by Sevo >
;
python::class_<CvHurryInfo, python::bases<CvInfoBase> >("CvHurryInfo")
@@ -307,8 +307,8 @@
//--------------------------------CCCP NEW--------------------------------
- .def("canBuildOutsideBorder", &CvImprovementInfo::canBuildOutsideBorder, "bool ()") // < Improvements Outside Borders by Lopez >
- .def("getImprovmentMakesValid", &CvImprovementInfo::getImprovementMakesValid, "bool (int i)") //Addition ImprovmentUpgrading by Impaler[WrG]
+ .def("canBuildOutsideBorder", &CvImprovementInfo::canBuildOutsideBorder, "bool ()") // < Improvements Outside Borders by Lopez >
+ .def("getImprovmentMakesValid", &CvImprovementInfo::getImprovementMakesValid, "bool (int i)") // < Improvment Upgrading by Impaler[WrG] >
;
@@ -393,6 +393,10 @@
.def("isTerrain", &CvFeatureInfo::isTerrain, "bool (int i)")
.def("getVarietyButton", &CvFeatureInfo::getVarietyButton, "string (int i)")
+
+ //---------------------------CCCP NEW-----------------------------
+
+ .def("getPandemicModifier", &CvFeatureInfo::getPandemicModifier, "int ()") // < Pandemics by Mexico Start >
;
python::class_<CvCommerceInfo, python::bases<CvInfoBase> >("CvCommerceInfo")
Modified: CvGameCoreDLL/CyInfoInterface3.cpp
===================================================================
--- CvGameCoreDLL/CyInfoInterface3.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CyInfoInterface3.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -143,10 +143,24 @@
.def("getLeaderHead", &CvLeaderHeadInfo::getLeaderHead, "string ()")
.def("getButton", &CvLeaderHeadInfo::getButton, "string ()")
+
+ //---------------------CCCP NEW----------------------------
- //-----------------NEW----------------------------
+ .def("getLeaderUnits", &CvLeaderHeadInfo::getLeaderUnits, "int (int i)") // < UniqueUnitsForLeaders by Impaler[WrG] >
- .def("getLeaderUnits", &CvLeaderHeadInfo::getLeaderUnits, "int (int i)") //Addition UniqueUnitsForLeaders by Impaler[WrG] 6/14/06
+ // < Favorite Religion by ??? Start >
+ .def("getFavoriteReligion", &CvLeaderHeadInfo::getFavoriteReligion, "int ()")
+ .def("setFavoriteReligion", &CvLeaderHeadInfo::setFavoriteReligion, "void (int)")
+
+ .def("getFavoriteReligionAttitudeChange", &CvLeaderHeadInfo::getFavoriteReligionAttitudeChange, "int ()")
+ .def("getFavoriteReligionAttitudeDivisor", &CvLeaderHeadInfo::getFavoriteReligionAttitudeDivisor, "int ()")
+ .def("getFavoriteReligionAttitudeChangeLimit", &CvLeaderHeadInfo::getFavoriteReligionAttitudeChangeLimit, "int ()")
+
+ .def("setFavoriteReligionAttitudeChange", &CvLeaderHeadInfo::setFavoriteReligionAttitudeChange, "void (int)")
+ .def("setFavoriteReligionAttitudeDivisor", &CvLeaderHeadInfo::setFavoriteReligionAttitudeDivisor, "void (int)")
+ .def("setFavoriteReligionAttitudeChangeLimit", &CvLeaderHeadInfo::setFavoriteReligionAttitudeChangeLimit, "void (int)")
+ // < Favorite Religion End >
+
;
// CvProcessInfos
@@ -193,6 +207,10 @@
.def("getBonusProductionModifier", &CvProjectInfo::getBonusProductionModifier, "int (int i)")
.def("getVictoryThreshold", &CvProjectInfo::getVictoryThreshold, "int (int i)")
.def("getProjectsNeeded", &CvProjectInfo::getProjectsNeeded, "int (int i)")
+
+ //-----------------------------CCCP NEW-----------------------------
+
+ .def("getGlobalPandemicModifier", &CvProjectInfo::getGlobalPandemicModifier, "int ()") // < Pandemics by Mexico Start >
;
python::class_<CvReligionInfo, python::bases<CvInfoBase> >("CvReligionInfo")
@@ -236,6 +254,11 @@
.def("getCommerceModifier", &CvTraitInfo::getCommerceModifier, "int (int i)")
.def("isFreePromotion", &CvTraitInfo::isFreePromotion, "int (int i)")
+
+ //----------------------------CCCP NEW------------------------------------
+
+ .def("getGlobalPandemicModifier", &CvTraitInfo::getGlobalPandemicModifier, "int ()") // < Pandemics by Mexico Start >
+
;
// CvWorldInfo
Modified: CvGameCoreDLL/CyPlayer.cpp
===================================================================
--- CvGameCoreDLL/CyPlayer.cpp 2007-03-29 16:45:44 UTC (rev 45)
+++ CvGameCoreDLL/CyPlayer.cpp 2007-03-30 04:15:10 UTC (rev 46)
@@ -1910,50 +1910,54 @@
return 0;
}
-//-----------------NEW------------------------------
+//-------------------------CCCP NEW----------------------------------
-int CyPlayer::getGreatPeopleUnitRate(int /*UnitTypes*/ iIndex) //Addition GreatPeoplePointPooling by Impaler[WrG]
+// < Great People Point Pooling by Impaler[WrG] Start >
+int CyPlayer::getGreatPeopleUnitRate(int /*UnitTypes*/ iIndex)
{
return m_pPlayer ? m_pPlayer->getGreatPeopleUnitRate((UnitTypes) iIndex) : -1;
}
-int CyPlayer::getGreatPeopleUnitProgress(int /*UnitTypes*/ iIndex) //Addition GreatPeoplePointPooling by Impaler[WrG]
+int CyPlayer::getGreatPeopleUnitProgress(int /*UnitTypes*/ iIndex)
{
return m_pPlayer ? m_pPlayer->getGreatPeopleUnitProgress((UnitTypes) iIndex) : -1;
}
-void CyPlayer::setGreatPeopleUnitProgress(int /*UnitTypes*/ iIndex, int iNewValue) //Addition GreatPeoplePointPooling by Impaler[WrG]
+void CyPlayer::setGreatPeopleUnitProgress(int /*UnitTypes*/ iIndex, int iNewValue)
{
m_pPlayer->setGreatPeopleUnitProgress((UnitTypes) iIndex, iNewValue);
}
-void CyPlayer::changeGreatPeopleUnitProgress(int /*UnitTypes*/ iIndex, int iChange) //Addition GreatPeoplePointPooling by Impaler[WrG]
+void CyPlayer::changeGreatPeopleUnitProgress(int /*UnitTypes*/ iIndex, int iChange)
{
m_pPlayer->changeGreatPeopleUnitProgress((UnitTypes) iIndex, iChange);
}
-int CyPlayer::getGreatPeopleProgress() //Addition GreatPeoplePointPooling by Impaler[WrG]
+int CyPlayer::getGreatPeopleProgress()
{
return m_pPlayer ? m_pPlayer->getGreatPeopleProgress() : -1;
}
-void CyPlayer::changeGreatPeopleProgress(int iChange) //Addition GreatPeoplePointPooling by Impaler[WrG]
+void CyPlayer::changeGreatPeopleProgress(int iChange)
{
m_pPlayer->changeGreatPeopleProgress(iChange);
}
+// < Great People Point Pooling End >
-int CyPlayer::getSpecialistTypeExtraCommerce(SpecialistTypes eSpecialist, CommerceTypes eIndex) //Addition SpecialistTechCommerceChange by Impaler[WrG]
+// < Specialist Tech Commerce Change by Impaler[WrG] Start >
+int CyPlayer::getSpecialistTypeExtraCommerce(SpecialistTypes eSpecialist, CommerceTypes eIndex)
{
return m_pPlayer ? m_pPlayer->getSpecialistTypeExtraCommerce(eSpecialist, eIndex) : NO_COMMERCE;
}
-void CyPlayer::changeSpecialistTypeExtraCommerce(SpecialistTypes eSpecialist, CommerceTypes eIndex, int iChange) //Addition SpecialistTechCommerceChange by Impaler[WrG]
+void CyPlayer::changeSpecialistTypeExtraCommerce(SpecialistTypes eSpecialist, CommerceTypes eIndex, int iChange)
{
if (m_pPlayer)
m_pPlayer->changeSpecialistTypeExtraCommerce(eSpecialist, eIndex, iChange);
}
+// < Specialist Tech Commerce Change End >
-// ---------------- AI_AUTO_PLAY_MOD start-------------------
+// < AI AutoPlay by jdog5000 Start >
bool CyPlayer::isAutoMoves()
{
return m_pPlayer->isAutoMoves();
@@ -1964,9 +1968,9 @@
if (m_pPlayer)
m_pPlayer->setAutoMoves(bNewValue);
}
-// ---------------- AI_AUTO_PLAY_MOD end ---------------------------------
+// < AI AutoPlay End >
-// < Scriptable Leader Traits Start >
+// < Scriptable Leader Traits by Lopez & Impaler[Wrg] >
void CyPlayer::addTrait(int iIndex)
{
if(m_pPlayer)
@@ -1982,9 +1986,9 @@
m_pPlayer->ProcessTrait((TraitTypes)iIndex, -1);
}
}
-// < Scriptable Leader Traits End >
+// < Scriptable Leader Traits End >
-// ---------------- REVOLUTION_MOD start ---------------------
+// < Revolution Mod by jdog5000 Start >
void CyPlayer::setFoundedFirstCity(bool bNewValue)
{
if( m_pPlayer )
@@ -2004,9 +2008,35 @@
if( m_pPlayer )
m_pPlayer->changeTechScore(iChange);
}
-// ---------------- REVOLUTION_MOD end -----------------------
+// < Revolution Mod End >
-int CyPlayer::getSevoWondersScore(int mode) // Mastery Victory by Sevo
+int CyPlayer::getSevoWondersScore(int mode) // < Mastery Victory by Sevo >
{
return m_pPlayer ? m_pPlayer->getSevoWondersScore(mode) : -1;
-}
\ No newline at end of file
+}
+
+// < Pandemics by Mexico Start >
+void CyPlayer::changeGlobalPandemicModifier(int ...
[truncated message content] |