• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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

  • 199
    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