Closed ilteroi closed 3 months ago
@axatin
shouldn't this be limited to capturing the capital of a minor
that's checked literally one line before the code you quoted: if (GET_PLAYER(eOriginalOwner).isMinorCiv())
what is the point of the ChangeBaseYieldRateFromCSAlliance() call here?
All yields from maritime city-states are given through YieldRateFromCSAlliance, see for example CvCity::UpdateYieldsFromExistingFriendsAndAllies
if (pMinor && pMinor->GetTrait() == MINOR_CIV_TRAIT_MARITIME)
{
if (pMinor->IsAllies(getOwner()))
{
int iBonus = isCapital() ? pMinor->GetAlliesCapitalFoodBonus() : pMinor->GetAlliesOtherCityFoodBonus();
if (iBonus != 0)
{
ChangeBaseYieldRateFromCSAlliance(YIELD_FOOD, iSign * iBonus / 100);
//CUSTOMLOG("adjusted food in %s by %d/100 for alliance with %s, current value is %d", getNameKey(), iSign * iBonus, GET_PLAYER(ePlayer).getNameKey(), GetBaseYieldRateFromCSAlliance(YIELD_FOOD));
}
}
i think you misread? minor players can have multiple cities ... in fact we probably need to check isOriginalCapital()
what is the point of m_iFoodInCapitalFromAnnexedMinors then? it's not needed ...
shouldn't this be limited to capturing the capital of a minor? i quite often see minors with mini-empires of multiple cities ...
what is the point of the ChangeBaseYieldRateFromCSAlliance() call here? why mix alliances and annexations?