Correcting Ability Capsules

Ability capsules were only updating the ID of the ability the pokemon thought it had, and not actually changing the pokemon's ability. This changes that.
This commit is contained in:
RonarsCorruption
2023-04-02 07:33:22 -04:00
committed by infinitefusion
parent 222327481f
commit 3b6d636e72

View File

@@ -1068,7 +1068,8 @@ ItemHandlers::UseOnPokemon.add(:ABILITYCAPSULE, proc { |item, pkmn, scene|
if scene.pbConfirm(_INTL("Would you like to change {1}'s Ability to {2}?",
pkmn.name, newabilname))
pkmn.ability_index = newabil
scene.pbRefresh
pkmn.ability = GameData::Ability.get((newabil == 0) ? abil1 : abil2).id
scene.pbHardRefresh
scene.pbDisplay(_INTL("{1}'s Ability changed to {2}!", pkmn.name, newabilname))
next true
end