• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

[PBS] Gen 7 PBS, Scripts, Graphics and more

Status
Not open for further replies.
195
Posts
7
Years
  • Age 27
  • Seen Apr 12, 2024
Ok so I downloaded and updated my essentials with all this and I got these errors. The first is wild battle and the second is trainer.

Code:
Exception: NameError
Message: undefined local variable or method `opponent' for #<PokeBattle_Battler:0x967bff0>
PokeBattle_Battler:888:in `pbCheckForm'
PokeBattle_Battle:2133:in `pbOnActiveAll'
PokeBattle_Battle:2131:in `each'
PokeBattle_Battle:2131:in `pbOnActiveAll'
PokeBattle_Battle:2574:in `pbStartBattleCore'
PokeBattle_Battle:2399:in `pbStartBattle'
PField_Field:905:in `pbWildBattle'
PField_Field:904:in `pbSceneStandby'
PField_Field:906:in `pbWildBattle'
PField_Field:903:in `pbBattleAnimation'

Exception: RuntimeError
Message: Script error within event 8, map 81 (Imogi Town):
Exception: NameError
Message: Section080:888:in `pbCheckForm'undefined local variable or method `opponent' for #<PokeBattle_Battler:0xa3a0e58>
***Full script:
pbTrainerBattle(PBTrainers::FISHERMAN,"Ray",_I("Sing it with me!"),false,0,false,0)
Interpreter:243:in `pbExecuteScript'
PokeBattle_Battle:2133:in `pbOnActiveAll'
PokeBattle_Battle:2131:in `each'
PokeBattle_Battle:2131:in `pbOnActiveAll'
PokeBattle_Battle:2574:in `pbStartBattleCore'
PokeBattle_Battle:2399:in `pbStartBattle'
PTrainer_NPCTrainers:345:in `pbTrainerBattle'
PTrainer_NPCTrainers:344:in `pbSceneStandby'
PTrainer_NPCTrainers:346:in `pbTrainerBattle'
PTrainer_NPCTrainers:343:in `pbBattleAnimation'

Interpreter:276:in `pbExecuteScript'
Interpreter:794:in `command_111'
Interpreter:320:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'
 
971
Posts
7
Years
  • Age 21
  • Seen Nov 28, 2022
Ok so I downloaded and updated my essentials with all this and I got these errors. The first is wild battle and the second is trainer.

Code:
Exception: NameError
Message: undefined local variable or method `opponent' for #<PokeBattle_Battler:0x967bff0>
PokeBattle_Battler:888:in `pbCheckForm'
PokeBattle_Battle:2133:in `pbOnActiveAll'
PokeBattle_Battle:2131:in `each'
PokeBattle_Battle:2131:in `pbOnActiveAll'
PokeBattle_Battle:2574:in `pbStartBattleCore'
PokeBattle_Battle:2399:in `pbStartBattle'
PField_Field:905:in `pbWildBattle'
PField_Field:904:in `pbSceneStandby'
PField_Field:906:in `pbWildBattle'
PField_Field:903:in `pbBattleAnimation'

Exception: RuntimeError
Message: Script error within event 8, map 81 (Imogi Town):
Exception: NameError
Message: Section080:888:in `pbCheckForm'undefined local variable or method `opponent' for #<PokeBattle_Battler:0xa3a0e58>
***Full script:
pbTrainerBattle(PBTrainers::FISHERMAN,"Ray",_I("Sing it with me!"),false,0,false,0)
Interpreter:243:in `pbExecuteScript'
PokeBattle_Battle:2133:in `pbOnActiveAll'
PokeBattle_Battle:2131:in `each'
PokeBattle_Battle:2131:in `pbOnActiveAll'
PokeBattle_Battle:2574:in `pbStartBattleCore'
PokeBattle_Battle:2399:in `pbStartBattle'
PTrainer_NPCTrainers:345:in `pbTrainerBattle'
PTrainer_NPCTrainers:344:in `pbSceneStandby'
PTrainer_NPCTrainers:346:in `pbTrainerBattle'
PTrainer_NPCTrainers:343:in `pbBattleAnimation'

