Apply static/magnet groups by slot type

only apply for emerald (only game in gen3 that supports it)
This commit is contained in:
Kurt 2017-11-30 22:34:57 -08:00
parent de25056275
commit 5d74096243
3 changed files with 3 additions and 7 deletions

View file

@ -82,10 +82,11 @@ namespace PKHeX.Core
const int steel = (int)MoveType.Steel;
const int electric = (int)MoveType.Electric;
foreach (EncounterArea Area in Areas)
foreach (var grp in Area.Slots.GroupBy(z => z.Type))
{
var s = new List<EncounterSlot>(); // Static
var m = new List<EncounterSlot>(); // Magnet Pull
foreach (EncounterSlot Slot in Area.Slots)
foreach (EncounterSlot Slot in grp)
{
var types = t[Slot.Species].Types;
if (types[0] == steel || types[1] == steel)

View file

@ -48,11 +48,7 @@ namespace PKHeX.Core
MarkG3SlotsSafariZones(ref FR_Slots, SafariLocation_FRLG);
MarkG3SlotsSafariZones(ref LG_Slots, SafariLocation_FRLG);
MarkEncountersStaticMagnetPull(ref R_Slots, PersonalTable.SM);
MarkEncountersStaticMagnetPull(ref S_Slots, PersonalTable.SM);
MarkEncountersStaticMagnetPull(ref E_Slots, PersonalTable.SM);
MarkEncountersStaticMagnetPull(ref FR_Slots, PersonalTable.SM);
MarkEncountersStaticMagnetPull(ref LG_Slots, PersonalTable.SM);
SlotsR = AddExtraTableSlots(R_Slots, SlotsRSEAlt);
SlotsS = AddExtraTableSlots(S_Slots, SlotsRSEAlt);

View file

@ -36,8 +36,7 @@
// Check Level Now
int lvl = SlotRange.GetLevel(slot, Lead, RandLevel);
if (lvl < 0) { } // todo
else if (pkm.HasOriginalMetLocation)
if (pkm.HasOriginalMetLocation)
{
if (lvl != pkm.Met_Level)
return false;