mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 12:35:20 -05:00
Prevent providing beta safari zone encounters
Fixes Krabby / etc. Fix genderless encounterstatic gender set (Voltorb) Now at 103, Exeggutor pretty cool that over 100 species can have every single encounter generate a legal pkm ;) might be useful to add metrics to count how many encounters are generated in a session
This commit is contained in:
parent
ab71ea2d8b
commit
ea2c6260fa
|
|
@ -255,8 +255,12 @@ private static IEnumerable<EncounterSlot> GetSlots(PKM pk, IReadOnlyCollection<i
|
|||
var slots = EncounterSlotGenerator.GetPossible(pk);
|
||||
foreach (var slot in slots)
|
||||
{
|
||||
if (slot.Generation == 2 && slot.Type.HasFlag(SlotType.Headbutt))
|
||||
if (slot.Generation == 2)
|
||||
{
|
||||
if (slot.Type.HasFlag(SlotType.Safari))
|
||||
continue;
|
||||
|
||||
if (slot.Type.HasFlag(SlotType.Headbutt))
|
||||
if (Legal.GetGSCHeadbuttAvailability(slot, pk.TID) != TreeEncounterAvailable.ValidTree)
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -266,6 +266,7 @@ private static void SetRandomPIDIV(PKM pkm, uint seed)
|
|||
private static void SetRandomWildPID4(PKM pk, int nature, int ability, int gender, PIDType specific = PIDType.None)
|
||||
{
|
||||
pk.RefreshAbility(ability);
|
||||
pk.Gender = gender;
|
||||
var type = GetPIDType(pk, specific);
|
||||
var method = GetGeneratorMethod(type);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user