• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Recover HP & Increase a Stat Move Function

SassyPants

Fairy & Psychic Type Trainer
4
Posts
2
Years
    • he/him
    • UK
    • Seen Feb 6, 2022
    Having trouble with a Move Effect to recover HP and Increase Defence Stat by one stage.
    Could anyone help by adding the healing bit below?

    class PokeBattle_Move_500 < PokeBattle_StatUpMove
    def initialize(battle,move)
    super
    @statUp = [:DEFENCE,1]
    end
    AND ALSO HEAL
    end

    Thanks in advance! :)
     
    Last edited:
    1,407
    Posts
    10
    Years
    • Seen today
    A good place to start would be to take a look at other existing healing moves that you can work off of.
     

    SassyPants

    Fairy & Psychic Type Trainer
    4
    Posts
    2
    Years
    • he/him
    • UK
    • Seen Feb 6, 2022
    Yeah, I tried to use Roost as a base as a healing move that also does another thing.
    I ended up with:

    Spoiler:


    This isn't quite right, though. This heals the user, but doesn't increase the stat.
    If I change it from PokeBattle_HealingMove to StatUpMove, the move doesn't do anything.
    I'm trying to learn so any help anyone could give would be great! :)
     
    Last edited:
    20
    Posts
    11
    Years
    • Seen Sep 11, 2022
    I have a similar move that I made a while back and this what it looks like:

    Spoiler:
     

    SassyPants

    Fairy & Psychic Type Trainer
    4
    Posts
    2
    Years
    • he/him
    • UK
    • Seen Feb 6, 2022
    *chef's kiss*
    Perfect, thank you so much for your help.
    Using your move, I was able to put together this:

    Spoiler:


    It works exactly as intended. You're a hero.
     
    1,407
    Posts
    10
    Years
    • Seen today
    You may want to stick
    Code:
    def healingMove?; return true; end
    at the top of your code to register that this is a proper healing move, so that it's appropriately targeted by the effects of Heal Block and the Triage Ability.
     
    Back
    Top