2022-06-18 18:04:24 +00:00
|
|
|
using System;
|
2018-06-24 05:00:01 +00:00
|
|
|
using System.Collections.Generic;
|
2017-09-04 02:51:29 +00:00
|
|
|
using System.Linq;
|
|
|
|
using static PKHeX.Core.LegalityCheckStrings;
|
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
namespace PKHeX.Core;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Verifies the <see cref="PKM"/> Ribbon values.
|
|
|
|
/// </summary>
|
|
|
|
public sealed class RibbonVerifier : Verifier
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
protected override CheckIdentifier Identifier => CheckIdentifier.Ribbon;
|
|
|
|
|
|
|
|
public override void Verify(LegalityAnalysis data)
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
// Flag VC (Gen1/2) ribbons using Gen7 origin rules.
|
|
|
|
var enc = data.EncounterMatch;
|
|
|
|
var pk = data.Entity;
|
2018-07-27 02:34:27 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
// Check Unobtainable Ribbons
|
|
|
|
if (pk.IsEgg)
|
2018-06-24 05:00:01 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
if (GetIncorrectRibbonsEgg(pk, enc))
|
|
|
|
data.AddLine(GetInvalid(LRibbonEgg));
|
|
|
|
return;
|
2018-06-24 05:00:01 +00:00
|
|
|
}
|
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
var result = GetIncorrectRibbons(pk, data.Info.EvoChainsAllGens, enc);
|
|
|
|
if (result.Count != 0)
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
var msg = string.Join(Environment.NewLine, result);
|
|
|
|
data.AddLine(GetInvalid(msg));
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
else
|
2017-09-06 03:32:07 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
data.AddLine(GetValid(LRibbonAllValid));
|
|
|
|
}
|
|
|
|
}
|
2017-09-06 03:32:07 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static List<string> GetIncorrectRibbons(PKM pk, EvolutionHistory evos, IEncounterTemplate enc)
|
|
|
|
{
|
|
|
|
List<string> missingRibbons = new();
|
|
|
|
List<string> invalidRibbons = new();
|
|
|
|
var ribs = GetRibbonResults(pk, evos, enc);
|
|
|
|
foreach (var bad in ribs)
|
|
|
|
(bad.Invalid ? invalidRibbons : missingRibbons).Add(bad.Name);
|
|
|
|
|
|
|
|
var result = new List<string>();
|
|
|
|
if (missingRibbons.Count > 0)
|
|
|
|
result.Add(string.Format(LRibbonFMissing_0, string.Join(", ", missingRibbons).Replace(RibbonInfo.PropertyPrefix, string.Empty)));
|
|
|
|
if (invalidRibbons.Count > 0)
|
|
|
|
result.Add(string.Format(LRibbonFInvalid_0, string.Join(", ", invalidRibbons).Replace(RibbonInfo.PropertyPrefix, string.Empty)));
|
|
|
|
return result;
|
|
|
|
}
|
2017-09-06 03:32:07 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static bool GetIncorrectRibbonsEgg(PKM pk, IEncounterTemplate enc)
|
|
|
|
{
|
|
|
|
var names = ReflectUtil.GetPropertiesStartWithPrefix(pk.GetType(), RibbonInfo.PropertyPrefix);
|
|
|
|
if (enc is IRibbonSetEvent3 event3)
|
|
|
|
names = names.Except(event3.RibbonNames());
|
|
|
|
if (enc is IRibbonSetEvent4 event4)
|
|
|
|
names = names.Except(event4.RibbonNames());
|
2018-07-27 02:34:27 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
foreach (var value in names.Select(name => ReflectUtil.GetValue(pk, name)))
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
if (value is null)
|
|
|
|
continue;
|
|
|
|
if (HasFlag(value) || HasCount(value))
|
|
|
|
return true;
|
|
|
|
|
|
|
|
static bool HasFlag(object o) => o is true;
|
|
|
|
static bool HasCount(object o) => o is > 0;
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
return false;
|
|
|
|
}
|
2018-05-12 15:13:39 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
internal static IEnumerable<RibbonResult> GetRibbonResults(PKM pk, EvolutionHistory evos, IEncounterTemplate enc)
|
|
|
|
{
|
|
|
|
return GetInvalidRibbons(pk, evos, enc)
|
|
|
|
.Concat(GetInvalidRibbonsEvent1(pk, enc))
|
|
|
|
.Concat(GetInvalidRibbonsEvent2(pk, enc));
|
|
|
|
}
|
2021-05-29 22:31:47 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static IEnumerable<RibbonResult> GetInvalidRibbons(PKM pk, EvolutionHistory evos, IEncounterTemplate enc)
|
|
|
|
{
|
|
|
|
// is a part of Event4, but O3 doesn't have the others
|
|
|
|
if (pk is IRibbonSetOnly3 {RibbonWorld: true})
|
|
|
|
yield return new RibbonResult(nameof(IRibbonSetOnly3.RibbonWorld));
|
2020-06-17 02:46:22 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
if (pk is IRibbonSetUnique3 u3)
|
|
|
|
{
|
|
|
|
if (enc.Generation != 3)
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
if (u3.RibbonWinning)
|
|
|
|
yield return new RibbonResult(nameof(u3.RibbonWinning));
|
|
|
|
if (u3.RibbonVictory)
|
|
|
|
yield return new RibbonResult(nameof(u3.RibbonVictory));
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
else
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
if (u3.RibbonWinning && !CanHaveRibbonWinning(pk, enc, 3))
|
|
|
|
yield return new RibbonResult(nameof(u3.RibbonWinning));
|
|
|
|
if (u3.RibbonVictory && !CanHaveRibbonVictory(pk, 3))
|
|
|
|
yield return new RibbonResult(nameof(u3.RibbonVictory));
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
}
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
int gen = enc.Generation;
|
|
|
|
if (pk is IRibbonSetUnique4 u4)
|
|
|
|
{
|
|
|
|
if (!IsAllowedBattleFrontier(pk.Species, pk.Form, 4) || gen > 4)
|
2019-12-07 19:58:56 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
foreach (var z in GetInvalidRibbonsNone(u4.RibbonBitsAbility(), u4.RibbonNamesAbility()))
|
2019-12-07 19:58:56 +00:00
|
|
|
yield return z;
|
|
|
|
}
|
2018-07-27 02:34:27 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
var c3 = u4.RibbonBitsContest3();
|
|
|
|
var c3n = u4.RibbonNamesContest3();
|
|
|
|
var iter3 = gen == 3 ? GetMissingContestRibbons(c3, c3n) : GetInvalidRibbonsNone(c3, c3n);
|
|
|
|
foreach (var z in iter3)
|
|
|
|
yield return z;
|
2022-06-03 03:05:27 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
var c4 = u4.RibbonBitsContest4();
|
|
|
|
var c4n = u4.RibbonNamesContest4();
|
|
|
|
var iter4 = (gen is 3 or 4) && IsAllowedInContest4(pk.Species, pk.Form) ? GetMissingContestRibbons(c4, c4n) : GetInvalidRibbonsNone(c4, c4n);
|
|
|
|
foreach (var z in iter4)
|
|
|
|
yield return z;
|
|
|
|
}
|
|
|
|
if (pk is IRibbonSetCommon4 s4)
|
2020-06-17 02:46:22 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
bool inhabited4 = gen is 3 or 4;
|
|
|
|
var iterate = GetInvalidRibbons4Any(pk, evos, s4, gen);
|
|
|
|
if (!inhabited4)
|
2020-06-17 02:46:22 +00:00
|
|
|
{
|
2022-08-04 01:17:46 +00:00
|
|
|
if (evos.HasVisitedBDSP) // Allow Sinnoh Champion. ILCA reused the Gen4 ribbon for the remake.
|
2022-06-18 18:04:24 +00:00
|
|
|
iterate = iterate.Concat(GetInvalidRibbonsNoneSkipIndex(s4.RibbonBitsOnly(), s4.RibbonNamesOnly(), 1));
|
|
|
|
else
|
|
|
|
iterate = iterate.Concat(GetInvalidRibbonsNone(s4.RibbonBitsOnly(), s4.RibbonNamesOnly()));
|
2020-06-17 02:46:22 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
foreach (var z in iterate)
|
|
|
|
yield return z;
|
2020-06-17 02:46:22 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
if (pk is IRibbonSetCommon6 s6)
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
bool inhabited6 = gen is >= 3 and <= 6;
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
var iterate = inhabited6
|
|
|
|
? GetInvalidRibbons6Any(pk, s6, gen, enc)
|
|
|
|
: pk.Format >= 8
|
2022-08-04 01:17:46 +00:00
|
|
|
? GetInvalidRibbons6AnyG8(s6, evos)
|
2022-06-18 18:04:24 +00:00
|
|
|
: GetInvalidRibbonsNone(s6.RibbonBits(), s6.RibbonNamesBool());
|
|
|
|
foreach (var z in iterate)
|
|
|
|
yield return z;
|
2021-11-26 23:41:24 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
if (!inhabited6)
|
2021-11-26 23:41:24 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
if (s6.RibbonCountMemoryContest > 0)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonCountMemoryContest));
|
|
|
|
if (s6.RibbonCountMemoryBattle > 0)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonCountMemoryBattle));
|
2021-11-26 23:41:24 +00:00
|
|
|
}
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
if (s6.RibbonBestFriends && !IsRibbonValidBestFriend(pk, evos, gen))
|
|
|
|
yield return new RibbonResult(nameof(IRibbonSetCommon6.RibbonBestFriends));
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
if (pk is IRibbonSetCommon7 s7)
|
|
|
|
{
|
|
|
|
bool inhabited7 = gen <= 7 && !pk.GG;
|
|
|
|
var iterate = inhabited7 ? GetInvalidRibbons7Any(pk, s7) : GetInvalidRibbonsNone(s7.RibbonBits(), s7.RibbonNames());
|
|
|
|
foreach (var z in iterate)
|
|
|
|
yield return z;
|
|
|
|
}
|
|
|
|
if (pk is IRibbonSetCommon3 s3)
|
|
|
|
{
|
|
|
|
if (s3.RibbonChampionG3 && gen != 3)
|
|
|
|
yield return new RibbonResult(nameof(s3.RibbonChampionG3)); // RSE HoF
|
|
|
|
if (s3.RibbonArtist && gen != 3)
|
|
|
|
yield return new RibbonResult(nameof(s3.RibbonArtist)); // RSE Master Rank Portrait
|
|
|
|
if (s3.RibbonEffort && !IsRibbonValidEffort(pk, evos, gen)) // unobtainable in Gen 5
|
|
|
|
yield return new RibbonResult(nameof(s3.RibbonEffort));
|
|
|
|
}
|
|
|
|
if (pk is IRibbonSetCommon8 s8)
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
bool inhabited8 = gen <= 8;
|
|
|
|
var iterate = inhabited8 ? GetInvalidRibbons8Any(pk, s8, enc, evos) : GetInvalidRibbonsNone(s8.RibbonBits(), s8.RibbonNames());
|
|
|
|
foreach (var z in iterate)
|
|
|
|
yield return z;
|
|
|
|
}
|
|
|
|
}
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static bool IsRibbonValidEffort(PKM pk, EvolutionHistory evos, int gen) => gen switch
|
|
|
|
{
|
|
|
|
5 when pk.Format == 5 => false,
|
2022-08-04 01:17:46 +00:00
|
|
|
8 when !evos.HasVisitedSWSH && !evos.HasVisitedBDSP => false,
|
2022-06-18 18:04:24 +00:00
|
|
|
_ => true,
|
|
|
|
};
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static bool IsRibbonValidBestFriend(PKM pk, EvolutionHistory evos, int gen) => gen switch
|
|
|
|
{
|
|
|
|
< 7 when pk is { IsUntraded: true } and IAffection { OT_Affection: < 255 } => false, // Gen6/7 uses affection. Can't lower it on OT!
|
2022-08-04 01:17:46 +00:00
|
|
|
8 when !evos.HasVisitedSWSH && !evos.HasVisitedBDSP => false, // Gen8+ replaced with Max Friendship.
|
2022-06-18 18:04:24 +00:00
|
|
|
_ => true,
|
|
|
|
};
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static IEnumerable<RibbonResult> GetMissingContestRibbons(IReadOnlyList<bool> bits, IReadOnlyList<string> names)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < bits.Count; i += 4)
|
|
|
|
{
|
|
|
|
bool required = false;
|
|
|
|
for (int j = i + 3; j >= i; j--)
|
2020-02-15 19:43:21 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
if (bits[j])
|
|
|
|
required = true;
|
|
|
|
else if (required) yield return new RibbonResult(names[j], false);
|
2020-02-15 19:43:21 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
}
|
|
|
|
}
|
2018-03-26 23:42:18 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static IEnumerable<RibbonResult> GetInvalidRibbons4Any(PKM pk, EvolutionHistory evos, IRibbonSetCommon4 s4, int gen)
|
|
|
|
{
|
|
|
|
if (s4.RibbonRecord)
|
|
|
|
yield return new RibbonResult(nameof(s4.RibbonRecord)); // Unobtainable
|
|
|
|
if (s4.RibbonFootprint && !CanHaveFootprintRibbon(pk, evos, gen))
|
|
|
|
yield return new RibbonResult(nameof(s4.RibbonFootprint));
|
|
|
|
|
2022-08-04 01:17:46 +00:00
|
|
|
bool visitBDSP = evos.HasVisitedBDSP;
|
2022-06-18 18:04:24 +00:00
|
|
|
bool gen34 = gen is 3 or 4;
|
|
|
|
bool not6 = pk.Format < 6 || gen is > 6 or < 3;
|
|
|
|
bool noDaily = !gen34 && not6 && !visitBDSP;
|
|
|
|
bool noSinnoh = pk is G4PKM { Species: (int)Species.Pichu, Form: 1 }; // Spiky Pichu
|
|
|
|
bool noCosmetic = (!gen34 && (not6 || (pk.XY && pk.IsUntraded)) && !visitBDSP) || noSinnoh;
|
|
|
|
|
|
|
|
if (noSinnoh)
|
|
|
|
{
|
|
|
|
if (s4.RibbonChampionSinnoh)
|
|
|
|
yield return new RibbonResult(nameof(s4.RibbonChampionSinnoh));
|
|
|
|
}
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
if (noDaily)
|
|
|
|
{
|
|
|
|
foreach (var z in GetInvalidRibbonsNone(s4.RibbonBitsDaily(), s4.RibbonNamesDaily()))
|
|
|
|
yield return z;
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
2018-07-27 02:34:27 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
if (noCosmetic)
|
2021-11-25 20:28:23 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
foreach (var z in GetInvalidRibbonsNone(s4.RibbonBitsCosmetic(), s4.RibbonNamesCosmetic()))
|
|
|
|
yield return z;
|
|
|
|
}
|
|
|
|
}
|
2021-11-25 20:28:23 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static IEnumerable<RibbonResult> GetInvalidRibbons6Any(PKM pk, IRibbonSetCommon6 s6, int gen, IEncounterTemplate enc)
|
|
|
|
{
|
|
|
|
foreach (var p in GetInvalidRibbons6Memory(pk, s6, gen, enc))
|
|
|
|
yield return p;
|
|
|
|
|
|
|
|
bool untraded = pk.IsUntraded || (enc is EncounterStatic6 {Species:(int)Species.Pikachu, Form: not 0}); // Disallow cosplay pikachu from XY ribbons
|
|
|
|
var iter = untraded ? GetInvalidRibbons6Untraded(pk, s6) : GetInvalidRibbons6Traded(pk, s6);
|
|
|
|
foreach (var p in iter)
|
|
|
|
yield return p;
|
|
|
|
|
|
|
|
var contest = s6.RibbonBitsContest();
|
|
|
|
bool allContest = contest.All(z => z);
|
|
|
|
if ((allContest != s6.RibbonContestStar) && !(untraded && pk.XY)) // if not already checked
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonContestStar), s6.RibbonContestStar);
|
|
|
|
|
|
|
|
// Each contest victory requires a contest participation; each participation gives 20 OT affection (not current trainer).
|
|
|
|
// Affection is discarded on PK7->PK8 in favor of friendship, which can be lowered.
|
|
|
|
if (pk is IAffection a)
|
|
|
|
{
|
|
|
|
var affect = a.OT_Affection;
|
|
|
|
var contMemory = s6.RibbonNamesContest();
|
|
|
|
int contCount = 0;
|
|
|
|
var present = contMemory.Where((_, i) => contest[i] && affect < 20 * ++contCount);
|
|
|
|
foreach (var rib in present)
|
|
|
|
yield return new RibbonResult(rib);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Gen6 can get the memory on those who did not participate by being in the party with other participants.
|
|
|
|
// This includes those who cannot enter into the Maison; having memory and no ribbon.
|
|
|
|
const int memChatelaine = 30;
|
|
|
|
bool hasChampMemory = enc.Generation == 7 && pk.Format == 7 && pk is ITrainerMemories m && (m.HT_Memory == memChatelaine || m.OT_Memory == memChatelaine);
|
|
|
|
if (!IsAllowedBattleFrontier(pk.Species))
|
|
|
|
{
|
|
|
|
if (hasChampMemory || s6.RibbonBattlerSkillful) // having memory and not ribbon is too rare, just flag here.
|
2021-11-25 20:28:23 +00:00
|
|
|
yield return new RibbonResult(nameof(s6.RibbonBattlerSkillful));
|
|
|
|
if (s6.RibbonBattlerExpert)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonBattlerExpert));
|
2022-06-18 18:04:24 +00:00
|
|
|
yield break;
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
if (!hasChampMemory || s6.RibbonBattlerSkillful || s6.RibbonBattlerExpert)
|
|
|
|
yield break;
|
2018-07-27 02:34:27 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
var result = new RibbonResult(nameof(s6.RibbonBattlerSkillful), false);
|
|
|
|
result.Combine(new RibbonResult(nameof(s6.RibbonBattlerExpert)));
|
|
|
|
yield return result;
|
|
|
|
}
|
|
|
|
|
2022-08-04 01:17:46 +00:00
|
|
|
private static IEnumerable<RibbonResult> GetInvalidRibbons6AnyG8(IRibbonSetCommon6 s6, EvolutionHistory evos)
|
2022-06-18 18:04:24 +00:00
|
|
|
{
|
2022-08-04 01:17:46 +00:00
|
|
|
if (!evos.HasVisitedBDSP)
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
var none = GetInvalidRibbonsNone(s6.RibbonBits(), s6.RibbonNamesBool());
|
|
|
|
foreach (var x in none)
|
|
|
|
yield return x;
|
|
|
|
yield break;
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
2018-07-27 02:34:27 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
if (s6.RibbonChampionKalos)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonChampionKalos));
|
|
|
|
if (s6.RibbonChampionG6Hoenn)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonChampionG6Hoenn));
|
|
|
|
//if (s6.RibbonBestFriends)
|
|
|
|
// yield return new RibbonResult(nameof(s6.RibbonBestFriends));
|
|
|
|
if (s6.RibbonTraining)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonTraining));
|
|
|
|
if (s6.RibbonBattlerSkillful)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonBattlerSkillful));
|
|
|
|
if (s6.RibbonBattlerExpert)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonBattlerExpert));
|
|
|
|
|
|
|
|
if (s6.RibbonCountMemoryContest != 0)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonCountMemoryContest));
|
|
|
|
if (s6.RibbonCountMemoryBattle != 0)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonCountMemoryBattle));
|
|
|
|
|
|
|
|
// Can get contest ribbons via BD/SP contests.
|
|
|
|
//if (s6.RibbonContestStar)
|
|
|
|
// yield return new RibbonResult(nameof(s6.RibbonContestStar));
|
|
|
|
//if (s6.RibbonMasterCoolness)
|
|
|
|
// yield return new RibbonResult(nameof(s6.RibbonMasterCoolness));
|
|
|
|
//if (s6.RibbonMasterBeauty)
|
|
|
|
// yield return new RibbonResult(nameof(s6.RibbonMasterBeauty));
|
|
|
|
//if (s6.RibbonMasterCuteness)
|
|
|
|
// yield return new RibbonResult(nameof(s6.RibbonMasterCuteness));
|
|
|
|
//if (s6.RibbonMasterCleverness)
|
|
|
|
// yield return new RibbonResult(nameof(s6.RibbonMasterCleverness));
|
|
|
|
//if (s6.RibbonMasterToughness)
|
|
|
|
// yield return new RibbonResult(nameof(s6.RibbonMasterToughness));
|
|
|
|
|
|
|
|
var contest = s6.RibbonBitsContest();
|
|
|
|
bool allContest = contest.All(z => z);
|
|
|
|
if (allContest != s6.RibbonContestStar) // if not already checked
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonContestStar), s6.RibbonContestStar);
|
|
|
|
}
|
|
|
|
|
|
|
|
private static IEnumerable<RibbonResult> GetInvalidRibbons6Memory(PKM pk, IRibbonSetCommon6 s6, int gen, IEncounterTemplate enc)
|
|
|
|
{
|
|
|
|
int contest = 0;
|
|
|
|
int battle = 0;
|
|
|
|
switch (gen)
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
case 3:
|
|
|
|
contest = IsAllowedInContest4(pk.Species, pk.Form) ? 40 : 20;
|
|
|
|
battle = IsAllowedBattleFrontier(pk.Species) ? CanHaveRibbonWinning(pk, enc, 3) ? 8 : 7 : 0;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
contest = IsAllowedInContest4(pk.Species, pk.Form) ? 20 : 0;
|
|
|
|
battle = IsAllowedBattleFrontier(pk.Species) ? 6 : 0;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (s6.RibbonCountMemoryContest > contest)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonCountMemoryContest));
|
|
|
|
if (s6.RibbonCountMemoryBattle > battle)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonCountMemoryBattle));
|
|
|
|
}
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static IEnumerable<RibbonResult> GetInvalidRibbons6Untraded(PKM pk, IRibbonSetCommon6 s6)
|
|
|
|
{
|
|
|
|
if (pk.XY)
|
|
|
|
{
|
|
|
|
if (s6.RibbonChampionG6Hoenn)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonChampionG6Hoenn));
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
if (s6.RibbonContestStar)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonContestStar));
|
|
|
|
if (s6.RibbonMasterCoolness)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonMasterCoolness));
|
|
|
|
if (s6.RibbonMasterBeauty)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonMasterBeauty));
|
|
|
|
if (s6.RibbonMasterCuteness)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonMasterCuteness));
|
|
|
|
if (s6.RibbonMasterCleverness)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonMasterCleverness));
|
|
|
|
if (s6.RibbonMasterToughness)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonMasterToughness));
|
|
|
|
}
|
|
|
|
else if (pk.AO)
|
|
|
|
{
|
|
|
|
if (s6.RibbonChampionKalos)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonChampionKalos));
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
}
|
2018-07-27 02:34:27 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static IEnumerable<RibbonResult> GetInvalidRibbons6Traded(PKM pk, IRibbonSetCommon6 s6)
|
|
|
|
{
|
|
|
|
// Medal count is wiped on transfer to pk8
|
|
|
|
if (s6.RibbonTraining && pk.Format <= 7)
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
const int req = 12; // only first 12
|
|
|
|
int count = ((ISuperTrain)pk).SuperTrainingMedalCount(req);
|
|
|
|
if (count < req)
|
|
|
|
yield return new RibbonResult(nameof(s6.RibbonTraining));
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
const int memChampion = 27;
|
|
|
|
bool hasChampMemory = pk is ITrainerMemories m && ((pk.Format < 8 && m.HT_Memory == memChampion) || (pk.Gen6 && m.OT_Memory == memChampion));
|
|
|
|
if (!hasChampMemory || s6.RibbonChampionKalos || s6.RibbonChampionG6Hoenn)
|
|
|
|
yield break;
|
|
|
|
|
|
|
|
var result = new RibbonResult(nameof(s6.RibbonChampionKalos), false);
|
|
|
|
result.Combine(new RibbonResult(nameof(s6.RibbonChampionG6Hoenn)));
|
|
|
|
yield return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
private static IEnumerable<RibbonResult> GetInvalidRibbons7Any(PKM pk, IRibbonSetCommon7 s7)
|
|
|
|
{
|
|
|
|
if (!IsAllowedBattleFrontier(pk.Species))
|
2019-12-07 19:58:56 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
if (s7.RibbonBattleRoyale)
|
|
|
|
yield return new RibbonResult(nameof(s7.RibbonBattleRoyale));
|
|
|
|
if (s7.RibbonBattleTreeGreat && !pk.USUM && pk.IsUntraded)
|
|
|
|
yield return new RibbonResult(nameof(s7.RibbonBattleTreeGreat));
|
|
|
|
if (s7.RibbonBattleTreeMaster)
|
|
|
|
yield return new RibbonResult(nameof(s7.RibbonBattleTreeMaster));
|
|
|
|
}
|
|
|
|
}
|
2022-05-31 04:43:52 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static IEnumerable<RibbonResult> GetInvalidRibbons8Any(PKM pk, IRibbonSetCommon8 s8, IEncounterTemplate enc, EvolutionHistory evos)
|
|
|
|
{
|
2022-08-04 03:27:13 +00:00
|
|
|
if (!CanObtainTowerMaster(evos) && s8.RibbonTowerMaster)
|
2022-06-18 18:04:24 +00:00
|
|
|
{
|
2022-08-04 03:27:13 +00:00
|
|
|
yield return new RibbonResult(nameof(s8.RibbonTowerMaster));
|
2022-06-18 18:04:24 +00:00
|
|
|
}
|
2022-08-04 03:27:13 +00:00
|
|
|
if (!evos.HasVisitedSWSH)
|
2022-06-18 18:04:24 +00:00
|
|
|
{
|
|
|
|
if (s8.RibbonChampionGalar)
|
|
|
|
yield return new RibbonResult(nameof(s8.RibbonChampionGalar));
|
|
|
|
if (s8.RibbonMasterRank)
|
|
|
|
yield return new RibbonResult(nameof(s8.RibbonMasterRank));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
const int memChampion = 27;
|
2019-12-07 19:58:56 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
bool hasChampMemory = (pk.Format == 8 && pk is IMemoryHT {HT_Memory: memChampion}) ||
|
|
|
|
(enc.Generation == 8 && pk is IMemoryOT {OT_Memory: memChampion});
|
|
|
|
if (hasChampMemory && !s8.RibbonChampionGalar)
|
2019-12-07 19:58:56 +00:00
|
|
|
yield return new RibbonResult(nameof(s8.RibbonChampionGalar));
|
|
|
|
}
|
2020-06-17 03:16:21 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
// Legends cannot compete in Ranked, thus cannot reach Master Rank and obtain the ribbon.
|
|
|
|
// Past gen Pokemon can get the ribbon only if they've been reset.
|
|
|
|
if (s8.RibbonMasterRank && !CanParticipateInRankedSWSH(pk, enc, evos))
|
|
|
|
yield return new RibbonResult(nameof(s8.RibbonMasterRank));
|
2020-07-10 03:53:57 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
if (!s8.RibbonTowerMaster)
|
|
|
|
{
|
|
|
|
// If the Tower Master ribbon is not present but a memory hint implies it should...
|
|
|
|
// This memory can also be applied in Gen6/7 via defeating the Chatelaines, where legends are disallowed.
|
|
|
|
const int strongest = 30;
|
|
|
|
if (pk is IMemoryOT {OT_Memory: strongest} or IMemoryHT {HT_Memory: strongest})
|
2020-07-10 03:53:57 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
if (enc.Generation == 8 || !IsAllowedBattleFrontier(pk.Species) || pk is IRibbonSetCommon6 {RibbonBattlerSkillful: false})
|
|
|
|
yield return new RibbonResult(nameof(s8.RibbonTowerMaster));
|
2020-07-10 03:53:57 +00:00
|
|
|
}
|
2019-12-07 19:58:56 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
}
|
2021-11-20 02:23:49 +00:00
|
|
|
|
2022-08-04 03:27:13 +00:00
|
|
|
if (s8.RibbonTwinklingStar && (!evos.HasVisitedBDSP || pk is IRibbonSetCommon6 {RibbonContestStar:false}))
|
2022-06-18 18:04:24 +00:00
|
|
|
{
|
|
|
|
yield return new RibbonResult(nameof(s8.RibbonTwinklingStar));
|
|
|
|
}
|
2021-11-20 02:23:49 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
// received when capturing photos with Pokémon in the Photography Studio
|
2022-08-04 03:27:13 +00:00
|
|
|
if (!evos.HasVisitedPLA && s8.RibbonPioneer)
|
2022-06-18 18:04:24 +00:00
|
|
|
{
|
|
|
|
yield return new RibbonResult(nameof(s8.RibbonPioneer));
|
2019-12-07 19:58:56 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
}
|
2019-12-07 19:58:56 +00:00
|
|
|
|
2022-08-04 03:27:13 +00:00
|
|
|
private static bool CanObtainTowerMaster(EvolutionHistory evos)
|
|
|
|
{
|
|
|
|
if (evos.HasVisitedSWSH)
|
|
|
|
return true; // Anything in SW/SH can be used in battle tower.
|
|
|
|
|
|
|
|
if (!evos.HasVisitedBDSP)
|
|
|
|
return false;
|
|
|
|
// Mythicals cannot be used in BD/SP's Battle Tower
|
|
|
|
return !Legal.Mythicals.Contains(evos.Gen8b[0].Species);
|
|
|
|
}
|
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static bool CanParticipateInRankedSWSH(PKM pk, IEncounterTemplate enc, EvolutionHistory evos)
|
|
|
|
{
|
|
|
|
bool exist = enc.Generation switch
|
2020-06-20 02:51:57 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
< 8 => pk is IBattleVersion { BattleVersion: (int)GameVersion.SW or (int)GameVersion.SH },
|
2022-08-04 01:17:46 +00:00
|
|
|
_ => evos.HasVisitedSWSH,
|
2022-06-18 18:04:24 +00:00
|
|
|
};
|
|
|
|
if (!exist)
|
|
|
|
return false;
|
2020-06-20 02:51:57 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
// Clamp to permitted species
|
|
|
|
var species = pk.Species;
|
|
|
|
if (species > Legal.MaxSpeciesID_8_R2)
|
|
|
|
return false;
|
2022-08-04 01:17:46 +00:00
|
|
|
|
2022-08-02 13:23:07 +00:00
|
|
|
// Series 13 rule-set was the first time Ranked Battles allowed the use of Mythical Pokémon.
|
2022-06-18 18:04:24 +00:00
|
|
|
if (Legal.Legends.Contains(species))
|
|
|
|
{
|
|
|
|
if (enc.Version == GameVersion.GO || enc is IEncounterServerDate { IsDateRestricted: true }) // Capture date is global time, and not console changeable.
|
2021-02-17 05:42:36 +00:00
|
|
|
{
|
2022-08-02 13:23:07 +00:00
|
|
|
if (pk.MetDate > new DateTime(2022, 11, 1)) // Series 13 end date
|
2021-02-17 05:42:36 +00:00
|
|
|
return false;
|
|
|
|
}
|
2020-06-20 02:51:57 +00:00
|
|
|
}
|
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
return PersonalTable.SWSH.IsPresentInGame(species, pk.Form);
|
|
|
|
}
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static IEnumerable<RibbonResult> GetInvalidRibbonsEvent1(PKM pk, IEncounterTemplate enc)
|
|
|
|
{
|
|
|
|
if (pk is not IRibbonSetEvent3 set1)
|
|
|
|
yield break;
|
|
|
|
var names = set1.RibbonNames();
|
|
|
|
var sb = set1.RibbonBits();
|
|
|
|
var eb = enc is IRibbonSetEvent3 e3 ? e3.RibbonBits() : new bool[sb.Length];
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
if (enc.Generation == 3)
|
|
|
|
{
|
|
|
|
eb[0] = sb[0]; // permit Earth Ribbon
|
|
|
|
if (pk.Version == 15 && enc is EncounterStaticShadow s)
|
2018-07-27 02:34:27 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
// only require national ribbon if no longer on origin game
|
|
|
|
bool untraded = s.Version == GameVersion.XD
|
|
|
|
? pk is XK3 {RibbonNational: false}
|
|
|
|
: pk is CK3 {RibbonNational: false};
|
|
|
|
eb[1] = !untraded;
|
2018-07-27 02:34:27 +00:00
|
|
|
}
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
2018-07-27 02:34:27 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
for (int i = 0; i < sb.Length; i++)
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
if (sb[i] != eb[i])
|
|
|
|
yield return new RibbonResult(names[i], !eb[i]); // only flag if invalid
|
|
|
|
}
|
|
|
|
}
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static IEnumerable<RibbonResult> GetInvalidRibbonsEvent2(PKM pk, IEncounterTemplate enc)
|
|
|
|
{
|
|
|
|
if (pk is not IRibbonSetEvent4 set2)
|
|
|
|
yield break;
|
|
|
|
var names = set2.RibbonNames();
|
|
|
|
var sb = set2.RibbonBits();
|
|
|
|
var eb = enc is IRibbonSetEvent4 e4 ? e4.RibbonBits() : new bool[sb.Length];
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
if (enc is EncounterStatic7 {Species: (int)Species.Magearna})
|
|
|
|
eb[1] = true; // require Wishing Ribbon
|
2018-07-27 02:34:27 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
for (int i = 0; i < sb.Length; i++)
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
if (sb[i] != eb[i])
|
|
|
|
yield return new RibbonResult(names[i], !eb[i]); // only flag if invalid
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
}
|
2017-09-04 02:51:29 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static IEnumerable<RibbonResult> GetInvalidRibbonsNone(IReadOnlyList<bool> bits, IReadOnlyList<string> names)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < bits.Count; i++)
|
2021-11-20 02:23:49 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
if (bits[i])
|
|
|
|
yield return new RibbonResult(names[i]);
|
2021-11-20 02:23:49 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
}
|
2021-11-20 02:23:49 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static IEnumerable<RibbonResult> GetInvalidRibbonsNoneSkipIndex(IReadOnlyList<bool> bits, IReadOnlyList<string> names, int skipIndex)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < bits.Count; i++)
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
2022-06-18 18:04:24 +00:00
|
|
|
if (bits[i] && i != skipIndex)
|
|
|
|
yield return new RibbonResult(names[i]);
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
}
|
2020-09-18 23:23:17 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static bool IsAllowedInContest4(int species, int form) => species switch
|
|
|
|
{
|
|
|
|
// Disallow Unown and Ditto, and Spiky Pichu (cannot trade)
|
|
|
|
(int)Species.Ditto => false,
|
|
|
|
(int)Species.Unown => false,
|
|
|
|
(int)Species.Pichu when form == 1 => false,
|
|
|
|
_ => true,
|
|
|
|
};
|
2021-11-20 02:23:49 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static bool IsAllowedBattleFrontier(int species) => !Legal.BattleFrontierBanlist.Contains(species);
|
2020-09-18 23:23:17 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static bool IsAllowedBattleFrontier(int species, int form, int gen)
|
|
|
|
{
|
|
|
|
if (gen == 4 && species == (int)Species.Pichu && form == 1) // spiky
|
|
|
|
return false;
|
|
|
|
return IsAllowedBattleFrontier(species);
|
|
|
|
}
|
2021-11-20 02:23:49 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static bool CanHaveFootprintRibbon(PKM pk, EvolutionHistory evos, int gen)
|
|
|
|
{
|
|
|
|
if (gen <= 4) // Friendship Check unnecessary - can decrease after obtaining ribbon.
|
|
|
|
return true;
|
|
|
|
// Gen5: Can't obtain
|
|
|
|
if (pk.Format < 6)
|
2020-09-18 23:23:17 +00:00
|
|
|
return false;
|
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
// Gen6/7: Increase level by 30 from original level
|
|
|
|
if (gen != 8 && !pk.GG && (pk.CurrentLevel - pk.Met_Level >= 30))
|
|
|
|
return true;
|
|
|
|
|
|
|
|
// Gen8-BDSP: Variable by species Footprint
|
2022-08-04 01:17:46 +00:00
|
|
|
if (evos.HasVisitedBDSP)
|
2020-09-18 23:23:17 +00:00
|
|
|
{
|
2022-08-04 01:17:46 +00:00
|
|
|
if (Array.Exists(evos.Gen8b, z => !HasFootprintBDSP[z.Species]))
|
2022-06-18 18:04:24 +00:00
|
|
|
return true; // no footprint
|
|
|
|
if (pk.CurrentLevel - pk.Met_Level >= 30)
|
|
|
|
return true; // traveled well
|
|
|
|
}
|
2020-09-18 23:23:17 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
// Otherwise: Can't obtain
|
|
|
|
return false;
|
|
|
|
}
|
2020-09-18 23:23:17 +00:00
|
|
|
|
2022-06-18 18:04:24 +00:00
|
|
|
private static bool CanHaveRibbonWinning(PKM pk, IEncounterTemplate enc, int gen)
|
|
|
|
{
|
|
|
|
if (gen != 3)
|
|
|
|
return false;
|
|
|
|
if (!IsAllowedBattleFrontier(pk.Species))
|
|
|
|
return false;
|
|
|
|
if (pk.Format == 3)
|
|
|
|
return pk.Met_Level <= 50;
|
|
|
|
|
|
|
|
// Most encounter types can be below level 50; only Shadow Dragonite & Tyranitar, and select Gen3 Event Gifts.
|
|
|
|
// These edge cases can't be obtained below level 50, unlike some wild Pokémon which can be encountered at different locations for lower levels.
|
|
|
|
if (enc.LevelMin <= 50)
|
|
|
|
return true;
|
|
|
|
|
|
|
|
return enc is not (EncounterStaticShadow or WC3);
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
2022-06-18 18:04:24 +00:00
|
|
|
|
|
|
|
private static bool CanHaveRibbonVictory(PKM pk, int gen)
|
|
|
|
{
|
|
|
|
return gen == 3 && IsAllowedBattleFrontier(pk.Species);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Footprint type is not Type 5, requiring 30 levels.
|
|
|
|
private static readonly bool[] HasFootprintBDSP =
|
|
|
|
{
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, false, true, true, false, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, false, false, true, false,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, false, false, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
false, false, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, false, true, true,
|
|
|
|
false, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, false, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, false, true, true, false, false, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, false, true, true, true, true, true, true,
|
|
|
|
true, true, true, false, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, false, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, false, true, false, true,
|
|
|
|
true, true, true, false, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
false, true, true, true, true, true, true, true, true, false,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, false, false, true,
|
|
|
|
true, true, true, false, false, false, false, false, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, false, true, false, false, true, false, false, false,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, false, false, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, true, true, true, true, true, true,
|
|
|
|
true, true, false, true, true, true, true, true, true, true,
|
|
|
|
true, true, true, true, false, true, false, true, true, true,
|
|
|
|
true, true, true, true, true, true, false, true, true, true,
|
|
|
|
true, true, true, true,
|
|
|
|
};
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|