Minor clean

This commit is contained in:
Kurt 2021-12-27 13:50:21 -08:00
parent cc8ac7a4f1
commit 76cac85243
4 changed files with 21 additions and 19 deletions

View file

@ -3,7 +3,7 @@
namespace PKHeX.Core
{
/// <inheritdoc cref="ISuggestModification"/>
public class ComplexSuggestion : ISuggestModification
public sealed class ComplexSuggestion : ISuggestModification
{
public readonly string Keyword;
public readonly Func<PKM, bool> Criteria = _ => true;

View file

@ -13,13 +13,9 @@ namespace PKHeX.Core
/// </summary>
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 @@ namespace PKHeX.Core
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

View file

@ -61,19 +61,23 @@ namespace PKHeX.Core
}
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:

View file

@ -423,7 +423,7 @@ namespace PKHeX.WinForms
var text = TB_Nickname.Text;
ReadOnlySpan<byte> 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();