CBattleGameInterface.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * CBattleGameInterface.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "IBattleEventsReceiver.h"
  12. #include "../battle/AutocombatPreferences.h"
  13. static constexpr int AI_INTERFACE_VER = 1;
  14. VCMI_LIB_NAMESPACE_BEGIN
  15. class CBattleCallback;
  16. class Environment;
  17. class DLL_LINKAGE CBattleGameInterface : public IBattleEventsReceiver
  18. {
  19. public:
  20. bool human = false;
  21. PlayerColor playerID;
  22. std::string dllName;
  23. virtual ~CBattleGameInterface() {};
  24. virtual void initBattleInterface(std::shared_ptr<Environment> ENV, std::shared_ptr<CBattleCallback> CB){};
  25. virtual void initBattleInterface(std::shared_ptr<Environment> ENV, std::shared_ptr<CBattleCallback> CB, AutocombatPreferences autocombatPreferences){};
  26. //battle call-ins
  27. virtual void activeStack(const BattleID & battleID, const CStack * stack)=0; //called when it's turn of that stack
  28. virtual void yourTacticPhase(const BattleID & battleID, int distance)=0; //called when interface has opportunity to use Tactics skill -> use cb->battleMakeTacticAction from this function
  29. };
  30. VCMI_LIB_NAMESPACE_END