Skip to content

Commit

Permalink
Exclude unobtainable SOS encounters
Browse files Browse the repository at this point in the history
Rather than do backtracking logic to see if the slot can be yielded, don't acknowledge the slot exists if it can't be yielded.
See pk3DS commit where we check EscapeRate for the base wild slot prior to adding it to the exported slot list.
  • Loading branch information
kwsch committed Oct 10, 2020
1 parent 79f60d2 commit 944c473
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions PKHeX.Core/Legality/Verifiers/AbilityVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,6 @@ private CheckResult VerifyAbility7(LegalityAnalysis data, IEncounterable enc)
bool valid = slot.Area.Type == SlotType.SOS;
if (!valid)
return GetInvalid(LAbilityMismatchSOS);

var pi = PersonalTable.USUM[slot.Species];
if (pi.EscapeRate == 0) // Can't SOS
return GetInvalid(LAbilityHiddenFail);
}
if (Legal.Ban_NoHidden7.Contains(pkm.SpecForm) && pkm.AbilityNumber == 4)
return GetInvalid(LAbilityHiddenUnavailable);
Expand Down
Binary file modified PKHeX.Core/Resources/byte/encounter_mn.pkl
Binary file not shown.
Binary file modified PKHeX.Core/Resources/byte/encounter_sn.pkl
Binary file not shown.
Binary file modified PKHeX.Core/Resources/byte/encounter_um.pkl
Binary file not shown.
Binary file modified PKHeX.Core/Resources/byte/encounter_us.pkl
Binary file not shown.

0 comments on commit 944c473

Please sign in to comment.