diff --git a/PKHeX.Core/Editing/ISpriteBuilder.cs b/PKHeX.Core/Editing/ISpriteBuilder.cs index 66387260f..055b87b4b 100644 --- a/PKHeX.Core/Editing/ISpriteBuilder.cs +++ b/PKHeX.Core/Editing/ISpriteBuilder.cs @@ -1,11 +1,15 @@ namespace PKHeX.Core { - public interface ISpriteBuilder + public interface ISpriteBuilder { T GetSprite(int species, int form, int gender, int heldItem, bool isEgg, bool isShiny, int generation = -1, bool isBoxBGRed = false); + T GetSprite(T baseSprite, int species, int heldItem, bool isEgg, bool isShiny, + int generation = -1, + bool isBoxBGRed = false); + void Initialize(SaveFile sav); } } diff --git a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs index fab240696..75ba3c752 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs @@ -1478,6 +1478,8 @@ namespace PKHeX.WinForms.Controls return; FieldsLoaded = false; NUD_Purification.Value = CHK_Shadow.Checked ? NUD_Purification.Maximum : 0; + ((IShadowPKM)pkm).Purification = (int)NUD_Purification.Value; + UpdatePreviewSprite?.Invoke(this, null); FieldsLoaded = true; } diff --git a/PKHeX.WinForms/PKHeX.WinForms.csproj b/PKHeX.WinForms/PKHeX.WinForms.csproj index cab16c873..6e294a344 100644 --- a/PKHeX.WinForms/PKHeX.WinForms.csproj +++ b/PKHeX.WinForms/PKHeX.WinForms.csproj @@ -1915,6 +1915,7 @@ + diff --git a/PKHeX.WinForms/Properties/Resources.Designer.cs b/PKHeX.WinForms/Properties/Resources.Designer.cs index 7403acb2f..8e81af517 100644 --- a/PKHeX.WinForms/Properties/Resources.Designer.cs +++ b/PKHeX.WinForms/Properties/Resources.Designer.cs @@ -4330,6 +4330,16 @@ namespace PKHeX.WinForms.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _249x { + get { + object obj = ResourceManager.GetObject("_249x", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -22934,12 +22944,11 @@ namespace PKHeX.WinForms.Properties { /// Looks up a localized string similar to PKHeX - By Kaphotics ///http://projectpokemon.org/pkhex/ /// - ///18/08/03 - New Update: + ///18/09/11 - New Update: /// - Legality: - /// - - Changed: Another round of legality check updates. Thanks @iiippppk, @WEERSOQUEER, @PrometheusG, @NinFanBoyFTW, paf, Cloud AC! - /// - - Added: Unavailable bred hidden abilities are now flagged for Gen5 origin entities (now covers all gens). - /// - - Added: WC6/7 mystery gift version compatibility checks based on wc*full data. Note: some gifts might still allow impossible future versions. - /// - Added: Hovering over a [rest of string was truncated]";. + /// - - Changed: Another round of legality check updates. Thanks HaxAras, @sora10pls, ICanSnake, Omnipotent Arceus, Raptor385, PF649, PrometheusG, @Narithegreat, Yami_Wheeler, crzyc, ThePunish3D, @Lusamine! + /// - - Added: Poké Pelago status legality checks have been enabled, which can detect improperly transferred files. + /// - Added: Clicking on the "Ball" label now brings up a list of all balls, with background color i [rest of string was truncated]";. /// internal static string changelog { get { @@ -28128,7 +28137,7 @@ namespace PKHeX.WinForms.Properties { } /// - /// Looks up a localized string similar to 20180803. + /// Looks up a localized string similar to 20180911. /// internal static string ProgramVersion { get { diff --git a/PKHeX.WinForms/Properties/Resources.resx b/PKHeX.WinForms/Properties/Resources.resx index 6189e51a7..4fc749f15 100644 --- a/PKHeX.WinForms/Properties/Resources.resx +++ b/PKHeX.WinForms/Properties/Resources.resx @@ -9205,4 +9205,7 @@ ..\Resources\img\Bag\Bag_Key.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\img\Pokemon Sprites\249x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/PKHeX.WinForms/Resources/img/Pokemon Sprites/249x.png b/PKHeX.WinForms/Resources/img/Pokemon Sprites/249x.png new file mode 100644 index 000000000..7ce8f4a46 Binary files /dev/null and b/PKHeX.WinForms/Resources/img/Pokemon Sprites/249x.png differ diff --git a/PKHeX.WinForms/Util/SpriteBuilder.cs b/PKHeX.WinForms/Util/SpriteBuilder.cs index a72ef9db2..e72b69fbf 100644 --- a/PKHeX.WinForms/Util/SpriteBuilder.cs +++ b/PKHeX.WinForms/Util/SpriteBuilder.cs @@ -41,6 +41,11 @@ namespace PKHeX.WinForms var baseImage = GetBaseImage(species, form, gender, isShiny, generation); + return GetSprite(baseImage, species, heldItem, isEgg, isShiny, generation, isBoxBGRed); + } + + public Image GetSprite(Image baseImage, int species, int heldItem, bool isEgg, bool isShiny, int generation = -1, bool isBoxBGRed = false) + { if (isEgg) baseImage = LayerOverImageEgg(baseImage, species, heldItem != 0); if (isShiny) diff --git a/PKHeX.WinForms/Util/SpriteUtil.cs b/PKHeX.WinForms/Util/SpriteUtil.cs index bddaa94a3..7d204ea1d 100644 --- a/PKHeX.WinForms/Util/SpriteUtil.cs +++ b/PKHeX.WinForms/Util/SpriteUtil.cs @@ -86,6 +86,8 @@ namespace PKHeX.WinForms var img = GetSprite(pkm.Species, pkm.AltForm, pkm.Gender, pkm.SpriteItem, pkm.IsEgg, pkm.IsShiny, pkm.Format, isBoxBGRed); if (pkm is IShadowPKM s && s.Purification > 0) { + if (pkm.Species == 249) // Lugia + img = Spriter.GetSprite(Resources._249x, 249, pkm.HeldItem, pkm.IsEgg, pkm.IsShiny, pkm.Format, isBoxBGRed); GetSpriteGlow(pkm, new byte[] { 75, 0, 130 }, out var pixels, out var baseSprite, true); var glowImg = ImageUtil.GetBitmap(pixels, baseSprite.Width, baseSprite.Height, baseSprite.PixelFormat); img = ImageUtil.LayerImage(glowImg, img, 0, 0);