38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
#ifndef CREATURELIB_ITEM_HPP
|
|
#define CREATURELIB_ITEM_HPP
|
|
|
|
#include <Arbutils/Memory/Memory.hpp>
|
|
#include <Arbutils/Misc.hpp>
|
|
#include <unordered_set>
|
|
#include "../Attacks/SecondaryEffect.hpp"
|
|
#include "BattleItemCategory.hpp"
|
|
#include "ItemCategory.hpp"
|
|
|
|
namespace CreatureLib::Library {
|
|
class Item {
|
|
private:
|
|
struct impl;
|
|
std::unique_ptr<impl> _impl;
|
|
|
|
public:
|
|
Item(const ArbUt::StringView& name, ItemCategory category, BattleItemCategory battleCategory, i32 price,
|
|
const SecondaryEffect* effect, const SecondaryEffect* battleTriggerEffect,
|
|
const std::unordered_set<u32>& flags) noexcept;
|
|
NO_COPY_OR_MOVE(Item)
|
|
|
|
virtual ~Item();
|
|
|
|
const ArbUt::StringView& GetName() const noexcept;
|
|
ItemCategory GetCategory() const noexcept;
|
|
BattleItemCategory GetBattleCategory() const noexcept;
|
|
i32 GetPrice() const noexcept;
|
|
|
|
const ArbUt::OptionalUniquePtr<const SecondaryEffect>& GetEffect() const noexcept;
|
|
const ArbUt::OptionalUniquePtr<const SecondaryEffect>& GetBattleTriggerEffect() const noexcept;
|
|
bool HasFlag(const ArbUt::BasicStringView& flag) const noexcept;
|
|
bool HasFlag(u32 flag) const noexcept;
|
|
};
|
|
}
|
|
|
|
#endif // CREATURELIB_ITEM_HPP
|