Indicate invalid PP(ups) count on localize

Viewing the invalid mon will have the UI fix it, so at least it gives some clarity as to what is actually being flagged.
VC->Bank is the big offender here.
This commit is contained in:
Kurt 2026-02-05 04:43:22 -06:00
parent c5b7eb4c7d
commit 3ef46268e9
15 changed files with 69 additions and 58 deletions

View File

@ -291,9 +291,9 @@ public sealed class LegalityCheckLocalization
public string MoveEvoFCombination_0 { get; set; } = "Moves combinations is not compatible with {0} evolution.";
public string MoveFExpectSingle_0 { get; set; } = "Expected: {0}";
public string MoveKeldeoMismatch { get; set; } = "Keldeo Move/Form mismatch.";
public string MovePPExpectHealed_0 { get; set; } = "Move {0} PP is below the amount expected.";
public string MovePPTooHigh_0 { get; set; } = "Move {0} PP is above the amount allowed.";
public string MovePPUpsTooHigh_0 { get; set; } = "Move {0} PP Ups is above the amount allowed.";
public string MovePPExpectHealed_01 { get; set; } = "Move {0} PP is below the amount expected ({1}).";
public string MovePPTooHigh_01 { get; set; } = "Move {0} PP is above the amount allowed ({1}).";
public string MovePPUpsTooHigh_01 { get; set; } = "Move {0} PP Ups is above the amount allowed ({1}).";
public string MoveShopAlphaMoveShouldBeMastered_0 { get; set; } = "Alpha Move should be marked as mastered.";
public string MoveShopAlphaMoveShouldBeOther { get; set; } = "Alpha encounter cannot be found with this Alpha Move.";

View File

