Advertisement
TechSkylander1518

Vendily's Evolve During Battle (v18/19/20)

Sep 14th, 2022
1,207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.16 KB | None | 0 0
  1. #In Battle_ExpAndMoveLearning, find this line:
  2.       moveList.each { |m| pbLearnMove(idxParty,m[1]) if m[0]==curLevel }
  3. #Right after that (NOT after the ends!), paste this:
  4.           newspecies=pkmn.check_evolution_on_level_up
  5.           old_item=pkmn.item
  6.           if newspecies
  7.             pbFadeOutInWithMusic(99999){
  8.             evo=PokemonEvolutionScene.new
  9.             evo.pbStartScreen(pkmn,newspecies)
  10.             evo.pbEvolution
  11.             evo.pbEndScreen
  12.             if battler
  13.               @scene.pbChangePokemon(@battlers[battler.index],@battlers[battler.index].pokemon)
  14.               battler.name=pkmn.name
  15.             end
  16.           }
  17.           if battler
  18.             pkmn.moves.each_with_index do |m,i|
  19.               battler.moves[i] = Battle::Move.from_pokemon_move(self,m)
  20.             end
  21.             battler.pbCheckFormOnMovesetChange
  22.             if pkmn.item!=old_item
  23.               battler.item=pkmn.item
  24.               battler.setInitialItem(pkmn.item)
  25.               battler.setRecycleItem(pkmn.item)
  26.             end
  27.           end
  28.         end
  29. #For versions prior to v20, change this line -
  30.               battler.moves[i] = Battle::Move.from_pokemon_move(self,m)
  31. #to
  32.               battler.moves[i] = PokeBattle_Move.from_pokemon_move(self,m)
  33. #If you're using v19, remember that v19 had a bug during evolution- make sure you've either downloaded the hotfixes or are working with a newer version.
  34. #If you're on v18/v18.1, then you'll need to change the first two lines from:
  35.       newspecies=pkmn.check_evolution_on_level_up
  36.           if newspecies
  37. #to
  38.       newspecies=pbCheckEvolution(pkmn)
  39.           if newspecies>0
  40. #Finally, to fix a map's BGM not resuming after battle, go to PokeBattle_Scene and find this section:
  41.   def pbEndBattle(_result)
  42.     @abortable = false
  43.     pbShowWindow(BLANK)
  44.     # Fade out all sprites
  45.     pbBGMFade(1.0)
  46.     pbFadeOutAndHide(@sprites)
  47.     pbDisposeSprites
  48.   end
  49. #Add $game_map.autoplay in, like so-
  50.   def pbEndBattle(_result)
  51.     @abortable = false
  52.     pbShowWindow(BLANK)
  53.     # Fade out all sprites
  54.     pbBGMFade(1.0)
  55.     pbFadeOutAndHide(@sprites)
  56.     pbDisposeSprites
  57.     $game_map.autoplay
  58.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement