IObjectInfo.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. virtual bool givesResources() const { return false; }
  33. virtual bool givesExperience() const { return false; }
  34. virtual bool givesMana() const { return false; }
  35. virtual bool givesMovement() const { return false; }
  36. virtual bool givesPrimarySkills() const { return false; }
  37. virtual bool givesSecondarySkills() const { return false; }
  38. virtual bool givesArtifacts() const { return false; }
  39. virtual bool givesCreatures() const { return false; }
  40. virtual bool givesSpells() const { return false; }
  41. virtual bool givesBonuses() const { return false; }
  42. virtual ~IObjectInfo() = default;
  43. };
  44. VCMI_LIB_NAMESPACE_END