2017-01-12 01:55:42 +00:00
|
|
|
|
namespace PKHeX.Core
|
2016-07-25 04:11:11 +00:00
|
|
|
|
{
|
|
|
|
|
public static class BoxWallpaper
|
|
|
|
|
{
|
2017-06-18 01:37:19 +00:00
|
|
|
|
public static string GetWallpaper(SaveFile SAV, int index)
|
2016-07-25 04:11:11 +00:00
|
|
|
|
{
|
|
|
|
|
index++;
|
2017-09-30 05:58:25 +00:00
|
|
|
|
string s = $"box_wp{index:00}";
|
2016-07-25 04:11:11 +00:00
|
|
|
|
switch (SAV.Generation)
|
|
|
|
|
{
|
2016-11-08 16:43:57 +00:00
|
|
|
|
case 7: s += "xy";
|
|
|
|
|
break;
|
2016-07-25 04:11:11 +00:00
|
|
|
|
case 6: s += SAV.ORAS && index > 16 ? "ao" : "xy";
|
|
|
|
|
break;
|
2016-07-26 06:11:17 +00:00
|
|
|
|
case 5: s += SAV.B2W2 && index > 16 ? "b2w2" : "bw";
|
2016-07-25 04:11:11 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4:
|
2016-07-26 06:11:17 +00:00
|
|
|
|
if (SAV.Pt && index > 16)
|
2016-07-25 04:11:11 +00:00
|
|
|
|
s += "pt";
|
2016-07-26 06:11:17 +00:00
|
|
|
|
else if (SAV.HGSS && index > 16)
|
2016-07-25 04:11:11 +00:00
|
|
|
|
s += "hgss";
|
|
|
|
|
else
|
|
|
|
|
s += "dp";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
2016-07-26 06:11:17 +00:00
|
|
|
|
if (SAV.E)
|
2016-07-25 04:11:11 +00:00
|
|
|
|
s += "e";
|
2016-07-26 06:11:17 +00:00
|
|
|
|
else if (SAV.FRLG && index > 12)
|
2016-07-25 04:11:11 +00:00
|
|
|
|
s += "frlg";
|
|
|
|
|
else
|
|
|
|
|
s += "rs";
|
|
|
|
|
break;
|
|
|
|
|
}
|
2017-01-12 01:55:42 +00:00
|
|
|
|
return s;
|
2016-07-25 04:11:11 +00:00
|
|
|
|
}
|
2017-06-18 01:37:19 +00:00
|
|
|
|
public static bool IsWallpaperRed(SaveFile SAV, int box)
|
2017-03-09 05:50:34 +00:00
|
|
|
|
{
|
|
|
|
|
switch (SAV.Generation)
|
|
|
|
|
{
|
|
|
|
|
case 3:
|
|
|
|
|
if (SAV.GameCube)
|
|
|
|
|
return box == 7 && SAV is SAV3XD; // flame pattern in XD
|
2017-06-18 01:37:19 +00:00
|
|
|
|
switch (SAV.GetBoxWallpaper(box))
|
2017-03-09 05:50:34 +00:00
|
|
|
|
{
|
|
|
|
|
case 5: // Volcano
|
|
|
|
|
return true;
|
|
|
|
|
case 13: // PokéCenter
|
|
|
|
|
return SAV.E;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
2017-06-18 01:37:19 +00:00
|
|
|
|
switch (SAV.GetBoxWallpaper(box))
|
2017-03-09 05:50:34 +00:00
|
|
|
|
{
|
|
|
|
|
case 5: // Volcano
|
|
|
|
|
case 12: // Checks
|
|
|
|
|
case 13: // PokéCenter
|
|
|
|
|
case 22: // Special
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
2017-06-18 01:37:19 +00:00
|
|
|
|
switch (SAV.GetBoxWallpaper(box))
|
2017-03-09 05:50:34 +00:00
|
|
|
|
{
|
|
|
|
|
case 5: // Volcano
|
|
|
|
|
case 12: // Checks
|
|
|
|
|
return true;
|
|
|
|
|
case 19: // PWT
|
|
|
|
|
case 22: // Reshiram
|
|
|
|
|
return SAV.B2W2;
|
|
|
|
|
case 21: // Zoroark
|
|
|
|
|
case 23: // Musical
|
|
|
|
|
return SAV.BW;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
case 7:
|
2017-06-18 01:37:19 +00:00
|
|
|
|
switch (SAV.GetBoxWallpaper(box))
|
2017-03-09 05:50:34 +00:00
|
|
|
|
{
|
|
|
|
|
case 5: // Volcano
|
|
|
|
|
case 12: // PokéCenter
|
|
|
|
|
case 20: // Special5 Flare/Magma
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2016-07-25 04:11:11 +00:00
|
|
|
|
}
|
|
|
|
|
}
|