@ -10,7 +10,8 @@ public static class LegalityCheckResultCodeExtensions
{
extension(LegalityCheckResultCode code)
{
public bool IsArgument => code is < FirstWithMove and >= FirstWithArgument;
public bool IsArgument => code is < FirstWithTwoArguments and >= FirstWithArgument;
public bool IsArgument2 => code is < FirstWithMove and >= FirstWithTwoArguments;
public bool IsMove => code is < FirstWithItem and >= FirstWithMove;
public bool IsItem => code is < FirstWithLanguage and >= FirstWithItem;
public bool IsLanguage => code is < FirstWithMemory and >= FirstWithLanguage;
@ -176,9 +177,9 @@ public static class LegalityCheckResultCodeExtensions
// Moves
MoveEvoFCombination_0 => localization.MoveEvoFCombination_0,
MovePPExpectHealed_0 => localization.MovePPExpectHealed_0,
MovePPTooHigh_0 => localization.MovePPTooHigh_0,
MovePPUpsTooHigh_0 => localization.MovePPUpsTooHigh_0,
MovePPExpectHealed_01 => localization.MovePPExpectHealed_01,
MovePPTooHigh_01 => localization.MovePPTooHigh_01,
MovePPUpsTooHigh_01 => localization.MovePPUpsTooHigh_01,
MoveShopMasterInvalid_0 => localization.MoveShopMasterInvalid_0,
MoveShopMasterNotLearned_0 => localization.MoveShopMasterNotLearned_0,
MoveShopPurchaseInvalid_0 => localization.MoveShopPurchaseInvalid_0,

View File

@ -84,6 +84,8 @@ private string GetInternalString(CheckResult chk)
return template;
if (code.IsArgument)
return string.Format(template, chk.Argument);
if (code.IsArgument2)
return string.Format(template, chk.Argument, chk.Argument2);
if (code.IsMove)
return string.Format(template, GetMoveName(chk.Argument));
if (code.IsItem)

View File

@ -404,15 +404,18 @@ public enum LegalityCheckResultCode : ushort
WordFilterTooManyNumbers_0, // count
PokerusDaysLEQ_0, // days
PokerusStrainUnobtainable_0, // strain
MovePPExpectHealed_0, // move slot
MovePPTooHigh_0, // move slot
MovePPUpsTooHigh_0, // move slot
MemoryHTGender_0, // gender value
G6SuperTrainBagInvalid_0,
StatIncorrectHeightValue_0,
StatIncorrectWeightValue_0,
StatIncorrectScaleValue_0,
// Two Numbers
FirstWithTwoArguments,
MovePPTooHigh_01 = FirstWithTwoArguments, // move slot, value
MovePPUpsTooHigh_01, // move slot, value
MovePPExpectHealed_01, // move slot, value
// Single Argument: Move ID
FirstWithMove,
MoveTechRecordFlagMissing_0 = FirstWithMove, // move ID

View File

@ -51,27 +51,32 @@ private void VerifyEntity(LegalityAnalysis data)
{
for (int i = 0; i < ups.Length; i++)
{
if (ups[i] != 0)
data.AddLine(GetInvalid(MovePPUpsTooHigh_0, (ushort)(i + 1)));
var value = ups[i];
if (value != 0)
data.AddLine(GetInvalid(MovePPUpsTooHigh_01, (ushort)(i + 1), (ushort)value));
}
}
else // Check specific move indexes
{
for (int i = 0; i < ups.Length; i++)
{
if (!Legal.IsPPUpAvailable(moves[i]) && ups[i] != 0)
data.AddLine(GetInvalid(MovePPUpsTooHigh_0, (ushort)(i + 1)));
var value = ups[i];
if (!Legal.IsPPUpAvailable(moves[i]) && value != 0)
data.AddLine(GetInvalid(MovePPUpsTooHigh_01, (ushort)(i + 1), (ushort)value));
}
}
var expectHeal = Legal.IsPPUnused(pk) || IsPPHealed(data, pk);
for (int i = 0; i < pp.Length; i++)
{
// Sometimes the PP count will exceed (such as VC=>Bank); just flag it as invalid so the user knows they need to heal them.
// Technically that case is legal (game bug) only if they never move it from the box, but we want to inform the user.
var expect = pk.GetMovePP(moves[i], ups[i]);
if (pp[i] > expect)
data.AddLine(GetInvalid(MovePPTooHigh_0, (ushort)(i + 1)));
else if (expectHeal && pp[i] != expect)
data.AddLine(GetInvalid(MovePPExpectHealed_0, (ushort)(i + 1)));
var value = pp[i];
if (value > expect)
data.AddLine(GetInvalid(MovePPTooHigh_01, (ushort)(i + 1), (ushort)value));
else if (expectHeal && value != expect)
data.AddLine(GetInvalid(MovePPExpectHealed_01, (ushort)(i + 1), (ushort)value));
}
}

View File

@ -225,9 +225,9 @@
"MoveEvoFCombination_0": "Moves combinations is not compatible with {0} evolution.",
"MoveFExpectSingle_0": "Expected: {0}",
"MoveKeldeoMismatch": "Keldeo Move/Form mismatch.",
"MovePPExpectHealed_0": "Move {0} PP is below the amount expected.",
"MovePPTooHigh_0": "Move {0} PP is above the amount allowed.",
"MovePPUpsTooHigh_0": "Move {0} PP Ups is above the amount allowed.",
"MovePPExpectHealed_01": "Move {0} PP is below the amount expected ({1}).",
"MovePPTooHigh_01": "Move {0} PP is above the amount allowed ({1}).",
"MovePPUpsTooHigh_01": "Move {0} PP Ups is above the amount allowed ({1}).",
"MoveShopAlphaMoveShouldBeMastered_0": "Alpha Move should be marked as mastered.",
"MoveShopAlphaMoveShouldBeOther": "Alpha encounter cannot be found with this Alpha Move.",
"MoveShopAlphaMoveShouldBeZero": "Only Alphas may have an Alpha Move set.",
@ -372,4 +372,4 @@
"BulkHeldItemInventoryNotAcquired_0": "{0} has not been acquired in player inventory.",
"BulkHeldItemInventoryUnassigned_0": "{0} is not marked as assigned in player inventory.",
"BulkFusionSourceInvalid": "The subsumed Species-Form stored in the save file does not match the expected Species-Form of the fused slot."
}
}

View File

@ -225,9 +225,9 @@
"MoveEvoFCombination_0": "Moves combinations is not compatible with {0} evolution.",
"MoveFExpectSingle_0": "Expected: {0}",
"MoveKeldeoMismatch": "Keldeo Move/Form mismatch.",
"MovePPExpectHealed_0": "Move {0} PP is below the amount expected.",
"MovePPTooHigh_0": "Move {0} PP is above the amount allowed.",
"MovePPUpsTooHigh_0": "Move {0} PP Ups is above the amount allowed.",
"MovePPExpectHealed_01": "Move {0} PP is below the amount expected ({1}).",
"MovePPTooHigh_01": "Move {0} PP is above the amount allowed ({1}).",
"MovePPUpsTooHigh_01": "Move {0} PP Ups is above the amount allowed ({1}).",
"MoveShopAlphaMoveShouldBeMastered_0": "Alpha Move should be marked as mastered.",
"MoveShopAlphaMoveShouldBeOther": "Alpha encounter cannot be found with this Alpha Move.",
"MoveShopAlphaMoveShouldBeZero": "Only Alphas may have an Alpha Move set.",
@ -372,4 +372,4 @@
"BulkHeldItemInventoryNotAcquired_0": "{0} has not been acquired in player inventory.",
"BulkHeldItemInventoryUnassigned_0": "{0} is not marked as assigned in player inventory.",
"BulkFusionSourceInvalid": "The subsumed Species-Form stored in the save file does not match the expected Species-Form of the fused slot."
}
}

