mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Minor clean
This commit is contained in:
parent
cc8ac7a4f1
commit
76cac85243
4 changed files with 21 additions and 19 deletions
|
@ -3,7 +3,7 @@
|
||||||
namespace PKHeX.Core
|
namespace PKHeX.Core
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="ISuggestModification"/>
|
/// <inheritdoc cref="ISuggestModification"/>
|
||||||
public class ComplexSuggestion : ISuggestModification
|
public sealed class ComplexSuggestion : ISuggestModification
|
||||||
{
|
{
|
||||||
public readonly string Keyword;
|
public readonly string Keyword;
|
||||||
public readonly Func<PKM, bool> Criteria = _ => true;
|
public readonly Func<PKM, bool> Criteria = _ => true;
|
||||||
|
|
|
@ -13,13 +13,9 @@ namespace PKHeX.Core
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static class GBRestrictions
|
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 };
|
private static readonly int[] G1Exeggcute_IncompatibleMoves = { 78, 77, 79 };
|
||||||
|
|
||||||
internal static readonly int[] Stadium_CatchRate =
|
private static readonly int[] Stadium_CatchRate =
|
||||||
{
|
{
|
||||||
167, // Normal Box
|
167, // Normal Box
|
||||||
168, // Gorgeous Box
|
168, // Gorgeous Box
|
||||||
|
@ -292,7 +288,9 @@ namespace PKHeX.Core
|
||||||
break;
|
break;
|
||||||
case (int)Cubone or (int)Marowak: // Cubone & Marowak
|
case (int)Cubone or (int)Marowak: // Cubone & Marowak
|
||||||
if (!moves.Contains((int)Move.TailWhip) && !moves.Contains((int)Move.Headbutt)) // Initial Red
|
if (!moves.Contains((int)Move.TailWhip) && !moves.Contains((int)Move.Headbutt)) // Initial Red
|
||||||
usedslots-=2;
|
{
|
||||||
|
usedslots -=2;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!moves.Contains(39)) // Initial Yellow Tail Whip
|
if (!moves.Contains(39)) // Initial Yellow Tail Whip
|
||||||
|
|
|
@ -61,19 +61,23 @@ namespace PKHeX.Core
|
||||||
}
|
}
|
||||||
catch { result.Add(MsgMysteryGiftParseFail); }
|
catch { result.Add(MsgMysteryGiftParseFail); }
|
||||||
}
|
}
|
||||||
else switch (gift)
|
else
|
||||||
{
|
{
|
||||||
case WC7 { IsBP: true } w7bp:
|
switch (gift)
|
||||||
result.Add($"BP: {w7bp.BP}");
|
{
|
||||||
break;
|
case WC7 { IsBP: true } w7bp:
|
||||||
case WC7 { IsBean: true } w7bean:
|
result.Add($"BP: {w7bp.BP}");
|
||||||
result.Add($"Bean ID: {w7bean.Bean}");
|
break;
|
||||||
result.Add($"Quantity: {w7bean.Quantity}");
|
case WC7 { IsBean: true } w7bean:
|
||||||
break;
|
result.Add($"Bean ID: {w7bean.Bean}");
|
||||||
default:
|
result.Add($"Quantity: {w7bean.Quantity}");
|
||||||
result.Add(MsgMysteryGiftParseTypeUnknown);
|
break;
|
||||||
break;
|
default:
|
||||||
|
result.Add(MsgMysteryGiftParseTypeUnknown);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (gift)
|
switch (gift)
|
||||||
{
|
{
|
||||||
case WC7 w7:
|
case WC7 w7:
|
||||||
|
|
|
@ -423,7 +423,7 @@ namespace PKHeX.WinForms
|
||||||
var text = TB_Nickname.Text;
|
var text = TB_Nickname.Text;
|
||||||
ReadOnlySpan<byte> minTrash = SAV.SetString(text, Math.Min(text.Length, nicktrash.Length));
|
ReadOnlySpan<byte> minTrash = SAV.SetString(text, Math.Min(text.Length, nicktrash.Length));
|
||||||
if (minTrash.Length > nicktrash.Length)
|
if (minTrash.Length > nicktrash.Length)
|
||||||
minTrash.Slice(0, nicktrash.Length);
|
minTrash = minTrash[..nicktrash.Length];
|
||||||
minTrash.CopyTo(nicktrash);
|
minTrash.CopyTo(nicktrash);
|
||||||
var d = new TrashEditor(tb, nicktrash, SAV);
|
var d = new TrashEditor(tb, nicktrash, SAV);
|
||||||
d.ShowDialog();
|
d.ShowDialog();
|
||||||
|
|
Loading…
Reference in a new issue