• 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!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist 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.

I need help to implement Sand Force

  • 152
    Posts
    15
    Years
    • Seen Jul 6, 2022
    if pbWeather==PBWeather::SANDSTORM && attacker.ability==PBAbilities::SANDFORCE &
    (isConst?(type,PBTypes,:ROCK) || isConst?(type,PBTypes,:GROUND) || isConst?(type,PBTypes,:STEEL))
    basedmg=(basedmg*1.33).floor
    end
    In what script have I to put it?
    I put it in the script PokeBattle_Move, after Thick Fat, but in the battle the Pokemon do not do his attacks.
     
    You put it in the right place. You're missing an ampersand at the end of line 1, which is what's causing the problem.

    For the record, this effect will be in the next version of Essentials. I used the following code (just a cosmetic difference to yours):

    Code:
        if @battle.pbWeather==PBWeather::SANDSTORM
          if isConst?(attacker.ability,PBAbilities,:SANDFORCE) &&
             (isConst?(type,PBTypes,:ROCK) || isConst?(type,PBTypes,:GROUND) ||
             isConst?(type,PBTypes,:STEEL))
            basedmg=(basedmg*1.3).floor
          end
        end
    The multiplier is apparently 1.3, not 4/3.
     
    Back
    Top