Misc tweaks (apostrophe & vc2 pre)

farfetch'd apostrophe mapping disabled for gen5 and prior
Closes #1474

flag gen2 new moves as not obtainable if transferred from RBY (VC1) as
they must be removed before transferring 2->1.
This commit is contained in:
Kurt 2017-09-20 16:19:50 -07:00
parent 7b6d393b2f
commit 69e8c071f7
2 changed files with 12 additions and 7 deletions

View file

@ -300,18 +300,21 @@ namespace PKHeX.Core
{
if (IsCheckValid(res[m])) // already validated with another generation
continue;
if (moves[m] == 0)
int move = moves[m];
if (move == 0)
continue;
if (gen == 1 && learnInfo.Source.Base.Contains(moves[m]))
if (gen == 1 && learnInfo.Source.Base.Contains(move))
res[m] = new CheckMoveResult(MoveSource.Initial, gen, Severity.Valid, native ? V361 : string.Format(V362, gen), CheckIdentifier.Move);
else if (info.EncounterMoves.LevelUpMoves[gen].Contains(moves[m]))
if (gen == 2 && !native && move > Legal.MaxMoveID_1 && pkm.VC1)
res[m] = new CheckMoveResult(MoveSource.Unknown, gen, Severity.Invalid, V176, CheckIdentifier.Move);
else if (info.EncounterMoves.LevelUpMoves[gen].Contains(move))
res[m] = new CheckMoveResult(MoveSource.LevelUp, gen, Severity.Valid, native ? V177 : string.Format(V330, gen), CheckIdentifier.Move);
else if (info.EncounterMoves.TMHMMoves[gen].Contains(moves[m]))
else if (info.EncounterMoves.TMHMMoves[gen].Contains(move))
res[m] = new CheckMoveResult(MoveSource.TMHM, gen, Severity.Valid, native ? V173 : string.Format(V331, gen), CheckIdentifier.Move);
else if (info.EncounterMoves.TutorMoves[gen].Contains(moves[m]))
else if (info.EncounterMoves.TutorMoves[gen].Contains(move))
res[m] = new CheckMoveResult(MoveSource.Tutor, gen, Severity.Valid, native ? V174 : string.Format(V332, gen), CheckIdentifier.Move);
else if (gen == info.Generation && learnInfo.Source.SpecialSource.Contains(moves[m]))
else if (gen == info.Generation && learnInfo.Source.SpecialSource.Contains(move))
res[m] = new CheckMoveResult(MoveSource.Special, gen, Severity.Valid, V175, CheckIdentifier.Move);
if (res[m] == null || gen >= 3)

View file

@ -1930,7 +1930,9 @@ namespace PKHeX.Core
/// <returns></returns>
private static string UnSanitizeString(string str, int generation, int species = -1, bool nicknamed = true)
{
var s = str.Replace("\u0027", "\u2019"); // farfetch'd
var s = str;
if (generation > 6)
s = str.Replace("\u0027", "\u2019"); // farfetch'd
if (generation == 5 || generation == 4)
{