• 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!
  • 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.

[Question] New weather: Windy weather

DarkFoxVerdigris

Founder of Pokémon Verdigris
  • 11
    Posts
    5
    Years
    • Seen Nov 26, 2020
    So I am once again here asking for help with windy weather because V18 changed stuff and now it doesn't work at all. The thing with it is that it doesn't power up a type but a flag of moves.


    So I have this code:
    Code:
        when PBWeather::Wind
          if move.windMove?
            mults[BASE_DMG_MULT] = (mults[BASE_DMG_MULT]*1.5).round
          end
    Or, alternatively (neither work):
    Code:
     when PBWeather::Wind
          if move.windMove?
            multipliers[FINAL_DMG_MULT] = (multipliers[FINAL_DMG_MULT]*1.5).round
          end
    Put under the
    Code:
    case @battle.pbWeather
    And whenever wind is in place in the game no move at all works, instead I get this error:
    Code:
    ---------------------------
    Pokemon Essentials
    ---------------------------
    [Pokémon Essentials version 18]
    
    Exception: NameError
    
    Message: undefined local variable or method move' for #<PokeBattle_Move_00C:0xcd863f8>
    
    
    
    Backtrace:
    
    Move_Usage_Calculations:398:in pbCalcDamageMultipliers'
    
    Move_Usage_Calculations:248:in pbCalcDamage'
    
    Battler_UseMove:623:in pbProcessMoveHit'
    
    Battler_UseMove:615:in each'
    
    Battler_UseMove:615:in pbProcessMoveHit'
    
    Battler_UseMove:426:in pbUseMove'
    
    Battler_UseMove:424:in each'
    
    Battler_UseMove:424:in pbUseMove'
    
    Battler_UseMove:59:in pbProcessTurn'
    
    Battler_UseMove:58:in `logonerr'

    Do you have any idea what the error is and how to fix it? Thank you!
     
    I think the problem is that you didn't define "windMove?", or you did it in the wrong location. Be sure to put it inside the class "PokeBattle_Move".
     
    I think the problem is that you didn't define "windMove?", or you did it in the wrong location. Be sure to put it inside the class "PokeBattle_Move".

    I should have specified: no attacking moves work during wind because they don't know how to calculate damage, I guess
     
    I should have specified: no attacking moves work during wind because they don't know how to calculate damage, I guess
    No moves work during wind because the code checks "move.windMove?"for every move but then realizes that function (windMove?) doesn't exist.
    it doesn't matter if it "is" one or not. Sorry for the confusion. :)
     
    No moves work during wind because the code checks "move.windMove?"for every move but then realizes that function (windMove?) doesn't exist.
    it doesn't matter if it "is" one or not. Sorry for the confusion. :)

    After testing it and something else I can tell you: no, that isn't the problem. I did define wind moves, it just seems there is either no way for weather and terrains to boost flagged moves, or that isn't the way.
     
    Oof, I just realised the problem. Sorry for me wrongly accusing you of not defining that function. :(
    The function "def pbCalcDamageMultipliers(user,target,numTargets,baseDmg,type,multipliers)" where your multiplier is located is part of the PokeBattle_Move class which means you adress the move with "self" or nothing.Try if this works:
    Spoiler:
     
    Oof, I just realised the problem. Sorry for me wrongly accusing you of not defining that function. :(
    The function "def pbCalcDamageMultipliers(user,target,numTargets,baseDmg,type,multipliers)" where your multiplier is located is part of the PokeBattle_Move class which means you adress the move with "self" or nothing.Try if this works:
    Spoiler:

    Oh thank you! It works now. That was one of my theories, but I had no idea how to change it. I'm still a newbie so these kinds of help are appreciated, thank you. :)
     
    Back
    Top