IGameRandomizer.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * IGameRandomizer.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 "../constants/EntityIdentifiers.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. class CGHeroInstance;
  14. enum class EArtifactClass;
  15. namespace vstd
  16. {
  17. class RNG;
  18. }
  19. /// Provides source of random rolls for game entities
  20. /// Instance of this interface only exists on server
  21. class DLL_LINKAGE IGameRandomizer : boost::noncopyable
  22. {
  23. public:
  24. virtual ~IGameRandomizer() = default;
  25. virtual ArtifactID rollArtifact() = 0;
  26. virtual ArtifactID rollArtifact(EArtifactClass type) = 0;
  27. virtual ArtifactID rollArtifact(std::set<ArtifactID> filtered) = 0;
  28. virtual std::vector<ArtifactID> rollMarketArtifactSet() = 0;
  29. virtual CreatureID rollCreature() = 0;
  30. virtual CreatureID rollCreature(int tier) = 0;
  31. virtual PrimarySkill rollPrimarySkillForLevelup(const CGHeroInstance * hero) = 0;
  32. virtual SecondarySkill rollSecondarySkillForLevelup(const CGHeroInstance * hero, const std::set<SecondarySkill> & candidates) = 0;
  33. virtual vstd::RNG & getDefault() = 0;
  34. };
  35. VCMI_LIB_NAMESPACE_END