Skip to content

Commit

Permalink
Update 22.05.08
Browse files Browse the repository at this point in the history
  • Loading branch information
kwsch committed May 7, 2022
1 parent a9443be commit e34d03d
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected virtual void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria
return;

sav.ApplyHandlingTrainerInfo(pk);
if (pk is IScaledSize s)
if (pk is IScaledSize { HeightScalar: 0, WeightScalar: 0 } s)
{
s.HeightScalar = PokeSizeUtil.GetRandomScalar();
s.WeightScalar = PokeSizeUtil.GetRandomScalar();
Expand Down
11 changes: 11 additions & 0 deletions PKHeX.Core/Legality/Encounters/EncounterSlot/EncounterSlot8a.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ public EncounterSlot8a(EncounterArea8a area, ushort species, byte form, byte min

public bool HasAlphaMove => IsAlpha && Type is not SlotType.Landmark;

protected override void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria, PKM pk)
{
base.ApplyDetails(sav, criteria, pk);

var pa = (PA8)pk;
if (IsAlpha)
pa.HeightScalarCopy = pa.HeightScalar = pa.WeightScalar = 255;
pa.ResetHeight();
pa.ResetWeight();
}

protected override void SetPINGA(PKM pk, EncounterCriteria criteria)
{
base.SetPINGA(pk, criteria);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected virtual void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria

sav.ApplyHandlingTrainerInfo(pk);

if (pk is IScaledSize s)
if (pk is IScaledSize { HeightScalar: 0, WeightScalar: 0 } s)
{
s.HeightScalar = PokeSizeUtil.GetRandomScalar();
s.WeightScalar = PokeSizeUtil.GetRandomScalar();
Expand Down
2 changes: 0 additions & 2 deletions PKHeX.Core/Legality/Verifiers/LegendsArceusVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@ private void VerifyTutorMoveIndex(LegalityAnalysis data, PA8 pa, int i, ReadOnly
// Check if the move can be purchased; using a Mastery Seed checks the permission.
if (pa.AlphaMove == moves[i])
return; // Previously checked.
if (data.EncounterMatch is IAlpha { IsAlpha: true } && CanMasterMoveFromMoveShop(moves[i], moves, bits))
return; // Alpha forced move.
if (!bits[i])
data.AddLine(GetInvalid(string.Format(LMoveShopMasterInvalid_0, ParseSettings.MoveStrings[moves[i]])));
else if (!CanLearnMoveByLevelUp(data, pa, i, moves))
Expand Down
8 changes: 3 additions & 5 deletions PKHeX.Core/PKM/Interfaces/IMoveShop8.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@ public static bool IsValidPurchasedEncounter(this IMoveShop8 shop, Learnset lear

// Can only purchase a move if it is not already in the available learnset.
var learnLevel = learn.GetMoveLevel(move);
if (learnLevel <= level)
if ((uint)learnLevel <= level)
return false;

// Can only purchase an Alpha Move if it was pre-1.1 patch.
if (move == alpha && allowPurchasedAlpha)
continue;

return false;
if (move == alpha && !allowPurchasedAlpha)
return false;
}

return true;
Expand Down
Binary file modified PKHeX.Core/Resources/legality/mgdb/wa8.pkl
Binary file not shown.
Binary file modified PKHeX.Core/Resources/legality/mgdb/wb8.pkl
Binary file not shown.
Binary file modified PKHeX.Core/Resources/legality/mgdb/wc8.pkl
Binary file not shown.
Binary file modified PKHeX.Core/Resources/legality/wild/encounter_go_home.pkl
Binary file not shown.
Binary file modified PKHeX.Core/Resources/legality/wild/encounter_go_lgpe.pkl
Binary file not shown.
2 changes: 1 addition & 1 deletion PKHeX.WinForms/PKHeX.WinForms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
<StartupObject>PKHeX.WinForms.Program</StartupObject>
<AssemblyName>PKHeX</AssemblyName>
<Version>22.03.18</Version>
<Version>22.05.08</Version>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
26 changes: 25 additions & 1 deletion PKHeX.WinForms/Resources/text/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
PKHeX - By Kaphotics
http://projectpokemon.org/pkhex/

22/03/18 - New Update:
22/05/08 - New Update:
- Legality:
- - Added: PLA move mastery/purchased flags are now legality checked thoroughly. Thanks @Lusamine & @Atrius97 !
- - Added: PLA event gifts are now checked for their date obtained.
- - Added: BDSP Darkrai & Arceus encounter data.
- - Fixed: Gen4 Roamers now allowed in Route 45 if the tile it was encountered on is not water.
- - Fixed: BDSP/PLA encounters are now flagged if they have a SWSH Mark.
- Added: Gen3 RSBox Japanese save files & memory cards are now supported. Thanks @SynapseProperty !
- Added: Gen2/3 Mail Editor now allows swapping mail slots if you rearrange party data.
- Added: Batch Editor can now $rand & $suggest EVs.
- Added: Deleting clones from the PKM Database window now deletes clones in the save file. Box->Delete Clones works fine too.
- Fixed: Deleting clones from the PKM Database window now correctly deletes all the extra clones.
- Fixed: Gen8 BDSP save files that have an invalid patch revision value can no longer be loaded (bad rom hacks!)
- Fixed: Gen7 Inventory editing now retains the Free Space sort index when saving. Thanks @RainThunder !
- Fixed: Gen6 Hall of Fame editing now saves the TID/SID correctly.
- Fixed: Gen4 Battle Hall editing now works correctly in the Misc Editor.
- Fixed: Gen4 SaveFile PCD/PGT collection editing now shows the Lock Capsule PCD slot, resists bad slot swaps, and no longer encrypts item PGTs. Thanks @DeadSkullzJr !
- Fixed: Gen2 Mail now edits the caption message correctly. Thanks @WonderSquid !
- Changed: Drag & Drop of PKMs out of the program into Discord now works! Hold shift when dropping to immediately send the file.
- Changed: Internal refactorings to reduce allocation, increase performance. PokeCrypto, GeniusCrypto, EvoCriteria, PKX.
- Changed: Gender sprites in the main window now show colored images instead of colored strings. Looks prettier!
- Changed: Gen8 PLA encounters now generate with a more accurate RNG correlation, resulting in valid entity seeds.
- Changed: Gen8 PLA noble sprites now show more detail. Still not legal to have in your save file.

22/03/18 - New Update: (144283) [4814091]
- Added support for BDSP v1.3 save data format.
- Legality:
- - Added: Experience above level 100 is now checked.
Expand Down

0 comments on commit e34d03d

Please sign in to comment.