2023-12-11 08:37:23 +02:00
|
|
|
/*
|
|
|
|
* 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;
|
|
|
|
|
2023-12-24 10:36:26 +02:00
|
|
|
int getPrisonsRemaning() const;
|
2024-01-16 18:16:15 +02:00
|
|
|
[[nodiscard]] HeroTypeID drawRandomHero();
|
2024-01-15 08:41:29 +02:00
|
|
|
void restoreDrawnHero(const HeroTypeID & hid);
|
2023-12-11 08:37:23 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
void getAllowedHeroes();
|
2023-12-24 10:36:26 +02:00
|
|
|
size_t reservedHeroes;
|
2023-12-11 08:37:23 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
std::vector<HeroTypeID> allowedHeroes;
|
|
|
|
};
|
|
|
|
|
2024-01-17 11:11:55 +02:00
|
|
|
VCMI_LIB_NAMESPACE_END
|