Legality: add date sanity check, shinyleaf/mood

date: If location specified, ensure valid date; if no location, ensure zeroed.
shinyleaf: check bad bits, check crown has all leafs.
mood: rename from pokeathlon, now sbyte. All values possible, only flag outside of party in HG/SS.

Revise HGSS slot setter to wipe mood to match game behavior (and thus not retain mood to be flagged by the legality check).
There's currently no editor for it, but maybe I can add it in a future commit.
This commit is contained in:
Kurt
2025-08-08 00:19:33 -05:00
parent 101aa17a8d
commit fd3af56ec4
28 changed files with 176 additions and 73 deletions

View File

@@ -75,8 +75,10 @@ public sealed class LegalityCheckLocalization
public string ContestSheenGEQ_0 { get; set; } = "Contest Stat Sheen should be >= {0}.";
public string ContestSheenLEQ_0 { get; set; } = "Contest Stat Sheen should be <= {0}.";
public string DateOutsideConsoleWindow { get; set; } = "Local Date is outside of console's local time window.";
public string DateTimeClockInvalid { get; set; } = "Local Time is not a valid timestamp.";
public string DateCalendarInvalidMet { get; set; } = "Met Date is not a valid calendar date.";
public string DateCalendarInvalidEgg { get; set; } = "Egg Met Date is not a valid calendar date.";
public string DateLocalInvalidDate { get; set; } = "Local Date is outside of console's local time window.";
public string DateLocalInvalidTime { get; set; } = "Local Time is not a valid timestamp.";
public string DateOutsideDistributionWindow { get; set; } = "Met Date is outside of distribution window.";
public string EggContest { get; set; } = "Cannot increase Contest Stats of an Egg.";
@@ -91,11 +93,9 @@ public sealed class LegalityCheckLocalization
public string EggLocationTradeFail { get; set; } = "Invalid Egg Location, shouldn't be 'traded' while an Egg.";
public string EggMetLocationFail { get; set; } = "Can't obtain Egg from Egg Location.";
public string EggNature { get; set; } = "Eggs cannot have their Stat Nature changed.";
public string EggPokeathlon { get; set; } = "Eggs cannot have Pokéathlon stats.";
public string EggPP { get; set; } = "Eggs cannot have modified move PP counts.";
public string EggPPUp { get; set; } = "Cannot apply PP Ups to an Egg.";
public string EggRelearnFlags { get; set; } = "Expected no Relearn Move Flags.";
public string EggShinyLeaf { get; set; } = "Eggs cannot have Shiny Leaf/Crown.";
public string EggShinyPokeStar { get; set; } = "Eggs cannot be a Pokéstar Studios star.";
public string EggSpecies { get; set; } = "Can't obtain Egg for this species.";
public string EggUnhatched { get; set; } = "Valid un-hatched Egg.";
@@ -202,6 +202,10 @@ public sealed class LegalityCheckLocalization
public string G3EReader { get; set; } = "Non Japanese Shadow E-reader Pokémon. Unreleased encounter.";
public string G3OTGender { get; set; } = "OT from Colosseum/XD cannot be female.";
public string G4InvalidTileR45Surf { get; set; } = "Johto Route 45 surfing encounter. Unreachable Water tiles.";
public string G4PartnerMoodEgg { get; set; } = "Eggs cannot have an Mood stat value.";
public string G4PartnerMoodZero { get; set; } = "Mood stat value should be zero when not in the player's party.";
public string G4ShinyLeafBitsInvalid { get; set; } = "Shiny Leaf/Crown bits are not valid.";
public string G4ShinyLeafBitsEgg { get; set; } = "Eggs cannot have Shiny Leaf/Crown.";
public string G5IVAll30 { get; set; } = "All IVs of N's Pokémon should be 30.";
public string G5PIDShinyGrotto { get; set; } = "Hidden Grotto captures cannot be shiny.";
public string G5SparkleInvalid { get; set; } = "Special In-game N's Sparkle flag should not be checked.";

View File

@@ -59,8 +59,10 @@ public static class LegalityCheckResultCodeExtensions
ContestSheenLEQ_0 => localization.ContestSheenLEQ_0,
// Date & Timestamps
DateOutsideConsoleWindow => localization.DateOutsideConsoleWindow,
DateTimeClockInvalid => localization.DateTimeClockInvalid,
DateCalendarInvalidMet => localization.DateCalendarInvalidMet,
DateCalendarInvalidEgg => localization.DateCalendarInvalidEgg,
DateLocalInvalidDate => localization.DateLocalInvalidDate,
DateLocalInvalidTime => localization.DateLocalInvalidTime,
DateOutsideDistributionWindow => localization.DateOutsideDistributionWindow,
// Egg
@@ -76,11 +78,9 @@ public static class LegalityCheckResultCodeExtensions
EggLocationTradeFail => localization.EggLocationTradeFail,
EggMetLocationFail => localization.EggMetLocationFail,
EggNature => localization.EggNature,
EggPokeathlon => localization.EggPokeathlon,
EggPP => localization.EggPP,
EggPPUp => localization.EggPPUp,
EggRelearnFlags => localization.EggRelearnFlags,
EggShinyLeaf => localization.EggShinyLeaf,
EggShinyPokeStar => localization.EggShinyPokeStar,
EggSpecies => localization.EggSpecies,
EggUnhatched => localization.EggUnhatched,
@@ -232,6 +232,10 @@ public static class LegalityCheckResultCodeExtensions
G3EReader => localization.G3EReader,
G3OTGender => localization.G3OTGender,
G4InvalidTileR45Surf => localization.G4InvalidTileR45Surf,
G4PartnerMoodEgg => localization.G4PartnerMoodEgg,
G4PartnerMoodZero => localization.G4PartnerMoodZero,
G4ShinyLeafBitsEgg => localization.G4ShinyLeafBitsEgg,
G4ShinyLeafBitsInvalid => localization.G4ShinyLeafBitsInvalid,
G5IVAll30 => localization.G5IVAll30,
G5PIDShinyGrotto => localization.G5PIDShinyGrotto,
G5SparkleInvalid => localization.G5SparkleInvalid,

