• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

Making an item to level down a pokemon

mde2001

Pokemon Industrial Developer
  • 70
    Posts
    10
    Years
    • Seen Aug 26, 2016
    Hi,

    I was wondering how you would add an item to add an item that does the opposite of a rare candy (eg. level down a pokemon by 1).

    I don't mind if it lowers happiness or other things like that.

    Thanks.
     
    Code:
    ItemHandlers::UseOnPokemon.add(:DARKCANDY,proc{|item,pokemon,scene|
       pbChangeLevel(pokemon,pokemon.level-1,scene)
       scene.pbHardRefresh
       next true
    })

    search Rare Candy next time. The pbChangeLevel function already includes messages for if you're lowering the level.
     
    Code:
    ItemHandlers::UseOnPokemon.add(:DARKCANDY,proc{|item,pokemon,scene|
       pbChangeLevel(pokemon,pokemon.level-1,scene)
       scene.pbHardRefresh
       next true
    })

    search Rare Candy next time. The pbChangeLevel function already includes messages for if you're lowering the level.

    Wouldn't you need to add an if statement to check if the Pokémon's level is equal to 1 so the level doesn't go to 0? I would do this myself, but I'm new to Ruby and don't know how to check for a Pokémon's level.

    EDIT: I just tested it out and it doesn't lower the Pokémon's level if it is level 1. Sorry for doubting you, I'm new to this. If you need a Dark Candy icon, OP, I've quickly made one. It's attached below. Put it in Graphics>Icons and change 577 to the number of your Dark Candy item.
     
    Last edited:
    Thanks for your help!

    I don't think I'm going to use that icon but thanks for making it anyway (if I do I'll credit you obviously!)
     
    Sorry, another question now. Where would I put this code?
     
    Back
    Top