mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Allow surf crossover from r223<->pkmleague
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
This commit is contained in:
parent
aa968f56aa
commit
47a1fd10e4
1 changed files with 25 additions and 0 deletions
|
@ -47,6 +47,31 @@ namespace PKHeX.Core
|
|||
return slots;
|
||||
}
|
||||
|
||||
public override bool IsMatchLocation(int location)
|
||||
{
|
||||
if (base.IsMatchLocation(location))
|
||||
return true;
|
||||
return CanCrossoverTo(location);
|
||||
}
|
||||
|
||||
private bool CanCrossoverTo(int location)
|
||||
{
|
||||
if (Type is SlotType.Surf)
|
||||
{
|
||||
return Location switch
|
||||
{
|
||||
486 => location is 167, // Route 223 -> Pokémon League
|
||||
167 => location is 486, // Pokémon League -> Route 223
|
||||
|
||||
// All other crossover surf locations are identical slot lists.
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
|
||||
// No crossover
|
||||
return false;
|
||||
}
|
||||
|
||||
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pkm, IReadOnlyList<EvoCriteria> chain)
|
||||
{
|
||||
foreach (var slot in Slots)
|
||||
|
|
Loading…
Reference in a new issue