1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-28 23:06:24 +02:00
vcmi/lib/rmg/modificators/PrisonHeroPlacer.h
DjWarmonger 4f28cd42b7
Update lib/rmg/modificators/PrisonHeroPlacer.h
Co-authored-by: Alexander Wilms <Alexander-Wilms@users.noreply.github.com>
2024-01-17 10:11:55 +01:00

42 lines
788 B
C++

/*
* PrisonHeroPlacer, 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 "../Zone.h"
#include "../Functions.h"
#include "../../mapObjects/ObjectTemplate.h"
VCMI_LIB_NAMESPACE_BEGIN
class CRandomGenerator;
class PrisonHeroPlacer : public Modificator
{
public:
MODIFICATOR(PrisonHeroPlacer);
void process() override;
void init() override;
int getPrisonsRemaning() const;
[[nodiscard]] HeroTypeID drawRandomHero();
void restoreDrawnHero(const HeroTypeID & hid);
private:
void getAllowedHeroes();
size_t reservedHeroes;
protected:
std::vector<HeroTypeID> allowedHeroes;
};
VCMI_LIB_NAMESPACE_END