View File

@@ -51,8 +51,10 @@ public enum LegalityCheckResultCode : ushort
ContestZeroSheen,
// Date & Timestamps
DateOutsideConsoleWindow,
DateTimeClockInvalid,
DateCalendarInvalidMet,
DateCalendarInvalidEgg,
DateLocalInvalidDate,
DateLocalInvalidTime,
DateOutsideDistributionWindow,
// Egg
@@ -67,11 +69,9 @@ public enum LegalityCheckResultCode : ushort
EggLocationTradeFail,
EggMetLocationFail,
EggNature,
EggPokeathlon,
EggPP,
EggPPUp,
EggRelearnFlags,
EggShinyLeaf,
EggShinyPokeStar,
EggSpecies,
EggUnhatched,
@@ -180,6 +180,10 @@ public enum LegalityCheckResultCode : ushort
G3EReader,
G3OTGender,
G4InvalidTileR45Surf,
G4PartnerMoodEgg,
G4PartnerMoodZero,
G4ShinyLeafBitsEgg,
G4ShinyLeafBitsInvalid,
G5IVAll30,
G5PIDShinyGrotto,
G5SparkleInvalid,

View File

@@ -40,14 +40,6 @@ public override void Verify(LegalityAnalysis data)
case PK3 when pk.Language != 1:
data.AddLine(GetInvalid(Egg, OTLanguageShouldBe_0, (byte)LanguageID.Japanese));
break;
// Cannot obtain Shiny Leaf or Pokeathlon Stats as Egg
case PK4 pk4:
if (pk4.ShinyLeaf != 0)
data.AddLine(GetInvalid(Egg, EggShinyLeaf));
if (pk4.PokeathlonStat != 0)
data.AddLine(GetInvalid(Egg, EggPokeathlon));
break;
}
if (pk is IHomeTrack { HasTracker: true })
@@ -57,6 +49,7 @@ public override void Verify(LegalityAnalysis data)
switch (pk)
{
case SK2 sk2: VerifyIsMovesetAllowed(data, sk2); break;
case G4PKM pk4: VerifyMisc4(data, pk4); break;
case PK5 pk5: VerifyStats5(data, pk5); break;
case PK7 pk7: VerifyStats7(data, pk7); break;
case PB7 pb7: VerifyStats7b(data, pb7); break;
@@ -93,6 +86,61 @@ public override void Verify(LegalityAnalysis data)
VerifyMiscFatefulEncounter(data);
VerifyMiscPokerus(data);
VerifyMiscScaleValues(data, pk, enc);
VerifyDateValues(data, pk);
}
private void VerifyMisc4(LegalityAnalysis data, G4PKM pk)
{
// Mood:
// Range is [-127, 127]. Deduplicated unique adjustments are +8, +10, and -20.
// Increment adjustments of -2 (-20 +8 +10) and +2 (+8*4 +10 -20) are possible.
// Start from 0 or from clamped edge, with above adjustments, at least one mutation path can arrive at a given [-127, 127] value.
// There are probably other scripted increments, but the above is just to prove that all values are possible via specific actions.
// Eggs cannot have a value other than 0.
// HG/SS resets when promoting to lead of party, or removing from party. Therefore, any party slot can retain a non-zero value.
// Mood also resets for the lead Pokémon when booting the game, but it can be mutated immediately after (and saved/dumped).
// Note: Trading to D/P/Pt does not clear (thus unchanged on side games too), so this check is only relevant for HG/SS slots.
if (pk.PartnerMood != 0)
{
if (pk.IsEgg)
data.AddLine(GetInvalid(Egg, G4PartnerMoodEgg));
else if (data.SlotOrigin is not StorageSlotType.Party && ParseSettings.ActiveTrainer is SAV4HGSS)
data.AddLine(GetInvalid(Egg, G4PartnerMoodZero));
}
// Shiny leaf: cannot have crown (bit 5) without bits 0-4. Bits higher are invalid.
// Eggs cannot receive a Shiny Leaf.
var leaf = pk.ShinyLeaf;
if (leaf is > 0b_11111 and not 0b_1_11111 || (leaf is not 0 && pk.IsEgg))
data.AddLine(GetInvalid(G4ShinyLeafBitsInvalid));
}
private static void VerifyDateValues(LegalityAnalysis data, PKM pk)
{
if (pk.Format <= 3)
return; // Gen1-3 do not have date values.
var expect0 = pk is PB8 ? Locations.Default8bNone : 0;
if (pk.MetLocation != expect0)
{
if (pk.MetDate is null)
data.AddLine(GetInvalid(Memory, DateCalendarInvalidMet));
}
else
{
if (pk.MetMonth != 0 || pk.MetDay != 0 || pk.MetYear != 0)
data.AddLine(GetInvalid(Memory, DateCalendarInvalidMet));
}
if (pk.EggLocation != expect0)
{
if (pk.EggMetDate is null)
data.AddLine(GetInvalid(Memory, DateCalendarInvalidEgg));
}
else
{
if (pk.EggMonth != 0 || pk.EggDay != 0 || pk.EggYear != 0)
data.AddLine(GetInvalid(Memory, DateCalendarInvalidEgg));
}
}
private void VerifyCorrelation8b(LegalityAnalysis data, IStaticCorrelation8b s8b, PKM pk)
@@ -680,12 +728,12 @@ private static void VerifyStats7b(LegalityAnalysis data, PB7 pb7)
data.AddLine(GetInvalid(Encounter, StatIncorrectCP_0, (uint)calc));
if (pb7.ReceivedTime is null)
data.AddLine(GetInvalid(Misc, DateTimeClockInvalid));
data.AddLine(GetInvalid(Misc, DateLocalInvalidTime));
// HOME moving in and out will retain received date. ensure it matches if no HT data present.
// Go Park captures will have different dates, as the GO met date is retained as Met Date.
if (pb7.ReceivedDate is not { } date || !EncounterDate.IsValidDateSwitch(date) || (pb7.IsUntraded && data.EncounterOriginal is not EncounterSlot7GO && date != pb7.MetDate))
data.AddLine(GetInvalid(Misc, DateOutsideConsoleWindow));
data.AddLine(GetInvalid(Misc, DateLocalInvalidDate));
}
private static void VerifyAbsoluteSizes<T>(LegalityAnalysis data, T obj) where T : IScaledSizeValue

