• 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!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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] Making a peaceful Leftovers item?

  • 18
    Posts
    5
    Years
    • Seen Jul 13, 2020
    Hey guys,
    I'm trying to make an item that will work like Leftovers, but will heal the pokemon only if it didn't deal any damage this turn.
    Sounds simple enough but I've been struggling with it for quite a while.
    Anyone can try and make that item?
    Thanks!!
     
    Just copy the leftovers code, and make the effect only work if this: if !((Pokemon object).lastMoveUsed.isDamageMove)

    Brilliant!
    It didn't work out exactly as you wrote it though, but after a few manipulations I got it to work with this:
    move = PokeBattle_Move.pbFromPBMove(@battle,PBMove.new(self.lastMoveUsed))
    if !move.pbIsDamaging?


    Thank you! You truly saved the day!
     
    Back
    Top