diff --git a/PKHeX.Core/Editing/Bulk/Suggestion/ComplexSuggestion.cs b/PKHeX.Core/Editing/Bulk/Suggestion/ComplexSuggestion.cs index 64bd1ce43..a34ed0b4c 100644 --- a/PKHeX.Core/Editing/Bulk/Suggestion/ComplexSuggestion.cs +++ b/PKHeX.Core/Editing/Bulk/Suggestion/ComplexSuggestion.cs @@ -3,7 +3,7 @@ namespace PKHeX.Core { /// - public class ComplexSuggestion : ISuggestModification + public sealed class ComplexSuggestion : ISuggestModification { public readonly string Keyword; public readonly Func Criteria = _ => true; diff --git a/PKHeX.Core/Legality/Restrictions/GBRestrictions.cs b/PKHeX.Core/Legality/Restrictions/GBRestrictions.cs index c17b8d015..e1c32ddf5 100644 --- a/PKHeX.Core/Legality/Restrictions/GBRestrictions.cs +++ b/PKHeX.Core/Legality/Restrictions/GBRestrictions.cs @@ -13,13 +13,9 @@ namespace PKHeX.Core /// internal static class GBRestrictions { - private static readonly int[] G1CaterpieMoves = { 33, 81 }; - private static readonly int[] G1WeedleMoves = { 40, 81 }; - //private static readonly int[] G1MetapodMoves = { 33, 81, 106 }; - private static readonly int[] G1KakunaMoves = { 40, 81, 106 }; private static readonly int[] G1Exeggcute_IncompatibleMoves = { 78, 77, 79 }; - internal static readonly int[] Stadium_CatchRate = + private static readonly int[] Stadium_CatchRate = { 167, // Normal Box 168, // Gorgeous Box @@ -292,7 +288,9 @@ private static int GetRequiredMoveCountDecrement(PKM pk, IReadOnlyList move break; case (int)Cubone or (int)Marowak: // Cubone & Marowak if (!moves.Contains((int)Move.TailWhip) && !moves.Contains((int)Move.Headbutt)) // Initial Red - usedslots-=2; + { + usedslots -=2; + } else { if (!moves.Contains(39)) // Initial Yellow Tail Whip diff --git a/PKHeX.Core/MysteryGifts/MysteryUtil.cs b/PKHeX.Core/MysteryGifts/MysteryUtil.cs index 29b174bac..25746ffc8 100644 --- a/PKHeX.Core/MysteryGifts/MysteryUtil.cs +++ b/PKHeX.Core/MysteryGifts/MysteryUtil.cs @@ -61,19 +61,23 @@ public static IEnumerable GetDescription(this MysteryGift gift, IBasicSt } catch { result.Add(MsgMysteryGiftParseFail); } } - else switch (gift) + else { - case WC7 { IsBP: true } w7bp: - result.Add($"BP: {w7bp.BP}"); - break; - case WC7 { IsBean: true } w7bean: - result.Add($"Bean ID: {w7bean.Bean}"); - result.Add($"Quantity: {w7bean.Quantity}"); - break; - default: - result.Add(MsgMysteryGiftParseTypeUnknown); - break; + switch (gift) + { + case WC7 { IsBP: true } w7bp: + result.Add($"BP: {w7bp.BP}"); + break; + case WC7 { IsBean: true } w7bean: + result.Add($"Bean ID: {w7bean.Bean}"); + result.Add($"Quantity: {w7bean.Quantity}"); + break; + default: + result.Add(MsgMysteryGiftParseTypeUnknown); + break; + } } + switch (gift) { case WC7 w7: diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_HallOfFame.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_HallOfFame.cs index 5c83a156d..8fe8e3c69 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_HallOfFame.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_HallOfFame.cs @@ -423,7 +423,7 @@ private void ChangeNickname(object sender, MouseEventArgs e) var text = TB_Nickname.Text; ReadOnlySpan minTrash = SAV.SetString(text, Math.Min(text.Length, nicktrash.Length)); if (minTrash.Length > nicktrash.Length) - minTrash.Slice(0, nicktrash.Length); + minTrash = minTrash[..nicktrash.Length]; minTrash.CopyTo(nicktrash); var d = new TrashEditor(tb, nicktrash, SAV); d.ShowDialog();