diff --git a/PKHeX.Core/Legality/LegalityCheckStrings.cs b/PKHeX.Core/Legality/LegalityCheckStrings.cs index 6b2ac45bb..97807fdbd 100644 --- a/PKHeX.Core/Legality/LegalityCheckStrings.cs +++ b/PKHeX.Core/Legality/LegalityCheckStrings.cs @@ -309,6 +309,9 @@ public static class LegalityCheckStrings public static string LMemoryStatFriendshipHT0 { get; set; } = "Untraded: Handling Trainer Friendship should be 0."; public static string LMemoryStatFriendshipOTBaseEvent { get; set; } = "Event OT Friendship does not match base friendship."; + public static string LMemoryStatFullness { get; set; } = "Fullness should be {0}."; + public static string LMemoryStatEnjoyment { get; set; } = "Enjoyment should be {0}."; + public static string LMoveEggFIncompatible0_1 { get; set; } = "{0} Inherited Move. Incompatible with {1} inherited moves."; public static string LMoveEggIncompatible { get; set; } = "Egg Move. Incompatible with event Egg moves."; public static string LMoveEggIncompatibleEvent { get; set; } = "Event Egg Move. Incompatible with normal Egg moves."; diff --git a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs index c8c2fd2a4..de47dda43 100644 --- a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Linq; using static PKHeX.Core.LegalityCheckStrings; using static PKHeX.Core.CheckIdentifier; @@ -43,12 +44,21 @@ public override void Verify(LegalityAnalysis data) VerifyMiscMovePP(data); } - if (pkm is PK7 pk7 && pk7.ResortEventStatus >= 20) - data.AddLine(GetInvalid(LTransferBad)); - if (pkm is PB7 pb7) - VerifyBelugaStats(data, pb7); - if (pkm is PK8 pk8) - VerifySWSHStats(data, pk8); + switch (pkm) + { + case PK7 pk7 when pk7.ResortEventStatus >= 20: + data.AddLine(GetInvalid(LTransferBad)); + break; + case PB7 pb7: + VerifyBelugaStats(data, pb7); + break; + case PK8 pk8: + VerifySWSHStats(data, pk8); + break; + } + + if (pkm.Format >= 6) + VerifyFullness(data, pkm); VerifyMiscFatefulEncounter(data); } @@ -299,6 +309,41 @@ public void VerifyVersionEvolution(LegalityAnalysis data) } } + private static void VerifyFullness(LegalityAnalysis data, PKM pkm) + { + if (pkm.Format >= 8 || pkm.IsEgg) + { + if (pkm.Fullness != 0) + data.AddLine(GetInvalid(string.Format(LMemoryStatFullness, 0), Encounter)); + if (pkm.Enjoyment != 0) + data.AddLine(GetInvalid(string.Format(LMemoryStatEnjoyment, 0), Encounter)); + return; + } + + if (pkm.Format != 6 || !pkm.IsUntraded || pkm.XY) + return; + + // OR/AS PK6 + if (pkm.Fullness == 0) + return; + if (pkm.Species != data.EncounterMatch.Species) + return; // evolved + + if (Unfeedable.Contains(pkm.Species)) + data.AddLine(GetInvalid(string.Format(LMemoryStatFullness, 0), Encounter)); + } + + private static readonly HashSet Unfeedable = new HashSet + { + (int)Species.Metapod, + (int)Species.Kakuna, + (int)Species.Pineco, + (int)Species.Silcoon, + (int)Species.Cascoon, + (int)Species.Shedinja, + (int)Species.Spewpa, + }; + private static void VerifyBelugaStats(LegalityAnalysis data, PB7 pb7) { // ReSharper disable once CompareOfFloatsByEqualityOperator -- THESE MUST MATCH EXACTLY diff --git a/PKHeX.Core/Resources/text/de/LegalityCheckStrings_de.txt b/PKHeX.Core/Resources/text/de/LegalityCheckStrings_de.txt index 2157784f9..95fb7efe3 100644 --- a/PKHeX.Core/Resources/text/de/LegalityCheckStrings_de.txt +++ b/PKHeX.Core/Resources/text/de/LegalityCheckStrings_de.txt @@ -237,8 +237,10 @@ LMemoryMissingHT = Memory: Handling Trainer Memory missing. LMemoryMissingOT = Memory: Original Trainer Memory missing. LMemoryStatAffectionHT0 = Untraded: Handling Trainer Affection should be 0. LMemoryStatAffectionOT0 = OT Affection should be 0. +LMemoryStatEnjoyment = Enjoyment should be {0}. LMemoryStatFriendshipHT0 = Untraded: Handling Trainer Friendship should be 0. LMemoryStatFriendshipOTBaseEvent = Event OT Friendship does not match base friendship. +LMemoryStatFullness = Fullness should be {0}. LMoveEggFIncompatible0_1 = {0} Inherited Move. Incompatible with {1} inherited moves. LMoveEggIncompatible = Egg Move. Incompatible with event Egg moves. LMoveEggIncompatibleEvent = Event Egg Move. Incompatible with normal Egg moves. diff --git a/PKHeX.Core/Resources/text/en/LegalityCheckStrings_en.txt b/PKHeX.Core/Resources/text/en/LegalityCheckStrings_en.txt index 0f831f7c6..6644f38eb 100644 --- a/PKHeX.Core/Resources/text/en/LegalityCheckStrings_en.txt +++ b/PKHeX.Core/Resources/text/en/LegalityCheckStrings_en.txt @@ -237,8 +237,10 @@ LMemoryMissingHT = Memory: Handling Trainer Memory missing. LMemoryMissingOT = Memory: Original Trainer Memory missing. LMemoryStatAffectionHT0 = Untraded: Handling Trainer Affection should be 0. LMemoryStatAffectionOT0 = OT Affection should be 0. +LMemoryStatEnjoyment = Enjoyment should be {0}. LMemoryStatFriendshipHT0 = Untraded: Handling Trainer Friendship should be 0. LMemoryStatFriendshipOTBaseEvent = Event OT Friendship does not match base friendship. +LMemoryStatFullness = Fullness should be {0}. LMoveEggFIncompatible0_1 = {0} Inherited Move. Incompatible with {1} inherited moves. LMoveEggIncompatible = Egg Move. Incompatible with event Egg moves. LMoveEggIncompatibleEvent = Event Egg Move. Incompatible with normal Egg moves. diff --git a/PKHeX.Core/Resources/text/es/LegalityCheckStrings_es.txt b/PKHeX.Core/Resources/text/es/LegalityCheckStrings_es.txt index 035ded6f6..3ba7b1c2d 100644 --- a/PKHeX.Core/Resources/text/es/LegalityCheckStrings_es.txt +++ b/PKHeX.Core/Resources/text/es/LegalityCheckStrings_es.txt @@ -237,8 +237,10 @@ LMemoryMissingHT = Recuerdo: Falta el recuerdo del entrenador anterior. LMemoryMissingOT = Recuerdo: Falta el recuerdo del entrenador original. LMemoryStatAffectionHT0 = No intercambiado: El Afecto con el entrenador anterior debería ser cero. LMemoryStatAffectionOT0 = El afecto del EO debería de ser cero. +LMemoryStatEnjoyment = Enjoyment should be {0}. LMemoryStatFriendshipHT0 = No intercambiado: La Amistad con el entrenador anterior debería ser cero. LMemoryStatFriendshipOTBaseEvent = La Amistad con el EO de Evento no coincide con el valor de base. +LMemoryStatFullness = Fullness should be {0}. LMoveEggFIncompatible0_1 = {0} Movimiento Heredado. Incompatible con {1} Movimientos heredados. LMoveEggIncompatible = Movimiento Huevo. Incompatible con Movimientos Huevo de Evento. LMoveEggIncompatibleEvent = Movimiento Huevo de Evento. Incompatible con Movimiento Huevo normal. diff --git a/PKHeX.Core/Resources/text/fr/LegalityCheckStrings_fr.txt b/PKHeX.Core/Resources/text/fr/LegalityCheckStrings_fr.txt index ae186100e..c4e4a4f6b 100644 --- a/PKHeX.Core/Resources/text/fr/LegalityCheckStrings_fr.txt +++ b/PKHeX.Core/Resources/text/fr/LegalityCheckStrings_fr.txt @@ -237,8 +237,10 @@ LMemoryMissingHT = Mémoire : Mémoire avec Dresseur actuel manquante. LMemoryMissingOT = Mémoire : Mémoire avec DO manquante. LMemoryStatAffectionHT0 = Non-échangés : L'affection avec le Dresseur Actuel doit être nulle. LMemoryStatAffectionOT0 = L'Affection pour le DO doit être nulle. +LMemoryStatEnjoyment = Enjoyment should be {0}. LMemoryStatFriendshipHT0 = Non-échangés : L'amitié avec le Dresseur Actuel doit être nulle . LMemoryStatFriendshipOTBaseEvent = Event OT Friendship does not match base friendship. +LMemoryStatFullness = Fullness should be {0}. LMoveEggFIncompatible0_1 = {0} Inherited Move. Incompatible with {1} inherited moves. LMoveEggIncompatible = Egg Move. Incompatible with event Egg moves. LMoveEggIncompatibleEvent = Event Egg Move. Incompatible with normal Egg moves. diff --git a/PKHeX.Core/Resources/text/it/LegalityCheckStrings_it.txt b/PKHeX.Core/Resources/text/it/LegalityCheckStrings_it.txt index 2157784f9..95fb7efe3 100644 --- a/PKHeX.Core/Resources/text/it/LegalityCheckStrings_it.txt +++ b/PKHeX.Core/Resources/text/it/LegalityCheckStrings_it.txt @@ -237,8 +237,10 @@ LMemoryMissingHT = Memory: Handling Trainer Memory missing. LMemoryMissingOT = Memory: Original Trainer Memory missing. LMemoryStatAffectionHT0 = Untraded: Handling Trainer Affection should be 0. LMemoryStatAffectionOT0 = OT Affection should be 0. +LMemoryStatEnjoyment = Enjoyment should be {0}. LMemoryStatFriendshipHT0 = Untraded: Handling Trainer Friendship should be 0. LMemoryStatFriendshipOTBaseEvent = Event OT Friendship does not match base friendship. +LMemoryStatFullness = Fullness should be {0}. LMoveEggFIncompatible0_1 = {0} Inherited Move. Incompatible with {1} inherited moves. LMoveEggIncompatible = Egg Move. Incompatible with event Egg moves. LMoveEggIncompatibleEvent = Event Egg Move. Incompatible with normal Egg moves. diff --git a/PKHeX.Core/Resources/text/ja/LegalityCheckStrings_ja.txt b/PKHeX.Core/Resources/text/ja/LegalityCheckStrings_ja.txt index eada806b0..b111d0943 100644 --- a/PKHeX.Core/Resources/text/ja/LegalityCheckStrings_ja.txt +++ b/PKHeX.Core/Resources/text/ja/LegalityCheckStrings_ja.txt @@ -237,8 +237,10 @@ LMemoryMissingHT = Memory: Handling Trainer Memory missing. LMemoryMissingOT = Memory: Original Trainer Memory missing. LMemoryStatAffectionHT0 = Untraded: Handling Trainer Affection should be 0. LMemoryStatAffectionOT0 = OT Affection should be 0. +LMemoryStatEnjoyment = Enjoyment should be {0}. LMemoryStatFriendshipHT0 = Untraded: Handling Trainer Friendship should be 0. LMemoryStatFriendshipOTBaseEvent = Event OT Friendship does not match base friendship. +LMemoryStatFullness = Fullness should be {0}. LMoveEggFIncompatible0_1 = {0} Inherited Move. Incompatible with {1} inherited moves. LMoveEggIncompatible = Egg Move. Incompatible with event Egg moves. LMoveEggIncompatibleEvent = Event Egg Move. Incompatible with normal Egg moves. diff --git a/PKHeX.Core/Resources/text/ko/LegalityCheckStrings_ko.txt b/PKHeX.Core/Resources/text/ko/LegalityCheckStrings_ko.txt index 9d8d3d3d5..c27a5bfd7 100644 --- a/PKHeX.Core/Resources/text/ko/LegalityCheckStrings_ko.txt +++ b/PKHeX.Core/Resources/text/ko/LegalityCheckStrings_ko.txt @@ -237,8 +237,10 @@ LMemoryMissingHT = 추억: 소유했던 트레이너와의 추억이 없습니 LMemoryMissingOT = 추억: 어버이와의 추억이 없습니다. LMemoryStatAffectionHT0 = 교환 경험 없음: 소유했던 트레이너와의 절친도는 0이어야 합니다. LMemoryStatAffectionOT0 = 어버이와의 절친도는 0이어야 합니다. +LMemoryStatEnjoyment = Enjoyment should be {0}. LMemoryStatFriendshipHT0 = 교환 경험 없음: 소유했던 트레이너와의 친밀도는 0이어야 합니다. LMemoryStatFriendshipOTBaseEvent = 이벤트 어버이와의 친밀도가 기본 친밀도와 일치하지 않습니다. +LMemoryStatFullness = Fullness should be {0}. LMoveEggFIncompatible0_1 = 유전받은 {0} 기술입니다. 유전받은 {1} 기술과 함께 존재할 수 없습니다. LMoveEggIncompatible = 교배기입니다. 이벤트 교배기와 함께 존재할 수 없습니다. LMoveEggIncompatibleEvent = 이벤트 교배기입니다. 일반 교배기와 함께 존재할 수 없습니다. diff --git a/PKHeX.Core/Resources/text/zh/LegalityCheckStrings_zh.txt b/PKHeX.Core/Resources/text/zh/LegalityCheckStrings_zh.txt index 428cce55e..f197f75f3 100644 --- a/PKHeX.Core/Resources/text/zh/LegalityCheckStrings_zh.txt +++ b/PKHeX.Core/Resources/text/zh/LegalityCheckStrings_zh.txt @@ -237,8 +237,10 @@ LMemoryMissingHT = 回忆: 缺失持有人回忆。 LMemoryMissingOT = 回忆: 缺失初训家回忆。 LMemoryStatAffectionHT0 = 未交换: 持有人的友好度应为0。 LMemoryStatAffectionOT0 = 初训家友好度应为0。 +LMemoryStatEnjoyment = Enjoyment should be {0}. LMemoryStatFriendshipHT0 = 未交换: 持有人的亲密度应为0。 LMemoryStatFriendshipOTBaseEvent = 配信的初训家亲密度与初始亲密度不一致。 +LMemoryStatFullness = Fullness should be {0}. LMoveEggFIncompatible0_1 = {0}的遗传招式。与遗传的招式{1}不共存。 LMoveEggIncompatible = 遗传招式。与配信蛋招式冲突。 LMoveEggIncompatibleEvent = 配信蛋招式。与遗传招式冲突。