Skip to content

Commit

Permalink
Update Auto-Legality Mod, add ForceLevel100for50
Browse files Browse the repository at this point in the history
Uses @santacrab's fork, which passes all tests on main repo
https://github.com/santacrab2/PKHeX-Plugins/commits/No-Z3-updates
  • Loading branch information
Lusamine committed Sep 5, 2023
1 parent f27008f commit 11e5384
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SysBot.Pokemon/Helpers/AutoLegalityWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public static void EnsureInitialized(LegalitySettings cfg)
private static void InitializeAutoLegality(LegalitySettings cfg)
{
InitializeCoreStrings();
if (!EncounterEvent.Initialized)
EncounterEvent.RefreshMGDB(cfg.MGDBPath);
EncounterEvent.RefreshMGDB(cfg.MGDBPath);
InitializeTrainerDatabase(cfg);
InitializeSettings(cfg);
}
Expand All @@ -36,6 +35,7 @@ private static void InitializeSettings(LegalitySettings cfg)
APILegality.SetAllLegalRibbons = cfg.SetAllLegalRibbons;
APILegality.SetMatchingBalls = cfg.SetMatchingBalls;
APILegality.ForceSpecifiedBall = cfg.ForceSpecifiedBall;
APILegality.ForceLevel100for50 = cfg.ForceLevel100for50;
Legalizer.EnableEasterEggs = cfg.EnableEasterEggs;
APILegality.AllowTrainerOverride = cfg.AllowTrainerDataOverride;
APILegality.AllowBatchCommands = cfg.AllowBatchCommands;
Expand Down
3 changes: 3 additions & 0 deletions SysBot.Pokemon/Settings/LegalitySettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public string GenerateOT
[Category(Generate), Description("Force the specified ball if legal.")]
public bool ForceSpecifiedBall { get; set; } = true;

[Category(Generate), Description("Assumes level 50 sets are level 100 competitive sets.")]
public bool ForceLevel100for50 { get; set; }

[Category(Generate), Description("The order in which Pokémon encounter types are attempted.")]
public List<EncounterTypeGroup> PrioritizeEncounters { get; set; } = new List<EncounterTypeGroup>() { EncounterTypeGroup.Egg, EncounterTypeGroup.Slot, EncounterTypeGroup.Static, EncounterTypeGroup.Mystery, EncounterTypeGroup.Trade };

Expand Down
Binary file modified SysBot.Pokemon/deps/PKHeX.Core.AutoMod.dll
Binary file not shown.

0 comments on commit 11e5384

Please sign in to comment.