mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-19 23:08:34 +00:00
Misc tweaks
rearrange getmove with respect to tutors; verifycurrentmoves was getting tutor moves in levelup extract not-found hint fetch Expose gen5 block objects (so I can play with saves in linqpad)
This commit is contained in:
parent
dc839333b7
commit
4deb5080d1
3 changed files with 15 additions and 13 deletions
|
@ -1015,7 +1015,7 @@ namespace PKHeX.Core
|
||||||
formcount = 4;
|
formcount = 4;
|
||||||
|
|
||||||
for (int i = 0; i < formcount; i++)
|
for (int i = 0; i < formcount; i++)
|
||||||
r.AddRange(GetMoves(pkm, species, minLvLG1, minLvLG2, vs[0].Level, i, moveTutor, Version, LVL, Tutor, Machine, MoveReminder, RemoveTransferHM, Generation));
|
r.AddRange(GetMoves(pkm, species, minLvLG1, minLvLG2, vs[0].Level, i, Tutor, Version, LVL, Tutor, Machine, MoveReminder, RemoveTransferHM, Generation));
|
||||||
if (Relearn)
|
if (Relearn)
|
||||||
r.AddRange(pkm.RelearnMoves);
|
r.AddRange(pkm.RelearnMoves);
|
||||||
return r.Distinct();
|
return r.Distinct();
|
||||||
|
@ -1047,7 +1047,7 @@ namespace PKHeX.Core
|
||||||
var maxLevel = evo.Level;
|
var maxLevel = evo.Level;
|
||||||
if (i != 0 && vs[i - 1].RequiresLvlUp) // evolution
|
if (i != 0 && vs[i - 1].RequiresLvlUp) // evolution
|
||||||
++maxLevel; // allow lvlmoves from the level it evolved to the next species
|
++maxLevel; // allow lvlmoves from the level it evolved to the next species
|
||||||
return GetMoves(pkm, evo.Species, minlvlevo1, minlvlevo2, maxLevel, pkm.AltForm, moveTutor, Version, LVL, Tutor, Machine, MoveReminder, RemoveTransferHM, Generation);
|
return GetMoves(pkm, evo.Species, minlvlevo1, minlvlevo2, maxLevel, pkm.AltForm, Tutor, Version, LVL, moveTutor, Machine, MoveReminder, RemoveTransferHM, Generation);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int GetEvoMoveMinLevel1(PKM pkm, int Generation, int minLvLG1, EvoCriteria evo)
|
private static int GetEvoMoveMinLevel1(PKM pkm, int Generation, int minLvLG1, EvoCriteria evo)
|
||||||
|
|
|
@ -102,21 +102,23 @@ namespace PKHeX.Core
|
||||||
private static LegalInfo VerifyWithoutEncounter(PKM pkm, LegalInfo info)
|
private static LegalInfo VerifyWithoutEncounter(PKM pkm, LegalInfo info)
|
||||||
{
|
{
|
||||||
info.EncounterMatch = new EncounterInvalid(pkm);
|
info.EncounterMatch = new EncounterInvalid(pkm);
|
||||||
|
string hint = GetHintWhyNotFound(pkm);
|
||||||
string hint; // hint why an encounter was not found
|
|
||||||
if (pkm.WasGiftEgg)
|
|
||||||
hint = LEncGift;
|
|
||||||
else if (pkm.WasEventEgg)
|
|
||||||
hint = LEncGiftEggEvent;
|
|
||||||
else if (pkm.WasEvent)
|
|
||||||
hint = LEncGiftNotFound;
|
|
||||||
else
|
|
||||||
hint = LEncInvalid;
|
|
||||||
|
|
||||||
info.Parse.Add(new CheckResult(Severity.Invalid, hint, CheckIdentifier.Encounter));
|
info.Parse.Add(new CheckResult(Severity.Invalid, hint, CheckIdentifier.Encounter));
|
||||||
info.Relearn = VerifyRelearnMoves.VerifyRelearn(pkm, info);
|
info.Relearn = VerifyRelearnMoves.VerifyRelearn(pkm, info);
|
||||||
info.Moves = VerifyCurrentMoves.VerifyMoves(pkm, info);
|
info.Moves = VerifyCurrentMoves.VerifyMoves(pkm, info);
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string GetHintWhyNotFound(PKM pkm)
|
||||||
|
{
|
||||||
|
if (pkm.WasGiftEgg)
|
||||||
|
return LEncGift;
|
||||||
|
if (pkm.WasEventEgg)
|
||||||
|
return LEncGiftEggEvent;
|
||||||
|
if (pkm.WasEvent)
|
||||||
|
return LEncGiftNotFound;
|
||||||
|
return LEncInvalid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,7 @@ namespace PKHeX.Core
|
||||||
public override int MaxGameID => Legal.MaxGameID_5; // B2
|
public override int MaxGameID => Legal.MaxGameID_5; // B2
|
||||||
|
|
||||||
// Blocks & Offsets
|
// Blocks & Offsets
|
||||||
private readonly BlockInfoNDS[] Blocks;
|
public readonly BlockInfoNDS[] Blocks;
|
||||||
protected override void SetChecksums() => Blocks.SetChecksums(Data);
|
protected override void SetChecksums() => Blocks.SetChecksums(Data);
|
||||||
public override bool ChecksumsValid => Blocks.GetChecksumsValid(Data);
|
public override bool ChecksumsValid => Blocks.GetChecksumsValid(Data);
|
||||||
public override string ChecksumInfo => Blocks.GetChecksumInfo(Data);
|
public override string ChecksumInfo => Blocks.GetChecksumInfo(Data);
|
||||||
|
|
Loading…
Add table
Reference in a new issue