IObjectInfo.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * IObjectInfo.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. VCMI_LIB_NAMESPACE_BEGIN
  12. class DLL_LINKAGE IObjectInfo
  13. {
  14. public:
  15. struct CArmyStructure
  16. {
  17. ui32 totalStrength;
  18. ui32 shootersStrength;
  19. ui32 flyersStrength;
  20. ui32 walkersStrength;
  21. CArmyStructure() :
  22. totalStrength(0),
  23. shootersStrength(0),
  24. flyersStrength(0),
  25. walkersStrength(0)
  26. {}
  27. bool operator <(const CArmyStructure & other) const
  28. {
  29. return this->totalStrength < other.totalStrength;
  30. }
  31. };
  32. /// Returns possible composition of guards. Actual guards would be
  33. /// somewhere between these two values
  34. virtual CArmyStructure minGuards() const { return CArmyStructure(); }
  35. virtual CArmyStructure maxGuards() const { return CArmyStructure(); }
  36. virtual bool givesResources() const { return false; }
  37. virtual bool givesExperience() const { return false; }
  38. virtual bool givesMana() const { return false; }
  39. virtual bool givesMovement() const { return false; }
  40. virtual bool givesPrimarySkills() const { return false; }
  41. virtual bool givesSecondarySkills() const { return false; }
  42. virtual bool givesArtifacts() const { return false; }
  43. virtual bool givesCreatures() const { return false; }
  44. virtual bool givesSpells() const { return false; }
  45. virtual bool givesBonuses() const { return false; }
  46. virtual ~IObjectInfo() = default;
  47. };
  48. VCMI_LIB_NAMESPACE_END