mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-04-26 18:47:11 -05:00
Misc fixes for FormInfo (#4678)
This commit is contained in:
parent
af98a5b5e9
commit
4ee9e4ad31
|
|
@ -54,6 +54,7 @@ public static bool IsMegaForm(ushort species, byte form)
|
||||||
// Only continue checking if the species is in the list of Battle Only forms.
|
// Only continue checking if the species is in the list of Battle Only forms.
|
||||||
// Some species have battle only forms as well as out-of-battle forms (other than base form).
|
// Some species have battle only forms as well as out-of-battle forms (other than base form).
|
||||||
(ushort)Darmanitan => (form & 1) == 1, // Zen
|
(ushort)Darmanitan => (form & 1) == 1, // Zen
|
||||||
|
(ushort)Greninja => form == 2, // Ash
|
||||||
(ushort)Zygarde => form == 4, // Zygarde Complete
|
(ushort)Zygarde => form == 4, // Zygarde Complete
|
||||||
(ushort)Minior => form < 7, // Minior Shields-Down
|
(ushort)Minior => form < 7, // Minior Shields-Down
|
||||||
(ushort)Mimikyu => (form & 1) == 1, // Busted
|
(ushort)Mimikyu => (form & 1) == 1, // Busted
|
||||||
|
|
@ -69,8 +70,8 @@ public static bool IsMegaForm(ushort species, byte form)
|
||||||
(ushort)Zygarde => form == 5,
|
(ushort)Zygarde => form == 5,
|
||||||
(ushort)Floette => form == 6,
|
(ushort)Floette => form == 6,
|
||||||
(ushort)Greninja => form == 3,
|
(ushort)Greninja => form == 3,
|
||||||
(ushort)Meowstic => form == 2,
|
(ushort)Meowstic => form is (2 or 3),
|
||||||
(ushort)Magearna => form == 2,
|
(ushort)Magearna => form is (2 or 3),
|
||||||
(ushort)Tatsugiri => form is (3 or 4 or 5),
|
(ushort)Tatsugiri => form is (3 or 4 or 5),
|
||||||
|
|
||||||
_ => form != 0,
|
_ => form != 0,
|
||||||
|
|
@ -87,6 +88,7 @@ public static bool IsMegaForm(ushort species, byte form)
|
||||||
public static byte GetOutOfBattleForm(ushort species, byte form, byte format) => species switch
|
public static byte GetOutOfBattleForm(ushort species, byte form, byte format) => species switch
|
||||||
{
|
{
|
||||||
(ushort)Darmanitan => (byte)(form & 2),
|
(ushort)Darmanitan => (byte)(form & 2),
|
||||||
|
(ushort)Greninja when form == 2 => 1, // Ash
|
||||||
(ushort)Zygarde when format > 6 => 3,
|
(ushort)Zygarde when format > 6 => 3,
|
||||||
(ushort)Minior => (byte)(form + 7),
|
(ushort)Minior => (byte)(form + 7),
|
||||||
(ushort)Mimikyu => (byte)(form & 2),
|
(ushort)Mimikyu => (byte)(form & 2),
|
||||||
|
|
@ -210,6 +212,7 @@ public static bool IsFormChangeable(ushort species, byte oldForm, byte newForm,
|
||||||
(int)Darmanitan,
|
(int)Darmanitan,
|
||||||
(int)Meloetta,
|
(int)Meloetta,
|
||||||
|
|
||||||
|
(int)Greninja,
|
||||||
(int)Aegislash,
|
(int)Aegislash,
|
||||||
(int)Xerneas,
|
(int)Xerneas,
|
||||||
(int)Zygarde,
|
(int)Zygarde,
|
||||||
|
|
@ -277,6 +280,7 @@ public static bool IsFormChangeable(ushort species, byte oldForm, byte newForm,
|
||||||
(int)Chandelure,
|
(int)Chandelure,
|
||||||
(int)Chesnaught,
|
(int)Chesnaught,
|
||||||
(int)Delphox,
|
(int)Delphox,
|
||||||
|
(int)Greninja,
|
||||||
(int)Pyroar,
|
(int)Pyroar,
|
||||||
(int)Malamar,
|
(int)Malamar,
|
||||||
(int)Barbaracle,
|
(int)Barbaracle,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user