1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00
- ally support: adventure map
This commit is contained in:
Ivan Savenko
2010-08-13 10:46:08 +00:00
parent 520d40cc59
commit fd45cd0a6d
10 changed files with 43 additions and 38 deletions

View File

@@ -2008,6 +2008,16 @@ UpgradeInfo CGameState::getUpgradeInfo(const CStackInstance &stack)
return ret;
}
int CGameState::getPlayerRelations( ui8 color1, ui8 color2 )
{
if ( color1 == color2 )
return 2;
const TeamState * ts = getPlayerTeam(color1);
if (ts && vstd::contains(ts->players, color2))
return 1;
return 0;
}
void CGameState::loadTownDInfos()
{
for(int i=0;i<F_NUMBER;i++)