• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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
    3
    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:
    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:
    I have a similar move that I made a while back and this what it looks like:

    Spoiler:
     
    *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.
     
    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