mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Add daily changing pokemon in Great Marsh (dppt)
add batch encounterarea generation function
This commit is contained in:
parent
d0427f0322
commit
543e7bab88
3 changed files with 50 additions and 3 deletions
|
@ -499,6 +499,8 @@ namespace PKHeX.Core
|
||||||
var Pt_Slots = getEncounterTables(GameVersion.Pt);
|
var Pt_Slots = getEncounterTables(GameVersion.Pt);
|
||||||
var HG_Slots = getEncounterTables(GameVersion.HG);
|
var HG_Slots = getEncounterTables(GameVersion.HG);
|
||||||
var SS_Slots = getEncounterTables(GameVersion.SS);
|
var SS_Slots = getEncounterTables(GameVersion.SS);
|
||||||
|
var DP_GreatMarshAlt = EncounterArea.getSimpleEncounterArea(DP_GreatMarshAlt_Speices, new[] {22,22, 24,24, 26,26}, 52, SlotType.Grass_Safari);
|
||||||
|
var Pt_GreatMarshAlt = EncounterArea.getSimpleEncounterArea(Pt_GreatMarshAlt_Speices, new[] {27,30}, 52, SlotType.Grass_Safari);
|
||||||
var DP_Trophy = EncounterArea.getTrophyArea(TrophyDP, new[] {16, 18});
|
var DP_Trophy = EncounterArea.getTrophyArea(TrophyDP, new[] {16, 18});
|
||||||
var Pt_Trophy = EncounterArea.getTrophyArea(TrophyPt, new[] {22, 22});
|
var Pt_Trophy = EncounterArea.getTrophyArea(TrophyPt, new[] {22, 22});
|
||||||
var HG_Headbutt_Slots = EncounterArea.getArray4HGSS_Headbutt(Data.unpackMini(Resources.encunters_hb_hg, "hg"));
|
var HG_Headbutt_Slots = EncounterArea.getArray4HGSS_Headbutt(Data.unpackMini(Resources.encunters_hb_hg, "hg"));
|
||||||
|
@ -533,9 +535,9 @@ namespace PKHeX.Core
|
||||||
MarkG4SlotsGreatMarsh(ref P_Slots, 52);
|
MarkG4SlotsGreatMarsh(ref P_Slots, 52);
|
||||||
MarkG4SlotsGreatMarsh(ref Pt_Slots, 52);
|
MarkG4SlotsGreatMarsh(ref Pt_Slots, 52);
|
||||||
|
|
||||||
SlotsD = addExtraTableSlots(D_Slots, D_HoneyTrees_Slots, SlotsDPPPtAlt, DP_Trophy);
|
SlotsD = addExtraTableSlots(D_Slots, D_HoneyTrees_Slots, DP_GreatMarshAlt, SlotsDPPPtAlt, DP_Trophy);
|
||||||
SlotsP = addExtraTableSlots(P_Slots, P_HoneyTrees_Slots, SlotsDPPPtAlt, DP_Trophy);
|
SlotsP = addExtraTableSlots(P_Slots, P_HoneyTrees_Slots, DP_GreatMarshAlt, SlotsDPPPtAlt, DP_Trophy);
|
||||||
SlotsPt = addExtraTableSlots(Pt_Slots, Pt_HoneyTrees_Slots, SlotsDPPPtAlt, Pt_Trophy);
|
SlotsPt = addExtraTableSlots(Pt_Slots, Pt_HoneyTrees_Slots, Pt_GreatMarshAlt, SlotsDPPPtAlt, Pt_Trophy);
|
||||||
SlotsHG = addExtraTableSlots(HG_Slots, HG_Headbutt_Slots, SlotsHGSSAlt);
|
SlotsHG = addExtraTableSlots(HG_Slots, HG_Headbutt_Slots, SlotsHGSSAlt);
|
||||||
SlotsSS = addExtraTableSlots(SS_Slots, SS_Headbutt_Slots, SlotsHGSSAlt);
|
SlotsSS = addExtraTableSlots(SS_Slots, SS_Headbutt_Slots, SlotsHGSSAlt);
|
||||||
|
|
||||||
|
|
|
@ -890,6 +890,37 @@ namespace PKHeX.Core
|
||||||
return new[] { new EncounterArea { Location = 68, Slots = l.ToArray() } };
|
return new[] { new EncounterArea { Location = 68, Slots = l.ToArray() } };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the encounter areas for species with same level range and same slottype at same location
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="species">List of species that exist in the Area.</param>
|
||||||
|
/// <param name="lvls">Paired LevelMins and LevelMaxs of the encounter slots.</param>
|
||||||
|
/// <param name="location">Location index of the encounter area.</param>
|
||||||
|
/// <param name="t">Encounter slot type of the encounter area.</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static EncounterArea[] getSimpleEncounterArea(IEnumerable<int> species, int[] lvls, int location, SlotType t)
|
||||||
|
{
|
||||||
|
var l = new List<EncounterSlot>();
|
||||||
|
// levels data not paired
|
||||||
|
if ((lvls.Length & 1) == 1)
|
||||||
|
return new[] { new EncounterArea { Location = location, Slots = l.ToArray() } };
|
||||||
|
|
||||||
|
foreach (var s in species)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < lvls.Length;)
|
||||||
|
{
|
||||||
|
l.Add(new EncounterSlot
|
||||||
|
{
|
||||||
|
LevelMin = lvls[i++],
|
||||||
|
LevelMax = lvls[i++],
|
||||||
|
Species = s,
|
||||||
|
Type = t
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new[] { new EncounterArea { Location = location, Slots = l.ToArray() } };
|
||||||
|
}
|
||||||
|
|
||||||
public static EncounterArea[] getArray(byte[][] entries)
|
public static EncounterArea[] getArray(byte[][] entries)
|
||||||
{
|
{
|
||||||
if (entries == null)
|
if (entries == null)
|
||||||
|
|
|
@ -992,6 +992,20 @@ namespace PKHeX.Core
|
||||||
private static int[] TrophyDP = {035, 039, 052, 113, 133, 137, 173, 174, 183, 298, 311, 312, 351, 438, 439, 440}; // Porygon
|
private static int[] TrophyDP = {035, 039, 052, 113, 133, 137, 173, 174, 183, 298, 311, 312, 351, 438, 439, 440}; // Porygon
|
||||||
private static int[] TrophyPt = {035, 039, 052, 113, 133, 132, 173, 174, 183, 298, 311, 312, 351, 438, 439, 440}; // Ditto
|
private static int[] TrophyPt = {035, 039, 052, 113, 133, 132, 173, 174, 183, 298, 311, 312, 351, 438, 439, 440}; // Ditto
|
||||||
|
|
||||||
|
private static readonly int[] DP_GreatMarshAlt_Speices =
|
||||||
|
{
|
||||||
|
// Daily changing Pokemon are not in the raw data http://bulbapedia.bulbagarden.net/wiki/Great_Marsh
|
||||||
|
055,315,397,451,453,455,
|
||||||
|
183,194,195,298,399,400, // Pre-National Pokédex
|
||||||
|
046,102,115,193,285,316,452,454 // Post-National Pokédex
|
||||||
|
};
|
||||||
|
private static readonly int[] Pt_GreatMarshAlt_Speices =
|
||||||
|
{
|
||||||
|
114,193,195,357,451,453,455,
|
||||||
|
194, // Pre-National Pokédex
|
||||||
|
046,102,115,285,316,352,452,454 // Post-National Pokédex
|
||||||
|
};
|
||||||
|
|
||||||
private static readonly int[] Shellos_EastSeaLocation_DP =
|
private static readonly int[] Shellos_EastSeaLocation_DP =
|
||||||
{
|
{
|
||||||
28, // Route 213
|
28, // Route 213
|
||||||
|
|
Loading…
Reference in a new issue