Add roto powers as held items

not gonna add sprites because these are useless, anyone can submit via
pr (image might need downscaling to <15x15)
Closes #1703

remove useless null checks (throws the exact same exception it would if
it were not there, except without detail)
This commit is contained in:
Kurt 2017-12-16 19:52:06 -08:00
parent 2dbdb35955
commit 47eee3aa98
2 changed files with 2 additions and 6 deletions

View file

@ -136,7 +136,7 @@ namespace PKHeX.Core
.Zip(Pouch_ZCrystalHeld_USUM, (k, v) => new { Key = (int)k, Value = (int)v })
.ToDictionary(x => x.Key, x => x.Value);
internal static readonly ushort[] HeldItems_SM = new ushort[1].Concat(Pouch_Items_SM).Concat(Pouch_Berries_SM).Concat(Pouch_Medicine_SM).Concat(Pouch_ZCrystalHeld_SM).ToArray();
internal static readonly ushort[] HeldItems_USUM = new ushort[1].Concat(Pouch_Items_SM).Concat(Pouch_Berries_SM).Concat(Pouch_Medicine_SM).Concat(Pouch_ZCrystalHeld_USUM).ToArray();
internal static readonly ushort[] HeldItems_USUM = new ushort[1].Concat(Pouch_Items_SM).Concat(Pouch_Berries_SM).Concat(Pouch_Medicine_SM).Concat(Pouch_ZCrystalHeld_USUM).Concat(Pouch_Roto_USUM).ToArray();
private static readonly HashSet<int> WildPokeballs7 = new HashSet<int> {
0x01, 0x02, 0x03, 0x04, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,

View file

@ -169,8 +169,6 @@ namespace PKHeX.Core
}
set
{
if (value == null)
throw new ArgumentNullException();
if (value.Count != BoxCount*BoxSlotCount)
throw new ArgumentException($"Expected {BoxCount*BoxSlotCount}, got {value.Count}");
if (value.Any(pk => PKMType != pk.GetType()))
@ -191,8 +189,6 @@ namespace PKHeX.Core
}
set
{
if (value == null)
throw new ArgumentNullException();
if (value.Count == 0 || value.Count > 6)
throw new ArgumentException($"Expected 1-6, got {value.Count}");
if (value.Any(pk => PKMType != pk.GetType()))
@ -499,7 +495,7 @@ namespace PKHeX.Core
return true;
}
protected virtual int GetBoxWallpaperOffset(int box) { return -1; }
protected virtual int GetBoxWallpaperOffset(int box) => -1;
public virtual int GetBoxWallpaper(int box)
{
int offset = GetBoxWallpaperOffset(box);