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

Move errors

orangejediman

Snivy's the badass of Gen V!
  • 81
    Posts
    16
    Years
    Hello! I was putting in some custom things, when moves stopped working. It shows ___ used ____! but no effect happens - this also does not apply to anything that is not targeting an opponent.

    I identified where it happens- basically the first pbDisplay (q) shows up when testing, but the second one (the r) does not. which means the issue has to happen in here:

    Code:
    def pbProcessNonMultiHitMove(thismove,user,target,nocheck=false,alltargets=nil,showanimation=true)
        @battle.pbDisplay(_INTL("q"))
        if !nocheck && !pbSuccessCheck(thismove,user,target,true)
          if thismove.function==0x10B # Hi Jump Kick, Jump Kick
            #TODO: Not shown if message is "It doesn't affect XXX..."
            @battle.pbDisplay(_INTL("{1} kept going and crashed!",user.pbThis))
            damage=[1,(user.totalhp/2).floor].max
            if damage>0
              @battle.scene.pbDamageAnimation(user,0)
              user.pbReduceHP(damage)
            end
            user.pbFaint if user.hp<=0
          end
          user.effects[PBEffects::Outrage]=0 if thismove.function==0xD2 # Outrage
          user.effects[PBEffects::Rollout]=0 if thismove.function==0xD3 # Rollout
          user.effects[PBEffects::FuryCutter]=0 if thismove.function==0x91 # Fury Cutter
          user.effects[PBEffects::EchoedVoice]=0 if thismove.function==0x92 # Echoed Voice
          user.effects[PBEffects::Stockpile]=0 if thismove.function==0x113 # Spit Up
          return
        else
          if thismove.function==0x91 # Fury Cutter
            user.effects[PBEffects::FuryCutter]+=1 if user.effects[PBEffects::FuryCutter]<4
          else
            user.effects[PBEffects::FuryCutter]=0
          end
          if thismove.function==0x92 # Echoed Voice
            user.effects[PBEffects::EchoedVoice]+=1 if user.effects[PBEffects::EchoedVoice]<5
          else
            user.effects[PBEffects::EchoedVoice]=0
          end
        end
        @battle.pbDisplay(_INTL("r"))
        damage=thismove.pbEffect(user,target,0,alltargets,showanimation) [...]

    this is in PokeBattle_Battler. Is there any problem that you all can see, or more that you need to help, please help me.
     
    Why did you say you've added custom stuff, and then not show it to us to analyse?

    The problem is somewhere in def pbSuccessCheck, by the way.
     
    Well, the changes are kind of spread out and I'd already boiled it down to in that section of code. The problem is that i have not actually changed anything in pbSuccessCheck, as can be seen here:

    Spoiler:

    So I'm not quite sure what's going on. I've added some ability effects in the damage calculation such as Fur Coat, but that part of the code isn't even reached.
     
    This was the error message after an abomasnow used Icy Wind:

    Spoiler:
     
    Back
    Top