mirror of
https://github.com/kwsch/pkNX.git
synced 2026-09-14 21:45:17 -05:00
Misc fixes
fix: double-trainer battles forced to 3 fix: high powered trainer rand moves no longer errors
This commit is contained in:
@@ -14,7 +14,7 @@ public class LearnsetRandomizer : Randomizer
|
||||
private readonly GameInfo Game;
|
||||
private readonly PersonalTable Personal;
|
||||
private MoveRandomizer moverand;
|
||||
private Move[] Moves;
|
||||
public Move[] Moves { private get; set; }
|
||||
|
||||
public LearnSettings Settings { get; private set; }
|
||||
public IList<int> BannedMoves { set => moverand.Settings.BannedMoves = value; }
|
||||
|
||||
@@ -239,7 +239,11 @@ private static int[] GetRandomMega(Dictionary<int, int[]> megas, out int species
|
||||
private static readonly int[] royal = { 081, 082, 083, 084, 185 };
|
||||
|
||||
// 3 poke max
|
||||
private static readonly int[] meowth = { 007, 008, 020, 021, 024, 025, 028, 029, 032, 033, 050, 051 };
|
||||
private static readonly int[] doubleTrainer =
|
||||
{
|
||||
007, 008, 020, 021, 024, 025, 028, 029, 032, 033, 050, 051, // jesse&james
|
||||
30, 31, // rival vs archer
|
||||
};
|
||||
|
||||
private static Dictionary<int, int> GetFixedCountIndexes(GameVersion game)
|
||||
{
|
||||
@@ -252,7 +256,7 @@ private static int[] GetRandomMega(Dictionary<int, int[]> megas, out int species
|
||||
if (GameVersion.USUM.Contains(game))
|
||||
return Legal.ImportantTrainers_USUM.Concat(royal).ToDictionary(z => z, index => royal.Contains(index) ? 1 : 6);
|
||||
if (GameVersion.GG.Contains(game))
|
||||
return Legal.ImportantTrainers_GG.ToDictionary(z => z, index => meowth.Contains(index) ? 3 : 6);
|
||||
return Legal.ImportantTrainers_GG.ToDictionary(z => z, index => doubleTrainer.Contains(index) ? 3 : 6);
|
||||
return new Dictionary<int, int>();
|
||||
}
|
||||
|
||||
|
||||
@@ -538,6 +538,7 @@ private void B_Randomize_Click(object sender, EventArgs e)
|
||||
rmove.Initialize((MovesetRandSettings)PG_Moves.SelectedObject, banned);
|
||||
var rspec = new SpeciesRandomizer(Game.Info, Personal);
|
||||
rspec.Initialize((SpeciesSettings)PG_Species.SelectedObject);
|
||||
learn.Moves = moves;
|
||||
var trand = new TrainerRandomizer(Game.Info, Personal, Trainers.LoadAll())
|
||||
{
|
||||
ClassCount = CB_Trainer_Class.Items.Count,
|
||||
|
||||
Reference in New Issue
Block a user