Add area->location references to remaining slots

This commit is contained in:
Kurt
2017-12-23 11:48:10 -08:00
parent 985883e6ae
commit 7f21728e84
4 changed files with 31 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ EncounterArea[] get(string resource, string ident)
var FR_Slots = get("fr", "fr");
var LG_Slots = get("lg", "lg");
MarkEncounterAreaArray(SlotsRSEAlt, SlotsFRLGUnown);
MarkEncounterAreaArray(SlotsRSEAlt, SlotsFRLGUnown, SlotsXD);
ReduceAreasSize(ref R_Slots);
ReduceAreasSize(ref S_Slots);

View File

@@ -37,7 +37,7 @@ static Encounters5()
MarkB2W2SwarmSlots(SlotsW2_Swarm);
MarkG5HiddenGrottoSlots(SlotsB2_HiddenGrotto);
MarkG5HiddenGrottoSlots(SlotsW2_HiddenGrotto);
MarkEncounterAreaArray(SlotsB_Swarm, SlotsW_Swarm, SlotsB2_Swarm, SlotsW2_Swarm, SlotsB2_HiddenGrotto, SlotsW2_HiddenGrotto);
MarkEncounterAreaArray(SlotsB_Swarm, SlotsW_Swarm, SlotsB2_Swarm, SlotsW2_Swarm, SlotsB2_HiddenGrotto, SlotsW2_HiddenGrotto, WhiteForestSlot);
SlotsB = AddExtraTableSlots(BSlots, SlotsB_Swarm);
SlotsW = AddExtraTableSlots(WSlots, SlotsW_Swarm, WhiteForestSlot);

View File

@@ -1,4 +1,5 @@
using static PKHeX.Core.EncounterUtil;
using System.Linq;
using static PKHeX.Core.EncounterUtil;
namespace PKHeX.Core
{
@@ -9,6 +10,7 @@ internal static class Encounters6
{
internal static readonly EncounterArea[] SlotsX, SlotsY, SlotsA, SlotsO;
internal static readonly EncounterStatic[] StaticX, StaticY, StaticA, StaticO;
internal static readonly ILookup<int, EncounterSlot> FriendSafari;
static Encounters6()
{
@@ -32,6 +34,28 @@ static Encounters6()
MarkEncountersGeneration(6, SlotsX, SlotsY, SlotsA, SlotsO);
MarkEncountersGeneration(6, StaticX, StaticY, StaticA, StaticO, TradeGift_XY, TradeGift_AO);
FriendSafari = GetFriendSafariArea();
}
private static ILookup<int, EncounterSlot> GetFriendSafariArea()
{
var area = new EncounterArea { Location = 148 };
EncounterSlot FriendSafariSlot(int d)
{
return new EncounterSlot
{
Area = area,
Generation = 6,
Species = d,
LevelMin = 30,
LevelMax = 30,
Form = 0,
Type = SlotType.FriendSafari,
};
}
area.Slots = Legal.FriendSafari.Select(FriendSafariSlot).ToArray();
return area.Slots.ToLookup(s => s.Species);
}
private static void MarkG6XYSlots(ref EncounterArea[] Areas)
{

View File

@@ -39,7 +39,10 @@ static Encounters7()
MarkG7SMSlots(ref SOS_UM);
SlotsUS = AddExtraTableSlots(REG_US, SOS_US, Encounter_Pelago_UU, Encounter_Pelago_US);
SlotsUM = AddExtraTableSlots(REG_UM, SOS_UM, Encounter_Pelago_UU, Encounter_Pelago_UM);
MarkEncounterAreaArray(SOS_SN, SOS_MN, SOS_US, SOS_UM, Encounter_Pelago_SN, Encounter_Pelago_MN, Encounter_Pelago_US, Encounter_Pelago_UM);
MarkEncounterAreaArray(SOS_SN, SOS_MN, SOS_US, SOS_UM,
Encounter_Pelago_SM, Encounter_Pelago_SN, Encounter_Pelago_MN,
Encounter_Pelago_UU, Encounter_Pelago_US, Encounter_Pelago_UM);
MarkEncountersGeneration(7, SlotsSN, SlotsMN, SlotsUS, SlotsUM);
MarkEncountersGeneration(7, StaticSN, StaticMN, StaticUS, StaticUM, TradeGift_SM, TradeGift_USUM);