• 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.5.1

This resource pertains to version 21.1 of Pokémon Essentials.
Switch Intelligence
ReserveLastPokemon Support**: Fixed an issue where the AI would switch into its Ace (last Pokemon) prematurely. It now respects the ReserveLastPokemon trainer flag.
Switch Loop Fix**: Implemented stability checks to prevent the AI from endlessly switching between two Pokemon with similar matchups.

Added a new Rule in Settings
RESPECT_RESERVE_LAST_POKEMON = true

You can turn it off with falsee

Move Scoring (Critical Hits)
Always Critical Hits*: Moves like *Flower Trick and Wiked Blow now correctly calculate their damage with a 1.5x multiplier.
Focus Energy Synergy**: The AI now heavily prioritizes using Focus Energy + High Crit Rate moves to guarantee critical hits.
Smart Stat Bypassing**: The AI now recognizes that critical hits ignore:
The Target's positive Defense/Sp.Def boosts (e.g. counter to Iron Defense).
The User's negative Attack/Sp.Atk drops (e.g. counter to Intimidate).
Immunity Awareness*: The AI will no longer attempt critical hit strategies against targets with *Battle Armor, Shell Armor, or Lucky Chant.
Sticky Web support
Better Crit logic
Smarter Screens (No redundancy + Context awareness)
Code Refactoring (Simpler, cleaner code)
Fixed multiple undefined_methode errors
Translated some german leftovers
added support type changing stuff like illusion/soak
  • Multi-hit move scoring (Pin Missile now calculates total power correctly)
  • Low BP move scoring precision (25 BP moves no longer rounded down)
  • Crash with Midbattle Scripts (ArgumentError and NoMethodError)
  • Deprecated baseDamage calls updated to .power
Added Mold Braker in priority stuff
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