Skip to content

Commit

Permalink
Ignore puppets in new empire size penalty
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveVision committed Jun 30, 2024
1 parent bfc4b33 commit b163c08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CvGameCoreDLL_Expansion2/CvPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17529,7 +17529,7 @@ int CvPlayer::GetNumUnitsSupplied(bool bCheckWarWeariness) const
iUnitSupply += GetNumUnitsSuppliedByPopulation();
iUnitSupply += GetUnitSupplyFromExpendedGreatPeople();

int iEmpireSizeReduction = max(getNumCities() * /*0 in CP, 5 in VP*/ GC.getMap().getWorldInfo().GetNumCitiesUnitSupplyMod(), 0);
int iEmpireSizeReduction = max(GetNumEffectiveCities() * /*0 in CP, 5 in VP*/ GC.getMap().getWorldInfo().GetNumCitiesUnitSupplyMod(), 0);
iUnitSupply *= 100;
iUnitSupply /= (100 + iEmpireSizeReduction);

Expand Down
2 changes: 1 addition & 1 deletion CvGameCoreDLL_Expansion2/Lua/CvLuaPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4499,7 +4499,7 @@ int CvLuaPlayer::lGetTechSupplyReduction(lua_State* L)
int CvLuaPlayer::lGetEmpireSizeSupplyReduction(lua_State* L)
{
CvPlayerAI* pkPlayer = GetInstance(L);
int iReductionPercent = max(pkPlayer->getNumCities() * /*0 in CP, 5 in VP*/ GC.getMap().getWorldInfo().GetNumCitiesUnitSupplyMod(), 0);
int iReductionPercent = max(pkPlayer->GetNumEffectiveCities(false) * /*0 in CP, 5 in VP*/ GC.getMap().getWorldInfo().GetNumCitiesUnitSupplyMod(), 0);
if (iReductionPercent == 0)
{
lua_pushinteger(L, 0);
Expand Down

0 comments on commit b163c08

Please sign in to comment.