This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user