RandomMapInfo.h 882 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * RandomMapInfo.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. /// Structure that describes placement rules for this object in random map
  13. struct DLL_LINKAGE RandomMapInfo
  14. {
  15. /// How valuable this object is, 1k = worthless, 10k = Utopia-level
  16. ui32 value;
  17. /// How many of such objects can be placed on map, 0 = object can not be placed by RMG
  18. std::optional<ui32> mapLimit;
  19. /// How many of such objects can be placed in one zone, 0 = unplaceable
  20. ui32 zoneLimit;
  21. /// Rarity of object, 5 = extremely rare, 100 = common
  22. ui32 rarity;
  23. RandomMapInfo():
  24. value(0),
  25. zoneLimit(0),
  26. rarity(0)
  27. {}
  28. void setMapLimit(ui32 val) { mapLimit = val; }
  29. };
  30. VCMI_LIB_NAMESPACE_END