mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixes wrong ability index after fusing
This commit is contained in:
@@ -801,7 +801,12 @@ def setAbilityAndNatureAndNickname(abilitiesList, naturesList)
|
||||
screen = PokemonOptionScreen.new(scene)
|
||||
screen.pbStartScreen
|
||||
|
||||
@pokemon1.body_original_ability_index = @pokemon1.ability_index
|
||||
@pokemon1.head_original_ability_index = @pokemon2.ability_index
|
||||
|
||||
|
||||
@pokemon1.ability = scene.selectedAbility
|
||||
@pokemon1.ability_index = locate_ability_index(@pokemon1,scene.selectedAbility)
|
||||
@pokemon1.nature = scene.selectedNature
|
||||
if scene.hasNickname
|
||||
@pokemon1.name = scene.nickname
|
||||
@@ -809,6 +814,17 @@ def setAbilityAndNatureAndNickname(abilitiesList, naturesList)
|
||||
|
||||
end
|
||||
|
||||
def locate_ability_index(pokemon, ability)
|
||||
abilityList = pokemon.getAbilityList
|
||||
for possible_ability in abilityList
|
||||
if possible_ability[0] == ability.id
|
||||
return possible_ability[1]
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
def setFusionMoves(fusedPoke, poke2, selected2ndOption = false)
|
||||
#NEW METHOD (not ready)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user