• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Resource icon

v21.1 Changed move type display script 0.1

This resource pertains to version 21.1 of Pokémon Essentials.
Pokémon Essentials Version
v21.1 ✅
here is a short script that changes the type displayed of moves affected by abilities like pixilate to their new type, the script also makes hidden power show its type.

Ruby:
Expand Collapse Copy
# updates move type ui based on abilities that change it.
class Battle::Move
  def type_ui_modifiers(battler)
       #
    if @realMove.id == :HIDDENPOWER
      return pbHiddenPower(battler.pokemon)[0]
      end
    if @realMove.display_type(battler.pokemon) == :NORMAL and battler.ability == :PIXILATE # check if battler has ability
      return :FAIRY # type to return
    end
  if @realMove.display_type(battler.pokemon) == :NORMAL and battler.ability == :AERILATE # check if battler has ability
      return :FLYING # type to return
    end
  if @realMove.display_type(battler.pokemon) == :NORMAL and battler.ability == :REFRIGERATE # check if battler has ability
      return :ICE # type to return
    end
  if battler.ability == :NORMALIZE # check if battler has ability
      return :NORMAL # type to return
    end
    end
 end
  end


  def display_type(battler)
    case @function_code
    when "TypeDependsOnUserMorpekoFormRaiseUserSpeed1"
      if battler.isSpecies?(:MORPEKO) || battler.effects[PBEffects::TransformSpecies] == :MORPEKO
        return pbBaseType(battler)
      end
=begin
    when "TypeDependsOnUserPlate", "TypeDependsOnUserMemory",
         "TypeDependsOnUserDrive", "TypeAndPowerDependOnUserBerry",
         "TypeIsUserFirstType", "TypeAndPowerDependOnWeather",
         "TypeAndPowerDependOnTerrain"
      return pbBaseType(battler)
=end
end
    if type_ui_modifiers(battler)
      return type_ui_modifiers(battler) # get new type if there is one
      end
    return @realMove.display_type(battler.pokemon)
  end
end


Edit:

Noticed that a commented out section in display type does something similar but I'm keeping this resource up because it's not that obvious on how to do it. Feel free to enable the commented out section though I don't know how much is affected by it.
Credits
Credit if used:
Charmingloopy
Author
Charmingloopy
Views
761
First release
Last update

Ratings

5.00 star(s) 1 ratings

Latest updates

  1. added hidden power

    added hidden power to the type ui display script so now it will display it's type

Latest reviews

Was looking for something like this for my project.
The fact it changes the battle move UI to better reflect the type change due to abilities makes it easier to track the change in real time.
Back
Top