mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-08-03 18:19:44 -05:00
Add forme randomization method
add alola option too
This commit is contained in:
parent
b71c19558a
commit
d2211a6779
|
|
@ -220,5 +220,26 @@ class Legal
|
|||
695, 696, 697, 698, 699, 700, 701, 702, 703,
|
||||
719,
|
||||
};
|
||||
|
||||
internal static readonly int[] AlolanOriginForms =
|
||||
{
|
||||
019, // Rattata
|
||||
020, // Raticate
|
||||
025, // Pikachu (Cosplay not transferrable)
|
||||
026, // Raichu
|
||||
027, // Sandshrew
|
||||
028, // Sandslash
|
||||
037, // Vulpix
|
||||
038, // Ninetails
|
||||
050, // Diglett
|
||||
051, // Dugtrio
|
||||
052, // Meowth
|
||||
053, // Persian
|
||||
074, // Geodude
|
||||
075, // Graveler
|
||||
076, // Golem
|
||||
088, // Grimer
|
||||
089, // Muk
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,18 @@ internal static int[] getSpeciesList(bool G1, bool G2, bool G3, bool G4, bool G5
|
|||
|
||||
return sL.Length == 0 ? RandomSpeciesList : sL;
|
||||
}
|
||||
internal static int GetRandomForme(int species, bool mega, bool alola, PersonalInfo[] stats = null)
|
||||
{
|
||||
if (stats == null)
|
||||
return 0;
|
||||
if (stats[species].FormeCount <= 1)
|
||||
return 0;
|
||||
if (alola && Legal.AlolanOriginForms.Contains(species))
|
||||
return (int)(Util.rnd32()%2);
|
||||
if (!Legal.Mega_ORAS.Contains((ushort)species) || mega)
|
||||
return (int)(Util.rnd32() % stats[species].FormeCount); // Slot-Random
|
||||
return 0;
|
||||
}
|
||||
|
||||
internal static int[] getRandomItemList()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user