Minor tweaks

Remove unused stuff
add some comments/xmldoc
Move Trainer1 to classes that use it
This commit is contained in:
Kurt 2019-11-28 14:00:55 -08:00
parent ea2f7f338b
commit f25b36a306
9 changed files with 28 additions and 15 deletions

View file

@ -38,7 +38,7 @@ namespace PKHeX.Core
return boost.Where(s => s.LevelMax < boostTo || s.IsLevelWithinRange(minLevel));
}
}
var slots = Slots.Where(slot => vs.Any(evo => evo.Species == slot.Species && evo.Form == slot.Form && evo.Level >= (slot.LevelMin)));
var slots = Slots.Where(slot => vs.Any(evo => evo.Species == slot.Species && evo.Form == slot.Form && evo.Level >= slot.LevelMin));
// Get slots where pokemon can exist with respect to level constraints
return slots.Where(s => s.IsLevelWithinRange(minLevel));
@ -57,7 +57,7 @@ namespace PKHeX.Core
{122, new byte[] {124, 128, 130}},
// Dappled Grove
// Dappled Grove, Watchtower Ruins
// Rolling Fields, Watchtower Ruins
{124, new byte[] {122, 126}},
// Watchtower Ruins
@ -171,6 +171,10 @@ namespace PKHeX.Core
}
}
/// <summary>
/// Encounter Conditions for <see cref="GameVersion.SWSH"/>
/// </summary>
/// <remarks>Values above <see cref="All"/> are for Shaking/Fishing hidden encounters only.</remarks>
[Flags]
public enum AreaWeather8
{
@ -193,6 +197,9 @@ namespace PKHeX.Core
NotWeather = Shaking_Trees | Fishing,
}
/// <summary>
/// Encounter Slot found in <see cref="GameVersion.SWSH"/>
/// </summary>
public sealed class EncounterSlot8 : EncounterSlot
{
public readonly AreaWeather8 Weather;

View file

@ -1,7 +1,13 @@
namespace PKHeX.Core
{
/// <summary>
/// Can mark as a "Favorite" in <see cref="GameVersion.GG"/>
/// </summary>
public interface IFavorite
{
/// <summary>
/// Marked as a "Favorite" in <see cref="GameVersion.GG"/>
/// </summary>
bool Favorite { get; set; }
}
}

View file

@ -1,5 +1,8 @@
namespace PKHeX.Core
{
/// <summary>
/// Metadata indicating the maximums (and minimums) a type of value can be.
/// </summary>
public interface IGameValueLimit
{
int MaxMoveID { get; }

View file

@ -1,5 +1,8 @@
namespace PKHeX.Core
{
/// <summary>
/// Tracks Geolocation history of a <see cref="PKM"/>
/// </summary>
public interface IGeoTrack
{
int Geo1_Region { get; set; }

View file

@ -906,7 +906,7 @@ namespace PKHeX.Core
}
private const int Galarian = 1068;
private const int Gigantamax = 1069;
// private const int Gigantamax = 1069;
private const int Gulping = 1070;
private const int Gorging = 1071;
private const int LowKey = 1072;
@ -926,18 +926,10 @@ namespace PKHeX.Core
private const int Crowned = 1083;
private const int Eternamax = 1084;
private static string[] GetSingleGigantamax(IReadOnlyList<string> types, IReadOnlyList<string> forms)
{
return new[]
{
types[000], // Normal
forms[Gigantamax], // Gigantamax
};
}
public static string[] GetAlcremieFormList(IReadOnlyList<string> forms)
{
var result = new string[63];
// seed form0 with the pattern
result[0 * 7] = forms[(int) Alcremie]; // Vanilla Cream
result[1 * 7] = forms[RubyCream];
result[2 * 7] = forms[MatchaCream];
@ -953,9 +945,10 @@ namespace PKHeX.Core
for (int f = 0; f < fc; f++)
{
int start = f * deco;
// iterate downwards using form0 as pattern ref, replacing on final loop
for (int i = deco - 1; i >= 0; i--)
{
result[start + i] = result[start] + $" ({((AlcremieDecoration) i).ToString()})";
result[start + i] = $"{result[start]} ({((AlcremieDecoration)i).ToString()})";
}
}

View file

@ -52,7 +52,7 @@ namespace PKHeX.Core
private StrategyMemo Initialize()
{
Trainer1 = 0x00078;
// Trainer1 = 0x00078;
Party = 0x000A8;
Box = 0x00B90;

View file

@ -21,6 +21,7 @@ namespace PKHeX.Core
private int SaveCount = -1;
private int SaveIndex = -1;
private int Trainer1;
private int Memo;
private int Shadow;
private readonly StrategyMemo StrategyMemo;

View file

@ -181,6 +181,7 @@ namespace PKHeX.Core
protected int WondercardFlags = int.MinValue;
protected int AdventureInfo = int.MinValue;
protected int Seal = int.MinValue;
protected int Trainer1;
public int GTS { get; protected set; } = int.MinValue;
// Storage

View file

@ -98,7 +98,6 @@ namespace PKHeX.Core
public virtual void CopyChangesFrom(SaveFile sav) => SetData(sav.Data, 0);
// Offsets
protected int Trainer1 { get; set; } = int.MinValue;
#region Stored PKM Limits
public abstract PersonalTable Personal { get; }