using PkmnLib.Dynamic.ScriptHandling; namespace PkmnLib.Dynamic.Models.Choices; /// /// A choice to flee from a battle. /// public interface IFleeChoice : ITurnChoice { } /// public class FleeTurnChoice : TurnChoice, IFleeChoice { /// public FleeTurnChoice(IPokemon user) : base(user) { } /// public override int ScriptCount => User.ScriptCount; /// public override void GetOwnScripts(List> scripts) { } /// public override void CollectScripts(List> scripts) => User.CollectScripts(scripts); /// public override string ToString() => $"FleeChoice: {User}"; protected bool Equals(FleeTurnChoice other) => other.User == User; /// public override bool Equals(object? obj) { if (obj is null) return false; if (ReferenceEquals(this, obj)) return true; if (obj is not FleeTurnChoice other) return false; return Equals(other); } /// public override int GetHashCode() => User?.GetHashCode() ?? 0; }