Skip to content

Commit

Permalink
GOTTA, SWEEP SWEEP SWEEP!
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveVision committed Jul 6, 2024
1 parent 214e297 commit 06e2c1e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 37 deletions.
6 changes: 1 addition & 5 deletions CvGameCoreDLL_Expansion2/CvCity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8488,12 +8488,8 @@ bool CvCity::hasBuildingPrerequisites(BuildingTypes eBuilding) const
// Check if a specific prerequisite building is needed in this city
BuildingTypes ePrereqBuilding = static_cast<BuildingTypes>(pkBuildingInfo->GetNeedBuildingThisCity());

// Determine if no prerequisite building is needed or the prerequisite building is present
bool bNoPrereqBuilding = (ePrereqBuilding == NO_BUILDING);
bool bHasPrereqBuilding = HasBuilding(ePrereqBuilding);

// Return true if no specific prerequisite building is needed or it is present in the city
return bNoPrereqBuilding || bHasPrereqBuilding;
return (ePrereqBuilding == NO_BUILDING) || HasBuilding(ePrereqBuilding);
}

// --------------------------------------------------------------------------------
Expand Down
8 changes: 0 additions & 8 deletions CvGameCoreDLL_Expansion2/CvDealAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6867,14 +6867,6 @@ int CvDealAI::GetTechValue(TechTypes eTech, bool bFromMe, PlayerTypes eOtherPlay
}
}

if(pkTechInfo->IsResearchAgreementTradingAllowed())
{
if(GC.getGame().isOption(GAMEOPTION_RESEARCH_AGREEMENTS) && !GC.getGame().isOption(GAMEOPTION_NO_SCIENCE))
{
iTechMod += 2;
}
}

// BASE COST = (TurnsLeft * 30 * (era ^ 0.7)) -- Ancient Era is 1, Classical Era is 2 because I incremented it
iItemValue = max(10, iTurnsLeft) * /*30*/ max(100, GC.getGame().getGameSpeedInfo().getTechCostPerTurnMultiplier());
float fItemMultiplier = (float)(pow( (double) std::max(1, (iTechEra)), (double) /*0.7*/ GD_FLOAT_GET(TECH_COST_ERA_EXPONENT) ) );
Expand Down
24 changes: 0 additions & 24 deletions CvGameCoreDLL_Expansion2/CvDiplomacyAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7040,18 +7040,6 @@ bool CvDiplomacyAI::IsPlayerBrokenAnyPromise(PlayerTypes ePlayer, int iWithinXTu
return true;
}

if (IsPlayerBrokenBorderPromise(ePlayer))
{
if (bCheckDuration)
{
int iTurnDifference = iGameTurn - GetPlayerBorderPromiseTurn(ePlayer);
if (iTurnDifference <= iWithinXTurns)
return true;
}
else
return true;
}

if (IsPlayerBrokenBullyCityStatePromise(ePlayer))
{
if (bCheckDuration)
Expand Down Expand Up @@ -7168,18 +7156,6 @@ bool CvDiplomacyAI::IsPlayerIgnoredAnyPromise(PlayerTypes ePlayer, int iWithinXT
return true;
}

if (IsPlayerIgnoredBorderPromise(ePlayer))
{
if (bCheckDuration)
{
int iTurnDifference = iGameTurn - GetPlayerBorderPromiseTurn(ePlayer);
if (iTurnDifference <= iWithinXTurns)
return true;
}
else
return true;
}

if (IsPlayerIgnoredBullyCityStatePromise(ePlayer))
{
if (bCheckDuration)
Expand Down

0 comments on commit 06e2c1e

Please sign in to comment.