Interpreter:276:in `pbExecuteScript'
Interpreter:794:in `command_111'
Interpreter:320:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'

More information please? What Pokémon did you send out/would you send out, what would/has the trainer send/sent out, have you made sure to you inserted everything properly, and with imported into Essentials, I assume you are running v16.2?

Rot8er_ConeX said:
Has someone attempted to make Gen VII follower sprites yet?
Not me.
 
195
Posts
7
Years
  • Age 27
  • Seen Apr 12, 2024
More information please? What Pokémon did you send out/would you send out, what would/has the trainer send/sent out, have you made sure to you inserted everything properly, and with imported into Essentials, I assume you are running v16.2?

It's any Pokémon; it happens with every trainer. I spent about 3 hours carefully going through the files and placing them into my scripts. And yes I am running v16.2
Another piece of information I noticed is that it may involve something with Silvally or BattleBond Greninja because it involves the pbCheckForm part of PokeBattle_Battler. It says that a local variable or method 'opponent' is undefined.
 
971
Posts
7
Years
  • Age 21
  • Seen Nov 28, 2022
It's any Pokémon; it happens with every trainer. I spent about 3 hours carefully going through the files and placing them into my scripts. And yes I am running v16.2
Another piece of information I noticed is that it may involve something with Silvally or BattleBond Greninja because it involves the pbCheckForm part of PokeBattle_Battler. It says that a local variable or method 'opponent' is undefined.

I forgot to ask, could you give me roughly 5 lines before line 888 and 5 after (include 888)? I wasn't having any problems on my end, so I think I may have made a mistake making my "tutorial" files, or you might have made a small error. Anyways, could you give me the lines? I'll take a look at it.

I've also just updated the main post to include four extra download links, each for a different folder from the pack. ALSO, I've added a few .ogg audio files, which have loop tags included.
 
Last edited:
195
Posts
7
Years
  • Age 27
  • Seen Apr 12, 2024
I forgot to ask, could you give me roughly 5 lines before line 888 and 5 after (include 888)? I wasn't having any problems on my end, so I think I may have made a mistake making my "tutorial" files, or you might have made a small error. Anyways, could you give me the lines? I'll take a look at it.

I've also just updated the main post to include four extra download links, each for a different folder from the pack. ALSO, I've added a few .ogg audio files, which have loop tags included.

Code:
    # Giratina
    if isConst?(self.species,PBSpecies,:GIRATINA)
      if [email protected]
        [email protected]
        transformed=true
      end
    end
    # Arceus
    if isConst?(opponent.ability,PBAbilities,:MULTITYPE) || isConst?(opponent.ability,PBAbilities,:RKSSYSTEM)
       isConst?(self.species,PBSpecies,:ARCEUS)
      if [email protected]
        [email protected]
        transformed=true
      end
    end
    # Silvally
    if isConst?(self.ability,PBAbilities,:RKSSYSTEM) &&
       isConst?(self.species,PBSpecies,:SILVALLY)
      if [email protected]
        [email protected]
        transformed=true
      end
    end
These are lines 880 to 902. I assume it's around here that you asked for?
 
971
Posts
7
Years
  • Age 21
  • Seen Nov 28, 2022
Code:
    # Giratina
    if isConst?(self.species,PBSpecies,:GIRATINA)
      if [email protected]
        [email protected]
        transformed=true
      end
    end
    # Arceus
    if isConst?(opponent.ability,PBAbilities,:MULTITYPE) || isConst?(opponent.ability,PBAbilities,:RKSSYSTEM)
       isConst?(self.species,PBSpecies,:ARCEUS)
      if [email protected]
        [email protected]
        transformed=true
      end
    end
    # Silvally
    if isConst?(self.ability,PBAbilities,:RKSSYSTEM) &&
       isConst?(self.species,PBSpecies,:SILVALLY)
      if [email protected]
        [email protected]
        transformed=true
      end
    end
These are lines 880 to 902. I assume it's around here that you asked for?

