Fix frlg safari rod slot checks

tfw whole legit boxes of dratini were flagged -> now legal
This commit is contained in:
Kurt 2017-11-28 20:56:21 -08:00
parent fb4fffffa0
commit c7a59453b1
3 changed files with 13 additions and 4 deletions

View file

@ -194,7 +194,6 @@ namespace PKHeX.Core
yield return info.GetFrame(blockSeed, seed.Charm3 ? LeadRequired.CuteCharm : LeadRequired.None);
// if no pokeblocks present (or failed call), fall out of the safari specific code and generate via the other scenarios
s = info.RNG.Prev(s); // wasted RNG call
}
var rand = s >> 16;
@ -217,7 +216,11 @@ namespace PKHeX.Core
if (seed.Charm3)
yield return info.GetFrame(prev, LeadRequired.CuteCharm);
else
{
if (info.Safari3)
prev = pidiv.RNG.Prev(prev); // wasted RNG call
yield return info.GetFrame(prev, LeadRequired.None);
}
}
}
}

View file

@ -35,7 +35,7 @@
DPPt = false;
FrameType = FrameType.MethodH;
RNG = pidiv.RNG;
Safari3 = pk.Ball == 5;
Safari3 = pk.Ball == 5 && !pk.FRLG;
if (ver != GameVersion.E)
return;

View file

@ -6,11 +6,12 @@ namespace PKHeX.Core
{
private static readonly Range[] H_OldRod = GetRanges(70, 30);
private static readonly Range[] H_GoodRod = GetRanges(60, 20, 20);
private static readonly Range[] H_SuperRod = GetRanges(40, 30, 15, 10, 5);
private static readonly Range[] H_SuperRod = GetRanges(40, 40, 15, 4, 1);
private static readonly Range[] H_Surf = GetRanges(60, 30, 5, 4, 1);
private static readonly Range[] H_Regular = GetRanges(20, 20, 10, 10, 10, 10, 5, 5, 4, 4, 1, 1);
private static readonly Range[] J_SuperRod = GetRanges(40, 40, 15, 4, 1);
private static readonly Range[] K_SuperRod = GetRanges(40, 30, 15, 10, 5);
private static readonly Range[] K_BCC = GetRanges(5,5,5,5, 10,10,10,10, 20,20).Reverse().ToArray();
private static readonly Range[] K_Headbutt = GetRanges(50, 15, 15, 10, 5, 5);
@ -34,11 +35,16 @@ namespace PKHeX.Core
switch (type)
{
case SlotType.Old_Rod:
case SlotType.Old_Rod_Safari:
return CalcSlot(ESV, H_OldRod);
case SlotType.Good_Rod:
case SlotType.Good_Rod_Safari:
return CalcSlot(ESV, H_GoodRod);
case SlotType.Super_Rod:
case SlotType.Super_Rod_Safari:
return CalcSlot(ESV, H_SuperRod);
case SlotType.Rock_Smash:
case SlotType.Surf:
return CalcSlot(ESV, H_Surf);
case SlotType.Swarm:
@ -57,7 +63,7 @@ namespace PKHeX.Core
case SlotType.Super_Rod:
case SlotType.Good_Rod:
case SlotType.Old_Rod:
return CalcSlot(ESV, H_SuperRod);
return CalcSlot(ESV, K_SuperRod);
case SlotType.BugContest:
return CalcSlot(ESV, K_BCC);
case SlotType.Grass_Safari: