mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 08:47:14 +00:00
Hidden Power Type creation from current IVs
This commit is contained in:
parent
8ddf420560
commit
21a2fe866e
1 changed files with 33 additions and 0 deletions
33
Misc/PKX.cs
33
Misc/PKX.cs
|
@ -1220,6 +1220,39 @@ namespace PKHeX
|
|||
}
|
||||
}
|
||||
|
||||
internal static int[] setHPIVs(string HP, int[] curIVs)
|
||||
{
|
||||
int[] ivmods = hpivs[Array.IndexOf(hptypes, HP)];
|
||||
for (int i = 0; i < 6; i++) // modify IVs
|
||||
{
|
||||
curIVs[i] &= 0x1E;
|
||||
curIVs[i] += ivmods[i];
|
||||
}
|
||||
return curIVs;
|
||||
}
|
||||
internal static string[] hptypes = new string[] {
|
||||
"Fighting", "Flying", "Poison", "Ground",
|
||||
"Rock", "Bug", "Ghost", "Steel", "Fire", "Water",
|
||||
"Grass", "Electric", "Psychic", "Ice", "Dragon", "Dark"
|
||||
};
|
||||
internal static int[][] hpivs = new int[][] {
|
||||
new int[] { 1, 1, 0, 0, 0, 0 }, // Fighting
|
||||
new int[] { 0, 0, 0, 0, 0, 1 }, // Flying
|
||||
new int[] { 1, 1, 0, 0, 0, 1 }, // Poison
|
||||
new int[] { 1, 1, 1, 0, 0, 1 }, // Ground
|
||||
new int[] { 1, 1, 0, 1, 0, 0 }, // Rock
|
||||
new int[] { 1, 0, 0, 1, 0, 1 }, // Bug
|
||||
new int[] { 1, 1, 0, 1, 0, 1 }, // Ghost
|
||||
new int[] { 1, 1, 1, 1, 0, 1 }, // Steel
|
||||
new int[] { 1, 0, 1, 0, 1, 0 }, // Fire
|
||||
new int[] { 1, 0, 0, 0, 1, 1 }, // Water
|
||||
new int[] { 1, 0, 1, 0, 1, 1 }, // Grass
|
||||
new int[] { 1, 1, 1, 0, 1, 1 }, // Electric
|
||||
new int[] { 1, 0, 1, 1, 1, 0 }, // Psychic
|
||||
new int[] { 1, 0, 0, 1, 1, 1 }, // Ice
|
||||
new int[] { 1, 0, 1, 1, 1, 1 }, // Dragon
|
||||
new int[] { 1, 1, 1, 1, 1, 1 }, // Dark
|
||||
};
|
||||
public class Simulator
|
||||
{
|
||||
public struct Set
|
||||
|
|
Loading…
Reference in a new issue