View File

@ -225,9 +225,9 @@
"MoveEvoFCombination_0": "Combinaciones de Movimientos no son compatibles con Movimientos de la evolución de {0}.",
"MoveFExpectSingle_0": "Esperado: {0}",
"MoveKeldeoMismatch": "Movimiento/Forma de Keldeo incorrecta.",
"MovePPExpectHealed_0": "Move {0} PP is below the amount expected.",
"MovePPTooHigh_0": "Los PP del movimiento {0} están por encima de los permitidos. ",
"MovePPUpsTooHigh_0": "Move {0} PP Ups is above the amount allowed.",
"MovePPExpectHealed_01": "Move {0} PP is below the amount expected ({1}).",
"MovePPTooHigh_01": "Los PP del movimiento {0} están por encima de los permitidos ({1}).",
"MovePPUpsTooHigh_01": "Move {0} PP Ups is above the amount allowed ({1}).",
"MoveShopAlphaMoveShouldBeMastered_0": "El movimiento del alfa deberia estar marcado como dominado.",
"MoveShopAlphaMoveShouldBeOther": "El encuentro del alfa no es posible con este movimiento.",
"MoveShopAlphaMoveShouldBeZero": "Solo los Pokémon alfa pueden tener un movimiento de alfa.",
@ -372,4 +372,4 @@
"BulkHeldItemInventoryNotAcquired_0": "{0} has not been acquired in player inventory.",
"BulkHeldItemInventoryUnassigned_0": "{0} is not marked as assigned in player inventory.",
"BulkFusionSourceInvalid": "The subsumed Species-Form stored in the save file does not match the expected Species-Form of the fused slot."
}
}

View File

@ -225,9 +225,9 @@
"MoveEvoFCombination_0": "Combinaciones de Movimientos no son compatibles con Movimientos de la evolución de {0}.",
"MoveFExpectSingle_0": "Esperado: {0}",
"MoveKeldeoMismatch": "Movimiento/Forma de Keldeo incorrecta.",
"MovePPExpectHealed_0": "Move {0} PP is below the amount expected.",
"MovePPTooHigh_0": "Los PP del movimiento {0} están por encima de los permitidos. ",
"MovePPUpsTooHigh_0": "Move {0} PP Ups is above the amount allowed.",
"MovePPExpectHealed_01": "Move {0} PP is below the amount expected ({1}).",
"MovePPTooHigh_01": "Los PP del movimiento {0} están por encima de los permitidos ({1}).",
"MovePPUpsTooHigh_01": "Move {0} PP Ups is above the amount allowed ({1}).",
"MoveShopAlphaMoveShouldBeMastered_0": "El movimiento del alfa deberia estar marcado como dominado.",
"MoveShopAlphaMoveShouldBeOther": "El encuentro del alfa no es posible con este movimiento.",
"MoveShopAlphaMoveShouldBeZero": "Solo los Pokémon alfa pueden tener un movimiento de alfa.",
@ -372,4 +372,4 @@
"BulkHeldItemInventoryNotAcquired_0": "{0} has not been acquired in player inventory.",
"BulkHeldItemInventoryUnassigned_0": "{0} is not marked as assigned in player inventory.",
"BulkFusionSourceInvalid": "The subsumed Species-Form stored in the save file does not match the expected Species-Form of the fused slot."
}
}

View File

