mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-24 03:13:18 +00:00
6f7602f2ad
Extract get/set team methods for battle video
30 lines
779 B
C#
30 lines
779 B
C#
using System.Collections.Generic;
|
|
|
|
namespace PKHeX.Core
|
|
{
|
|
public abstract class BattleVideo : IPokeGroup
|
|
{
|
|
public abstract IReadOnlyList<PKM> BattlePKMs { get; }
|
|
public abstract int Generation { get; }
|
|
|
|
public IEnumerable<PKM> Contents => BattlePKMs;
|
|
|
|
public static BattleVideo? GetVariantBattleVideo(byte[] data)
|
|
{
|
|
if (BV6.IsValid(data))
|
|
return new BV6(data);
|
|
if (BV7.IsValid(data))
|
|
return new BV7(data);
|
|
return null;
|
|
}
|
|
|
|
public static bool IsValid(byte[] data)
|
|
{
|
|
if (BV6.IsValid(data))
|
|
return true;
|
|
if (BV7.IsValid(data))
|
|
return true;
|
|
return false;
|
|
}
|
|
}
|
|
}
|