BattleStateInfoForRetreat.h 843 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * BattleStateInfoForRetreat.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 "BattleSide.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. namespace battle
  14. {
  15. class Unit;
  16. using Units = boost::container::small_vector<const Unit *, 4>;
  17. }
  18. class CGHeroInstance;
  19. class DLL_LINKAGE BattleStateInfoForRetreat
  20. {
  21. public:
  22. bool canFlee;
  23. bool canSurrender;
  24. bool isLastTurnBeforeDie;
  25. BattleSide ourSide;
  26. battle::Units ourStacks;
  27. battle::Units enemyStacks;
  28. const CGHeroInstance * ourHero;
  29. const CGHeroInstance * enemyHero;
  30. int turnsSkippedByDefense;
  31. BattleStateInfoForRetreat();
  32. uint64_t getOurStrength() const;
  33. uint64_t getEnemyStrength() const;
  34. };
  35. VCMI_LIB_NAMESPACE_END