Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
8CBCA403 committed Sep 17, 2022
1 parent c7fb19d commit ba54349
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 7 deletions.
7 changes: 6 additions & 1 deletion WangPlugin/GUI/DexBuildForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,12 @@ private void FormAndSubDex_Click(object sender, EventArgs e)
PKL = CapPikachuDex.CapPikachuSets(SAV, Editor);
break;
case "Unown":
PKL = UnownDex.UnownSets(SAV, Editor);
if (SAV.SAV.Version is GameVersion.SW or GameVersion.SH or GameVersion.SWSH)
PKL = GastrodonDex.GastrodonSets(SAV, Editor);
else
{
PKL = UnownDex.UnownSets(SAV, Editor);
}
break;
case "Deoxys":
PKL = DeoxysDex.DeoxysSets(SAV, Editor);
Expand Down
8 changes: 8 additions & 0 deletions WangPlugin/WangUtil/DexBase/HisuiformDex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ public static List<PKM> HisuiSets(ISaveFileProvider SAV, IPKMView Editor)
{
pk = (PA8)SearchDatabase.SearchPKM(SAV, Editor, a[i], 47, 1, false, 0, 0, 4);
}
else if (a[i]==483)
{
pk.Form = 1;
}
else if (a[i] == 484)
{
pk.Form = 1;
}
pk.CurrentLevel = 100;
pk.Species = a[i];
pk.ResetHeight();
Expand Down
2 changes: 2 additions & 0 deletions WangPlugin/WangUtil/DexBase/MegaDex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public static List<PKM> MegaSets(ISaveFileProvider SAV, IPKMView Editor)
{
PK6 pk6 = (PK6)SearchDatabase.SearchPKM(SAV, Editor, USUM[i], 25, 0, false);
pk = pk6.ConvertToPK7();
pk.Language = 2;
}
pk.CurrentLevel = 100;
pk.Species = USUM[i];
Expand Down Expand Up @@ -87,6 +88,7 @@ public static List<PKM> MegaSets(ISaveFileProvider SAV, IPKMView Editor)
{
PK6 pk6 = (PK6)SearchDatabase.SearchPKM(SAV, Editor, USUM[i], 25, 0, false);
pk = pk6.ConvertToPK7();
pk.Language = 2;
}
pk.CurrentLevel = 100;
pk.Species = USUM[i];
Expand Down
6 changes: 4 additions & 2 deletions WangPlugin/WangUtil/DexBase/UnownDex.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Windows.Forms;
using PKHeX.Core;
using PKHeX.Core.AutoMod;

namespace WangPlugin.WangUtil.DexBase
{
Expand All @@ -22,11 +23,12 @@ public static List<PKM> UnownSets(ISaveFileProvider SAV, IPKMView Editor)
}
break;
case GameVersion.S or GameVersion.E or GameVersion.R or
GameVersion.FR or GameVersion.LG or GameVersion.RSE:
GameVersion.FR or GameVersion.LG or GameVersion.RSE or GameVersion.RS:
for (int i = 0; i < 28; i++)
{
pk = SearchDatabase.SearchPKM(SAV, Editor, 201, 5);
pk.Form = (byte)i;
pk = SAV.SAV.Legalize(pk);
PKL.Add(pk);
}
break;
Expand Down Expand Up @@ -70,7 +72,7 @@ public static List<PKM> UnownSets(ISaveFileProvider SAV, IPKMView Editor)
case GameVersion.BD or GameVersion.SP or GameVersion.BDSP:
for (int i = 0; i < 28; i++)
{
pk = SearchDatabase.SearchPKM(SAV, Editor, 201, 48);
pk = SearchDatabase.SearchPKM(SAV, Editor, 201, 48,i);
pk.Form = (byte)i;
PKL.Add(pk);
}
Expand Down
6 changes: 6 additions & 0 deletions WangPlugin/WangUtil/DexBase/VivillonDex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,12 @@ public static List<PKM> VivillonSets(ISaveFileProvider SAV, IPKMView Editor)
break;
case 18:
var p = SearchDatabase.MytheryPK(SAV,Editor,666,6,18);

PKL.Add(p);
break;
case 19:
p = SearchDatabase.MytheryPK(SAV, Editor, 666, 6, 19);

PKL.Add(p);
break;
}
Expand Down Expand Up @@ -386,10 +388,14 @@ public static List<PKM> VivillonSets(ISaveFileProvider SAV, IPKMView Editor)
break;
case 18:
var p =(PK6)SearchDatabase.MytheryPK(SAV, Editor, 666, 6, 18);
p.Language = 2;
p.ClearNickname();
PKL.Add(p.ConvertToPK7());
break;
case 19:
p = (PK6)SearchDatabase.MytheryPK(SAV, Editor, 666, 6, 19);
p.Language = 1;
p.ClearNickname();
PKL.Add(p.ConvertToPK7());
break;
}
Expand Down
14 changes: 10 additions & 4 deletions WangPlugin/WangUtil/PluginEnums/DexModClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,21 @@ public static List<DexModClass> DexModList(ISaveFileProvider sav)
if(V is not GameVersion.SW && V is not GameVersion.SH && V is not GameVersion.BD&& V is not GameVersion.SP)
L.Add(Arceus);
}
if (G >= 5&& V is not GameVersion.BD && V is not GameVersion.SP && V is not GameVersion.PLA)
if (G >= 5&& V is not GameVersion.BD && V is not GameVersion.SP)
{
if (G != 8)
if (G != 8 && V is not GameVersion.PLA)
{
L.Add(Deerling);

}
if (V is not GameVersion.PLA)
{
L.Add(Genesect);
}
if (V is GameVersion.PLA&&V is not GameVersion.SW & V is not GameVersion.SH&& V is not GameVersion.SWSH)
{
L.Add(Incarnate);
}

L.Add(Genesect);
}
if (G >= 6)
{
Expand Down

0 comments on commit ba54349

Please sign in to comment.