Misc gen2 upgrades

Filename & random shiny IVs
Closes #534
This commit is contained in:
Kurt 2016-12-20 17:24:41 -08:00
parent 67667f9778
commit 6003c2b71a
2 changed files with 11 additions and 3 deletions

View file

@ -2611,7 +2611,8 @@ namespace PKHeX
pkm.setShinyPID();
else
{
TB_ATKIV.Text = "15";
int[] atkIVs = {2, 3, 6, 7, 10, 11, 14, 15};
TB_ATKIV.Text = atkIVs[Util.rnd32()%atkIVs.Length].ToString();
TB_DEFIV.Text = "10";
TB_SPEIV.Text = "10";
TB_SPAIV.Text = "10";

View file

@ -23,8 +23,15 @@ namespace PKHeX
public override int Format => 2;
public bool Japanese => otname.Length == STRLEN_J;
public override string FileName => $"{Species:000} - {Nickname} - {SaveUtil.ccitt16(Encrypt()):X4}.{Extension}";
public override string FileName
{
get
{
string form = AltForm > 0 ? $"-{AltForm:00)}" : "";
string star = IsShiny ? " ★" : "";
return $"{Species:000}{form}{star} - {Nickname} - {SaveUtil.ccitt16(Encrypt()):X4}.{Extension}";
}
}
public PK2(byte[] decryptedData = null, string ident = null, bool jp = false)
{