Extreme Speed as a field move

Extreme Speed as a field move

Pokémon Essentials Version
v18.1 ✅
xtreme.gif
This makes Extreme Speed a field move able to be used in the overworld! While Extreme Speed is active, the player will walk as fast as they would move while biking, will run and surf faster than that, and will bike even faster!

To make things easier with egg hatching, Extreme Speed is reset not when the player transfers to a new map, but if the player goes indoors!

In Game_Character, find this line:
Ruby:
self.move_speed_real = (val == 6) ? 64 : (val == 5) ? 32 : (2 ** (val + 1)) * 0.8
Replace it with:
Ruby:
self.move_speed_real = (val == 7) ? 128 : (val == 6) ? 64 : (val == 5) ? 32 : (2 ** (val + 1)) * 0.8

In Game_PlayerVisuals, find this section:
Ruby:
  def update_command
    if PBTerrain.isIce?(pbGetTerrainTag)
      self.move_speed = 4     # Sliding on ice
    elsif !moving? && !@move_route_forcing && $PokemonGlobal
      if $PokemonGlobal.bicycle
        self.move_speed = 5   # Cycling
      elsif pbCanRun? || $PokemonGlobal.surfing
        self.move_speed = 4   # Running, surfing
      else
        self.move_speed = 3   # Walking, diving
      end
    end
    super
  end
Change it to this:
Ruby:
  def update_command
    if PBTerrain.isIce?(pbGetTerrainTag)
      self.move_speed = 4     # Sliding on ice
    elsif !moving? && !@move_route_forcing && $PokemonGlobal
      #extremespeed
      if $PokemonGlobal.bicycle
        if $PokemonMap.extremespeedUsed
          self.move_speed = 7
        else
          self.move_speed = 5   # Cycling
        end
        elsif pbCanRun? || $PokemonGlobal.surfing
         if $PokemonMap.extremespeedUsed
            self.move_speed = 6
          else
            self.move_speed = 4   # Running, surfing
          end
        else
          if $PokemonMap.extremespeedUsed
            self.move_speed = 5
        else
          self.move_speed = 3   # Walking, diving
        end
      end
    end
    super
  end

In PField_Metadata, find this section:
Ruby:
class PokemonMapMetadata
  attr_reader :erasedEvents
  attr_reader :movedEvents
  attr_accessor :strengthUsed
  attr_accessor :blackFluteUsed
  attr_accessor :whiteFluteUsed
Add:
Ruby:
  attr_accessor :extremespeedUsed
Below that, find:
Ruby:
  def clear
    @erasedEvents   = {}
    @movedEvents    = {}
    @strengthUsed   = false
    @blackFluteUsed = false
    @whiteFluteUsed = false
end
Before "end", add:
Ruby:
    if $game_player==true
      if !pbGetMetadata($game_map.map_id,MetadataOutdoor)
        @extremespeedUsed = false
      end
    end

And at the end of PField_FieldMoves, add this:

Ruby:
#===============================================================================
# Extreme Speed
#===============================================================================


HiddenMoveHandlers::CanUseMove.add(:EXTREMESPEED,proc { |move,pkmn,showmsg|
  if $PokemonMap.extremespeedUsed
      if pbConfirmMessage(_INTL("Extreme Speed is already being used. Slow down?"))
        $PokemonMap.extremespeedUsed=false
      end
    next false
  end
  next true
})

HiddenMoveHandlers::UseMove.add(:EXTREMESPEED,proc { |move,pokemon|
  if !pbHiddenMoveAnimation(pokemon)
    pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move)))
  end
    pbMessage(_INTL("{1} gave {2} a burst of speed!",pokemon.name,$Trainer.name))
    $PokemonMap.extremespeedUsed=true
  next true
})
Credits
Credits to TechSkylander1518, please!
  • Like
Reactions: Zygoat
Author
TechSkylander1518
Views
580
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from TechSkylander1518

Latest updates

  1. Patching a bug

    Quick update because I realized there's a game-breaking bug if you start a new game! If you're...
Top