View File

@@ -281,7 +281,7 @@ public override ushort MetLocationDP
public override byte OriginalTrainerGender { get => (byte)(Data[0x84] & 1); set => Data[0x84] = (byte)((Data[0x84] & ~0x1) | (value & 1)); }
public override GroundTileType GroundTile { get => (GroundTileType)Data[0x85]; set => Data[0x85] = (byte)value; }
public override byte BallHGSS { get => Data[0x86]; set => Data[0x86] = value; }
public override byte PokeathlonStat { get => Data[0x87]; set => Data[0x87] = value; }
public override sbyte PartnerMood { get => (sbyte)Data[0x87]; set => Data[0x87] = (byte)value; }
#endregion
// Not stored

View File

@@ -269,7 +269,7 @@ public override ushort MetLocationDP
public override byte OriginalTrainerGender { get => (byte)(Data[0x84] >> 7); set => Data[0x84] = (byte)((Data[0x84] & ~0x80) | (value << 7)); }
public override GroundTileType GroundTile { get => (GroundTileType)Data[0x85]; set => Data[0x85] = (byte)value; }
public override byte BallHGSS { get => Data[0x86]; set => Data[0x86] = value; }
public override byte PokeathlonStat { get => Data[0x87]; set => Data[0x87] = value; }
public override sbyte PartnerMood { get => (sbyte)Data[0x87]; set => Data[0x87] = (byte)value; }
#endregion
#region Battle Stats

View File

@@ -268,7 +268,7 @@ public override ushort MetLocationDP
public override byte OriginalTrainerGender { get => (byte)(Data[0x84] >> 7); set => Data[0x84] = (byte)((Data[0x84] & ~0x80) | (value << 7)); }
public override GroundTileType GroundTile { get => (GroundTileType)Data[0x85]; set => Data[0x85] = (byte)value; }
public override byte BallHGSS { get => Data[0x86]; set => Data[0x86] = value; }
public override byte PokeathlonStat { get => Data[0x87]; set => Data[0x87] = value; }
public override sbyte PartnerMood { get => (sbyte)Data[0x87]; set => Data[0x87] = (byte)value; }
#endregion
#region Battle Stats

View File

@@ -166,7 +166,7 @@ public abstract class G4PKM : PKM, IHandlerUpdate,
public abstract GroundTileType GroundTile { get; set; }
public abstract byte BallDPPt { get; set; }
public abstract byte BallHGSS { get; set; }
public abstract byte PokeathlonStat { get; set; }
public abstract sbyte PartnerMood { get; set; } // HG/SS overworld interactions, Pokéathlon?
public int MarkingCount => 6;
public abstract byte MarkingValue { get; set; }
@@ -376,7 +376,7 @@ protected T ConvertTo<T>() where T : G4PKM, new()
BallDPPt = BallDPPt,
BallHGSS = BallHGSS,
GroundTile = GroundTile,
PokeathlonStat = PokeathlonStat,
PartnerMood = PartnerMood,
FatefulEncounter = FatefulEncounter,
MetLevel = MetLevel,

View File

@@ -35,8 +35,10 @@
"ContestZeroSheen": "Contest Stat Sheen should be 0.",
"ContestSheenGEQ_0": "Contest Stat Sheen should be >= {0}.",
"ContestSheenLEQ_0": "Contest Stat Sheen should be <= {0}.",
"DateOutsideConsoleWindow": "Local Date is outside of console's local time window.",
"DateTimeClockInvalid": "Local Time is not a valid timestamp.",
"DateCalendarInvalidMet": "Met Date is not a valid calendar date.",
"DateCalendarInvalidEgg": "Egg Met Date is not a valid calendar date.",
"DateLocalInvalidDate": "Local Date is outside of console's local time window.",
"DateLocalInvalidTime": "Local Time is not a valid timestamp.",
"DateOutsideDistributionWindow": "Met Date is outside of distribution window.",
"EggContest": "Cannot increase Contest Stats of an Egg.",
"EggEXP": "Eggs cannot receive experience.",
@@ -50,11 +52,9 @@
"EggLocationTradeFail": "Invalid Egg Location, shouldn't be 'traded' while an Egg.",
"EggMetLocationFail": "Can't obtain Egg from Egg Location.",
"EggNature": "Eggs cannot have their Stat Nature changed.",
"EggPokeathlon": "Eggs cannot have Pokéathlon stats.",
"EggPP": "Eggs cannot have modified PP counts.",
"EggPPUp": "Cannot apply PP Ups to an Egg.",
"EggRelearnFlags": "Expected no Relearn Move Flags.",
"EggShinyLeaf": "Eggs cannot have Shiny Leaf/Crown.",
"EggShinyPokeStar": "Eggs cannot be a Pokéstar Studios star.",
"EggSpecies": "Can't obtain Egg for this species.",
"EggUnhatched": "Valid un-hatched Egg.",
@@ -148,6 +148,10 @@
"G3EReader": "Non Japanese Shadow E-reader Pokémon. Unreleased encounter.",
"G3OTGender": "OT from Colosseum/XD cannot be female.",
"G4InvalidTileR45Surf": "Johto Route 45 surfing encounter. Unreachable Water tiles.",
"G4PartnerMoodEgg": "Eggs cannot have an Mood stat value.",
"G4PartnerMoodZero": "Mood stat value should be zero when not in the player's party.",
"G4ShinyLeafBitsInvalid": "Shiny Leaf/Crown bits are not valid.",
"G4ShinyLeafBitsEgg": "Eggs cannot have Shiny Leaf/Crown.",
"G5IVAll30": "All IVs of N's Pokémon should be 30.",
"G5PIDShinyGrotto": "Hidden Grotto captures cannot be shiny.",
"G5SparkleInvalid": "Special in-game N's Sparkle flag should not be checked.",

View File

@@ -35,8 +35,10 @@
"ContestZeroSheen": "Contest Stat Sheen should be 0.",
"ContestSheenGEQ_0": "Contest Stat Sheen should be >= {0}.",
"ContestSheenLEQ_0": "Contest Stat Sheen should be <= {0}.",
"DateOutsideConsoleWindow": "Local Date is outside of console's local time window.",
"DateTimeClockInvalid": "Local Time is not a valid timestamp.",
"DateCalendarInvalidMet": "Met Date is not a valid calendar date.",
"DateCalendarInvalidEgg": "Egg Met Date is not a valid calendar date.",
"DateLocalInvalidDate": "Local Date is outside of console's local time window.",
"DateLocalInvalidTime": "Local Time is not a valid timestamp.",
"DateOutsideDistributionWindow": "Met Date is outside of distribution window.",
"EggContest": "Cannot increase Contest Stats of an Egg.",
"EggEXP": "Eggs cannot receive experience.",
@@ -50,11 +52,9 @@
"EggLocationTradeFail": "Invalid Egg Location, shouldn't be 'traded' while an Egg.",
"EggMetLocationFail": "Can't obtain Egg from Egg Location.",
"EggNature": "Eggs cannot have their Stat Nature changed.",
"EggPokeathlon": "Eggs cannot have Pokéathlon stats.",
"EggPP": "Eggs cannot have modified move PP counts.",
"EggPPUp": "Cannot apply PP Ups to an Egg.",
"EggRelearnFlags": "Expected no Relearn Move Flags.",
"EggShinyLeaf": "Eggs cannot have Shiny Leaf/Crown.",
"EggShinyPokeStar": "Eggs cannot be a Pokéstar Studios star.",
"EggSpecies": "Can't obtain Egg for this species.",
"EggUnhatched": "Valid un-hatched Egg.",
@@ -148,6 +148,10 @@
"G3EReader": "Non Japanese Shadow E-reader Pokémon. Unreleased encounter.",
"G3OTGender": "OT from Colosseum/XD cannot be female.",
"G4InvalidTileR45Surf": "Johto Route 45 surfing encounter. Unreachable Water tiles.",
"G4PartnerMoodEgg": "Eggs cannot have an Mood stat value.",
"G4PartnerMoodZero": "Mood stat value should be zero when not in the player's party.",
"G4ShinyLeafBitsInvalid": "Shiny Leaf/Crown bits are not valid.",
"G4ShinyLeafBitsEgg": "Eggs cannot have Shiny Leaf/Crown.",
"G5IVAll30": "All IVs of N's Pokémon should be 30.",
"G5PIDShinyGrotto": "Hidden Grotto captures cannot be shiny.",
"G5SparkleInvalid": "Special in-game N's Sparkle flag should not be checked.",

View File

