Handle Volt Tackle for HOME sharing GetAllMoves

This commit is contained in:
Kurt
2023-07-21 12:24:31 -07:00
parent 75ec6ca38d
commit c5d35fbce5
5 changed files with 19 additions and 1 deletions

View File

@@ -150,6 +150,10 @@ public void GetAllMoves(Span<bool> result, PKM pk, EvolutionHistory history, IEn
foreach (var evo in evos)
GetAllMoves(result, pk, evo, types, option);
var home = LearnGroupHOME.Instance;
if (option != LearnOption.HOME && home.HasVisited(pk, history))
home.GetAllMoves(result, pk, history, enc, types);
}
private static void GetAllMoves(Span<bool> result, PKM pk, EvoCriteria evo, MoveSourceType types, LearnOption option)

View File

@@ -56,6 +56,10 @@ public void GetAllMoves(Span<bool> result, PKM pk, EvolutionHistory history, IEn
foreach (var evo in history.Gen8a)
GetAllMoves(result, pk, evo, types, option);
var home = LearnGroupHOME.Instance;
if (option != LearnOption.HOME && home.HasVisited(pk, history))
home.GetAllMoves(result, pk, history, enc, types);
}
private static void GetAllMoves(Span<bool> result, PKM pk, EvoCriteria evo, MoveSourceType types, LearnOption option)

View File

@@ -97,6 +97,10 @@ public void GetAllMoves(Span<bool> result, PKM pk, EvolutionHistory history, IEn
foreach (var evo in history.Gen8b)
GetAllMoves(result, pk, evo, types, option);
var home = LearnGroupHOME.Instance;
if (option != LearnOption.HOME && home.HasVisited(pk, history))
home.GetAllMoves(result, pk, history, enc, types);
}
private static void GetAllMoves(Span<bool> result, PKM pk, EvoCriteria evo, MoveSourceType types, LearnOption option)

View File

@@ -121,6 +121,10 @@ public void GetAllMoves(Span<bool> result, PKM pk, EvolutionHistory history, IEn
foreach (var evo in evos)
GetAllMoves(result, pk, evo, types, option);
var home = LearnGroupHOME.Instance;
if (option != LearnOption.HOME && home.HasVisited(pk, history))
home.GetAllMoves(result, pk, history, enc, types);
}
private static void GetAllMoves(Span<bool> result, PKM pk, EvoCriteria evo, MoveSourceType types, LearnOption option)

View File

@@ -277,7 +277,9 @@ private static void LoopMerge(Span<bool> result, PKM pk, ReadOnlySpan<EvoCriteri
foreach (var evo in evos)
{
var chk = dest.GetCanLearnHOME(pk, evo, move, types);
if (chk.Method == LearnMethod.None)
// HOME has special handling to allow Volt Tackle outside of learnset possibilities.
// Most games do not have a Learn Source for Volt Tackle besides it being specially inserted for Egg Encounters.
if (chk.Method == LearnMethod.None && move is not (int)Move.VoltTackle)
continue;
result[move] = true;
break;