• 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.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Recovery moves as overworld moves

v19 Recovery moves as overworld moves N/A

This resource pertains to version 19 of Pokémon Essentials.
Pokémon Essentials Version
v19 ➖
I made this for messi3d on this thread, but I figured it'd be easier to put it in resources if anyone else is looking for it!


V19
Moves like these affect the party rather than the overworld, so we need to define them in UI_Party. Locate this part of the code:
Ruby:
Expand Collapse Copy
          if [:MILKDRINK, :SOFTBOILED].include?(m.id) ||
             HiddenMoveHandlers.hasHandler(m.id)

This defines all moves that will appear as commands. To make another move appear as a command, just add it to the list- for example:

Ruby:
Expand Collapse Copy
          if [:MILKDRINK, :SOFTBOILED, :ROOST].include?(m.id) ||
             HiddenMoveHandlers.hasHandler(m.id)

However, this is only the part that makes the command appear. For the actual function, we have to go a little further down.


Ruby:
Expand Collapse Copy
            pbRefresh
            break
        elsif pbCanUseHiddenMove?(pkmn,pkmn.moves[i].id)
          if pbConfirmUseHiddenMove(pkmn,pkmn.moves[i].id)
That "elsif" is setting up the commands for Hidden Moves, right after the code for Softboiled/Milk Drink has been completed. So we'll put our new code right in between them.
Ruby:
Expand Collapse Copy
            pbRefresh
            break
#CODEGOESHERE
        elsif pbCanUseHiddenMove?(pkmn,pkmn.moves[i].id)
          if pbConfirmUseHiddenMove(pkmn,pkmn.moves[i].id)



Moves that heal the user
Ruby:
Expand Collapse Copy
        elsif [:ROOST,:RECOVER].include?(pkmn.moves[i].id)
            amt = [(pkmn.totalhp/5).floor,1].max
            if pkmn.hp==0 || pkmn.hp==pkmn.totalhp
              movename = pkmn.moves[i].name
                pbDisplay(_INTL("{1} can't be used.",movename))
                @scene.pbSelect(pkmnid)
                break
              end
            if pkmn.moves[i].pp<=1
              pbDisplay(_INTL("Not enough PP..."))
              break
            end
                pkmn.moves[i].pp -= 1
                hpgain = pbItemRestoreHP(pkmn,amt)
                @scene.pbDisplay(_INTL("{1}'s HP was restored by {2} points.",pkmn.name,hpgain))
                pbRefresh
            @scene.pbSelect(pkmnid)
            pbRefresh
            break
  • This move can't be used while the Pokemon is fainted or at full health. It also only works on the user.
  • Using this move outside of battle will deplete 1PP from the move. If you'd like to change this, change pkmn.moves[I].[/I]pp -= 1
  • If you paste this code in as it is, only Roost and Recover will work this way. To add more moves, add them to the list that you changed in the first step and add them to the list at the top. (elsif [:ROOST,:RECOVER])
  • These moves will heal by 1/5th of the user's max HP. If you'd like to change that, change amt = [(pkmn.totalhp/5).floor,1].max. If you'd like different moves to have different amounts, set up a condition for amt.

As an example, this makes Roost restore by 1/5 total HP, while Recover restores by 1/2.
Ruby:
Expand Collapse Copy
          if pkmn.moves[i].id == :ROOST
            amt = [(pkmn.totalhp/5).floor,1].max
          elsif pkmn.moves[i].id == :RECOVER
            amt = [(pkmn.totalhp/2).floor,1].max
           end

Moves that cure the party's status effects
Ruby:
Expand Collapse Copy
        elsif [:HEALBELL].include?(pkmn.moves[i].id)
            if pkmn.hp==0
              movename = pkmn.moves[i].name
                pbDisplay(_INTL("{1} can't be used.",movename))
                @scene.pbSelect(pkmnid)
                break
              end
            if pkmn.moves[i].pp==0
              pbDisplay(_INTL("Not enough PP..."))
              break
            end
            oldpkmnid = pkmnid
            cured = 0
            #moveno = i
            for j in 0...party.length
              newpkmn = @party[j]
              if newpkmn.status!=:NONE
                newpkmn.heal_status
              else
                cured+=1
             end
            end
          if cured==party.length
            pbDisplay(_INTL("Nobody has any status effects!"))
            @scene.pbSelect(oldpkmnid)
            pbRefresh
          else
            pbDisplay(_INTL("Everyone's status effects were cured!"))
            @scene.pbSelect(oldpkmnid)
            pkmn.moves[i].pp -= 1
            pbRefresh
            break
          end

Same deal as the recovery moves! Depletes 1PP outside of battle, can't be used if there's no need for it or if the user is fainted! This is only set up for Heal Bell, but adding Aromatherapy should be a cinch!



