am i looking in the right place to get ready of "refuse to talk" # of turns after a war declaration?
Code:
int CvTeamAI::AI_makePeaceTradeVal(TeamTypes ePeaceTeam, TeamTypes eTeam) const
{
int iModifier;
int iValue;
FAssertMsg(eTeam != getID(), "shouldn't call this function on ourselves");
FAssertMsg(ePeaceTeam != getID(), "shouldn't call this function on ourselves");
FAssertMsg(GET_TEAM(ePeaceTeam).isAlive(), "GET_TEAM(ePeaceTeam).isAlive is expected to be true");
FAssertMsg(atWar(ePeaceTeam, eTeam), "eTeam should be at war with ePeaceTeam");
iValue = (50 + GC.getGameINLINE().getGameTurn());
iValue += ((GET_TEAM(eTeam).getNumCities() + GET_TEAM(ePeaceTeam).getNumCities()) * 8);
iModifier = 0;
switch ((GET_TEAM(eTeam).AI_getAttitude(ePeaceTeam) + GET_TEAM(ePeaceTeam).AI_getAttitude(eTeam)) / 2)
{
case ATTITUDE_FURIOUS:
iModifier += 400;
break;
case ATTITUDE_ANNOYED:
iModifier += 200;
break;
case ATTITUDE_CAUTIOUS:
iModifier += 100;
break;
case ATTITUDE_PLEASED:
iModifier += 50;
break;
case ATTITUDE_FRIENDLY:
break;
default:
FAssert(false);
break;
}
iValue *= max(0, (iModifier + 100));
iValue /= 100;
iValue *= 40;
[B]iValue /= (GET_TEAM(eTeam).AI_getAtWarCounter(ePeaceTeam) + 10);[/B]
iValue -= (iValue % GC.getDefineINT("DIPLOMACY_VALUE_REMAINDER"));
if (isHuman())
{
return max(iValue, GC.getDefineINT("DIPLOMACY_VALUE_REMAINDER"));
}
else
{
return iValue;
}
}