38 lines
1.4 KiB
C++
38 lines
1.4 KiB
C++
#ifndef CREATURELIB_CREATECREATURE_HPP
|
|
#define CREATURELIB_CREATECREATURE_HPP
|
|
|
|
#include "../../Library/DataLibrary.hpp"
|
|
#include "../Library/BattleLibrary.hpp"
|
|
#include "Creature.hpp"
|
|
|
|
namespace CreatureLib::Battling {
|
|
class CreateCreature {
|
|
ArbUt::BorrowedPtr<const BattleLibrary> _library;
|
|
ArbUt::StringView _species;
|
|
ArbUt::StringView _variant = "default"_cnc;
|
|
u8 _level;
|
|
std::optional<std::string> _nickname = "";
|
|
|
|
ArbUt::StringView _talent = ""_cnc;
|
|
Library::Gender _gender = static_cast<Library::Gender>(-1);
|
|
u8 _coloring = 0;
|
|
ArbUt::StringView _heldItem = ""_cnc;
|
|
u32 _identifier = 0;
|
|
ArbUt::List<std::tuple<ArbUt::BorrowedPtr<const Library::AttackData>, AttackLearnMethod>> _attacks;
|
|
|
|
public:
|
|
CreateCreature(ArbUt::BorrowedPtr<const BattleLibrary> library, const ArbUt::StringView& species, u8 level)
|
|
: _library(library), _species(species), _level(level),
|
|
_attacks(library->GetSettings()->GetMaximalAttacks()) {}
|
|
|
|
CreateCreature WithVariant(const ArbUt::StringView& variant);
|
|
CreateCreature WithNickname(std::string nickname);
|
|
CreateCreature WithGender(Library::Gender gender);
|
|
CreateCreature WithAttack(const ArbUt::StringView& attackName, AttackLearnMethod learnMethod);
|
|
|
|
Creature* Create();
|
|
};
|
|
}
|
|
|
|
#endif // CREATURELIB_CREATECREATURE_HPP
|