Prior to v19
Moves like these affect the party rather than the overworld, so we need to define them in PScreen_Party. Locate this part of the code:
Ruby:
Expand Collapse Copy
        if !pkmn.egg? && (isConst?(move.id,PBMoves,:MILKDRINK) ||
                          isConst?(move.id,PBMoves,:SOFTBOILED) ||
                          HiddenMoveHandlers.hasHandler(move.id))

This defines all moves that will appear as commands. To make another move appear as a command, just add it to the list- for example:
Ruby:
Expand Collapse Copy
        if !pkmn.egg? && (isConst?(move.id,PBMoves,:MILKDRINK) ||
                          isConst?(move.id,PBMoves,:SOFTBOILED) ||
                          isConst?(move.id,PBMoves,:ROOST) ||
                          HiddenMoveHandlers.hasHandler(move.id))

However, this is only the part that makes the command appear. For the actual function, we have to go a little further down.

Ruby:
Expand Collapse Copy
            @scene.pbSelect(oldpkmnid)
            pbRefresh
            break
          elsif pbCanUseHiddenMove?(pkmn,pkmn.moves[i].id)
            if pbConfirmUseHiddenMove(pkmn,pkmn.moves[i].id)
That "elsif" is setting up the commands for Hidden Moves, right after the code for Softboiled/Milk Drink has been completed. So we'll put our new code right in between them.
Ruby:
Expand Collapse Copy
            @scene.pbSelect(oldpkmnid)
            pbRefresh
            break
#CODEGOESHERE
          elsif pbCanUseHiddenMove?(pkmn,pkmn.moves[i].id)
            if pbConfirmUseHiddenMove(pkmn,pkmn.moves[i].id)
Moves that heal the user
Ruby:
Expand Collapse Copy
          elsif isConst?(pkmn.moves[i].id,PBMoves,:ROOST) ||
                  isConst?(pkmn.moves[i].id,PBMoves,:RECOVER)
            amt = [(pkmn.totalhp/5).floor,1].max
            if pkmn.hp==0 || pkmn.hp==pkmn.totalhp
              movename = PBMoves.getName(pkmn.moves[i].id)
                pbDisplay(_INTL("{1} can't be used.",movename))
                @scene.pbSelect(pkmnid)
                break
              end
            if pkmn.moves[i].pp<=1
              pbDisplay(_INTL("Not enough PP..."))
              break
            end
                pkmn.moves[i].pp -= 1
                hpgain = pbItemRestoreHP(pkmn,amt)
                @scene.pbDisplay(_INTL("{1}'s HP was restored by {2} points.",pkmn.name,hpgain))
                pbRefresh
            @scene.pbSelect(pkmnid)
            pbRefresh
            break
  • This move can't be used while the Pokemon is fainted or at full health. It also only works on the user.
  • Using this move outside of battle will deplete 1PP from the move. If you'd like to change this, change pkmn.moves[I].[/I]pp -= 1
  • If you paste this code in as it is, only Roost and Recover will work this way. You can add more moves in the same way that you added them in the first step, adding isConst?(pkmn.moves.id,PBMoves,:MOVE) to the list here.
  • These moves will heal by 1/5th of the user's max HP. If you'd like to change that, change amt = [(pkmn.totalhp/5).floor,1].max. If you'd like different moves to have different amounts, set up a condition for amt.

Ruby:
Expand Collapse Copy
          if isConst?(pkmn.moves[i].id,PBMoves,:ROOST)
            amt = [(pkmn.totalhp/5).floor,1].max
           elsif  isConst?(pkmn.moves[i].id,PBMoves,:RECOVER)
            amt = [(pkmn.totalhp/2).floor,1].max
           end

Moves that cure the party's status effects
Ruby:
Expand Collapse Copy
          elsif isConst?(pkmn.moves[i].id,PBMoves,:HEALBELL)
            if pkmn.hp==0
              movename = PBMoves.getName(pkmn.moves[i].id)
                pbDisplay(_INTL("{1} can't be used.",movename))
                @scene.pbSelect(pkmnid)
                break
              end
            moveno = i
            oldpkmnid = pkmnid
            cured = 0
            for i in 0...party.length
              newpkmn = @party[i]
              if newpkmn.status!=0
                newpkmn.healStatus
              else
                cured+=1
             end
            end
            if cured==party.length
            pbDisplay(_INTL("Nobody has any status effects!"))
            @scene.pbSelect(oldpkmnid)
            pbRefresh
          else
            pkmn.moves[moveno].pp -= 1
            pbDisplay(_INTL("Everyone's status effects were cured!"))
            @scene.pbSelect(oldpkmnid)
            pbRefresh
            break
          end

Same deal as the recovery moves! Depletes 1PP outside of battle, can't be used if there's no need for it or if the user is fainted! This is only set up for Heal Bell, but adding Aromatherapy should be a cinch!

Looking for more overworld moves?
You may also be interested in Lucidious89's Improved Field Skills.
Credits
Credits to TechSkylander1518, please!
Author
TechSkylander1518
Views
2,149
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from TechSkylander1518

Latest updates

  1. v19 Update

    Now v19-compatible!
Back
Top