mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-03 00:46:55 +02:00
Implemented rule-based evaluation of tactical advantage between armies.
AI will creep more agressively and smarter.
This commit is contained in:
@ -1820,15 +1820,15 @@ void CGTownInstance::setPropertyDer(ui8 what, ui32 val)
|
||||
break;
|
||||
}
|
||||
}
|
||||
int CGTownInstance::fortLevel() const //0 - none, 1 - fort, 2 - citadel, 3 - castle
|
||||
CGTownInstance::EFortLevel CGTownInstance::fortLevel() const //0 - none, 1 - fort, 2 - citadel, 3 - castle
|
||||
{
|
||||
if((builtBuildings.find(9))!=builtBuildings.end())
|
||||
return 3;
|
||||
return CASTLE;
|
||||
if((builtBuildings.find(8))!=builtBuildings.end())
|
||||
return 2;
|
||||
return CITADEL;
|
||||
if((builtBuildings.find(7))!=builtBuildings.end())
|
||||
return 1;
|
||||
return 0;
|
||||
return FORT;
|
||||
return NONE;
|
||||
}
|
||||
|
||||
int CGTownInstance::hallLevel() const // -1 - none, 0 - village, 1 - town, 2 - city, 3 - capitol
|
||||
|
Reference in New Issue
Block a user