mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 14:36:54 -05:00
Allow click correcting Gender icon
This commit is contained in:
@@ -110,6 +110,7 @@ internal static int GetMaxSpeciesOrigin(PKM pk)
|
||||
PA8 pa8 => !pa8.LA,
|
||||
PB8 pb8 => !pb8.BDSP,
|
||||
PK8 pk8 => pk8.IsSideTransfer || pk8.BattleVersion != 0,
|
||||
PK9 pk9 => !pk9.SV,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
@@ -129,7 +130,7 @@ public static bool IsPPUpAvailable(PKM pk)
|
||||
public static bool IsPPUpAvailable(ushort moveID) => moveID switch
|
||||
{
|
||||
0 => false,
|
||||
(int)Move.Sketch => false,
|
||||
(int)Move.Sketch => false, // BD/SP v1.0 could use PP Ups on Sketch, but not in later versions. Disallow anyways.
|
||||
(int)Move.RevivalBlessing => false,
|
||||
_ => true,
|
||||
};
|
||||
|
||||
@@ -567,12 +567,18 @@ private void ClickLevel(object sender, EventArgs e)
|
||||
|
||||
private void ClickGender(object sender, EventArgs e)
|
||||
{
|
||||
if (!Entity.PersonalInfo.IsDualGender)
|
||||
var pi = Entity.PersonalInfo;
|
||||
if (!pi.IsDualGender)
|
||||
{
|
||||
var expect = pi.FixedGender();
|
||||
if (UC_Gender.Gender != expect)
|
||||
UC_Gender.Gender = expect;
|
||||
return; // can't toggle
|
||||
}
|
||||
|
||||
var (canToggle, gender) = UC_Gender.ToggleGender();
|
||||
if (!canToggle)
|
||||
return;
|
||||
gender = UC_Gender.Gender = 0; // fix bad genders
|
||||
if (Entity.Format <= 2)
|
||||
{
|
||||
Stats.SetATKIVGender(gender);
|
||||
|
||||
Reference in New Issue
Block a user