using PkmnLib.Dynamic.Events; using PkmnLib.Dynamic.Models; using PkmnLib.Static; namespace PkmnLib.Dynamic.ScriptHandling; /// /// Base class for Pokéball scripts. /// public abstract class PokeballScript : ItemScript { /// protected PokeballScript(IItem item) : base(item) { } /// /// Returns the catch rate of the Pokéball against the given target Pokémon. /// public abstract byte GetCatchRate(IPokemon target); /// public override void OnUseWithTarget(IPokemon target, EventHook eventHook) { var battleData = target.BattleData; battleData?.Battle.AttempCapture(battleData.SideIndex, battleData.Position, Item); } }