@@ -35,8 +35,10 @@
"ContestZeroSheen": " La estadística de concurso Brillo debería ser 0.",
"ContestSheenGEQ_0": "La estadística de concurso Brillo debería ser >= {0}.",
"ContestSheenLEQ_0": "La estadística de concurso Brillo debería ser <= {0}.",
"DateOutsideConsoleWindow": "Local Date is outside of console's local time window.",
"DateTimeClockInvalid": "Local Time is not a valid timestamp.",
"DateCalendarInvalidMet": "Met Date is not a valid calendar date.",
"DateCalendarInvalidEgg": "Egg Met Date is not a valid calendar date.",
"DateLocalInvalidDate": "Local Date is outside of console's local time window.",
"DateLocalInvalidTime": "Local Time is not a valid timestamp.",
"DateOutsideDistributionWindow": "La fecha de encuentro está fuera del rango de fechas de distribución.",
"EggContest": "No se pueden aumentar las estadísticas de Concurso de un Huevo.",
"EggEXP": "Los Huevos no pueden recibir experiencia.",
@@ -50,11 +52,9 @@
"EggLocationTradeFail": "Localización del Huevo inválida, no debería haber sido intercambiado mientras era un Huevo.",
"EggMetLocationFail": "No se puede obtener el Huevo en la localización.",
"EggNature": "Los Huevos no pueden tener Naturaleza estadística.",
"EggPokeathlon": "Los Huevos no pueden tener estadísticas del Pokéathlon.",
"EggPP": "Los Huevos no pueden tener los contadores de PP modificados.",
"EggPPUp": "No se puede aplicar Más PP a un huevo.",
"EggRelearnFlags": "Los Huevos no pueden tener Discos Técnicos marcados. ",
"EggShinyLeaf": "Los Huevos no pueden tener Hoja/Corona dorada.",
"EggShinyPokeStar": "Los Huevos no pueden ser una estrella de los Estudios Cinematográficos Pokéwoods.",
"EggSpecies": "Esta especie no puede tener Huevos.",
"EggUnhatched": "Huevo eclosionado inválido.",
@@ -148,6 +148,10 @@
"G3EReader": "Pokémon oscuro de E-Reader japonés. Encuentro no liberado.",
"G3OTGender": "EO de Colosseum/XD no puede ser femenino.",
"G4InvalidTileR45Surf": "Encuentro mediante Surf en la ruta 45 de Johto. Zonas de agua inalcanzables.",
"G4PartnerMoodEgg": "Eggs cannot have an Mood stat value.",
"G4PartnerMoodZero": "Mood stat value should be zero when not in the player's party.",
"G4ShinyLeafBitsInvalid": "Shiny Leaf/Crown bits are not valid.",
"G4ShinyLeafBitsEgg": "Los Huevos no pueden tener Hoja/Corona dorada.",
"G5IVAll30": "Todos los IVs de los Pokémon de N deberían ser 30.",
"G5PIDShinyGrotto": "Las Capturas en Los Claros Ocultos no pueden ser variocolor.",
"G5SparkleInvalid": "La marca chispeante especial de los Pokémon de N en el juego no debería marcarse.",

View File

@@ -35,8 +35,10 @@
"ContestZeroSheen": "Contest Stat Sheen should be 0.",
"ContestSheenGEQ_0": "Contest Stat Sheen should be >= {0}.",
"ContestSheenLEQ_0": "Contest Stat Sheen should be <= {0}.",
"DateOutsideConsoleWindow": "Local Date is outside of console's local time window.",
"DateTimeClockInvalid": "Local Time is not a valid timestamp.",
"DateCalendarInvalidMet": "Met Date is not a valid calendar date.",
"DateCalendarInvalidEgg": "Egg Met Date is not a valid calendar date.",
"DateLocalInvalidDate": "Local Date is outside of console's local time window.",
"DateLocalInvalidTime": "Local Time is not a valid timestamp.",
"DateOutsideDistributionWindow": "La date de rencontre est en dehors de la fenêtre de distribution.",
"EggContest": "Impossible d'augmenter les Stats de Concours à un Œuf.",
"EggEXP": "Les œufs ne peuvent pas recevoir d'expérience.",
@@ -50,11 +52,9 @@
"EggLocationTradeFail": "Lieu d'obtention d'Œuf invalide, impossible de faire un échange sous cette forme.",
"EggMetLocationFail": "L'œuf ne peut pas être obtenu au lieu de rencontre.",
"EggNature": "Les œufs ne peuvent pas avoir de nature statistique.",
"EggPokeathlon": "Les Œufs ne peuvent pas avoir de statistiques Pokéathlon.",
"EggPP": "Impossible de modifier les PP d'un Œuf.",
"EggPPUp": "Impossible d'appliquer des PP Plus à un Œuf.",
"EggRelearnFlags": "Les œufs ne peuvent pas avoir de disques techniques marqués.",
"EggShinyLeaf": "Les Œufs ne peuvent pas avoir de feuille / couronne d'or.",
"EggShinyPokeStar": "Les œufs ne peuvent pas être une star de Pokéwood.",
"EggSpecies": "Cette espèce ne peut pas se reproduire.",
"EggUnhatched": "Œuf non-éclos valide.",
@@ -148,6 +148,10 @@
"G3EReader": "Pokémon Shadow E-reader non japonais. Rencontre non officialisé.",
"G3OTGender": "Le DO de Pokémon Colosseum / XD ne peut pas être une fille.",
"G4InvalidTileR45Surf": "Rencontre à la Route 45 de Johto en Surfant. Cases d'eau inatteignables.",
"G4PartnerMoodEgg": "Eggs cannot have an Mood stat value.",
"G4PartnerMoodZero": "Mood stat value should be zero when not in the player's party.",
"G4ShinyLeafBitsInvalid": "Shiny Leaf/Crown bits are not valid.",
"G4ShinyLeafBitsEgg": "Les Œufs ne peuvent pas avoir de feuille / couronne d'or.",
"G5IVAll30": "Tous les IVs des Pokémon de N doivent être 30.",
"G5PIDShinyGrotto": "Les Pokémon capturés dans les Trouées cachées ne peuvent pas être chromatiques.",
"G5SparkleInvalid": "Le flag de l'éclat spécial des Pokémon de N ne doit pas être coché.",

View File

