using PkmnLib.Dynamic.Models;
using PkmnLib.Static.Utils;
namespace PkmnLib.Dynamic.ScriptHandling;
public abstract class ItemScript : IDeepCloneable
{
///
/// Initializes the script with the given parameters for a specific item
///
public virtual void OnInitialize(IReadOnlyDictionary? parameters)
{
}
///
/// Returns whether the item is usable in the current context.
///
public virtual bool IsItemUsable => false;
///
/// Returns whether the item requires a target to be used.
///
public virtual bool RequiresTarget => false;
///
/// Returns whether the item is usable on the given target.
///
public virtual bool IsTargetValid(IPokemon target) => false;
///
/// Returns whether the item can be held by a Pokémon.
///
public virtual bool IsHoldable => false;
///
/// Returns whether the item can be held by the given target.
///
public virtual bool CanTargetHold(IPokemon pokemon) => false;
///
/// Handles the use of the item.
///
public virtual void OnUse()
{
}
///
/// Handles the use of the item on the given target.
///
///
public virtual void OnUseWithTarget(IPokemon target)
{
}
}