2025-05-16 17:20:56 +03:00
|
|
|
/*
|
|
|
|
* IGameRandomizer.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../constants/EntityIdentifiers.h"
|
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
|
2025-05-18 10:52:48 +03:00
|
|
|
class CGHeroInstance;
|
|
|
|
|
2025-05-16 17:20:56 +03:00
|
|
|
enum class EArtifactClass;
|
|
|
|
|
|
|
|
namespace vstd
|
|
|
|
{
|
2025-05-19 17:43:29 +03:00
|
|
|
class RNG;
|
2025-05-16 17:20:56 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/// Provides source of random rolls for game entities
|
|
|
|
/// Instance of this interface only exists on server
|
2025-05-18 10:52:48 +03:00
|
|
|
class DLL_LINKAGE IGameRandomizer : boost::noncopyable
|
2025-05-16 17:20:56 +03:00
|
|
|
{
|
|
|
|
public:
|
2025-05-18 10:52:48 +03:00
|
|
|
virtual ~IGameRandomizer() = default;
|
2025-05-16 17:20:56 +03:00
|
|
|
|
|
|
|
virtual ArtifactID rollArtifact() = 0;
|
|
|
|
virtual ArtifactID rollArtifact(EArtifactClass type) = 0;
|
|
|
|
virtual ArtifactID rollArtifact(std::set<ArtifactID> filtered) = 0;
|
|
|
|
|
|
|
|
virtual std::vector<ArtifactID> rollMarketArtifactSet() = 0;
|
|
|
|
|
|
|
|
virtual CreatureID rollCreature() = 0;
|
|
|
|
virtual CreatureID rollCreature(int tier) = 0;
|
|
|
|
|
2025-05-18 10:52:48 +03:00
|
|
|
virtual PrimarySkill rollPrimarySkillForLevelup(const CGHeroInstance * hero) = 0;
|
|
|
|
virtual SecondarySkill rollSecondarySkillForLevelup(const CGHeroInstance * hero, const std::set<SecondarySkill> & candidates) = 0;
|
2025-05-16 17:20:56 +03:00
|
|
|
|
|
|
|
virtual vstd::RNG & getDefault() = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_END
|