1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-28 23:06:24 +02:00
vcmi/lib/mapObjects/CRewardableConstructor.h

58 lines
1.4 KiB
C
Raw Normal View History

/*
* CRewardableConstructor.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 "CRewardableObject.h"
#include "CObjectClassesHandler.h"
#include "../JsonNode.h"
class DLL_LINKAGE CRandomRewardObjectInfo : public IObjectInfo
{
JsonNode parameters;
public:
bool givesResources() const override;
bool givesExperience() const override;
bool givesMana() const override;
bool givesMovement() const override;
bool givesPrimarySkills() const override;
bool givesSecondarySkills() const override;
bool givesArtifacts() const override;
bool givesCreatures() const override;
bool givesSpells() const override;
bool givesBonuses() const override;
void configureObject(CRewardableObject * object, CRandomGenerator & rng) const;
CRandomRewardObjectInfo()
{}
void init(const JsonNode & objectConfig);
};
class DLL_LINKAGE CRewardableConstructor : public AObjectTypeHandler
{
CRandomRewardObjectInfo objectInfo;
void initTypeData(const JsonNode & config) override;
public:
CRewardableConstructor();
2016-09-08 17:06:28 +02:00
CGObjectInstance * create(const ObjectTemplate & tmpl) const override;
2014-05-17 17:50:11 +03:00
void configureObject(CGObjectInstance * object, CRandomGenerator & rng) const override;
2016-09-08 17:06:28 +02:00
std::unique_ptr<IObjectInfo> getObjectInfo(const ObjectTemplate & tmpl) const override;
};