2022-11-25 01:42:17 +00:00
|
|
|
using static PKHeX.Core.RibbonIndex;
|
|
|
|
|
|
|
|
namespace PKHeX.Core;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Parsing logic for <see cref="IRibbonSetCommon8"/>.
|
|
|
|
/// </summary>
|
|
|
|
public static class RibbonVerifierMark9
|
|
|
|
{
|
|
|
|
public static void Parse(this IRibbonSetMark9 r, RibbonVerifierArguments args, ref RibbonResultList list)
|
|
|
|
{
|
|
|
|
if (r.RibbonMarkAlpha != MarkRules.IsMarkPresentAlpha(args.Encounter))
|
2022-11-25 18:42:53 +00:00
|
|
|
list.Add(MarkAlpha, !r.RibbonMarkAlpha);
|
2022-11-25 01:42:17 +00:00
|
|
|
if (r.RibbonMarkGourmand && !MarkRules.IsMarkValidGourmand(args.History))
|
|
|
|
list.Add(MarkGourmand);
|
|
|
|
if (r.RibbonMarkItemfinder && !MarkRules.IsMarkValidItemFinder(args.History))
|
|
|
|
list.Add(MarkItemfinder);
|
|
|
|
if (r.RibbonMarkJumbo && !MarkRules.IsMarkAllowedJumbo(args.History, args.Entity))
|
|
|
|
list.Add(MarkJumbo);
|
|
|
|
if (r.RibbonMarkMightiest != MarkRules.IsMarkPresentMightiest(args.Encounter))
|
|
|
|
list.Add(MarkMightiest, !r.RibbonMarkMightiest);
|
|
|
|
if (r.RibbonMarkMini && !MarkRules.IsMarkAllowedMini(args.History, args.Entity))
|
|
|
|
list.Add(MarkMini);
|
|
|
|
if (r.RibbonMarkPartner && !MarkRules.IsMarkValidPartner(args.History))
|
|
|
|
list.Add(MarkPartner);
|
|
|
|
if (r.RibbonMarkTitan != MarkRules.IsMarkPresentTitan(args.Encounter))
|
2022-11-25 18:42:53 +00:00
|
|
|
list.Add(MarkTitan, !r.RibbonMarkTitan);
|
2022-11-25 01:42:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static void ParseEgg(this IRibbonSetMark9 r, ref RibbonResultList list)
|
|
|
|
{
|
|
|
|
if (r.RibbonMarkAlpha)
|
|
|
|
list.Add(MarkAlpha);
|
|
|
|
if (r.RibbonMarkGourmand)
|
|
|
|
list.Add(MarkGourmand);
|
|
|
|
if (r.RibbonMarkItemfinder)
|
|
|
|
list.Add(MarkItemfinder);
|
|
|
|
if (r.RibbonMarkJumbo)
|
|
|
|
list.Add(MarkJumbo);
|
|
|
|
if (r.RibbonMarkMightiest)
|
|
|
|
list.Add(MarkMightiest);
|
|
|
|
if (r.RibbonMarkMini)
|
|
|
|
list.Add(MarkMini);
|
|
|
|
if (r.RibbonMarkPartner)
|
|
|
|
list.Add(MarkPartner);
|
|
|
|
if (r.RibbonMarkTitan)
|
|
|
|
list.Add(MarkTitan);
|
|
|
|
}
|
|
|
|
}
|