Gen3 PCNY: remove OT gender checks

Same as PCJP, uses the recipient's save file gender. Not random.
This commit is contained in:
Kurt 2024-11-11 08:16:58 -06:00
parent 4414b34fe7
commit 52437d1712

View file

@ -87,7 +87,6 @@ public sealed class EncounterGift3NY(ushort Species, Distribution3NY Distributio
pk.PID = pid;
pk.IV32 = PIDGenerator.SetIVsFromSeedSequentialLCRNG(ref seed);
pk.RefreshAbility((int)(pid & 1));
pk.OriginalTrainerGender = (byte)GetGender(LCRNG.Next16(ref seed));
return;
}
}
@ -168,14 +167,6 @@ public sealed class EncounterGift3NY(ushort Species, Distribution3NY Distributio
if (type is not PIDType.BACD_AX)
return false;
var seed = value.OriginSeed;
var rand5 = LCRNG.Next5(seed) >> 16;
var expect = GetGender(rand5);
if (pk.OriginalTrainerGender != expect)
return false;
return true; // Table weight -> gift selection is a separate RNG, nothing to check!
}
private static uint GetGender(uint rand16) => CommonEvent3.GetGenderBit7(rand16);
}