Make ExplicitAI configurable
All checks were successful
Build / Build (push) Successful in 1m2s

This commit is contained in:
2025-10-21 11:27:04 +02:00
parent 8fd7df5d80
commit 5831df701b
2 changed files with 82 additions and 21 deletions

View File

@@ -60,7 +60,7 @@ public partial class ExplicitAI
private IPokemon? ChooseBestReplacementPokemon(byte position, bool terribleMoves,
IReadOnlyList<IPokemon> usablePokemon, IBattleSide battleSide)
{
var options = usablePokemon.Where((pokemon, index) =>
var options = usablePokemon.Where((_, index) =>
{
if (_skillFlags.ReserveLastPokemon && index == usablePokemon.Count - 1 && usablePokemon.Count > 1)
return false; // Don't switch to the last Pokemon if there are others available.
@@ -132,6 +132,9 @@ public partial class ExplicitAI
return score;
}
/// <summary>
/// Calculates the expected entry hazard damage for a given Pokémon on a given battle side.
/// </summary>
public static uint CalculateEntryHazardDamage(IPokemon pokemon, IBattleSide side)
{
var damage = 0u;