Emerald Imperium V1.3 Changelog
Table of Contents
- Overview
- Pokemon Balance Changes
- Move-Related Changes
- Item-Related Changes
- Trainer, Gift Mon, and Encounter Changes
- Other Changes and Additions
- General Bug Fixes
- AI Changes/Improvements
- Credits
---
Overview
Emerald Imperium V1.3 Changelog
You will have to patch a new ROM for changes to take effect, but
your old save file should still work. Make sure your ROM file and
save file have the same name. Do not patch your existing ROM.
In-Game Saves carry over, Save states do not!!!!
Please note this update removed some abilities from ability
randomizer mode, as a result updating mid run will re-randomize
all your Pokemon's abilities.
Disclaimer: when adding new Items / NPCs / Trainers etc, we often
have to re-use flags/variables within the game. We do our best to
make sure all new content is available to those who update mid-run,
and even though save files WILL carry over, it is possible that we
missed some things and it may be impossible to obtain certain new
Items / battle certain trainers etc if you update mid-run without
starting a new game!
Please continue to submit feedback and report any bugs you
encounter.
Pokemon Balance Changes:
● Added custom ability “Bone Zone” for Alolan-Marowak
○ Functions the same as in Radical Red
● Added custom ability “Parasitic Waste” for Mega Garbodor
○ Functions the same as in Radical Red
○ Credits to Kildemal and ScarredLion for coding this ability
● Added new custom ability “THE GRIPPER” to Mega Dusknoir
○ Functionally adds the effect of the move Spirit Shackle to all contact
moves that Mega Dusknoir uses
● Added Sharpness as a Hidden Ability for Iron Boulder
● Added Snow Warning as an ability for Snover
● Added Power Spot as a 2nd ability for Stonjourner
● Added Toxic Debris as a Hidden Ability for Weezing (missed from RR changes)
● Added Punk Rock as an ability for Chatot (missed from RR changes)
● Added Inner Focus as an ability for Lycanroc Midday (missed from RR changes)
● Meltan ability changed back from Transistor to Magnet Pull
● Turtwig line’s abilities changed from:
1) Overgrow 2) Self Sufficient HA) Rock Head to
1) Shell Armor 2) Rock Head HA) Self Sufficient
○ All abilities give Mega Torterra Ice Eater still
● Hippopatas line’s ability Sand Force moved from HA to 2nd ability
● Mega Infernape Ability changed from Adaptability to Iron Fist
● Gouging Fire now learns Flare Blitz at level 49, Burning Bulwark at 86
● Skarmory now learns Metal Sound at level 28, Spikes at 42
● Starmie now learns Recover at level 26 instead of level 1
● Tyranitar now learns Sucker Punch at level 50
● Drapion now learns Sucker Punch at level 40
● Feraligatr now learns Aqua Fang at level 44 instead of 45
● Hippowdon now learns Slack Off at level 35
● Toedscool no longer has access to Spore
● Toedscruel now learns Spore at level 47 instead of 42
● Nosepass now learns Spark at level 18
● Froslass now learns Detect at level 30
● Accelgor now learns Detect at level 26
● Dewott now learns Razor Shell at 35, both Samurotts learn it at level 1
● Greninja now learns Round, Bounce, Fling, and Smack Down from level up
○ Previously, Froakie learned these moves, but Greninja did not
● Removed Detect from Eevee’s Egg Move Pool
○ Leafeon and Flareon now learn Detect on Level Up
○ No other Eeveelutions get access to Detect
● Replaced Detect in Iron Hands’ learnset with Iron Defense
● Replaced Detect in Kartana’s learnset with Smart Strike
● Replaced Protect with Detect in level-up learnsets for Shellder, Cloyster,
Corphish, Crawdaunt, Snorunt, Glalie, Mesprit, Shelmet, Jangmo-o, Hakamo-o,
and Kommo-o
● Dusknoir and Dusclops now learn Knock off from TM
● Hisuian Liligant now learns Solar Blade from TM
● Meganium now learns Moonblast from TM
● Magearna now learns Draining Kiss from TM
● Sneasler and Hisuian-Sneasel now learn Ice Punch from TM
● Added missing Egg moves for the following Pokemon: Impidimp line,
Hisuian-Growlithe line, Voltorb line, Hisuian-Voltorb line, Hisuian-Qwilfish line,
Hippopotas line, Hisuian-Zorua line, Hisuian-Sneasel line, and Frillish line
● Fixed Costume Pikachus’ learnsets in general
○ Pikachu-Belle gets Freezy Frost and Icicle Crash at level 1, Icicle Spear,
Ice Beam from TMs
○ Pikachu-Pop Star gets Sparkly Swirl at level 1, Dazzling Gleam and
Moonblast from TMs
○ Pikachu-Surfing gets Bouncy Bubble at level 1, Water Pulse and
Liquidation from TMs
○ Pikachu-Flying gets Air Slash at level 1, Air Slash, Fly, and Hurricane from TMs
○ Pikachu-PhD gets Psychic at level 1, Psychic, Psychic Noise, Zen
Headbutt from TMs
○ Pikachu-Rock Star gets Meteor Mash at level 1, Iron Head, Flash Cannon,
and Steel Beam from TMs
○ Pikachu-Libre gets Flying Press at level 1, Close Combat, Aura Sphere,
and Focus Blast from TMs
○ Pikachu-Cosplay gets Volt Tackle at level 1
● Fixed Rotom forms learnsets
● Changed Hydrapple’s sprite (credits to DegelAlex on DeviantArt and
Phantomony for finding and adding it to the game)
● Changed Gen 7 starters to have 20 Egg cycles so their hatch times match the
rest of the starters
● Changed all Unfezant stats to match those of male version on RR dex
● Changed stat distribution for several custom Mega Pokemon (Table on next
page)
Empoleon O Empoleon D Mega Infernape
Old New Old New Old New
Base HP 100 84 Base HP 140 118 Base HP 76 76
Base Attack 150 150 Base Attack 75 86 Base Attack 137 137
Base Defense 75 83 Base Defense 145 88 Base Defense 71 82
Base SpAtk 110 110 Base SpAtk 75 131 Base SpAtk 137 137
Base SpDef 75 83 Base SpDef 145 157 Base SpDef 71 82
Base Speed 120 120 Base Speed 50 50 Base Speed 142 120
Mega Slaking Mega Roserade
Old New Old New
Base HP 150 150 Base HP 60 60
Base Attack 160 160 Base Attack 70 80
Base Defense 110 110 Base Defense 85 90
Base SpAtk 60 95 Base SpAtk 150 140
Base SpDef 110 75 Base SpDef 120 125
Base Speed 110 110 Base Speed 130 120
Move-Related Changes:
● Added the move Draco Barrage from Radical Red
○ 100 BP, 100% Accurate Special Attacking Dragon-type move
○ Does damage to targets Defense/Special Defense depending on which is
better (same as Shell Side Arm)
○ Ignores Fairy immunity
○ Has 33% recoil damage
● Changed Ion Deluge from 25 PP to 5
● Changed Mighty Cleave from 95 to 90 Base Power
● Changed Barb Barrage to do double damage when attacking a Pokemon with
any status condition, like Hex (not just poison, change missed from RR)
● Changed Armor Cannon to be boosted by Mega Launcher (change missed from
RR)
● Fixed Raging Bull typing not being correct for Granbull and Bouffalant
● Fixed Triple Dive’s move power
● Fixed various move animations
● Added move animations for Armor Cannon, Supercell Slam, Mighty Cleave,
Tachyon Cutter, Psyblade, Glaive Rush, Triple Dive, and Ruination (credits to
Linathan for adding the move animations to expansion!)
Item-Related Changes:
● Added new Key Item “Hex Orb” which allows the player to pre-status their
Pokemon when used; given by Scott at the same time as the Exp. Share in
Petalburg
○ If you update mid run and already got the Exp. Share from Scott, the Hex
Maniac NPC behind the ledges on Route 104 will give the Hex Orb
○ Credits to psf for this feature
● Added TMs for Spikes, Heavy Slam, Gravity, Misty Explosion, Steel Beam, Draco
Barrage and updated teachable learnsets accordingly
○ See Items doc for locations
○ Credits to breadbeing for writing a script to easily add new TMs to mons
learnsets
● Added various Berries to the map
○ Micle Berries - Route 114
○ Starf and Lansat - Route 115
○ Lum - Route 121
○ Ganlon, Apicot, Wiki, Figy, Mago, Iapapa - Route 123
○ Note: these Berries likely will not spawn if you update in the middle of a
run, you will likely need to start a new game to see them
○ Credits to Muffins for meticulously sorting out how these Berries should be
balanced
● Move Pomeg Berry Vendor from Dewford to Rustboro
● Float Stones are now purchasable in Mauville City mart
● Air Balloons pushed back from gift from Rival on 110 to gift from Dawn in Lilycove
City
● Rival on 110 gives Shed Shells now
● Move Good Rod Fisherman from Route 118 to Route 103 (after Pokefan double
battle, left of Trick House)
● EmpoleoniteD pushed back from gift from Dawn on 111 to gift from Dawn in
Lilycove City
● Flannery now gives the Blazikenite instead of the Infernapite
● Trainer Cap (Fortree City Creator’s Lab) now gives the Infernapite instead of the
Blazikenite
● Move the Eon Ticket and the Aurora Ticket from postgame to gifts from Wally in
Victory Road
○ Latios/Latias and Deoxys are now available before postgame
● Move Old Sea Map from postgame to on the ground in the Abandoned Ship
○ Mew is now available after the player has Dive
● Make Safari Balls have 100% catch rate
● Swapped locations of Roark and Candice, scaled teams accordingly
○ This was done to make it so the player doesn’t have to fight back to back
rock/ground trainers in the early game
○ See the “Item-Related Changes” section for how their rewards were
changed
● Tweaks to a whole lot of encounter tables, I am not going to list every single
change, but see Pokemon Doc for details. Notable changes include:
○ Grass on Route 115 is now available before Surf
○ Grass on 118 is now available before Surf
○ Grass has been added to 111 before needing Rock Smash
○ Grass has been added to Lilycove City
○ Grass has been added to Mossdeep City
○ Grass has been added to Route 126
○ Grass on 123 is available after Surfing from Mauville
○ Encounters have been added inside the Trick House (which is now its own
encounter location)
○ Fishing odds were changed (and every table was subsequently updated):
■ Old Rod has 3 slots: 34%, 33%, 33%
■ Good Rod has 3 slots: 34%, 33%, 33%
● Reduced the level of Pokemon that can be caught with Old Rod to levels 3-5 on
Routes 102 and 115
Other Changes and Additions:
● Added “Mono” cheat code to enable Monotype Starter Selection with Prof. Birch
with the following options (after you enter the “Mono” code, talk to Prof. Birch as
normal and he will have different starter options for you):
○ Fighting: Mankey, Machop, Timburr
○ Flying: Hoppip, Flethling, Rookidee
○ Poison: Budew, Venipede, Koffing
○ Ground: Trapinch, Geodude, Tympole
○ Rock: Rolycoly, Geodude-Alola, Nacli
○ Bug: Grubbin, Blipbug, Scatterbug
○ Ghost: Gastly, Litwick, Duskull
○ Steel: Tinkatink, Honedge, Klink
○ Electric: Pichu, Shinx, Mareep
○ Psychic: Hatenna, Solosis, Gothita
○ Ice: Snover, Swinub, Spheal
○ Dragon: Bagon, Gible, Dratini
○ Dark: Pawniard, Zigzagoon-Galar, Sandile
○ Normal: Whismur, Lillipup, Smoliv
○ Fairy: Cottonee, Igglybuff, Impidimp
○ Note, options for Fire, Water, and Grass were not included because there
are already 27 of those per type :)
○ Credits to RoboLing on Discord as well as everyone else who participated
in the feedback thread for this idea
○ Credits to Fraz, Duck, TallMills, and King Justice for helping refine the
mono starter choices as well
● Added “ShinyR” cheat code for guaranteed Shiny Roamers
○ Credits to Xurofall on Discord for being crazy enough to assemble enough
shinies to get this feature added
● Added aliases for the longer Cheat Codes (you can now enter any of the
following codes and they will work)
○ “DexAll”: can enter full name or “Dxa”
○ “CaughtAll”: can enter full name or “Cal”
○ “EZCatch”: can enter full name or “Ezc”
○ “ShinyS”: can enter full name or “Shs”
○ “MaxMoney”: can enter full name or “Mmy”
○ “ShinyR”: can enter full name or “Shr”
○ Credits to breadbeing for this functionality
● Added symbols indicating type effectiveness of moves when choosing a move in
battle
○ Note this indicator only factors in the typing of the move vs the typing of
the targeted Pokemon, it does NOT factor in the targeted Pokemon’s
ability
○ This functionality matches that of Rad Red
● Added a “Level Box to Level Cap” feature to the 2nd Nurse in Poke Centers
○ Levels all Pokemon in the player’s party and PC to the Level Cap
○ You can use the “Markings” feature in the PC to mark a Pokemon that
shouldn’t get leveled up, if desired
○ Credits to hedara for this feature
● Added a feature to show form changes during the Hall of Fame screen after
defeating the Champion
○ Pokemon must be holding its form-changing item to be shown as such.
For example, to see Mega Gyarados in the Hall of Fame, the player’s
Gyarados must be holding the Gyaradosite during the Champion battle
○ Credits to PCG for this feature
● Added a 2nd page of Options (credits to Phantonomy)
○ Option to increase overall battle speed (credits to Phantonomy)
○ Option to increase health-bar drain speed
○ Option to toggle pressing R to run in battle
○ Note about these, if you set them before starting a new game, they will
reset after the game has started. This is a known bug that for *technical
reasons* cannot be fixed until later (source: trust me bro)
● Added a new option the the L Menu called the “NuzVial”
○ The NuzVial is only available in gauntlets that the player cannot leave (Hot
House, Elite 4)
○ It is functionally the PokeVial, but it does not apply to fainted Pokemon
○ This was added because Nuzlockers may lose Pokemon during the Elite 4
and can accidentally use the PokeVial to revive fainted Pokemon
unintentionally
○ The regular PokeVial is still available alongside the NuzVial
○ Yes, it is that hard to just buy potions
● The full PC is now accessible from the L Menu’s “PC” function, not just the “Move
Pokemon” option
● Overworld poison damage was enabled
○ This was done to make it easier for players to pre-damage to specific HP
● Remove stats display pages after using the Infinite Candy so less mashing of “A”
is required
● Players now have the ability to Fly using the Pokenav after defeating the Rival in
Rustboro instead of from the Rival on 110
○ This is a workaround to the Briney softlock
○ If you update your game after the Rustboro Rival but before the 110 Rival,
you may manage to avoid receiving this feature, so be careful
● Added Fly locations to Mt. Chimney, Weather Institute, and Route 128 near
Seafloor Cavern
● Added a new cave section in Fiery Path containing Heatran that is accessible
after the 8th Gym Badge is obtained
● Added Surfing and Flying Pikachu forms to Mauville Pika distributor
○ Special thanks to Gobou and the other Rad Red folks for letting us use
their sprites :)
● Shellos West and Gastrodon West have been added around the map, so not just
East variant can be found anymore
● Removed abilities “Poison Puppeteer” and “Tera Shell” from randomizer as they
only functioned with Pecharunt and Terapagos, respectively
● Removed Own Tempo Rockruff from randomizer as it could never evolve
● Shortened text from Steven in Granite Cave
● Increased Safari Zone step limit from 500 -> 5000
● Removed Drake from Pokenav Match Call
General Bug Fixes:
● Fixed a bug where roamer Pokemon could terrastalize or dynamax
● Fixed a trainer’s underleveled geodude on Mt. Chimney
● Fixed rare occurrence where player could Surf without having the HM
● Fixed bug where Infinite Candy was registerable even though the player can’t
use it from the field
○ It is no longer registerable
○ Credits to KFSPC8 for this fix
● Fixed Protective Pads not protecting against some secondary effects
● Fixed Clear Body activating incorrectly against certain Protect effects
● Fixed several interactions with Toxic Spikes
● Fixed Scald defrosting a target even if used while asleep
● Fixed mon using Dive into Desolate Land failing to resurface and getting
soft-locked
● Fixed mons not taking crash damage if using Supercell Slam into Lightning Rod
or Volt Absorb
● Fixed mons being able to reselect their moves after using a move into a
Bulletproof immunity white holding Choice items (and a few other scenarios)
● Fixed Entrainment into Primal Weather abilities not clearing the weather
● Fixed bug where in certain scenarios if you swapped multiple turns in a row with
multiple mons with Intimidate, it wouldn’t proc
● Fixed Parental Bond making moves that take 2 turns happen in one
● Fix bug where Weather Ball type was not being set correctly
● Fixed typo in Stevens dialogue on Route 128
● Fixed typo in Trainer X’s dialogue
● Fixed typo in Supreme Overlord ability description
● Fixed typo in Screen Cleaner description
NOTE: The numbers in parentheses next to some of these changes
represents a pull request number into emerald-expansion (the base
for this hack). It is mostly there for my own internal tracking purposes
and you don’t have to worry about it!
AI Changes/Improvements:
● AI’s Pokemon can now be pre-statused! This will be indicated in the Boss Battles
Doc, see Juan’s Ursaluna for example
● AI will no longer attempt to status you if you have abilities that benefit from it;
Guts, for example (6550)
● AI will no longer use Scald or other fire moves on Frostbitten Pokemon unless it
is extremely beneficial to do so (can KO for example) (6442)
● AI will no longer go for set up moves when facing a Pokemon with the Unaware
ability (6524)
● In situations where the AI has a slow KO and a last-chance priority move
(meaning it has a priority move, but is also is getting fainted by the player), the AI
now has an 80% for the last-chance priority move to be scored higher than the
slow KO move (7337)
● AI can now see it has a Focus Sash when considering switch-ins and
determining number of hits to be KOed, applies to both mid-turn switches and
post-KO switches (6436)
○ AI should now see its own and the player’s Focus Sash / Sturdy in all its
calculations
● AI can now see that Magic Guard affects Mind Blown and Steel Beam
● AI can now factor in its own weather-setting abilities when determining switch-ins
(7373)
● AI should now correctly see all scenarios where either itself or the player are
Choice locked
○ Will now factor in the player’s move they are Choice locked into when
determining hits to KO for switchin candidates and deciding switching out
(6343)
○ Will now switch if it is Choice locked into a move that cannot hit the
player’s Pokemon (6464)
○ Will no longer consider other moves when searching for its own
supereffective moves while Choice locked (6892)
● AI will now be encouraged to use a pivot move if they have Palafinn on the field
to activate Zero to Hero (6791)
● Absorb AI Switching (the following are checked in order in code)
○ AI will now see Mold Breaker when factoring in switches for Absorb
Abilities (6864):
○ In situations where Absorb Switch AI is being considered, if the AI’s mon
on the field has a super effective move, it will now switch 40% of the time
instead of 33% previously
○ AI will now switch into a mon with an Absorbing Ability 100% of the time if
the player is Choice locked into a move it can absorb
○ AI will now switch into a mon with an Absorbing Ability 80% of the time as
the default case instead of 100% previously
● AI will now recognize when the player has Absorb Abilities when determining if its
moves are effective (7309)
● AI will now score Magnitude and Present as their average damage amounts
instead of 0 (7334)
● AI will no longer get a flat decrease to Explosion moves, and had some custom
handling added to determine when it should consider using Explosion moves to
pick up KOs (see section at bottom)
● AI will no longer be encouraged to go for setup moves when the player is at full
health and has Sturdy, is holding a Focus Sash, or is Mimikyu-Disguised (7345)
○ Fixes AI spamming setup moves into these mons because they never see OHKO
● AI will no longer be encouraged to go for stat dropping moves when the player is
at -4 or lower for the given stat category
● AI will no longer be discouraged from going for Shell Smash if they are not a
mixed attacker
● AI will now prefer to go for an extremely low damaging move over a move that
has no effect at all in certain very unfavorable situations (7350)
● Added rudimentary 1v1 calculation to Bad Odds switching so Pokemon that win a
1v1 won’t switch even if they have no super effective move and / or a bad type
matchup (6927)
● “Defensive switchin candidate” changed to require winning the projected 1v1 in
addition to just taking more than 3 hits to KO (6927)
● Improved Substitute/ Shed Tail switch AI (6334, updated in 6615)
● Improved AI’s defense against Focus Punch (6713)
● Improved AI’s setup scoring vs Haze (and other Haze-like effects) (6894, 6966)
● Improved AI’s move scoring when considering using Hazard moves when the
player has moves that can clear them (6311)
● Improved AI’s ability to determine when it should go for a recovery move,
including Strength Sap (7342)
● Improved AI’s ability to see priority moves. The AI should now be consistently
factoring in both its own and the player’s priority moves for all scenarios
(switch-in 1v1s, setup move scoring, normal move scoring, etc) (7337)
● Improved AI’s ability to choose moves when facing a Pokemon holding a
supereffective move reducing berry:
○ Before: If AI sees it can 2HKO the player through a resist berry, it will
pretend the berry is not there when doing its damage calc. This led to
situations where the AI thought it could OHKO the player, and the AI could
choose to go for a 2HKO through a resist berry instead of an OHKO with
another move.
○ Now: If AI sees it can 2HKO the player through a resist berry, it will
pretend the berry is not there when doing its damage calc. However, now
if the AI has to choose between a move that is not affected by a resist
berry and a move it “thinks” can OHKO because it is ignoring the resist
berry, it will choose the move that is unaffected by the resist berry and can
actually OHKO the player. This means the AI will no longer choose a
move that can 2HKO through a resist berry over a move that can OHKO.
○ This is factored into the “compare damaging moves” functionality
described at the bottom
● Fixed various things in the AI’s damage calc formula (6396, 6397, 6733, 7130)
● Fixed potential double switching caused by Wonder Guard (6737)
● Fixed cases where AI could see Zero-Hit-KOs for switch-ins, which caused many
strange switches (7131)
○ Generic “switchin can 1v1” with no other clauses has been added as a
higher priority than “generic highest damage mon” when determining
switchin candidates for both post-KO and mid battle
● Fixed cases where AI could incorrectly see it has a free switch after the player
uses a pivot move, causing it to make some bad switch-in decisions (6498)
● Fixed a bug where AI could potentially not see what stat it was boosting correctly
for setup moves (7346)
● Adjustments for move comparison scoring (7301 + what iriv changed)
● AI can now adjust its switch scoring based on its move scoring (6615)
○ If all the AI’s moves score beneath 90, the Pokemon will switch out
○ If the AI has a switch out effect move (U-Turn, Chilly Reception, etc.) that
scores above 100, the AI will cancel any switch it is considering and stay
in (probably to use that move, but not necessarily)
○ The AI will not switch if it cannot hit the player’s Pokemon
● Reworked the “type matchup” formula that is used to determine if an AI Pokemon
has a “good defensive matchup” (7364)
○ In the following description, Atk1 represents the “primary type of the
attacking Pokemon”, Atk2 represents the “secondary type of the attacking
Pokemon”, and same for Def1 and Def2
○ Previously, the formula was:
If the result of this equation was less than 1, then it’s a “good type
matchup”:
(Atk1 -> Def1) x (Atk2 -> Def1) x (Atk1 -> Def2) x (Atk2 -> Def2)
○ Example of the old formula that would result in a poor decision from the
AI: the player has a Poliwrath, and the AI has a Ceruledge in its party and
is trying to determine a good switch into the Poliwrath.
Going through the old formula, we would see:
(Water->Fire=2) x (Fight->Fire=1) x (Water->Ghost=1) x (Fight->Ghost=0)
= Total: 0
This meant that even though Ceruledge is probably a bad matchup into
Poliwrath because Water is supereffective on Fire, the AI would see it as a
good matchup because Ghost is immune to fighting. Type immunities like
this are the most obvious example of where the old formula led to poor
decisions, but there were others as well.
○ The new formula is:
If the result of this equation is less than 2, then it’s a good type
matchup:
((Atk1 -> Def1) x (Atk2 -> Def1)) + ((Atk1 -> Def2) x (Atk2 -> Def2))
Notably, immunities are treated as 0.1 instead of 0 here!
○ Let’s use the same example with the new formula:
((Water->Fire=2) x (Fight->Fire=1)) = 2 +
((Water->Ghost=1) x (Fight->Ghost=0)) = 0.1
2 + 0.1 = Total: 2.1
And since 2.1 is greater than 2, this is considered a bad type matchup!
○ Some other examples of cases where the new behaviour makes
improvements:
Player’s Camerupt -> AI’s Bellossom used to see Bellossom as Neutral,
now sees Bad
Player’s Toxicroak -> AI’s Aggron used to see Aggron as Good, now sees
Bad
○ The immunity value is specifically less than 0.125 because that threshold
ties quad resistances; with 0.125, Aegislash sees the same matchup into
a mono Fighting mon as it does into a mono Bug mon, where it is
obviously better into Fighting. Having that multiplier at 0.1 instead keeps
this behaviour.
● Added custom handling for the AI considering Explosion moves that makes its
likelihood to consider Exploding scale with the amount of HP it is missing:
○ If the AI has >= 90% HP, it has a 0% chance to consider Exploding
○ If the AI has <= 10% HP, it has a 90% chance to consider Exploding
○ All chances to consider Exploding for HPs between 10% and 90% are
calculated with the following formula:
RandomNumber(0-255) < X where:
X = ((90 - %HP) * 229) / 80
○ So at 50% HP, the AI has a roughly 45% chance to consider Exploding
○ This formula is run at the beginning of when the AI is choosing its moves
to determine if it should consider moves with the Explosion effect
○ If this check fails, Explosion moves will get a flat -10
○ Explosion will also get a flat -10 if the target is immune to it (Ghost type
into normal-type Explosion for example)
○ Explosion will also get a flat -10 if the ability Damp is on the field
○ Explosion effects will also be seen as negative effects when comparing
between 2 damaging moves
● Fix AI not calcing Explosion damage with halved defensive stats for the target
● Reworked some of how AI compares its damaging moves
(AI_CompareDamagingMoves for those that look at the code)
(7337 + some other custom work)
○ The following is the new order of importance when comparing 2 damaging
moves:
1) Fewest number of hits to KO
Then the following are checked for moves that have the same number of
hits to KO
2) If number of hits to KO is 1, then give preference to priority moves if the
AI is outsped otherwise
3) Give preference to moves that are not 2-turn attacks (Solarbeam,
Phantom Force, etc)
4) If number of hits to KO is 1, then give preference to moves that are not
affected by a resist berry that the player is holding
5) If number of hits to KO is 1, then check min rolls and give preference to
moves that are guaranteed OHKOs, if any
6) Give preference to moves that do significantly more damage than other
moves. “Significantly” here is defined by seeing if one move’s lowest roll
does more than another move’s highest roll. This check is not run if there
are 2 moves that are guaranteed OHKOs.
7) Give preference to moves with higher accuracy
8) Give preference to moves with better secondary effects
○ The overall goal of these changes was to try and keep a smart and unique
move selection criteria that is not just “always pick highest damage move”,
while also giving some incentive for higher damage moves in situations
where it is very obvious that a move does a lot more than another
● Slight rework to how AI decides to use Fast Pivot Moves (U-Turn, Volt Switch,
Parting Shot, etc when the AI is faster)
○ Pivot moves are no longer seen as a positive effect when comparing 2
moves of equal scoring
○ The criteria for the AI to get an explicit score increase for a fast pivot are
now:
■ AI is faster
■ AI can not KO the player
■ AI has a mon that can reasonably switch in (determined from
previous switch checks)
■ The AI mon on the field has >= 33% HP, or 25% HP and
regenerator
■ AND One of the following is true:
• The player can KO the AI Pokemon
• The AI does not have any stat boosts, has a good switch in
candidate, and can break the player’s Sturdy/Focus Sash/
Shadow Shield/ Multiscale
● The AI does not have any stat boosts and generally has a
good switch in candidate
Credits:
● HUGE credits to the pokeemerald-expansion team for all the fixes /
improvements that I ported from them
● Notably HUGER credits to Pawkkie, Alex, and hedara from the expansion team,
as it is most often their work on expansion that I am porting for this game.
Pawkkie especially is directly responsible for the vast majority of these AI fixes
and improvements!
● Credits to yyatsuta for maintaining the patcher that we use for new versions!
● Credits to Kildemal, Specker, and iamguitar for creating and maintaining the
official website and pokedex for Emerald Imperium, absolute goats!
● Credits to anyone who made a PR to the repo that I may have missed
Thank you all for continuing to make bug reports and feedback posts, I know I can
never get to every single thing mentioned there, but I do read all of them and implement
and fix as many as I can so please keep leveraging those systems!