• 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!
  • Dawn, Gloria, Juliana, or Summer - 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.

How does applysandstorm work?

  • 85
    Posts
    7
    Years
    • Seen Nov 24, 2023
    Hey there, I found two errors regarding the 17.2 version of Pokemon Essentials.

    The first one is pretty simple:The move Petal Blizzard is written to be a special attack in the PBS files, even though it should be a physical attack.
    ^Disregard this one.I just realised Petal Blizzard is a gen 6 move that I got from a different PBS file,so it has nothing to do with the normal Essentials version....

    For the second one, however, I'm not sure if it's an actual error or it's just me misunderstanding the script, but, in the script editor, in the PokeBattle_Move folder, around the line 931, it is written so that Sandstorm raises the DEFENSE or Rock Types, even though it should raise their Special Defense.Here's how it looks:
    Code:
        defense=opponent.defense
        if @battle.pbWeather==PBWeather::SANDSTORM &&
           opponent.pbHasType?(:ROCK) && applysandstorm
          defense=(defense*1.5).round
        end

    This is how I tried to fix it,although I'm not 100% sure it worked:

    Code:
        spdef=opponent.spdef
        if @battle.pbWeather==PBWeather::SANDSTORM &&
           opponent.pbHasType?(:ROCK) && applysandstorm
          spdef=(spdef*1.5).round

    Please let me know if I'm wrong.
     
    Last edited:
    You're wrong on all three counts.

    Firstly, there's no such version as 1.7. The latest version is 17.2.

    Secondly, Petal Blizzard is a move from Gen 6, and the PBS files that come with Essentials only go up to Gen 5. It's not my problem.

    Thirdly, the variable defense contains the target's Defense stat if the move is physical, or the target's Special Defense if the move is special. Think of it as the defensive stat, rather than specifically Defense. atk is the same; it's the attacking stat (which is either Attack or Special Attack as appropriate). The code for Sandstorm is correct, so don't worry about it.
     
    You're wrong on all three counts.

    Firstly, there's no such version as 1.7. The latest version is 17.2.

    Secondly, Petal Blizzard is a move from Gen 6, and the PBS files that come with Essentials only go up to Gen 5. It's not my problem.

    Yep, I apologize. I just realised those 2 were wrong right before I read your reply.

    Thirdly, the variable defense contains the target's Defense stat if the move is physical, or the target's Special Defense if the move is special. Think of it as the defensive stat, rather than specifically Defense. atk is the same; it's the attacking stat (which is either Attack or Special Attack as appropriate).

    But if that's the case, won't Sandstorm buff the Pokemon's defense or special defense depending on whether it has been hit by a physical or special attack? Shouldn't it be changed so that the buff activates only when the Pokemon's hit by a special attack?
     
    But if that's the case, won't Sandstorm buff the Pokemon's defense or special defense depending on whether it has been hit by a physical or special attack? Shouldn't it be changed so that the buff activates only when the Pokemon's hit by a special attack?
    That's the point of the variable applysandstorm. It's only true if it's a special move, and thus defense happens to contain the target's Special Defense stat.
     
    Back
    Top