I'm not sure how you got that Arceus part, as I have something different (which all seems to work). You can copy this over if you'd like:
Code:
# Giratina
    if isConst?(self.species,PBSpecies,:GIRATINA)
      if [email protected]
        [email protected]
        transformed=true
      end
    end
    # Arceus
    if isConst?(self.ability,PBAbilities,:MULTITYPE) &&
       isConst?(self.species,PBSpecies,:ARCEUS)
      if [email protected]
        [email protected]
        transformed=true
      end
    end
    # Silvally
    if isConst?(self.ability,PBAbilities,:RKSSYSTEM) &&
       isConst?(self.species,PBSpecies,:SILVALLY)
      if [email protected]
        [email protected]
        transformed=true
      end
    end
 
195
Posts
7
Years
  • Age 27
  • Seen Apr 12, 2024
I'm not sure how you got that Arceus part, as I have something different (which all seems to work). You can copy this over if you'd like:
Code:
# Giratina
    if isConst?(self.species,PBSpecies,:GIRATINA)
      if [email protected]
        [email protected]
        transformed=true
      end
    end
    # Arceus
    if isConst?(self.ability,PBAbilities,:MULTITYPE) &&
       isConst?(self.species,PBSpecies,:ARCEUS)
      if [email protected]
        [email protected]
        transformed=true
      end
    end
    # Silvally
    if isConst?(self.ability,PBAbilities,:RKSSYSTEM) &&
       isConst?(self.species,PBSpecies,:SILVALLY)
      if [email protected]
        [email protected]
        transformed=true
      end
    end

Wouldn't you know, it's that one small Arceus thing {XD} thanks for the help, great work on the pack so far!

EDIT: And...now I can't attack. :/
Spoiler:
 
Last edited:
971
Posts
7
Years
  • Age 21
  • Seen Nov 28, 2022
Wouldn't you know, it's that one small Arceus thing {XD} thanks for the help, great work on the pack so far!

EDIT: And...now I can't attack. :/
Spoiler:

I see I've made a mistake with copying over my changes to the "tutorial" files. It should be @battle.field.effects. This is what it should look like:
Code:
    if self.hasWorkingAbility(:SURGESURFER) && @battle.field.effects[PBEffects::ElectricTerrain]>0
      speedmult=speedmult*2
    end

That should fix the second problem. As for the first one, could you link me some lines around 3072 in PokeBattle_Battler?
 
195
Posts
7
Years
  • Age 27
  • Seen Apr 12, 2024
That should fix the second problem. As for the first one, could you link me some lines around 3072 in PokeBattle_Battler?

Well I noticed this myself earlier, it's something with Water Bubble

Code:
    if user.hasWorkingAbility(:WATERBUBBLE) && user.status==PBStatuses::BURN
      PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
      pbCureStatus(false)
      @battle.pbDisplay(_INTL("{1}'s {2} prevents burns!",pbThis,PBAbilities.getName(user.ability))) if showMessages
    end
These are lines 3072-3076
 
971
Posts
7
Years
  • Age 21
  • Seen Nov 28, 2022
Well I noticed this myself earlier, it's something with Water Bubble

Code:
    if user.hasWorkingAbility(:WATERBUBBLE) && user.status==PBStatuses::BURN
      PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
      pbCureStatus(false)
      @battle.pbDisplay(_INTL("{1}'s {2} prevents burns!",pbThis,PBAbilities.getName(user.ability))) if showMessages
    end
These are lines 3072-3076

I think you pasted those lines after this: pbEffectsAfterHit(user,target,thismove,turneffects)

Didn't you? I meant the def, which I didn't specify this time for some reason. If this is the cause, I'm sorry for my idiocy. If it's not, then I wouldn't really know, since it's all working just fine for me.
 
195
Posts
7
Years
  • Age 27
  • Seen Apr 12, 2024
I think you pasted those lines after this: pbEffectsAfterHit(user,target,thismove,turneffects)

Didn't you? I meant the def, which I didn't specify this time for some reason. If this is the cause, I'm sorry for my idiocy. If it's not, then I wouldn't really know, since it's all working just fine for me.

