Filter out uncatchable SV fixed spawns by AI action

This commit is contained in:
Lusamine
2025-01-12 19:46:25 -06:00
parent 7a67dd55ac
commit ac0f650cc6

View File

@@ -163,8 +163,8 @@ bool FindArea(AreaType type)
WriteFixedSpawn(specNamesInternal, moveNames, placeNameMap, gw, tableKey, i, entry, appearAreas);
// Serialize
if (entry.PokeGeneration.GenerationPattern == GenerationPattern.Watch)
continue; // not actually encounter-able, they're just for spectacle (lighthouse wingull)
if (IsAvoidantAction(entry.PokeAI.ActionId))
continue; // not actually encounter-able, they're just for spectacle
// var locs = appearAreas.Select(a => placeNameMap[a.PlaceName].Index);
if (appearAreas.Count == 0)
continue;
@@ -839,4 +839,12 @@ private static void WriteEncounts(TextWriter tw, IReadOnlyList<string> specNames
result[ahtb.Entries[i].Name] = (text[i], i);
return result;
}
static bool IsAvoidantAction(PokemonActionID action) => action switch
{
PokemonActionID.FS_POP_PATH_RUN_SPEED_UP_1_NOT_COL_DELAY => true, // lighthouse Wingull (South) and Wattrel (East, West)
PokemonActionID.FS_POP_PATH_RUN_SPEED_UP_1_NOT_COL_DESTROY => true, // fence Wingull (Cabo Poco)
PokemonActionID.FS_POP_COMMON_FLIGHT_NOT_COL_DESTROY => true, // starting Fletchling (level 2)
_ => false,
};
}