@ -225,9 +225,9 @@
"MoveEvoFCombination_0": "Le moveset est incompatible avec l'évolution de {0}.",
"MoveFExpectSingle_0": "Attendu : {0}",
"MoveKeldeoMismatch": "Combinaison forme/capacité invalide chez Keldeo.",
"MovePPExpectHealed_0": "Les PP de la capacité {0} sont inférieures à la quantité attendue.",
"MovePPTooHigh_0": "Les PP de la capacité {0} sont supérieures à la quantité attendue.",
"MovePPUpsTooHigh_0": "La quantité de PP Plus pour la capacité {0} est supérieure à la quantité attendue.",
"MovePPExpectHealed_01": "Les PP de la capacité {0} sont inférieures à la quantité attendue ({1}).",
"MovePPTooHigh_01": "Les PP de la capacité {0} sont supérieures à la quantité attendue ({1}).",
"MovePPUpsTooHigh_01": "La quantité de PP Plus pour la capacité {0} est supérieure à la quantité attendue ({1}).",
"MoveShopAlphaMoveShouldBeMastered_0": "La capacité de Baron devrait être marquée comme maîtrisée.",
"MoveShopAlphaMoveShouldBeOther": "La rencontre avec le Baron ne peut être trouvée avec cette capacité de Baron.",
"MoveShopAlphaMoveShouldBeZero": "Seuls les Barons peuvent avoir un ensemble de capacités de Baron.",
@ -372,4 +372,4 @@
"BulkHeldItemInventoryNotAcquired_0": "{0} has not been acquired in player inventory.",
"BulkHeldItemInventoryUnassigned_0": "{0} is not marked as assigned in player inventory.",
"BulkFusionSourceInvalid": "The subsumed Species-Form stored in the save file does not match the expected Species-Form of the fused slot."
}
}

View File

@ -225,9 +225,9 @@
"MoveEvoFCombination_0": "la combinazione di mosse non è compatibile con l'evoluzione di {0}.",
"MoveFExpectSingle_0": "Expected: {0}",
"MoveKeldeoMismatch": "Mossa/Forma di Keldeo non corrispondente.",
"MovePPExpectHealed_0": "Move {0} PP is below the amount expected.",
"MovePPTooHigh_0": "I PP della mossa {0} sono oltre il massimo consentito.",
"MovePPUpsTooHigh_0": "I PP Up della mossa {0} sono oltre il massimo consentito.",
"MovePPExpectHealed_01": "Move {0} PP is below the amount expected ({1}).",
"MovePPTooHigh_01": "I PP della mossa {0} sono oltre il massimo consentito ({1}).",
"MovePPUpsTooHigh_01": "I PP Up della mossa {0} sono oltre il massimo consentito ({1}).",
"MoveShopAlphaMoveShouldBeMastered_0": "La Mossa Alfa dovrebbe essere registrata come masterata.",
"MoveShopAlphaMoveShouldBeOther": "L'incontro Alfa non può essere trovato con questa mossa Alfa.",
"MoveShopAlphaMoveShouldBeZero": "Solo gli Alfa possono avere una mossa Alfa.",
@ -372,4 +372,4 @@
"BulkHeldItemInventoryNotAcquired_0": "{0} has not been acquired in player inventory.",
"BulkHeldItemInventoryUnassigned_0": "{0} is not marked as assigned in player inventory.",
"BulkFusionSourceInvalid": "The subsumed Species-Form stored in the save file does not match the expected Species-Form of the fused slot."
}
}

View File

@ -225,9 +225,9 @@
"MoveEvoFCombination_0": "技の組み合わせは {0} 進化と両立できません。",
"MoveFExpectSingle_0": "予想: {0}",
"MoveKeldeoMismatch": "ケルディオの技/フォルムが一致しません。",
"MovePPExpectHealed_0": "Move {0} PP is below the amount expected.",
"MovePPTooHigh_0": "技 {0} のPPが上限を超えています。",
"MovePPUpsTooHigh_0": "技 {0} のポイントアップ上限を超えています。",
"MovePPExpectHealed_01": "Move {0} PP is below the amount expected ({1}).",
"MovePPTooHigh_01": "技 {0} のPPが上限を超えています ({1})。",
"MovePPUpsTooHigh_01": "技 {0} のポイントアップ上限を超えています ({1})。",
"MoveShopAlphaMoveShouldBeMastered_0": "オヤブン技は皆伝マークがなければなりません。",
"MoveShopAlphaMoveShouldBeOther": "このオヤブン技では、オヤブンのエンカウントを調べることができません。",
"MoveShopAlphaMoveShouldBeZero": "オヤブンのみがオヤブン技を持つことが出来ます。",
@ -372,4 +372,4 @@
"BulkHeldItemInventoryNotAcquired_0": "{0} has not been acquired in player inventory.",
"BulkHeldItemInventoryUnassigned_0": "{0} is not marked as assigned in player inventory.",
"BulkFusionSourceInvalid": "The subsumed Species-Form stored in the save file does not match the expected Species-Form of the fused slot."
}
}

View File