That line is on line 3014 for me. These are the lines I placed WaterBubble after, 3046-3071.
Code:
    # Force the use of certain moves if they're already being used
    if @effects[PBEffects::TwoTurnAttack]>0 ||
       @effects[PBEffects::HyperBeam]>0 ||
       @effects[PBEffects::Outrage]>0 ||
       @effects[PBEffects::Rollout]>0 ||
       @effects[PBEffects::Uproar]>0 ||
       @effects[PBEffects::Bide]>0
      choice[2]=PokeBattle_Move.pbFromPBMove(@battle,PBMove.new(@currentMove))
      turneffects[PBEffects::SpecialUsage]=true
      PBDebug.log("Continuing multi-turn move #{choice[2].name}")
    elsif @effects[PBEffects::Encore]>0
      if @battle.pbCanShowCommands?(@index) &&
         @battle.pbCanChooseMove?(@index,@effects[PBEffects::EncoreIndex],false)
        if choice[1]!=@effects[PBEffects::EncoreIndex] # Was Encored mid-round
          choice[1]=@effects[PBEffects::EncoreIndex]
          choice[2]=@moves[@effects[PBEffects::EncoreIndex]]
          choice[3]=-1 # No target chosen
        end
        PBDebug.log("Using Encored move #{choice[2].name}")
      end
    end
    thismove=choice[2]
    return if !thismove || thismove.id==0 # if move was not chosen
    if !turneffects[PBEffects::SpecialUsage]
      # TODO: Quick Claw message
    end
Worst case you could just send me a copy of your PokeBattle_Battler, it would solve any errors by making them non-existent.
 
Last edited:
971
Posts
7
Years
  • Age 21
  • Seen Nov 28, 2022
That line is on line 3014 for me. These are the lines I placed WaterBubble after, 3046-3071.
Code:
    # Force the use of certain moves if they're already being used
    if @effects[PBEffects::TwoTurnAttack]>0 ||
       @effects[PBEffects::HyperBeam]>0 ||
       @effects[PBEffects::Outrage]>0 ||
       @effects[PBEffects::Rollout]>0 ||
       @effects[PBEffects::Uproar]>0 ||
       @effects[PBEffects::Bide]>0
      choice[2]=PokeBattle_Move.pbFromPBMove(@battle,PBMove.new(@currentMove))
      turneffects[PBEffects::SpecialUsage]=true
      PBDebug.log("Continuing multi-turn move #{choice[2].name}")
    elsif @effects[PBEffects::Encore]>0
      if @battle.pbCanShowCommands?(@index) &&
         @battle.pbCanChooseMove?(@index,@effects[PBEffects::EncoreIndex],false)
        if choice[1]!=@effects[PBEffects::EncoreIndex] # Was Encored mid-round
          choice[1]=@effects[PBEffects::EncoreIndex]
          choice[2]=@moves[@effects[PBEffects::EncoreIndex]]
          choice[3]=-1 # No target chosen
        end
        PBDebug.log("Using Encored move #{choice[2].name}")
      end
    end
    thismove=choice[2]
    return if !thismove || thismove.id==0 # if move was not chosen
    if !turneffects[PBEffects::SpecialUsage]
      # TODO: Quick Claw message
    end
Worst case you could just send me a copy of your PokeBattle_Battler, it would solve any errors by making them non-existent.

