31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
#ifndef ITEMUSESCRIPT_HPP
|
|
#define ITEMUSESCRIPT_HPP
|
|
|
|
#include <Arbutils/Collections/List.hpp>
|
|
#include "../../Library/EffectParameter.hpp"
|
|
namespace CreatureLib::Battling {
|
|
class Creature;
|
|
|
|
class ItemUseScript {
|
|
public:
|
|
virtual ~ItemUseScript() = default;
|
|
|
|
virtual void
|
|
OnInitialize([[maybe_unused]] const ArbUt::List<CreatureLib::Library::EffectParameter*>& parameters){};
|
|
/// @brief Is the item an item we are able to use?
|
|
[[nodiscard]] virtual bool IsItemUsable() const { return false; }
|
|
/// @brief Do we need to use the item on a creature?
|
|
[[nodiscard]] virtual bool IsCreatureUseItem() const { return false; }
|
|
/// @brief Can the item be used on the given creature.
|
|
[[nodiscard]] virtual bool IsUseValidForCreature([[maybe_unused]] Creature* creature) const { return false; }
|
|
|
|
/// @brief Can the item be held?
|
|
[[nodiscard]] virtual bool IsHoldable() const { return false; }
|
|
|
|
virtual void OnUse() const {}
|
|
virtual void OnCreatureUse([[maybe_unused]] Creature* creature) const {}
|
|
};
|
|
}
|
|
|
|
#endif // ITEMUSESCRIPT_HPP
|