2017-06-20 04:43:44 +00:00
|
|
|
|
namespace PKHeX.Core
|
|
|
|
|
{
|
|
|
|
|
/// <summary> Common Ribbons introduced in Generation 4 </summary>
|
2019-01-26 22:48:32 +00:00
|
|
|
|
public interface IRibbonSetCommon4
|
2017-06-20 04:43:44 +00:00
|
|
|
|
{
|
|
|
|
|
bool RibbonChampionSinnoh { get; set; }
|
|
|
|
|
bool RibbonAlert { get; set; }
|
|
|
|
|
bool RibbonShock { get; set; }
|
|
|
|
|
bool RibbonDowncast { get; set; }
|
|
|
|
|
bool RibbonCareless { get; set; }
|
|
|
|
|
bool RibbonRelax { get; set; }
|
|
|
|
|
bool RibbonSnooze { get; set; }
|
|
|
|
|
bool RibbonSmile { get; set; }
|
|
|
|
|
bool RibbonGorgeous { get; set; }
|
|
|
|
|
bool RibbonRoyal { get; set; }
|
|
|
|
|
bool RibbonGorgeousRoyal { get; set; }
|
|
|
|
|
bool RibbonFootprint { get; set; }
|
|
|
|
|
bool RibbonRecord { get; set; }
|
|
|
|
|
bool RibbonLegend { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal static partial class RibbonExtensions
|
|
|
|
|
{
|
|
|
|
|
private static readonly string[] RibbonSetNamesCommon4 =
|
|
|
|
|
{
|
2017-06-27 05:18:42 +00:00
|
|
|
|
nameof(IRibbonSetCommon4.RibbonGorgeous), nameof(IRibbonSetCommon4.RibbonRoyal), nameof(IRibbonSetCommon4.RibbonGorgeousRoyal),
|
2017-06-20 04:43:44 +00:00
|
|
|
|
};
|
2018-07-27 02:34:27 +00:00
|
|
|
|
|
2017-06-27 05:18:42 +00:00
|
|
|
|
internal static bool[] RibbonBitsCosmetic(this IRibbonSetCommon4 set)
|
2017-06-20 04:43:44 +00:00
|
|
|
|
{
|
|
|
|
|
return new[]
|
|
|
|
|
{
|
|
|
|
|
set.RibbonGorgeous,
|
|
|
|
|
set.RibbonRoyal,
|
|
|
|
|
set.RibbonGorgeousRoyal,
|
2017-06-27 05:18:42 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
2018-07-27 02:34:27 +00:00
|
|
|
|
|
2018-05-12 19:28:48 +00:00
|
|
|
|
internal static string[] RibbonNamesCosmetic(this IRibbonSetCommon4 _) => RibbonSetNamesCommon4;
|
2018-07-27 02:34:27 +00:00
|
|
|
|
|
2017-06-27 05:18:42 +00:00
|
|
|
|
private static readonly string[] RibbonSetNamesCommon4Only =
|
|
|
|
|
{
|
|
|
|
|
nameof(IRibbonSetCommon4.RibbonRecord), nameof(IRibbonSetCommon4.RibbonChampionSinnoh), nameof(IRibbonSetCommon4.RibbonLegend),
|
|
|
|
|
};
|
2018-07-27 02:34:27 +00:00
|
|
|
|
|
2017-06-27 05:18:42 +00:00
|
|
|
|
internal static bool[] RibbonBitsOnly(this IRibbonSetCommon4 set)
|
|
|
|
|
{
|
|
|
|
|
return new[]
|
|
|
|
|
{
|
2017-06-20 04:43:44 +00:00
|
|
|
|
set.RibbonRecord,
|
2018-07-27 00:12:27 +00:00
|
|
|
|
set.RibbonChampionSinnoh,
|
2017-06-20 04:43:44 +00:00
|
|
|
|
set.RibbonLegend,
|
|
|
|
|
};
|
|
|
|
|
}
|
2018-07-27 02:34:27 +00:00
|
|
|
|
|
2018-05-12 19:28:48 +00:00
|
|
|
|
internal static string[] RibbonNamesOnly(this IRibbonSetCommon4 _) => RibbonSetNamesCommon4Only;
|
2017-06-27 05:18:42 +00:00
|
|
|
|
|
|
|
|
|
private static readonly string[] RibbonSetNamesCommon4Daily =
|
2017-06-21 04:57:00 +00:00
|
|
|
|
{
|
2017-06-27 05:18:42 +00:00
|
|
|
|
nameof(IRibbonSetCommon4.RibbonAlert), nameof(IRibbonSetCommon4.RibbonShock),
|
2017-06-21 04:57:00 +00:00
|
|
|
|
nameof(IRibbonSetCommon4.RibbonDowncast), nameof(IRibbonSetCommon4.RibbonCareless), nameof(IRibbonSetCommon4.RibbonRelax),
|
|
|
|
|
nameof(IRibbonSetCommon4.RibbonSnooze), nameof(IRibbonSetCommon4.RibbonSmile),
|
|
|
|
|
};
|
2017-06-27 05:18:42 +00:00
|
|
|
|
|
|
|
|
|
internal static bool[] RibbonBitsDaily(this IRibbonSetCommon4 set)
|
2017-06-21 04:57:00 +00:00
|
|
|
|
{
|
|
|
|
|
return new[]
|
|
|
|
|
{
|
|
|
|
|
set.RibbonAlert,
|
|
|
|
|
set.RibbonShock,
|
|
|
|
|
set.RibbonDowncast,
|
|
|
|
|
set.RibbonCareless,
|
|
|
|
|
set.RibbonRelax,
|
|
|
|
|
set.RibbonSnooze,
|
|
|
|
|
set.RibbonSmile,
|
|
|
|
|
};
|
|
|
|
|
}
|
2018-07-27 02:34:27 +00:00
|
|
|
|
|
2018-05-12 19:28:48 +00:00
|
|
|
|
internal static string[] RibbonNamesDaily(this IRibbonSetCommon4 _) => RibbonSetNamesCommon4Daily;
|
2022-05-31 04:43:52 +00:00
|
|
|
|
|
|
|
|
|
internal static void CopyRibbonSetCommon4(this IRibbonSetCommon4 set, IRibbonSetCommon4 dest)
|
|
|
|
|
{
|
|
|
|
|
dest.RibbonChampionSinnoh = set.RibbonChampionSinnoh;
|
|
|
|
|
dest.RibbonAlert = set.RibbonAlert;
|
|
|
|
|
dest.RibbonShock = set.RibbonShock;
|
|
|
|
|
dest.RibbonDowncast = set.RibbonDowncast;
|
|
|
|
|
dest.RibbonCareless = set.RibbonCareless;
|
|
|
|
|
dest.RibbonRelax = set.RibbonRelax;
|
|
|
|
|
dest.RibbonSnooze = set.RibbonSnooze;
|
|
|
|
|
dest.RibbonSmile = set.RibbonSmile;
|
|
|
|
|
dest.RibbonGorgeous = set.RibbonGorgeous;
|
|
|
|
|
dest.RibbonRoyal = set.RibbonRoyal;
|
|
|
|
|
dest.RibbonGorgeousRoyal = set.RibbonGorgeousRoyal;
|
|
|
|
|
dest.RibbonFootprint = set.RibbonFootprint;
|
|
|
|
|
dest.RibbonRecord = set.RibbonRecord;
|
|
|
|
|
dest.RibbonLegend = set.RibbonLegend;
|
|
|
|
|
}
|
2017-06-20 04:43:44 +00:00
|
|
|
|
}
|
|
|
|
|
}
|