@@ -35,8 +35,10 @@
"ContestZeroSheen": "Il Lustro dovrebbe essere 0.",
"ContestSheenGEQ_0": "Il Lustro dovrebbe essere >= {0}.",
"ContestSheenLEQ_0": "Il Lustro dovrebbe essere <= {0}.",
"DateOutsideConsoleWindow": "Local Date is outside of console's local time window.",
"DateTimeClockInvalid": "Local Time is not a valid timestamp.",
"DateCalendarInvalidMet": "Met Date is not a valid calendar date.",
"DateCalendarInvalidEgg": "Egg Met Date is not a valid calendar date.",
"DateLocalInvalidDate": "Local Date is outside of console's local time window.",
"DateLocalInvalidTime": "Local Time is not a valid timestamp.",
"DateOutsideDistributionWindow": "La data di incontro è al di fuori del periodo di Distribuzione.",
"EggContest": "Le statistiche delle gare non possono crescere per un Uovo.",
"EggEXP": "Le Uova non possono ricevere esperienza.",
@@ -50,11 +52,9 @@
"EggLocationTradeFail": "Il luogo di incontro non dovrebbe essere 'Scambio', se è un Uovo.",
"EggMetLocationFail": "Impossibile ottenre l'Uovo nel Luogo dell'Uovo.",
"EggNature": "Le Uova non possono avere la Natura delle Statistiche cambiata.",
"EggPokeathlon": "Le Uova non possono avere statistiche Pokéathlon.",
"EggPP": "Le Uova non possono avere modifiche ai PP.",
"EggPPUp": "Non si possono applicare PP Up alle Uova.",
"EggRelearnFlags": "Non sono previsti segnali di Mosse Ricordabili.",
"EggShinyLeaf": "Le Uova non possono avere Foglielucenti o la Corona di Foglie.",
"EggShinyPokeStar": "Le Uova non possono essere Star del Pokéwood.",
"EggSpecies": "Impossibile ottenere Uova di questa specie.",
"EggUnhatched": "Uovo non schiuso valido.",
@@ -148,6 +148,10 @@
"G3EReader": "Incontro Ombra E-Reader non Giapponese. Evento non rilasciato.",
"G3OTGender": "AO di Colosseum/XD non possono essere femmina.",
"G4InvalidTileR45Surf": "Incontro da surf nel Percorso 45 di Johto, la casella d'acqua è irraggiungibile.",
"G4PartnerMoodEgg": "Eggs cannot have an Mood stat value.",
"G4PartnerMoodZero": "Mood stat value should be zero when not in the player's party.",
"G4ShinyLeafBitsInvalid": "Shiny Leaf/Crown bits are not valid.",
"G4ShinyLeafBitsEgg": "Le Uova non possono avere Foglielucenti o la Corona di Foglie.",
"G5IVAll30": "Tutti gli IV dei Pokémon di N dovrebbero essere 30.",
"G5PIDShinyGrotto": "Gli incontri del Meandro Nascosto non possono essere Shiny.",
"G5SparkleInvalid": "Il segnale speciale di luccichio dei Pokémon di N non dovrebbe essere ablitato.",

View File

@@ -35,8 +35,10 @@
"ContestZeroSheen": "けづやは0でなければなりません。",
"ContestSheenGEQ_0": "けづやは >= {0} でなければなりません。",
"ContestSheenLEQ_0": "けづやは <= {0} でなければなりません。",
"DateOutsideConsoleWindow": "Local Date is outside of console's local time window.",
"DateTimeClockInvalid": "Local Time is not a valid timestamp.",
"DateCalendarInvalidMet": "Met Date is not a valid calendar date.",
"DateCalendarInvalidEgg": "Egg Met Date is not a valid calendar date.",
"DateLocalInvalidDate": "Local Date is outside of console's local time window.",
"DateLocalInvalidTime": "Local Time is not a valid timestamp.",
"DateOutsideDistributionWindow": "出会った日が配布期間外です。",
"EggContest": "タマゴはコンディションを上げることはできません。",
"EggEXP": "タマゴは経験値を得ることはできません。",
@@ -50,11 +52,9 @@
"EggLocationTradeFail": "もらった場所が無効です。タマゴの状態で交換してはいけません。",
"EggMetLocationFail": "そのもらった場所では、タマゴを入手できません。",
"EggNature": "タマゴはミントで性格変更できません。",
"EggPokeathlon": "タマゴはポケスロンのステータスを変更できません。",
"EggPP": "タマゴは技のPPを変更することはできません。",
"EggPPUp": "タマゴにポイントアップは使用できません",
"EggRelearnFlags": "技を思い出すフラグがないと思われます。",
"EggShinyLeaf": "タマゴに『かがやくはっぱ/冠』を設定することはできません。",
"EggShinyPokeStar": "タマゴにポケウッドのスターを付与することはできません。",
"EggSpecies": "このポケモンのタマゴは入手できません。",
"EggUnhatched": "孵化していない正規のタマゴ。",
@@ -148,6 +148,10 @@
"G3EReader": "日本以外でカードeリーダーを使ったダークポケモン。未実装のエンカウント。",
"G3OTGender": "「ポケモンコロシアム」「ポケモンXD」では女性トレーナーは選択できません",
"G4InvalidTileR45Surf": "45ばんどうろ(4世代)の水上エンカウント。正規では到達不可能です。",
"G4PartnerMoodEgg": "Eggs cannot have an Mood stat value.",
"G4PartnerMoodZero": "Mood stat value should be zero when not in the player's party.",
"G4ShinyLeafBitsInvalid": "Shiny Leaf/Crown bits are not valid.",
"G4ShinyLeafBitsEgg": "タマゴに『かがやくはっぱ/冠』を設定することはできません。",
"G5IVAll30": "Nのポケモンは個体値が全て30です。",
"G5PIDShinyGrotto": "隠し穴産のポケモンは色違いになりません。",
"G5SparkleInvalid": "Nのポケモンフラグのチェックを外してください。",

View File

