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

[Scripting Question] Totem Boosts

NeoCrimson

Prismatic Master
4
Posts
7
Years
    • Seen Jul 7, 2018
    Is it possible to make a wild encounter get stat boosts at the start of the battle like a Totem or UB? I was thinking of making UB encounters get stat boosts.
     

    Rinkoou

    Awful-Pun Master
    54
    Posts
    7
    Years
  • I kind of have a solution. You can make a form of the Pokémon with boosted stats and give it a custom message when it enters the battle. In PokeBattle_Battle, find "Initialize wild Pokémon" and replace the section with this:
    Code:
        if !@opponent
          if @party2.length==1
            if @doublebattle
              raise _INTL("Only two wild Pokémon are allowed in double battles")
            end
            wildpoke=@party2[0]
            @battlers[1].pbInitialize(wildpoke,0,false)
            @peer.pbOnEnteringBattle(self,wildpoke)
            pbSetSeen(wildpoke)
            @scene.pbStartBattle(self)
            if $game_switches[#]
              pbDisplayPaused(_INTL("Totem (1) appeared! Some of it's stats were boosted!"))
            else
              pbDisplayPaused(_INTL("Wild {1} appeared!",wildpoke.name))
            end
          elsif @party2.length==2
            if !@doublebattle
              raise _INTL("Only one wild Pokémon is allowed in single battles")
            end
            @battlers[1].pbInitialize(@party2[0],0,false)
            @battlers[3].pbInitialize(@party2[1],1,false)
            @peer.pbOnEnteringBattle(self,@party2[0])
            @peer.pbOnEnteringBattle(self,@party2[1])
            pbSetSeen(@party2[0])
            pbSetSeen(@party2[1])
            @scene.pbStartBattle(self)
            pbDisplayPaused(_INTL("Wild {1} and\r\n{2} appeared!",
               @party2[0].name,@party2[1].name))
          else
            raise _INTL("Only one or two wild Pokémon are allowed")
          end

    Replace the # with a specified switch and use it like the Shiny Pokémon switch, turning it off immediately after battle. Hope this helps.
     

    NeoCrimson

    Prismatic Master
    4
    Posts
    7
    Years
    • Seen Jul 7, 2018
    But then if the mon could have a move that boosted its stats like Nasty Plot, It would boost said stat meaning a max of +7 in a stat for stat boosts. I want something that actives upon entering battle like Intimidate or I could just make a Wild Battle Only Forme that resets upon capture for the UBS. With an ability that boosts a certain stat if in the wild.
     
    188
    Posts
    9
    Years
    • Seen today
    Try this code in PokeBattle_Battler:
    Code:
        # Air Balloon message
        if self.hasWorkingItem(:AIRBALLOON) && onactive
          @battle.pbDisplay(_INTL("{1} floats in the air with its {2}!",pbThis,PBItems.getName(self.item)))
        end
        [COLOR="Red"]# Totem Pokémon
        if $game_switches[#] && [email protected]?(@index) && onactive
          if isConst?(self.species,PBSpecies,:MIMIKYU) # Totem Mimikyu
            for i in [PBStats::ATTACK,PBStats::DEFENSE,PBStats::SPEED,
                      PBStats::SPATK,PBStats::SPDEF]
              @stages[i]+=1
            end
          end
        end[/COLOR]
     
    Back
    Top