mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-29 08:50:19 -05:00
Gen3 PCNY: remove OT gender checks
Same as PCJP, uses the recipient's save file gender. Not random.
This commit is contained in:
@@ -87,7 +87,6 @@ private static void SetPINGA(PK3 pk, EncounterCriteria criteria, PersonalInfo3 p
|
||||
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 bool IsCompatibleReviseReset(ref PIDIV value, PKM pk)
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user