mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-27 21:55:58 -05:00
Change defunct gen8 location memory setting to check 1%
Refer to previous commit, the apply-memory has a 1% chance of failing for 100% memories, resulting in the ability to have 0-memory HT via link trades. In-game trades caused the previous logic, as those forget to set the HT memory (likely the same logic flaw as skipping the nickname check via game settings).
This commit is contained in:
@@ -286,8 +286,8 @@ private void VerifyHTMemory(LegalityAnalysis data)
|
||||
switch (memory)
|
||||
{
|
||||
// No Memory
|
||||
case 0: // SWSH trades don't set HT memories immediately, which is hilarious.
|
||||
data.AddLine(Get(LMemoryMissingHT, memoryGen == 8 ? Severity.Fishy : Severity.Invalid));
|
||||
case 0: // SWSH memory application has an off-by-one error: [0,99] + 1 <= chance --> don't apply
|
||||
data.AddLine(Get(LMemoryMissingHT, memoryGen == 8 ? ParseSettings.Gen8MemoryMissingHT : Severity.Invalid));
|
||||
VerifyHTMemoryNone(data, mem);
|
||||
return;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public static class ParseSettings
|
||||
public static Severity NicknamedMysteryGift { get; private set; } = Severity.Fishy;
|
||||
public static Severity RNGFrameNotFound { get; private set; } = Severity.Fishy;
|
||||
public static Severity Gen7TransferStarPID { get; private set; } = Severity.Fishy;
|
||||
public static Severity Gen8MemoryLocationTextVariable { get; private set; } = Severity.Fishy;
|
||||
public static Severity Gen8MemoryMissingHT { get; private set; } = Severity.Fishy;
|
||||
public static Severity Gen8TransferTrackerNotPresent { get; private set; } = Severity.Fishy;
|
||||
public static Severity NicknamedAnotherSpecies { get; private set; } = Severity.Fishy;
|
||||
|
||||
@@ -89,8 +89,8 @@ public static void InitFromSettings(IParseSettings settings)
|
||||
NicknamedMysteryGift = settings.NicknamedMysteryGift;
|
||||
RNGFrameNotFound = settings.RNGFrameNotFound;
|
||||
Gen7TransferStarPID = settings.Gen7TransferStarPID;
|
||||
Gen8MemoryLocationTextVariable = settings.Gen8MemoryLocationTextVariable;
|
||||
Gen8TransferTrackerNotPresent = settings.Gen8TransferTrackerNotPresent;
|
||||
Gen8MemoryMissingHT = settings.Gen8MemoryMissingHT;
|
||||
NicknamedAnotherSpecies = settings.NicknamedAnotherSpecies;
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public interface IParseSettings
|
||||
Severity NicknamedMysteryGift { get; }
|
||||
Severity RNGFrameNotFound { get; }
|
||||
Severity Gen7TransferStarPID { get; }
|
||||
Severity Gen8MemoryLocationTextVariable { get; }
|
||||
Severity Gen8MemoryMissingHT { get; }
|
||||
Severity Gen8TransferTrackerNotPresent { get; }
|
||||
Severity NicknamedAnotherSpecies { get; }
|
||||
}
|
||||
|
||||
@@ -199,8 +199,8 @@ public sealed class LegalitySettings : IParseSettings
|
||||
[LocalizedDescription("Severity to flag a Legality Check if Pokémon from Gen1/2 has a Star Shiny PID.")]
|
||||
public Severity Gen7TransferStarPID { get; set; } = Severity.Fishy;
|
||||
|
||||
[LocalizedDescription("Severity to flag a Legality Check if a Gen8 Location Memory text variable is present.")]
|
||||
public Severity Gen8MemoryLocationTextVariable { get; set; } = Severity.Fishy;
|
||||
[LocalizedDescription("Severity to flag a Legality Check if a Gen8 Memory is missing for the Handling Trainer.")]
|
||||
public Severity Gen8MemoryMissingHT { get; set; } = Severity.Fishy;
|
||||
|
||||
[LocalizedDescription("Severity to flag a Legality Check if the HOME Tracker is Missing")]
|
||||
public Severity Gen8TransferTrackerNotPresent { get; set; } = Severity.Fishy;
|
||||
|
||||
Reference in New Issue
Block a user