2019-09-13 06:20:52 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace PKHeX.Core
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <see cref="GameVersion.GG"/> encounter area
|
|
|
|
|
/// </summary>
|
|
|
|
|
public sealed class EncounterArea7b : EncounterArea32
|
|
|
|
|
{
|
|
|
|
|
private const int CatchComboBonus = 1;
|
|
|
|
|
|
2020-06-28 03:18:29 +00:00
|
|
|
|
protected override IEnumerable<EncounterSlot> GetMatchFromEvoLevel(PKM pkm, IReadOnlyList<DexLevel> chain, int minLevel)
|
2019-09-13 06:20:52 +00:00
|
|
|
|
{
|
2020-06-28 03:18:29 +00:00
|
|
|
|
var slots = Slots.Where(slot => chain.Any(evo => evo.Species == slot.Species && evo.Form == slot.Form && evo.Level >= (slot.LevelMin - CatchComboBonus)));
|
2019-09-13 06:20:52 +00:00
|
|
|
|
|
|
|
|
|
// Get slots where pokemon can exist with respect to level constraints
|
2019-09-20 05:54:53 +00:00
|
|
|
|
return slots.Where(s => s.IsLevelWithinRange(minLevel, minLevel, 0, CatchComboBonus));
|
2019-09-13 06:20:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override IEnumerable<EncounterSlot> GetFilteredSlots(PKM pkm, IEnumerable<EncounterSlot> slots, int minLevel)
|
|
|
|
|
{
|
2020-04-13 02:41:03 +00:00
|
|
|
|
return slots;
|
2019-09-13 06:20:52 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-04-13 02:41:03 +00:00
|
|
|
|
}
|