1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-07 23:33:15 +02:00

AI for neutral creatures and battles and player AIs can be different. StupidAI will handle neutrals by default.

Fixes for issues with deserialization and handling Tactics secondary skill.
This commit is contained in:
Michał W. Urbańczyk
2011-02-23 03:57:45 +00:00
parent 9d313d3d2c
commit cab8f9e11d
13 changed files with 64 additions and 32 deletions

View File

@@ -20,7 +20,7 @@
*/
template<typename rett>
rett * createAnyAI(CCallback * cb, std::string dllname, std::string methodName)
rett * createAnyAI(std::string dllname, std::string methodName)
{
char temp[50];
rett * ret=NULL;
@@ -62,14 +62,14 @@ rett * createAnyAI(CCallback * cb, std::string dllname, std::string methodName)
return ret;
}
CGlobalAI * CAIHandler::getNewAI(CCallback * cb, std::string dllname)
CGlobalAI * CAIHandler::getNewAI(std::string dllname)
{
return createAnyAI<CGlobalAI>(cb, dllname, "GetNewAI");
return createAnyAI<CGlobalAI>(dllname, "GetNewAI");
}
CBattleGameInterface * CAIHandler::getNewBattleAI( CCallback * cb, std::string dllname )
CBattleGameInterface * CAIHandler::getNewBattleAI(std::string dllname )
{
return createAnyAI<CBattleGameInterface>(cb, dllname, "GetNewBattleAI");
return createAnyAI<CBattleGameInterface>(dllname, "GetNewBattleAI");
}
BattleAction CGlobalAI::activeStack( const CStack * stack )