Here are some lines (You may not have all of these, but that doesn't matter. You do have moxie, from which you know where to put this):
Code:
    # Moxie
    if user.hasWorkingAbility(:MOXIE) && target.isFainted?
      if user.pbIncreaseStatWithCause(PBStats::ATTACK,1,user,PBAbilities.getName(user.ability))
        PBDebug.log("[Ability triggered] #{user.pbThis}'s Moxie")
      end
    end
    # Rubbed
    if target.hasWorkingAbility(:RUBBED) && thismove.isContactMove? ||
       thismove.function==0x02 && target.effects[PBEffects::Rubbed]==-1
      target.effects[PBEffects::Rubbed]=6
    end
    # Beak Blast
    if target.effects[PBEffects::BeakBlast]>0 && thismove.isContactMove?
      user.status=PBStatuses::BURN
    end
    # Battle Bond
    if isConst?(user.species,PBSpecies,:GRENINJA) && user.hasWorkingAbility(:BATTLEBOND)
      if target.isFainted? && !user.isFainted? && user.form==0
        [email protected](target.index)
        if party.length>1
          PBDebug.log("[Ability triggered] #{user.pbThis}'s Battle Bond")
          @effects[PBEffects::BattleBond]=1
        end
      end
    end
    # Beast Boost
    if user.hasWorkingAbility(:BEASTBOOST) && target.isFainted? && !user.isFainted?
      if isConst?(user.species,PBSpecies,:BUZZWOLE) || isConst?(user.species,PBSpecies,:KARTANA) ||
         isConst?(user.species,PBSpecies,:GUZZLORD)
        if user.pbIncreaseStatWithCause(PBStats::ATTACK,1,user,PBAbilities.getName(user.ability))
        end
      end
      if isConst?(user.species,PBSpecies,:PHEROMOSA)
        if user.pbIncreaseStatWithCause(PBStats::SPEED,1,user,PBAbilities.getName(user.ability))
        end
      end
      if isConst?(user.species,PBSpecies,:XURKITREE) ||
         isConst?(user.species,PBSpecies,:CELESTEELA)
        if user.pbIncreaseStatWithCause(PBStats::SPATK,1,user,PBAbilities.getName(user.ability))
        end
      end
      if isConst?(user.species,PBSpecies,:NIHILEGO)
        if user.pbIncreaseStatWithCause(PBStats::SPDEF,1,user,PBAbilities.getName(user.ability))
        end
      end
    end
    if user.hasWorkingAbility(:WATERBUBBLE) && user.status==PBStatuses::BURN
      PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
      pbCureStatus(false)
      @battle.pbDisplay(_INTL("{1}'s {2} prevents burns!",pbThis,PBAbilities.getName(user.ability))) if showMessages
    end
    # Berserk
    if user.hasWorkingAbility(:BERSERK) && user.hp<=(user.totalhp/2).floor
      if user.pbCanIncreaseStatStage?(PBStats::SPATK,user)
        user.pbIncreaseStatWithCause(PBStats::SPATK,1,user,PBAbilities.getName(user.ability))
      end
    end
    # Comatose
    if user.hasWorkingAbility(:COMATOSE)
      case user.status
      when PBStatuses::SLEEP
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} is already sleeping!",pbThis))
      when PBStatuses::BURN
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} can't be burned!",pbThis))
      when PBStatuses::POISON
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} can't be poisoned!",pbThis))
      when PBStatuses::FROZEN
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} can't be frozen!",pbThis))
      when PBStatuses::PARALYSIS
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} can't be paralyzed!",pbThis))
      end
      if user.effects[PBEffects::Yawn]>=1
        @effects[PBEffects::Yawn]=0
        @battle.pbDisplay(_INTL("{1} is already sleeping!",pbThis))
      end
    end
 
195
Posts
7
Years
  • Age 27
  • Seen Apr 12, 2024
