• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - 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.

[Scripting Question] Attacking move that set Weather fails by some reason

  • 4
    Posts
    8
    Years
    • Seen May 31, 2024
    The move in question is supposed to deal damage then set up a Hail. In the first attempt, I tried to set the moves function code in the PBS to be the same as Hail, and while the move works fine in the first use, it completely fails the second time. Then I tried to add a pbAdditionalEffect to set Hail if Hail is not already up, like this:
    Code:
    class PokeBattle_Move_300 < PokeBattle_WeatherMove
      def pbAdditionalEffect(user,target)
        @weatherType = :Hail if ![:Hail].include?(@battle.pbWeather)
      end
    end

    And now the move just fails regardless. I assume is something in the PokeBattle_WeatherMove that's forcing the move to fail, but if I try to set it as a regular damaging move (as in, use PokeBattle_Move_300 < PokeBattle_Move), the move deals damage but the Weather doesn't start. I'm just really confused, and help would be much appreciated.
     
    Back
    Top