mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-13 20:06:16 -05:00
Revise Gen8 HOME gift 0/0 scale rolling
This commit is contained in:
@@ -196,7 +196,7 @@ private void VerifySVStats(LegalityAnalysis data, PK9 pk9)
|
||||
var enc = data.EncounterOriginal;
|
||||
if (pk9 is { HeightScalar: 0, WeightScalar: 0 })
|
||||
{
|
||||
if (enc.Context.Generation() < 9 && !data.Info.EvoChainsAllGens.HasVisitedPLA && enc is not IPogoSlot) // <=Gen8 rerolls height/weight, never zero.
|
||||
if (enc.Generation < 8 && !data.Info.EvoChainsAllGens.HasVisitedPLA && enc is not IPogoSlot) // <=Gen8 rerolls height/weight, never zero.
|
||||
data.AddLine(Get(LStatInvalidHeightWeight, Severity.Invalid, Encounter));
|
||||
else if (CheckHeightWeightOdds(enc) && ParseSettings.ZeroHeightWeight != Severity.Valid)
|
||||
data.AddLine(Get(LStatInvalidHeightWeight, ParseSettings.ZeroHeightWeight, Encounter));
|
||||
|
||||
@@ -730,21 +730,12 @@ public override bool IsMatchExact(PKM pk, EvoCriteria evo)
|
||||
{
|
||||
// Prior to 3.0.0, HOME would set the Height and Weight exactly and not give a random value if it was 0.
|
||||
// However, entering HOME will re-randomize the Height and Weight.
|
||||
if (pk.MetDate is { } x && IsHOMEGiftOld(x))
|
||||
if (pk.MetDate is { } x && !IsHOMEGiftOld(x))
|
||||
{
|
||||
// Need to defer and not mismatch date ranges.
|
||||
if (!EncounterServerDate.IsValidDateWC8(this, x))
|
||||
return false;
|
||||
|
||||
if (pk.Context is not (EntityContext.Gen8 or EntityContext.Gen8b))
|
||||
{
|
||||
// Only these 3 can transfer to PLA and get 0 scale prior to 3.0.0
|
||||
if (Species is not ((ushort)Core.Species.Pikachu or (ushort)Core.Species.Eevee or (ushort)Core.Species.Rotom or (ushort)Core.Species.Pichu))
|
||||
{
|
||||
if (pk is IScaledSize { HeightScalar: 0, WeightScalar: 0 })
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// This was later fixed on 6/15/2023 to stop re-rolling old gifts. New gifts would be random.
|
||||
// Gifts that were already re-rolled would stay re-rolled.
|
||||
if (pk is IScaledSize { HeightScalar: 0, WeightScalar: 0 })
|
||||
return false; // Disallow anything that's not an Old HOME gift from having 0/0.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user