• 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?".
  • Staff applications for our PokéCommunity Daily and Social Media team are now open! Interested in joining staff? Then click here for more info!
  • 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
    9
    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