Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #New evolution methods:
- #Level up with a specific ribbon
- GameData::Evolution.register({
- :id => :LevelRibbon,
- :parameter => :Ribbon,
- :minimum_level => 1, # Needs any level up
- :level_up_proc => proc { |pkmn, parameter|
- next pkmn.hasRibbon?(parameter)
- }
- })
- #Level up with PokeRus
- GameData::Evolution.register({
- :id => :LevelPokerus,
- :parameter => Integer,
- :level_up_proc => proc { |pkmn, parameter|
- next pkmn.level >= parameter && pkmn.pokerus > 0
- }
- })
- #Alternate version of Berserk Gene that works like Toxic Orb?
- #Form handler based on poke ball?
- #Choice Sp Def/Def items
- #Unown are compatible with any move that starts with the same letter -
- #Script section Pokemon, this section -
- def compatible_with_move?(move_id)
- move_data = GameData::Move.try_get(move_id)
- return false if !move_data
- return true if species_data.tutor_moves.include?(move_data.id)
- return true if getMoveList.any? { |m| m[1] == move_data.id }
- return true if species_data.get_egg_moves.include?(move_data.id)
- return false
- end
- #Add
- def compatible_with_move?(move_id)
- move_data = GameData::Move.try_get(move_id)
- return false if !move_data
- return true if species_data.tutor_moves.include?(move_data.id)
- return true if getMoveList.any? { |m| m[1] == move_data.id }
- return true if species_data.get_egg_moves.include?(move_data.id)
- return true if self.isSpecies?(:UNOWN) && move_data.real_name.chr.upcase == species_data.form_name
- return false
- end
- #Shiny autosave
- module Settings
- SHINY_CAUGHT_SWITCH = 59
- end
- module Battle::CatchAndStoreMixin
- # Register all caught Pokémon in the Pokédex, and store them.
- def pbRecordAndStoreCaughtPokemon
- @caughtPokemon.each do |pkmn|
- pbSetCaught(pkmn)
- pbSetSeen(pkmn) # In case the form changed upon leaving battle
- if pkmn.shiny?
- $game_switches[Settings::SHINY_CAUGHT_SWITCH] = true
- end
- # Record the Pokémon's species as owned in the Pokédex
- if !pbPlayer.owned?(pkmn.species)
- pbPlayer.pokedex.set_owned(pkmn.species)
- if $player.has_pokedex
- pbDisplayPaused(_INTL("{1}'s data was added to the Pokédex.", pkmn.name))
- pbPlayer.pokedex.register_last_seen(pkmn)
- @scene.pbShowPokedex(pkmn.species)
- end
- end
- # Record a Shadow Pokémon's species as having been caught
- pbPlayer.pokedex.set_shadow_pokemon_owned(pkmn.species) if pkmn.shadowPokemon?
- # Store caught Pokémon
- pbStorePokemon(pkmn)
- end
- @caughtPokemon.clear
- end
- end
- EventHandlers.add(:on_frame_update, :shiny_saveprompt,
- proc {
- next if $game_temp.in_menu || $game_temp.in_battle || $game_player.move_route_forcing ||
- $game_temp.message_window_showing || pbMapInterpreterRunning?
- if $game_switches[Settings::SHINY_CAUGHT_SWITCH]
- pbMessage(_INTL("You caught a shiny Pokémon!"))
- scene = PokemonSave_Scene.new
- screen = PokemonSaveScreen.new(scene)
- screen.pbSaveScreen
- $game_switches[Settings::SHINY_CAUGHT_SWITCH] = false
- end
- }
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement