mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Add japanese blue encounter tables (unique to jp_blue)
When creating a new pk1 for the slot->pkm, get it as a pk1-japanese. Export the gameversion when in pk1/2 format (same as VC).
This commit is contained in:
parent
2deb51b365
commit
4a3a8dd090
6 changed files with 13 additions and 9 deletions
|
@ -9,9 +9,11 @@ namespace PKHeX.Core
|
|||
internal static class Encounters1
|
||||
{
|
||||
private static readonly EncounterArea1[] SlotsR = Get("red", "g1", RD);
|
||||
private static readonly EncounterArea1[] SlotsB = Get("blue", "g1", BU);
|
||||
private static readonly EncounterArea1[] SlotsG = Get("blue", "g1", GN);
|
||||
private static readonly EncounterArea1[] SlotsY = Get("yellow", "g1", YW);
|
||||
internal static readonly EncounterArea1[] SlotsRBY = ArrayUtil.ConcatAll(SlotsR, SlotsB, SlotsY);
|
||||
private static readonly EncounterArea1[] SlotsB = Get("blue_jp", "g1", BU);
|
||||
internal static readonly EncounterArea1[] SlotsRBY = ArrayUtil.ConcatAll(SlotsR, SlotsG, SlotsY);
|
||||
internal static readonly EncounterArea1[] SlotsRGBY = ArrayUtil.ConcatAll(SlotsRBY, SlotsB);
|
||||
|
||||
private static EncounterArea1[] Get(string name, string ident, GameVersion game) =>
|
||||
EncounterArea1.GetAreas(BinLinker.Unpack(Util.GetBinaryResource($"encounter_{name}.pkl"), ident), game);
|
||||
|
|
|
@ -134,7 +134,7 @@ namespace PKHeX.Core
|
|||
|
||||
private static IEnumerable<EncounterArea> GetEncounterTable(PKM pkm, GameVersion game) => game switch
|
||||
{
|
||||
RBY or RD or BU or GN or YW => SlotsRBY,
|
||||
RBY or RD or BU or GN or YW => pkm.Japanese ? SlotsRGBY : SlotsRBY,
|
||||
|
||||
GSC or GD or SV or C => GetEncounterTableGSC(pkm),
|
||||
|
||||
|
|
|
@ -404,7 +404,7 @@ namespace PKHeX.Core
|
|||
var loc = EncounterLocation;
|
||||
if (!string.IsNullOrEmpty(loc))
|
||||
lines.Add(string.Format(L_F0_1, "Location", loc));
|
||||
if (pkm.VC)
|
||||
if (Info.Generation <= 2)
|
||||
lines.Add(string.Format(L_F0_1, nameof(GameVersion), Info.Game));
|
||||
|
||||
if (!Info.PIDParsed)
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<None Remove="Resources\byte\encounter_b.pkl" />
|
||||
<None Remove="Resources\byte\encounter_b2.pkl" />
|
||||
<None Remove="Resources\byte\encounter_blue.pkl" />
|
||||
<None Remove="Resources\byte\encounter_blue_jp.pkl" />
|
||||
<None Remove="Resources\byte\encounter_crystal.pkl" />
|
||||
<None Remove="Resources\byte\encounter_d.pkl" />
|
||||
<None Remove="Resources\byte\encounter_e.pkl" />
|
||||
|
@ -880,6 +881,7 @@
|
|||
<EmbeddedResource Include="Resources\byte\encounter_b.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_b2.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_blue.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_blue_jp.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_crystal.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_d.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_e.pkl" />
|
||||
|
|
|
@ -426,12 +426,12 @@ namespace PKHeX.Core
|
|||
return (PKM)Activator.CreateInstance(type, new object[argCount]);
|
||||
}
|
||||
|
||||
public static PKM GetBlank(int gen, GameVersion ver)
|
||||
public static PKM GetBlank(int gen, GameVersion ver) => gen switch
|
||||
{
|
||||
if (gen == 7 && GameVersion.Gen7b.Contains(ver))
|
||||
return new PB7();
|
||||
return GetBlank(gen);
|
||||
}
|
||||
1 when ver == GameVersion.BU => new PK1(true),
|
||||
7 when GameVersion.Gen7b.Contains(ver) => new PB7(),
|
||||
_ => GetBlank(gen)
|
||||
};
|
||||
|
||||
public static PKM GetBlank(int gen, int ver) => GetBlank(gen, (GameVersion) ver);
|
||||
|
||||
|
|
BIN
PKHeX.Core/Resources/byte/encounter_blue_jp.pkl
Normal file
BIN
PKHeX.Core/Resources/byte/encounter_blue_jp.pkl
Normal file
Binary file not shown.
Loading…
Reference in a new issue