@@ -35,8 +35,10 @@
"ContestZeroSheen": "Contest Stat Sheen should be 0.",
"ContestSheenGEQ_0": "Contest Stat Sheen should be >= {0}.",
"ContestSheenLEQ_0": "Contest Stat Sheen should be <= {0}.",
"DateOutsideConsoleWindow": "Local Date is outside of console's local time window.",
"DateTimeClockInvalid": "Local Time is not a valid timestamp.",
"DateCalendarInvalidMet": "Met Date is not a valid calendar date.",
"DateCalendarInvalidEgg": "Egg Met Date is not a valid calendar date.",
"DateLocalInvalidDate": "Local Date is outside of console's local time window.",
"DateLocalInvalidTime": "Local Time is not a valid timestamp.",
"DateOutsideDistributionWindow": "Met Date is outside of distribution window.",
"EggContest": "알은 컨디션을 올릴 수 없습니다.",
"EggEXP": "알은 경험치를 얻을 수 없습니다.",
@@ -50,11 +52,9 @@
"EggLocationTradeFail": "알을 만난 장소가 잘못되었습니다. 부화 전 알을 교환할 수 없습니다.",
"EggMetLocationFail": "알을 만난 장소에서 알을 얻을 수 없습니다.",
"EggNature": "알은 성격과 능력치 성격이 서로 다를 수 없습니다.",
"EggPokeathlon": "알은 포켓슬론 능력치를 가질 수 없습니다.",
"EggPP": "알은 PP를 수정할 수 없습니다.",
"EggPPUp": "알에는 PP업을 적용할 수 없습니다.",
"EggRelearnFlags": "떠올리기 기술 플래그가 없어야 합니다.",
"EggShinyLeaf": "알은 빛나는나뭇잎/왕관을 가질 수 없습니다.",
"EggShinyPokeStar": "알은 포켓우드 스타가 될 수 없습니다.",
"EggSpecies": "이 포켓몬 종류의 알은 얻을 수 없습니다.",
"EggUnhatched": "사용할 수 있는 부화 전 알입니다.",
@@ -148,6 +148,10 @@
"G3EReader": "일본판이 아닌 버전의 섀도우 E-reader 포켓몬입니다. 배포되지 않은 인카운터입니다.",
"G3OTGender": "콜로세움/XD 버전에서는 여성 어버이를 사용할 수 없습니다.",
"G4InvalidTileR45Surf": "성도 45번 도로는 물 타일에 접근할 수 없으므로 파도타기 인카운터가 불가능합니다.",
"G4PartnerMoodEgg": "Eggs cannot have an Mood stat value.",
"G4PartnerMoodZero": "Mood stat value should be zero when not in the player's party.",
"G4ShinyLeafBitsInvalid": "Shiny Leaf/Crown bits are not valid.",
"G4ShinyLeafBitsEgg": "알은 빛나는나뭇잎/왕관을 가질 수 없습니다.",
"G5IVAll30": "N이 소유한 포켓몬의 IV는 30이어야 합니다.",
"G5PIDShinyGrotto": "은혈에서 포획한 포켓몬은 색이 다를 수 없습니다.",
"G5SparkleInvalid": "게임 내 특수한 N 전용 반짝임 플래그가 켜져 있지 않아야 합니다.",

View File

@@ -35,8 +35,10 @@
"ContestZeroSheen": "华丽大赛光泽度应为0。",
"ContestSheenGEQ_0": "华丽大赛光泽度应 >= {0}。",
"ContestSheenLEQ_0": "华丽大赛光泽度应 <= {0}。",
"DateOutsideConsoleWindow": "本地日期超出主机日期范围。",
"DateTimeClockInvalid": "本地时间不符合有效时间戳格式。",
"DateCalendarInvalidMet": "Met Date is not a valid calendar date.",
"DateCalendarInvalidEgg": "Egg Met Date is not a valid calendar date.",
"DateLocalInvalidDate": "本地日期超出主机日期范围。",
"DateLocalInvalidTime": "本地时间不符合有效时间戳格式。",
"DateOutsideDistributionWindow": "相遇日期在配信日期区间之外。",
"EggContest": "不能增加蛋的华丽大赛状态。",
"EggEXP": "蛋不能获得经验值。",
@@ -50,11 +52,9 @@
"EggLocationTradeFail": "非法蛋取得场所, 不能在还是蛋时“交换”",
"EggMetLocationFail": "不能在蛋取得场所获得蛋。",
"EggNature": "不能改变蛋的能力性格(薄荷)。",
"EggPokeathlon": "蛋不能有全能竞技赛体能值。",
"EggPP": "蛋不能有PP数变动。",
"EggPPUp": "不能对蛋使用PP提升剂。",
"EggRelearnFlags": "蛋没有回忆招式。",
"EggShinyLeaf": "蛋不能有闪光树叶/王冠。",
"EggShinyPokeStar": "蛋无法成为宝可梦好莱坞之星。",
"EggSpecies": "不能获得该种宝可梦的蛋。",
"EggUnhatched": "合法孵化的蛋。",
@@ -148,6 +148,10 @@
"G3EReader": "非日版黑暗E卡宝可梦。未解禁相遇方式。",
"G3OTGender": "来自圆形竞技场/XD的初训家不能为女性。",
"G4InvalidTileR45Surf": "城都45号水路的水面相遇类型不可到达的水路。",
"G4PartnerMoodEgg": "Eggs cannot have an Mood stat value.",
"G4PartnerMoodZero": "Mood stat value should be zero when not in the player's party.",
"G4ShinyLeafBitsInvalid": "Shiny Leaf/Crown bits are not valid.",
"G4ShinyLeafBitsEgg": "蛋不能有闪光树叶/王冠。",
"G5IVAll30": "N的宝可梦所有个体值应为30。",
"G5PIDShinyGrotto": "在隐藏洞穴捕获的宝可梦不能为异色。",
"G5SparkleInvalid": "特殊游戏内宝可梦N的闪光标记不应勾选。",

View File

