mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 04:23:12 +00:00
Revise Gen8 HOME gift 0/0 scale rolling
This commit is contained in:
parent
af228b0fec
commit
69f7413387
2 changed files with 6 additions and 15 deletions
|
@ -196,7 +196,7 @@ public sealed class MiscVerifier : Verifier
|
|||
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 sealed class WC8(byte[] Data) : DataMysteryGift(Data), ILangNick, INature
|
|||
{
|
||||
// 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))
|
||||
{
|
||||
// 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.MetDate is { } x && !IsHOMEGiftOld(x))
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
return false; // Disallow anything that's not an Old HOME gift from having 0/0.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue