Files
CreatureLib/src/Battling/Models/CreateCreature.hpp
Deukhoofd 49e0f00237
All checks were successful
continuous-integration/drone/push Build is passing
Initialize CreateCreature with ConstString instead of std::string.
2020-04-10 16:44:25 +02:00

40 lines
1.5 KiB
C++

#ifndef CREATURELIB_CREATECREATURE_HPP
#define CREATURELIB_CREATECREATURE_HPP
#include <Arbutils/Collections/List.hpp>
#include "../../Library/DataLibrary.hpp"
#include "Creature.hpp"
using namespace Arbutils::Collections;
namespace CreatureLib::Battling {
class CreateCreature {
const BattleLibrary* _library;
Arbutils::CaseInsensitiveConstString _species;
Arbutils::CaseInsensitiveConstString _variant = "default"_cnc;
uint8_t _level;
std::string _nickname = "";
Arbutils::CaseInsensitiveConstString _talent = ""_cnc;
Library::Gender _gender = static_cast<Library::Gender>(-1);
uint8_t _coloring = 0;
Arbutils::CaseInsensitiveConstString _heldItem = ""_cnc;
uint32_t _identifier = 0;
List<std::tuple<const Library::AttackData*, AttackLearnMethod>> _attacks = {};
public:
CreateCreature(const BattleLibrary* library, const Arbutils::CaseInsensitiveConstString& species, uint8_t level)
: _library(library), _species(species), _level(level) {}
CreateCreature* WithVariant(const Arbutils::CaseInsensitiveConstString& variant);
CreateCreature* WithNickname(std::string nickname);
CreateCreature* WithGender(Library::Gender gender);
CreateCreature* WithAttack(const Arbutils::CaseInsensitiveConstString& attackName,
AttackLearnMethod learnMethod);
Creature* Create();
};
}
#endif // CREATURELIB_CREATECREATURE_HPP