@ -225,9 +225,9 @@
"MoveEvoFCombination_0": "기술 조합이 {0} 진화와 호환되지 않습니다.",
"MoveFExpectSingle_0": "Expected: {0}",
"MoveKeldeoMismatch": "케르디오의 기술과 폼이 일치하지 않습니다.",
"MovePPExpectHealed_0": "Move {0} PP is below the amount expected.",
"MovePPTooHigh_0": "기술 {0}의 PP가 허용된 값보다 많습니다.",
"MovePPUpsTooHigh_0": "Move {0} PP Ups is above the amount allowed.",
"MovePPExpectHealed_01": "Move {0} PP is below the amount expected ({1}).",
"MovePPTooHigh_01": "기술 {0}의 PP가 허용된 값보다 많습니다 ({1}).",
"MovePPUpsTooHigh_01": "Move {0} PP Ups is above the amount allowed ({1}).",
"MoveShopAlphaMoveShouldBeMastered_0": "Alpha Move should be marked as mastered.",
"MoveShopAlphaMoveShouldBeOther": "Alpha encounter cannot be found with this Alpha Move.",
"MoveShopAlphaMoveShouldBeZero": "Only Alphas may have an Alpha Move set.",
@ -372,4 +372,4 @@
"BulkHeldItemInventoryNotAcquired_0": "{0} has not been acquired in player inventory.",
"BulkHeldItemInventoryUnassigned_0": "{0} is not marked as assigned in player inventory.",
"BulkFusionSourceInvalid": "The subsumed Species-Form stored in the save file does not match the expected Species-Form of the fused slot."
}
}

View File

@ -225,9 +225,9 @@
"MoveEvoFCombination_0": "招式组合与{0}进化型不兼容。",
"MoveFExpectSingle_0": "预期: {0}",
"MoveKeldeoMismatch": "凯路迪欧的招式与形态不匹配。",
"MovePPExpectHealed_0": "招式 {0} 的PP恢复量未达预期值",
"MovePPTooHigh_0": "招式 {0} PP高于允许值。",
"MovePPUpsTooHigh_0": "招式 {0} PP上升高于允许值。",
"MovePPExpectHealed_01": "招式 {0} 的PP恢复量未达预期值 ({1})。",
"MovePPTooHigh_01": "招式 {0} PP高于允许值 ({1})。",
"MovePPUpsTooHigh_01": "招式 {0} PP上升高于允许值 ({1})。",
"MoveShopAlphaMoveShouldBeMastered_0": "头目招式应标记为精通。",
"MoveShopAlphaMoveShouldBeOther": "头目相遇方式与此头目招式不匹配。",
"MoveShopAlphaMoveShouldBeZero": "只有头目才可能拥有头目招式池。",
@ -372,4 +372,4 @@
"BulkHeldItemInventoryNotAcquired_0": "{0} has not been acquired in player inventory.",
"BulkHeldItemInventoryUnassigned_0": "{0} is not marked as assigned in player inventory.",
"BulkFusionSourceInvalid": "存档中记录的被消耗“种族-形态”与该融合槽位应有的“种族-形态”不一致。"
}
}

View File

@ -225,9 +225,9 @@
"MoveEvoFCombination_0": "招式組合與{0}進化型不相容。",
"MoveFExpectSingle_0": "應該是該招式: {0}。",
"MoveKeldeoMismatch": "凱路迪歐之現時招式與當前形態不匹配。",
"MovePPExpectHealed_0": "Move {0} PP is below the amount expected.",
"MovePPTooHigh_0": "招式 {0} PP 高於允許值。",
"MovePPUpsTooHigh_0": "招式 {0} PP 高於允許值。",
"MovePPExpectHealed_01": "Move {0} PP is below the amount expected. ({1})",
"MovePPTooHigh_01": "招式 {0} PP 高於允許值。 ({1})",
"MovePPUpsTooHigh_01": "招式 {0} PP 高於允許值。 ({1})",
"MoveShopAlphaMoveShouldBeMastered_0": "頭目技能應標記爲精通。",
"MoveShopAlphaMoveShouldBeOther": "此頭目遇見方式未能與該頭目招式匹配。",
"MoveShopAlphaMoveShouldBeZero": "僅頭目可擁有頭目招式池。",
@ -372,4 +372,4 @@
"BulkHeldItemInventoryNotAcquired_0": "{0} has not been acquired in player inventory.",
"BulkHeldItemInventoryUnassigned_0": "{0} is not marked as assigned in player inventory.",
"BulkFusionSourceInvalid": "The subsumed Species-Form stored in the save file does not match the expected Species-Form of the fused slot."
}
}