• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Resource icon

v21.1 Advanced AI System 1.1

This resource pertains to version 21.1 of Pokémon Essentials.
Added
Global Effectiveness Guard: Added a robust wrapper in Hotfixes.rb to prevent ArgumentError crashes when nil types are passed to Effectiveness.calculate.
Matchup Improvement Logic: AI now compares the candidate Pokemon's score against the current Pokemon's score. This avoids switching for marginal gains or equal stats.

Fixed
Infinite Switch Loop: Resolved the issue where the opponent would endlessly switch between two similar Pokemon (e.g., Cloyster and Lapras) by requiring a significant matchup improvement to trigger a switch.
Double Battle Crash: Fixed NoMethodError: undefined method 'ai_skill_level' by correctly passing the skill level from the AI Core.
Switch Logic Crash: Fixed NoMethodError: undefined method 'pbCalcTypeMod' by migrating to the Effectiveness system.
Spread Move Crash: Fixed NoMethodError: undefined method 'targets_all?' in Doubles_Coordination.rb for v21.1 compatibility.
Move Property Crash: Fixed NoMethodError: undefined method 'base_damage' for non-damaging move classes by adding robust property check fallbacks.
Stalemate Logic: Improved detection for offensive immunities. AI will no longer stay in battle just because it is immune to the opponent if it cannot deal damage in return.

Improved
Type Guarding: Added strict nil-checks for move types throughout Switch_Intelligence.rb.
Performance: Caching and error handling improvements in the Core AI loop.
Back
Top