Here are some lines (You may not have all of these, but that doesn't matter. You do have moxie, from which you know where to put this):
Code:
    # Moxie
    if user.hasWorkingAbility(:MOXIE) && target.isFainted?
      if user.pbIncreaseStatWithCause(PBStats::ATTACK,1,user,PBAbilities.getName(user.ability))
        PBDebug.log("[Ability triggered] #{user.pbThis}'s Moxie")
      end
    end
    # Rubbed
    if target.hasWorkingAbility(:RUBBED) && thismove.isContactMove? ||
       thismove.function==0x02 && target.effects[PBEffects::Rubbed]==-1
      target.effects[PBEffects::Rubbed]=6
    end
    # Beak Blast
    if target.effects[PBEffects::BeakBlast]>0 && thismove.isContactMove?
      user.status=PBStatuses::BURN
    end
    # Battle Bond
    if isConst?(user.species,PBSpecies,:GRENINJA) && user.hasWorkingAbility(:BATTLEBOND)
      if target.isFainted? && !user.isFainted? && user.form==0
        [email protected](target.index)
        if party.length>1
          PBDebug.log("[Ability triggered] #{user.pbThis}'s Battle Bond")
          @effects[PBEffects::BattleBond]=1
        end
      end
    end
    # Beast Boost
    if user.hasWorkingAbility(:BEASTBOOST) && target.isFainted? && !user.isFainted?
      if isConst?(user.species,PBSpecies,:BUZZWOLE) || isConst?(user.species,PBSpecies,:KARTANA) ||
         isConst?(user.species,PBSpecies,:GUZZLORD)
        if user.pbIncreaseStatWithCause(PBStats::ATTACK,1,user,PBAbilities.getName(user.ability))
        end
      end
      if isConst?(user.species,PBSpecies,:PHEROMOSA)
        if user.pbIncreaseStatWithCause(PBStats::SPEED,1,user,PBAbilities.getName(user.ability))
        end
      end
      if isConst?(user.species,PBSpecies,:XURKITREE) ||
         isConst?(user.species,PBSpecies,:CELESTEELA)
        if user.pbIncreaseStatWithCause(PBStats::SPATK,1,user,PBAbilities.getName(user.ability))
        end
      end
      if isConst?(user.species,PBSpecies,:NIHILEGO)
        if user.pbIncreaseStatWithCause(PBStats::SPDEF,1,user,PBAbilities.getName(user.ability))
        end
      end
    end
    if user.hasWorkingAbility(:WATERBUBBLE) && user.status==PBStatuses::BURN
      PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
      pbCureStatus(false)
      @battle.pbDisplay(_INTL("{1}'s {2} prevents burns!",pbThis,PBAbilities.getName(user.ability))) if showMessages
    end
    # Berserk
    if user.hasWorkingAbility(:BERSERK) && user.hp<=(user.totalhp/2).floor
      if user.pbCanIncreaseStatStage?(PBStats::SPATK,user)
        user.pbIncreaseStatWithCause(PBStats::SPATK,1,user,PBAbilities.getName(user.ability))
      end
    end
    # Comatose
    if user.hasWorkingAbility(:COMATOSE)
      case user.status
      when PBStatuses::SLEEP
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} is already sleeping!",pbThis))
      when PBStatuses::BURN
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} can't be burned!",pbThis))
      when PBStatuses::POISON
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} can't be poisoned!",pbThis))
      when PBStatuses::FROZEN
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} can't be frozen!",pbThis))
      when PBStatuses::PARALYSIS
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} can't be paralyzed!",pbThis))
      end
      if user.effects[PBEffects::Yawn]>=1
        @effects[PBEffects::Yawn]=0
        @battle.pbDisplay(_INTL("{1} is already sleeping!",pbThis))
      end
    end

They've been added, but it doesn't change much.
 
195
Posts
7
Years
  • Age 27
  • Seen Apr 12, 2024
Did you look for moxie and copy only the Water Bubble underneath it? In the right place at that?

Well, it's there now. I also got another bug but upon inspection found it was our outdated Lazer Focus code so I removed it and now all is well. Thanks for all the help :)
 

rigbycwts

Hmm, hmm.
98
Posts
11
Years
  • Seen Feb 22, 2019
