mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
5bcccc6d92
* Revises legality checks to account for traveling between the three game islands (PLA/BDSP/SWSH) * Adds conversion mechanisms between the three formats, as well as flexible conversion options to backfill missing data (thanks GameFreak/ILCA for opting for lossy conversion instead of updating the games). * Adds API abstractions for HOME data storage format (EKH/PKH format 1, aka EH1/PH1). * Revises some APIs for better usage: - `PKM` now exposes a `Context` to indicate the isolation context for legality purposes. - Some method signatures have changed to accept `Context` or `GameVersion` instead of a vague `int` for Generation. - Evolution History is now tracked in the Legality parse for specific contexts, rather than only per generation.
94 lines
4.1 KiB
C#
94 lines
4.1 KiB
C#
namespace PKHeX.Core
|
|
{
|
|
/// <summary> Common Ribbons introduced in Generation 6 </summary>
|
|
public interface IRibbonSetCommon6
|
|
{
|
|
bool RibbonChampionKalos { get; set; }
|
|
bool RibbonChampionG6Hoenn { get; set; }
|
|
bool RibbonBestFriends { get; set; }
|
|
bool RibbonTraining { get; set; }
|
|
bool RibbonBattlerSkillful { get; set; }
|
|
bool RibbonBattlerExpert { get; set; }
|
|
|
|
bool RibbonContestStar { get; set; }
|
|
bool RibbonMasterCoolness { get; set; }
|
|
bool RibbonMasterBeauty { get; set; }
|
|
bool RibbonMasterCuteness { get; set; }
|
|
bool RibbonMasterCleverness { get; set; }
|
|
bool RibbonMasterToughness { get; set; }
|
|
|
|
int RibbonCountMemoryContest { get; set; }
|
|
int RibbonCountMemoryBattle { get; set; }
|
|
}
|
|
|
|
internal static partial class RibbonExtensions
|
|
{
|
|
private static readonly string[] RibbonSetNamesCommon6Bool =
|
|
{
|
|
nameof(IRibbonSetCommon6.RibbonChampionKalos), nameof(IRibbonSetCommon6.RibbonChampionG6Hoenn), // nameof(IRibbonSetCommon6.RibbonBestFriends),
|
|
nameof(IRibbonSetCommon6.RibbonTraining), nameof(IRibbonSetCommon6.RibbonBattlerSkillful), nameof(IRibbonSetCommon6.RibbonBattlerExpert),
|
|
nameof(IRibbonSetCommon6.RibbonContestStar), nameof(IRibbonSetCommon6.RibbonMasterCoolness), nameof(IRibbonSetCommon6.RibbonMasterBeauty),
|
|
nameof(IRibbonSetCommon6.RibbonMasterCuteness), nameof(IRibbonSetCommon6.RibbonMasterCleverness), nameof(IRibbonSetCommon6.RibbonMasterToughness),
|
|
};
|
|
|
|
private static readonly string[] RibbonSetNamesCommon6Contest =
|
|
{
|
|
nameof(IRibbonSetCommon6.RibbonMasterCoolness), nameof(IRibbonSetCommon6.RibbonMasterBeauty),
|
|
nameof(IRibbonSetCommon6.RibbonMasterCuteness), nameof(IRibbonSetCommon6.RibbonMasterCleverness),
|
|
nameof(IRibbonSetCommon6.RibbonMasterToughness),
|
|
};
|
|
|
|
internal static bool[] RibbonBits(this IRibbonSetCommon6 set)
|
|
{
|
|
return new[]
|
|
{
|
|
set.RibbonChampionKalos,
|
|
set.RibbonChampionG6Hoenn,
|
|
//set.RibbonBestFriends,
|
|
set.RibbonTraining,
|
|
set.RibbonBattlerSkillful,
|
|
set.RibbonBattlerExpert,
|
|
|
|
set.RibbonContestStar,
|
|
set.RibbonMasterCoolness,
|
|
set.RibbonMasterBeauty,
|
|
set.RibbonMasterCuteness,
|
|
set.RibbonMasterCleverness,
|
|
set.RibbonMasterToughness,
|
|
};
|
|
}
|
|
|
|
internal static bool[] RibbonBitsContest(this IRibbonSetCommon6 set)
|
|
{
|
|
return new[]
|
|
{
|
|
set.RibbonMasterCoolness,
|
|
set.RibbonMasterBeauty,
|
|
set.RibbonMasterCuteness,
|
|
set.RibbonMasterCleverness,
|
|
set.RibbonMasterToughness,
|
|
};
|
|
}
|
|
|
|
internal static string[] RibbonNamesBool(this IRibbonSetCommon6 _) => RibbonSetNamesCommon6Bool;
|
|
internal static string[] RibbonNamesContest(this IRibbonSetCommon6 _) => RibbonSetNamesCommon6Contest;
|
|
|
|
internal static void CopyRibbonSetCommon6(this IRibbonSetCommon6 set, IRibbonSetCommon6 dest)
|
|
{
|
|
dest.RibbonChampionKalos = set.RibbonChampionKalos;
|
|
dest.RibbonChampionG6Hoenn = set.RibbonChampionG6Hoenn;
|
|
dest.RibbonBestFriends = set.RibbonBestFriends;
|
|
dest.RibbonTraining = set.RibbonTraining;
|
|
dest.RibbonBattlerSkillful = set.RibbonBattlerSkillful;
|
|
dest.RibbonBattlerExpert = set.RibbonBattlerExpert;
|
|
dest.RibbonContestStar = set.RibbonContestStar;
|
|
dest.RibbonMasterCoolness = set.RibbonMasterCoolness;
|
|
dest.RibbonMasterBeauty = set.RibbonMasterBeauty;
|
|
dest.RibbonMasterCuteness = set.RibbonMasterCuteness;
|
|
dest.RibbonMasterCleverness = set.RibbonMasterCleverness;
|
|
dest.RibbonMasterToughness = set.RibbonMasterToughness;
|
|
dest.RibbonCountMemoryContest = set.RibbonCountMemoryContest;
|
|
dest.RibbonCountMemoryBattle = set.RibbonCountMemoryBattle;
|
|
}
|
|
}
|
|
}
|