mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-08 18:05:54 -05:00
Apply static/magnet groups by slot type
only apply for emerald (only game in gen3 that supports it)
This commit is contained in:
@@ -82,10 +82,11 @@ internal static void MarkEncountersStaticMagnetPull(ref EncounterArea[] Areas, P
|
||||
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)
|
||||
|
||||
@@ -48,11 +48,7 @@ EncounterArea[] get(string resource, string ident)
|
||||
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);
|
||||
|
||||
@@ -36,8 +36,7 @@ public bool IsSlotCompatibile(EncounterSlot slot, PKM pkm)
|
||||
|
||||
// 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;
|
||||
|
||||
Reference in New Issue
Block a user