Here are some lines (You may not have all of these, but that doesn't matter. You do have moxie, from which you know where to put this):
Code:
    # Moxie
    if user.hasWorkingAbility(:MOXIE) && target.isFainted?
      if user.pbIncreaseStatWithCause(PBStats::ATTACK,1,user,PBAbilities.getName(user.ability))
        PBDebug.log("[Ability triggered] #{user.pbThis}'s Moxie")
      end
    end
    # Rubbed
    if target.hasWorkingAbility(:RUBBED) && thismove.isContactMove? ||
       thismove.function==0x02 && target.effects[PBEffects::Rubbed]==-1
      target.effects[PBEffects::Rubbed]=6
    end
    # Beak Blast
    if target.effects[PBEffects::BeakBlast]>0 && thismove.isContactMove?
      user.status=PBStatuses::BURN
    end
    # Battle Bond
    if isConst?(user.species,PBSpecies,:GRENINJA) && user.hasWorkingAbility(:BATTLEBOND)
      if target.isFainted? && !user.isFainted? && user.form==0
        [email protected](target.index)
        if party.length>1
          PBDebug.log("[Ability triggered] #{user.pbThis}'s Battle Bond")
          @effects[PBEffects::BattleBond]=1
        end
      end
    end
    # Beast Boost
    if user.hasWorkingAbility(:BEASTBOOST) && target.isFainted? && !user.isFainted?
      if isConst?(user.species,PBSpecies,:BUZZWOLE) || isConst?(user.species,PBSpecies,:KARTANA) ||
         isConst?(user.species,PBSpecies,:GUZZLORD)
        if user.pbIncreaseStatWithCause(PBStats::ATTACK,1,user,PBAbilities.getName(user.ability))
        end
      end
      if isConst?(user.species,PBSpecies,:PHEROMOSA)
        if user.pbIncreaseStatWithCause(PBStats::SPEED,1,user,PBAbilities.getName(user.ability))
        end
      end
      if isConst?(user.species,PBSpecies,:XURKITREE) ||
         isConst?(user.species,PBSpecies,:CELESTEELA)
        if user.pbIncreaseStatWithCause(PBStats::SPATK,1,user,PBAbilities.getName(user.ability))
        end
      end
      if isConst?(user.species,PBSpecies,:NIHILEGO)
        if user.pbIncreaseStatWithCause(PBStats::SPDEF,1,user,PBAbilities.getName(user.ability))
        end
      end
    end
    if user.hasWorkingAbility(:WATERBUBBLE) && user.status==PBStatuses::BURN
      PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
      pbCureStatus(false)
      @battle.pbDisplay(_INTL("{1}'s {2} prevents burns!",pbThis,PBAbilities.getName(user.ability))) if showMessages
    end
    # Berserk
    if user.hasWorkingAbility(:BERSERK) && user.hp<=(user.totalhp/2).floor
      if user.pbCanIncreaseStatStage?(PBStats::SPATK,user)
        user.pbIncreaseStatWithCause(PBStats::SPATK,1,user,PBAbilities.getName(user.ability))
      end
    end
    # Comatose
    if user.hasWorkingAbility(:COMATOSE)
      case user.status
      when PBStatuses::SLEEP
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} is already sleeping!",pbThis))
      when PBStatuses::BURN
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} can't be burned!",pbThis))
      when PBStatuses::POISON
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} can't be poisoned!",pbThis))
      when PBStatuses::FROZEN
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} can't be frozen!",pbThis))
      when PBStatuses::PARALYSIS
        PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
        pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} can't be paralyzed!",pbThis))
      end
      if user.effects[PBEffects::Yawn]>=1
        @effects[PBEffects::Yawn]=0
        @battle.pbDisplay(_INTL("{1} is already sleeping!",pbThis))
      end
    end
Out of pure curiosity, what's the Rubbed Ability?
 
824
Posts
8
Years
Out of pure curiosity, what's the Rubbed Ability?

Whatever it is, it looks like it has to do with getting hit by the move Struggle, and setting something up to last for six turns. If I had to hazard a guess, I'm going to assume that it makes the user immune to the move Struggle for six turns, basically forcing the target to Struggle itself to death without getting to deal any damage.

That feels to me like a very niche ability. How often does Struggle come up?
 
971
Posts
7
Years
  • Age 21
  • Seen Nov 28, 2022
Whatever it is, it looks like it has to do with getting hit by the move Struggle, and setting something up to last for six turns. If I had to hazard a guess, I'm going to assume that it makes the user immune to the move Struggle for six turns, basically forcing the target to Struggle itself to death without getting to deal any damage.

That feels to me like a very niche ability. How often does Struggle come up?

I should've taken that out, it's for a project I'm helping with :P
As for struggle, I wanted it to activate even when struggle is used, since it appeared not to activate it. I appreciate your guess, though :D
(I also have no idea if that's actually working to this day, I haven't worked on it after adding those lines in)
 
Status
Not open for further replies.
Back
Top