@@ -35,8 +35,10 @@
"ContestZeroSheen": "華麗大賽光澤度應置「0」。",
"ContestSheenGEQ_0": "華麗大賽光澤度應大於或等於「 {0} 」。",
"ContestSheenLEQ_0": "華麗大賽光澤度應小於或等於「 {0} 」。",
"DateOutsideConsoleWindow": "Local Date is outside of console's local time window.",
"DateTimeClockInvalid": "Local Time is not a valid timestamp.",
"DateCalendarInvalidMet": "Met Date is not a valid calendar date.",
"DateCalendarInvalidEgg": "Egg Met Date is not a valid calendar date.",
"DateLocalInvalidDate": "Local Date is outside of console's local time window.",
"DateLocalInvalidTime": "Local Time is not a valid timestamp.",
"DateOutsideDistributionWindow": "遇見日期於神秘禮物配信期間之外。",
"EggContest": "不能調整蛋之華麗大賽狀態。",
"EggEXP": "蛋不能獲得經驗值。",
@@ -50,11 +52,9 @@
"EggLocationTradeFail": "不合法之蛋取得場所, 無法於寶可夢仍是蛋時「連線交換」。",
"EggMetLocationFail": "無法於設定之蛋取得場所獲得該蛋。",
"EggNature": "無法使用「薄荷」修正蛋之性格。",
"EggPokeathlon": "蛋不能有全能競技賽體能值。",
"EggPP": "蛋不能修改 PP 值。",
"EggPPUp": "不能對蛋使用 PP 提升劑。",
"EggRelearnFlags": "預期不會重新學習技能標記。",
"EggShinyLeaf": "蛋不能携帶閃耀的葉片/王冠。",
"EggShinyPokeStar": "蛋無法成為寶可夢好萊塢之星。",
"EggSpecies": "不能獲得該種寶可夢之蛋。",
"EggUnhatched": "合法孵化之蛋。",
@@ -148,6 +148,10 @@
"G3EReader": "非日版黑暗E-reader寶可夢。未解禁之遇見方式。",
"G3OTGender": "來自圓形競技場/暗黑旋風XD之初訓家不能為女性。",
"G4InvalidTileR45Surf": "城都45號道路之水面遇見類型但該水道不可到達。",
"G4PartnerMoodEgg": "Eggs cannot have an Mood stat value.",
"G4PartnerMoodZero": "Mood stat value should be zero when not in the player's party.",
"G4ShinyLeafBitsInvalid": "Shiny Leaf/Crown bits are not valid.",
"G4ShinyLeafBitsEgg": "蛋不能携帶閃耀的葉片/王冠。",
"G5IVAll30": "N的寶可夢所有個體值應為30。",
"G5PIDShinyGrotto": "於隱藏洞穴捕獲之寶可夢不能為異色。",
"G5SparkleInvalid": "特殊遊戲內寶可夢N的異色標記不應勾選。",

View File

@@ -18,4 +18,4 @@
"EggInvalid": "Unerwartete Ei-Attacke.",
"EggLevelUp": "Vererbte Attacke durch Level-Aufstieg erlernt.",
"LevelUpSuffix": " @ lv{0}"
}
}

View File

@@ -18,4 +18,4 @@
"EggInvalid": "Not an expected Egg move.",
"EggLevelUp": "Inherited move learned by Level-up.",
"LevelUpSuffix": " @ lv{0}"
}
}

View File

@@ -18,4 +18,4 @@
"EggInvalid": "Movimiento Huevo no esperado.",
"EggLevelUp": "Movimiento heredado aprendido por subida de nivel.",
"LevelUpSuffix": " @ lv{0}"
}
}

View File

@@ -18,4 +18,4 @@
"EggInvalid": "Attaque Œuf non attendue.",
"EggLevelUp": "Attaque héritée apprise par montée de niveau.",
"LevelUpSuffix": " @ lv{0}"
}
}

View File

@@ -18,4 +18,4 @@
"EggInvalid": "Mossa Uovo non prevista.",
"EggLevelUp": "Mossa ereditata appresa per aumento di livello.",
"LevelUpSuffix": " @ lv{0}"
}
}

View File

@@ -18,4 +18,4 @@
"EggInvalid": "期待されないタマゴ技。",
"EggLevelUp": "遺伝レベルアップ技。",
"LevelUpSuffix": " @ lv{0}"
}
}

View File

@@ -18,4 +18,4 @@
"EggInvalid": "예상되지 않은 알 기술.",
"EggLevelUp": "유전된 레벨업 기술.",
"LevelUpSuffix": " @ lv{0}"
}
}

View File

@@ -18,4 +18,4 @@
"EggInvalid": "非预期的蛋招式。",
"EggLevelUp": "遗传升级学会的招式。",
"LevelUpSuffix": " @ lv{0}"
}
}

View File

@@ -18,4 +18,4 @@
"EggInvalid": "非預期的蛋招式。",
"EggLevelUp": "遺傳升級學會的招式。",
"LevelUpSuffix": " @ lv{0}"
}
}

View File

@@ -370,7 +370,7 @@ public int Region
protected sealed override PK4 GetPKM(byte[] data) => new(data);
protected sealed override byte[] DecryptPKM(byte[] data) => PokeCrypto.DecryptArray45(data);
protected sealed override void SetPKM(PKM pk, bool isParty = false)
protected override void SetPKM(PKM pk, bool isParty = false)
{
var pk4 = (PK4)pk;
// Apply to this Save File

View File

@@ -178,6 +178,13 @@ public void SetBoxWallpaper(int box, int value)
}
#endregion
protected override void SetPKM(PKM pk, bool isParty = false)
{
base.SetPKM(pk, isParty);
if (!isParty)
((PK4)pk).PartnerMood = 0;
}
public override IReadOnlyList<InventoryPouch> Inventory
{
get