fixes ability capsule not changing the ability

This commit is contained in:
infinitefusion
2024-06-30 15:18:42 -04:00
parent 0ba5b1551e
commit c6a52b7940

View File

@@ -1075,6 +1075,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
pkmn.ability = GameData::Ability.get((newabil == 0) ? abil1 : abil2).id
#pkmn.ability = GameData::Ability.get((newabil == 0) ? abil1 : abil2).id
scene.pbHardRefresh
scene.pbDisplay(_INTL("{1}'s Ability changed to {2}!", pkmn.name, newabilname))