The PokéCommunity Forums Fan Games Game Development Scripts, Tutorials & Tools
Essentials Script Gen VII Scripts (Z-Moves, Abilities and Moves,)

Scripts, Tutorials & Tools This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Reply
 
Thread Tools
  #76    
Old December 26th, 2017 (10:38 PM).
BwAetherTrainer284's Avatar
BwAetherTrainer284 BwAetherTrainer284 is offline
     
    Join Date: Jun 2017
    Location: Ecuador
    Gender: Male
    Nature: Adamant
    Posts: 4
    Is this project still alive?
    I ask it because it's been a year and until now there are some scripts of moves and abilities that weren't made like: Stakeout, Disguise, Sunsteel Strike, Moongeist Beam, Prism Armor, Throat Chop and Comatose.
    Just as there are some scripts that don't work or give many syntax errors like: Receiver, Instruct, Soul Heart, Stomping Tantrum, Spotlight, Toxic Thread, Dancer and Laser Focus.
    Reply With Quote
      #77    
    Old December 26th, 2017 (10:47 PM).
    Ego13's Avatar
    Ego13 Ego13 is online now
    hollow_ego
       
      Join Date: Jul 2017
      Location: Larua Region
      Gender: Male
      Nature: Calm
      Posts: 219
      Quote:
      Originally Posted by BwAetherTrainer284 View Post
      Is this project still alive?
      I ask it because it's been a year and until now there are some scripts of moves and abilities that weren't made like: Stakeout, Disguise, Sunsteel Strike, Moongeist Beam, Prism Armor, Throat Chop and Comatose.
      Just as there are some scripts that don't work or give many syntax errors like: Receiver, Instruct, Soul Heart, Stomping Tantrum, Spotlight, Toxic Thread, Dancer and Laser Focus.
      Good question. I'm wondering the same.
      Recently i coded Comatose and Dancer (not quite finished yet)
      __________________
      Looking for spriters to help with

      Pokemon Hollow on pokecommunity.com
      Reply With Quote
        #78    
      Old February 3rd, 2018 (2:54 PM). Edited February 4th, 2018 by Adrenst.
      Adrenst Adrenst is offline
      Adrenst
         
        Join Date: Jan 2018
        Gender: Male
        Posts: 3
        Disclaimer:: this is on v17.2
        But throat chop seems pretty straight forward, like a combination of imprison and healblock is how I did it (avoided looking into disable because it was referenced too many times lol)

        First thing you need to do is add an effect to PBEffects
        Code:
        ThroatChop         = 109 # use whatever is the next lowest value for you
        And obviously add a def to Move_effects:
        Code:
        class PokeBattle_Move_CF15 < PokeBattle_Move
          def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
            ret=super(attacker,opponent,hitnum,alltargets,showanimation)
            if opponent.damagestate.calcdamage>0 && !opponent.damagestate.substitute &&
                !opponent.isFainted?
              opponent.effects[PBEffects::ThroatChop]=2
              @battle.pbDisplay(_INTL("{1} can't use sound based moves!",opponent.pbThis))
            end
            return ret
          end
        end
        Then you just have a few things left to

        first find pbTryUseMove in PokeBattle_battler and add this (I added mine below the imprison code)
        Code:
        if @effects[PBEffects::ThroatChop]>0 && !pbOpposing1.fainted?
              if thismove.isSoundBased?
                @battle.pbDisplay(_INTL("{1} can't use {2} because they were Throat Chopped!",pbThis,thismove.name))
                PBDebug.log("[Move failed] #{pbThis} can't use #{thismove.name} because they were Throat chopped!")
                return false
              end
            end
        The previous block prevents an already selected move from being used. This next block will prevent them from choosing it: put in PokeBattle_Battle in pbCanChooseMove (again I put it below imprison)

        Code:
        if thispkmn.effects[PBEffects::ThroatChop]>0 && thismove.isSoundBased?
              if showMessages
                pbDisplayPaused(_INTL("{1} can't use {2} because they are throat chopped!",thispkmn.pbThis,thismove.name))
              end
              return false
            end
        And lastly decrement the value if it's more than 0 in PokeBattle_Battle in pbEndofRoundPhase (this time I put it below Heal bell because it works similar)
        Code:
        # Throat Chop
            for i in priority
              next if i.fainted?
              if i.effects[PBEffects::ThroatChop]>0
                i.effects[PBEffects::ThroatChop]-=1
                if i.effects[PBEffects::ThroatChop]==0
                  pbDisplay(_INTL("{1}'s can use sound based moves again!",i.pbThis))
                  PBDebug.log("[End of effect] #{i.pbThis} is no longer Throat chopped")
                end
              end
            end
        I just tested on an Exploud that knows only sound moves and it prevented an already selected move and also prevented move selection causing it to struggle. If anyone happens to know the real lines pokemon displays when throat chop effects happen please let me know!

        Quote:
        Originally Posted by Ego13 View Post
        Good question. I'm wondering the same.
        Recently i coded Comatose and Dancer (not quite finished yet)
        If you could post either/both of those I'd appreciate it. I only started looking into pokemon essentials a few days ago and dancer especially is eluding me.
        Reply With Quote
          #79    
        Old February 3rd, 2018 (11:43 PM). Edited February 4th, 2018 by Adrenst.
        Adrenst Adrenst is offline
        Adrenst
           
          Join Date: Jan 2018
          Gender: Male
          Posts: 3
          Quote:
          Originally Posted by BwAetherTrainer284 View Post
          Is this project still alive?
          I ask it because it's been a year and until now there are some scripts of moves and abilities that weren't made like: Stakeout, Disguise, Sunsteel Strike, Moongeist Beam, Prism Armor, Throat Chop and Comatose.
          Just as there are some scripts that don't work or give many syntax errors like: Receiver, Instruct, Soul Heart, Stomping Tantrum, Spotlight, Toxic Thread, Dancer and Laser Focus.
          For sunsteelstrike can't you just define a basic move function to handle the attack, then you find all references to MOLDBREAKER and turn them from 'attacker.hasMoldBreaker' to '(attacker.hasMoldBreaker || @function==0xfoobar)' where 'foobar' if your function code. Make sure if the moldbreaker check has a ! in front, you do '(!attacker.hasMoldBreaker && @function !=0xfoobar)' . Haven't tested but mold breaker is the same effect so I am confident.

          For instruct when I used the code earlier in this thread it worked but made the attack target myself. To remedy this I added this to Battler

          Code:
            attr_accessor :lastTarget
          Then I updated it in the same places as lastAttacker:

          in initialize in Battler
          Code:
          @lastTarget       = 0
          in pbOnDamageLost in PokeBattle_Move:
          Code:
          attacker.lastTarget = opponent.index # instruct
          and in PokeBattle_Battler find @battlers[i].lastAttacker.clear and underneath that add:
          Code:
          @battlers[i].lastTarget=0
          then you can change this just alter the line like this in the instruct move def to use the last target instead of yourself.
          Code:
          opponent.pbUseMoveSimple(opponent.lastMoveUsed,-1,opponent.lastTarget)
          I tested (in doubles obv) surf, it successfully hit all targets again, muddy water which successfully hit both enemies a second time, and when I 1-shot the enemy my instruct redirected to the other poke. I think that's every necessary test case?

          And spotlight is simple. Find follow me and copy it, but places where it uses attacker replace with opponent basically. Make sure to change you copy to have a new function code :)
          Reply With Quote
            #80    
          Old February 4th, 2018 (4:56 AM).
          Ego13's Avatar
          Ego13 Ego13 is online now
          hollow_ego
             
            Join Date: Jul 2017
            Location: Larua Region
            Gender: Male
            Nature: Calm
            Posts: 219
            Quote:
            Originally Posted by Adrenst View Post
            If you could post either/both of those I'd appreciate it. I only started looking into pokemon essentials a few days ago and dancer especially is eluding me.
            for Comatose it really is just placing the ability check in the right places in the right way.
            Here are the places where it needs to be added
            Spoiler:
            • to Trace PokeBattle_Battler around line 1137
            • to Dream Eater PokeBattle_Battler around line 2680 -> && !target.hasWorkingAbility(:COMATOSE)
            • to def pbCanSleep? PokeBattle_BattlerEffects around line 5 -> if !ignorestatus && (status==PBStatuses::SLEEP || hasWorkingAbility(:COMATOSE))
            • to def pbCanSleepYawn PokeBattle_BattlerEffects around line 64 after Insomnia
            • to all other status Effects (canPoison? etc.) -> keep in mind the checks for Poison Spikes and checks like def pbCanPoisonSynchronize?(opponent)
            • to ability copying moves class PokeBattle_Move_065< PokeBattle_Move,class PokeBattle_Move_066 < PokeBattle_Move,class PokeBattle_Move_067 < PokeBattle_Move
            • to Wake up slap class PokeBattle_Move_07D < PokeBattle_Move
            • to Hex class PokeBattle_Move_07F < PokeBattle_Move
            • to Sleep Talk class PokeBattle_Move_0B4 < PokeBattle_Move
            • to Rest class PokeBattle_Move_0D9 < PokeBattle_Move
            • to Nightmare Move Effect class PokeBattle_Move_10F < PokeBattle_Move
            • to Snore class PokeBattle_Move_011 < PokeBattle_Move
            • to Nightmare in PokeBattle_Battle around line 3358


            For Dancer follow these instructions. It is tested for single and double battles and should work just like in the game. Give credit when using this (as it was a real pain to get this stuff working and took me several hours)
            Spoiler:
            • [* ]Add Effect "Dancer" to PBEffects at
              Code:
              # These effects apply to a battler
            • Add Effect "DancerSkip" to PBEffects at
              Code:
              # These effects apply to the usage of a move
            • In PokeBattle_Battler in
              Code:
              def pbInitEffects(batonpass)
              around line 481 (after Yawn) add:
              Code:
              @effects[PBEffects::Dancer] = false
            • In PokeBattle_Battler
              Code:
              def pbUseMoveSimple(moveid,index=-1,target=-1)
              has to look like this:
              Code:
              def pbUseMoveSimple(moveid,index=-1,target=-1)
                  choice=[]
                  choice[0]=1       # "Use move"
                  choice[1]=index   # Index of move to be used in user's moveset
                  choice[2]=PokeBattle_Move.pbFromPBMove(@battle,PBMove.new(moveid)) # PokeBattle_Move object of the move
                  choice[2].pp=-1
                  choice[3]=target  # Target (-1 means no target yet)
                  if index>=0
                    @battle.choices[@index][1]=index
                  end
                  PBDebug.log("#{pbThis} used simple move #{choice[2].name}")
                  pbUseMove(choice,true)  if $dancercount!=1
                  pbUseMove(choice,false) if $dancercount==1
                  return
                end
            • In PokeBattle_Battler find
              Code:
              # Record that user has used a move this round (ot at least tried to)
              and make the code under it look like this
              Code:
               if self.effects[PBEffects::Dancer] && $dancercount==1
                    $dancercount=0
                  else
                    [email protected] 
                  end
            • In PokeBattle_Battler find
              Code:
              # End of move usage
              (around line 3674, before def pbCancelMoves starts)
              under that line and before
              Code:
              pbEndTurn(choice)
              add
              Code:
              abilityOnMoveEnd(user) if user.effects[PBEffects::Dancer]!=true
            • make a new script section above main and name it Ability Helper Scripts
              add the following script
              Code:
              def abilityOnMoveEnd(user)
                
                dancermoves=[170,138,63,483,192,17,418,420]
                #dancemoves={FEATHERDANCE,FIERYDANCE,DRAGONDANCE,LUNARDANCE,PETALDANCE,QUIVERDANCE,SWORDSDANCE,TEETERDANCE}
                dancers=[]
                user.effects[PBEffects::Dancer]=true if dancermoves.include?(@battle.lastMoveUsed)
                for i in @battle.pbPriority
                  dancers.push(i) if i.hasWorkingAbility(:DANCER) && i.effects[PBEffects::Dancer]!=true
                end
              
                for i in dancers #@battle.pbPriority
                  if dancermoves.include?(@battle.lastMoveUsed) && !i.isFainted? && i.effects[PBEffects::Outrage]==0
                    #tempOutrage=i.effects[PBEffects::Outrage]
                    tempChoice=i.effects[PBEffects::ChoiceBand]
                    #@battle.pbDisplay(_INTL("{1}'s Dancer!",i.pbThis))
                    @battle.scene.showAbilityMessage(i,true)
                    $dancercount=1
                    i.effects[PBEffects::Dancer]=true
                    i.pbUseMoveSimple(@battle.lastMoveUsed)
                    i.effects[PBEffects::Outrage]=0
                    #i.effects[PBEffects::Outrage]=tempOutrage
                    i.effects[PBEffects::ChoiceBand]=tempChoice
                    
                  elsif dancermoves.include?(@battle.lastMoveUsed)  && !i.isFainted? && i.effects[PBEffects::Outrage]!=0
                    #@battle.pbDisplay(_INTL("{1}'s Dancer!",i.pbThis))
                    @battle.scene.showAbilityMessage(i,true)
                    @battle.pbDisplay(_INTL("But it failed!"))
                  end
                  for i in dancers
                    i.effects[PBEffects::Dancer]=false
                  end
                  user.effects[PBEffects::Dancer]=false
                end
              end
            __________________
            Looking for spriters to help with

            Pokemon Hollow on pokecommunity.com
            Reply With Quote
              #81    
            Old February 4th, 2018 (1:35 PM).
            Ego13's Avatar
            Ego13 Ego13 is online now
            hollow_ego
               
              Join Date: Jul 2017
              Location: Larua Region
              Gender: Male
              Nature: Calm
              Posts: 219
              It doesn't do it in the end. As soon as a dancer move was used it interrupts the turn order and continues as soon as all dancers did their thing
              __________________
              Looking for spriters to help with

              Pokemon Hollow on pokecommunity.com
              Reply With Quote
                #82    
              Old February 7th, 2018 (7:02 PM). Edited February 7th, 2018 by Evilrake.
              Evilrake's Avatar
              Evilrake Evilrake is offline
                 
                Join Date: Dec 2013
                Gender: Male
                Posts: 84
                Quote:
                Originally Posted by Rot8er_ConeX View Post
                Code:
                ################################################################################
                # The user's next move will be a critical hit
                ################################################################################
                class PokeBattle_Move_19A < PokeBattle_Move
                  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
                    attacker.effects[PBEffects::LaserFocus]=2
                    @battle.pbDisplay(_INTL("{1} began focusing hard!",attacker.pbThis))
                    return 0
                  end
                end
                Code:
                  
                  def pbIsCritical?(attacker,opponent)
                    if opponent.hasWorkingAbility(:SHELLARMOR) && !attacker.hasBypassingAbility 
                      return false
                    end
                    return false if opponent.pbOwnSide.effects[PBEffects::LuckyChant]>0
                    return true if @function==0xA0 # Frost Breath
                    return true if attacker.hasWorkingAbility(:MERCILESS) && opponent.status==PBStatus::POISON
                    return true if attacker.effects[PBEffects::LaserFocus]>0
                Idk if I'm reading this right, but doesn't Laser Focus have to reset its pbeffect to zero after it successfully crits? So that way it only works for one move? So the second bit could look like

                Code:
                  
                  def pbIsCritical?(attacker,opponent)
                    if opponent.hasWorkingAbility(:SHELLARMOR) && !attacker.hasBypassingAbility 
                      return false
                    end
                    return false if opponent.pbOwnSide.effects[PBEffects::LuckyChant]>0
                    return true if @function==0xA0 # Frost Breath
                    return true if attacker.hasWorkingAbility(:MERCILESS) && opponent.status==PBStatus::POISON
                    if attacker.effects[PBEffects::LaserFocus]>0
                attacker.effects[PBEffects::LaserFocus]=0
                return true
                end
                
                edit: Tested and doesn't seem to be working that way either. a

                And for stomping tantrum, this instruction isn't very clear:

                Quote:
                Add this line as the very last line in PokeBattle_Battler, def pbProcessMoveAgainstTarget:

                Code:
                user.effects[PBEffects::LastMoveFailed]=false
                Could you put it more clearly in context?
                __________________
                Creator of Pokemon Sekai

                Reply With Quote
                  #83    
                Old February 19th, 2018 (6:03 PM).
                marc_go29's Avatar
                marc_go29 marc_go29 is offline
                   
                  Join Date: Feb 2018
                  Posts: 1
                  Hey guys, I've been trying to make Long Reach work, but I'm totally new to coding and I have no idea where to start, do you have a code or an advise? I tried editing all the contact moves effects (items, abilities, etc) giving them exeptions for pokemon with Long Reach, but it gave me a ton of error messages haha
                  Reply With Quote
                    #84    
                  Old February 19th, 2018 (10:17 PM).
                  BwAetherTrainer284's Avatar
                  BwAetherTrainer284 BwAetherTrainer284 is offline
                     
                    Join Date: Jun 2017
                    Location: Ecuador
                    Gender: Male
                    Nature: Adamant
                    Posts: 4
                    Quote:
                    Originally Posted by marc_go29 View Post
                    Hey guys, I've been trying to make Long Reach work, but I'm totally new to coding and I have no idea where to start, do you have a code or an advise? I tried editing all the contact moves effects (items, abilities, etc) giving them exeptions for pokemon with Long Reach, but it gave me a ton of error messages haha

                    It's easy to add the Long Reach script.
                    To add the Long Reach ability script (including the Protective Pads item script that has the same effect) you must first locate this line in PokeBattle_Battler

                    Code:
                    def pbEffectsOnDealingDamage(move,user,target,damage)
                        movetype=move.pbType(move.type,user,target)
                        if damage>0 && move.isContactMove?
                          if !target.damagestate.substitute
                            if target.hasWorkingItem(:STICKYBARB,true) && user.item==0 && !user.fainted?
                              user.item=target.item
                              target.item=0
                    And then you add these lines that are marked in red.

                    Code:
                    def pbEffectsOnDealingDamage(move,user,target,damage)
                        movetype=move.pbType(move.type,user,target)
                        if damage>0 && move.isContactMove? && !user.hasWorkingAbility(:LONGREACH) && !user.hasWorkingItem(:PROTECTIVEPADS)
                          if !target.damagestate.substitute
                            if target.hasWorkingItem(:STICKYBARB,true) && user.item==0 && !user.fainted?
                              user.item=target.item
                              target.item=0

                    I tried this script against Pokémon with the abilities Rough Skin, Flame Body, Iron Barbs and Static and it works perfectly.
                    Reply With Quote
                      #85    
                    Old April 9th, 2018 (5:44 PM).
                    Test_BR's Avatar
                    Test_BR Test_BR is offline
                       
                      Join Date: Apr 2018
                      Location: Far, far away
                      Gender: Male
                      Nature: Calm
                      Posts: 3
                      I've tried the code from this thread for the terrain abilities. And while they seemingly did work, there's one thing missing. When my Gyarados (with Grassy Surge) faces Regice (with Psychic Surge), both abilities are active at the same time. One of them does not override the other one. So, Regice can't hurt a non-flying Pkm with Ice Shard, and when Regice gets hurt, its hp gets healed a bit.
                      I'm not sure if it's just me implementing the code just wrongly or the code per se has yet to include the overriding turn/effect. Any suggestions?
                      Reply With Quote
                        #86    
                      Old April 12th, 2018 (2:39 AM).
                      Test_BR's Avatar
                      Test_BR Test_BR is offline
                         
                        Join Date: Apr 2018
                        Location: Far, far away
                        Gender: Male
                        Nature: Calm
                        Posts: 3
                        I noticed that abilities such as Queenly Majesty and Dazzling are incomplete because they do not protect the user from Prankster. Therefore, I used the code from this thread as a basis and tried to come up with a solution. And so far, my code seems to work.
                        New code:
                        Code:
                        if target.hasWorkingAbility(:QUEENLYMAJESTY) && user.hasWorkingAbility(:PRANKSTER) && thismove.pbIsStatus?
                              @battle.pbDisplay(_INTL("{1}'s Queenly Majesty made the move ineffective!",target.pbThis))
                              PBDebug.log("[Move failed] The target's Queenly Majesty stopped the attack")
                              return false
                            end
                            if target.hasWorkingAbility(:QUEENLYMAJESTY) && user.hasWorkingAbility(:GALEWINGS) && isConst?(thismove.type,PBTypes,:FLYING) && thismove.pbIsDamaging?
                              @battle.pbDisplay(_INTL("{1}'s Queenly Majesty made the move ineffective!",target.pbThis))
                              PBDebug.log("[Move failed] The target's Queenly Majesty stopped the attack")
                              return false
                            end
                        The same can be applied to Dazzling, I think, prodvied of course there's nothing wrong with this code.
                        Reply With Quote
                          #87    
                        Old April 13th, 2018 (6:10 AM).
                        JustheGamer JustheGamer is offline
                           
                          Join Date: Aug 2017
                          Posts: 2
                          Does anyone have scripts for the Neuroforce ability (Ultra Necrozma) and the Photon Geyser attack?
                          Reply With Quote
                            #88    
                          Old June 22nd, 2018 (6:31 AM).
                          parkerw1997 parkerw1997 is offline
                             
                            Join Date: Sep 2013
                            Gender: Male
                            Posts: 24
                            Quote:
                            Originally Posted by BlackOutG5 View Post
                            Why set-up Shell trap that way when it can easily be a counter?
                            For example: In the PBS set it up as 01 instead of 00 for No Target,

                            Under the Blast Beak message
                            Code:
                            elsif pbChoseMoveFunctionCode?(i.index,0x1AE) # Shell Trap
                                    pbDisplay(_INTL("{1} set up a Shell-Trap!",i.pbThis))
                            Then search for opponent.effects[PBEffects::CounterTarget]=attacker.index and under add opponent.effects[PBEffects::ShellTrap]=attacker.index
                            and in PBEffects have it modified like Counter. Then for the actualy script function.

                            Code:
                            ################################################################################
                            # Counters a physical move used against the user this round, with an explosion.
                            ################################################################################
                            class PokeBattle_Move_1AE < PokeBattle_Move
                              def pbAddTarget(targets,attacker)
                                if attacker.effects[PBEffects::ShellTrap]>=0 &&
                                   attacker.pbIsOpposing?(attacker.effects[PBEffects::ShellTrap])
                                  if !attacker.pbAddTarget(targets,@battle.battlers[attacker.effects[PBEffects::ShellTrap]])
                                    attacker.pbRandomTarget(targets)
                                  end
                                end
                              end
                            
                              def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
                                if attacker.effects[PBEffects::Counter]<=0 || !opponent
                                  @battle.pbDisplay(_INTL("Shell Trap failed!"))
                                  return -1
                                end
                                ret=pbEffectFixedDamage(150,attacker,opponent,hitnum,alltargets,showanimation)
                                return ret
                              end
                            end
                            What is your full code for Beak Blast and Shell Trap because it doesn't seem to be working for me.
                            Reply With Quote
                              #89    
                            Old October 10th, 2018 (11:35 AM). Edited 2 Weeks Ago by WolfPP.
                            WolfPP's Avatar
                            WolfPP WolfPP is offline
                               
                              Join Date: Aug 2018
                              Location: Brazil
                              Gender: Male
                              Nature: Jolly
                              Posts: 146
                              I do to Neuroforce (Ultra Necrozma):
                              Spoiler:

                              in 'PokeBattle_Move' search
                              Code:
                              if attacker.hasWorkingItem(:LIFEORB) && (options&SELFCONFUSE)==0
                              Below, add:
                              Code:
                                  if attacker.hasWorkingAbility(:NEUROFORCE) && 
                                     opponent.damagestate.typemod>8 
                                    finaldamagemult=(finaldamagemult*1.25).round
                                  end


                              To Prism Armor (Necrozma/Dusk Mane Necrozma/Dawn Wings Necrozma)
                              Spoiler:

                              in 'PokeBattle_AI' search to:
                              Code:
                                  # Sniper - n/a
                                  # Solid Rock, Filter
                                  if skill>=PBTrainerAI.bestSkill
                                    if (opponent.hasWorkingAbility(:SOLIDROCK)
                              and REPLACE to:
                              Code:
                                  # Sniper - n/a
                                  # Solid Rock, Filter
                                  if skill>=PBTrainerAI.bestSkill
                                    if (opponent.hasWorkingAbility(:SOLIDROCK) || opponent.hasWorkingAbility(:PRISMARMOR) || opponent.hasWorkingAbility(:FILTER)) &&
                                       typemod>8
                                      damage=(damage*0.75).round
                                    end
                                  end
                              in 'PokeBattle_Move', search:
                              Code:
                                    if (opponent.hasWorkingAbility(:SOLIDROCK) ||
                                       opponent.hasWorkingAbility(:FILTER)) &&
                                       opponent.damagestate.typemod>8
                                      finaldamagemult=(finaldamagemult*0.75).round
                                    end
                              and REPLACE to:
                              Code:
                                    if (opponent.hasWorkingAbility(:SOLIDROCK) ||
                                       opponent.hasWorkingAbility(:PRISMARMOR) ||
                                       opponent.hasWorkingAbility(:FILTER)) &&
                                       opponent.damagestate.typemod>8
                                      finaldamagemult=(finaldamagemult*0.75).round
                                    end


                              To put N-Lunarizer and N-Solarizer:
                              Spoiler:

                              in 'PItem_ItemEffects' search:
                              Code:
                              ItemHandlers::UseOnPokemon.add(:DNASPLICERS,proc{|item,pokemon,scene|
                                 if isConst?(pokemon.species,PBSpecies,:KYUREM)
                                   if pokemon.hp>0
                                     if pokemon.fused!=nil
                                       if $Trainer.party.length>=6
                                         scene.pbDisplay(_INTL("You have no room to separate the Pokémon."))
                                         next false
                                       else
                                         #scene.pbAnimForme(pokemon.species,chose,pokemon.form)#
                                         $Trainer.party[$Trainer.party.length]=pokemon.fused
                                         pokemon.fused=nil
                                         pokemon.form=0
                                         scene.pbHardRefresh
                                         scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
                                         next true
                                       end
                                     else
                                       chosen=scene.pbChoosePokemon(_INTL("Fuse with which Pokémon?"))
                                       if chosen>=0
                                         poke2=$Trainer.party[chosen]
                                         if (isConst?(poke2.species,PBSpecies,:RESHIRAM) ||
                                            isConst?(poke2.species,PBSpecies,:ZEKROM)) && poke2.hp>0 && !poke2.egg?
                                           #scene.pbAnimFormeFusion(pokemon.species,chose,poke2.species,chosen,newform)#
                                           pokemon.form=1 if isConst?(poke2.species,PBSpecies,:RESHIRAM)
                                           pokemon.form=2 if isConst?(poke2.species,PBSpecies,:ZEKROM)
                                           pokemon.fused=poke2
                                           pbRemovePokemonAt(chosen)
                                           scene.pbHardRefresh
                                           scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
                                           next true
                                         elsif poke2.egg?
                                           scene.pbDisplay(_INTL("It cannot be fused with an Egg."))
                                         elsif poke2.hp<=0
                                           scene.pbDisplay(_INTL("It cannot be fused with that fainted Pokémon."))
                                         elsif pokemon==poke2
                                           scene.pbDisplay(_INTL("It cannot be fused with itself."))
                                         else
                                           scene.pbDisplay(_INTL("It cannot be fused with that Pokémon."))
                                         end
                                       else
                                         next false
                                       end
                                     end
                                   else
                                     scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
                                   end
                                 else
                                   scene.pbDisplay(_INTL("It had no effect."))
                                   next false
                                 end
                              })
                              Bellow that, add:
                              Code:
                              ItemHandlers::UseOnPokemon.add(:NSOLARIZER,proc{|item,pokemon,scene|
                                 if isConst?(pokemon.species,PBSpecies,:NECROZMA)
                                   if pokemon.hp>0
                                     if pokemon.fused!=nil
                                       if $Trainer.party.length>=6
                                         scene.pbDisplay(_INTL("You have no room to separate the Pokémon."))
                                         next false
                                       else
                                         #scene.pbAnimForme(pokemon.species,chose,pokemon.form)#
                                         $Trainer.party[$Trainer.party.length]=pokemon.fused
                                         pokemon.fused=nil
                                         pokemon.form=0
                                         scene.pbHardRefresh
                                         scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
                                         next true
                                       end
                                     else
                                       chosen=scene.pbChoosePokemon(_INTL("Fuse with which Pokémon?"))
                                       if chosen>=0
                                         poke2=$Trainer.party[chosen]
                                         if isConst?(poke2.species,PBSpecies,:SOLGALEO) && poke2.hp>0 && !poke2.egg?
                                           #scene.pbAnimFormeFusion(pokemon.species,chose,poke2.species,chosen,newform)#
                                           pokemon.form=1 if isConst?(poke2.species,PBSpecies,:SOLGALEO)
                                           pokemon.fused=poke2
                                           pbRemovePokemonAt(chosen)
                                           scene.pbHardRefresh
                                           scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
                                           next true
                                         elsif poke2.egg?
                                           scene.pbDisplay(_INTL("It cannot be fused with an Egg."))
                                         elsif poke2.hp<=0
                                           scene.pbDisplay(_INTL("It cannot be fused with that fainted Pokémon."))
                                         elsif pokemon==poke2
                                           scene.pbDisplay(_INTL("It cannot be fused with itself."))
                                         else
                                           scene.pbDisplay(_INTL("It cannot be fused with that Pokémon."))
                                         end
                                       else
                                         next false
                                       end
                                     end
                                   else
                                     scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
                                   end
                                 else
                                   scene.pbDisplay(_INTL("It had no effect."))
                                   next false
                                 end
                              })
                              
                              ItemHandlers::UseOnPokemon.add(:NLUNARIZER,proc{|item,pokemon,scene|
                                 if isConst?(pokemon.species,PBSpecies,:NECROZMA)
                                   if pokemon.hp>0
                                     if pokemon.fused!=nil
                                       if $Trainer.party.length>=6
                                         scene.pbDisplay(_INTL("You have no room to separate the Pokémon."))
                                         next false
                                       else
                                         #scene.pbAnimForme(pokemon.species,chose,pokemon.form)#
                                         $Trainer.party[$Trainer.party.length]=pokemon.fused
                                         pokemon.fused=nil
                                         pokemon.form=0
                                         scene.pbHardRefresh
                                         scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
                                         next true
                                       end
                                     else
                                       chosen=scene.pbChoosePokemon(_INTL("Fuse with which Pokémon?"))
                                       if chosen>=0
                                         poke2=$Trainer.party[chosen]
                                         if isConst?(poke2.species,PBSpecies,:LUNALA) && poke2.hp>0 && !poke2.egg?
                                           #scene.pbAnimFormeFusion(pokemon.species,chose,poke2.species,chosen,newform)#
                                           pokemon.form=2 if isConst?(poke2.species,PBSpecies,:LUNALA)
                                           pokemon.fused=poke2
                                           pbRemovePokemonAt(chosen)
                                           scene.pbHardRefresh
                                           scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
                                           next true
                                         elsif poke2.egg?
                                           scene.pbDisplay(_INTL("It cannot be fused with an Egg."))
                                         elsif poke2.hp<=0
                                           scene.pbDisplay(_INTL("It cannot be fused with that fainted Pokémon."))
                                         elsif pokemon==poke2
                                           scene.pbDisplay(_INTL("It cannot be fused with itself."))
                                         else
                                           scene.pbDisplay(_INTL("It cannot be fused with that Pokémon."))
                                         end
                                       else
                                         next false
                                       end
                                     end
                                   else
                                     scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
                                   end
                                 else
                                   scene.pbDisplay(_INTL("It had no effect."))
                                   next false
                                 end
                              })
                              in item.txt (PBS folder), add in the last line:
                              Code:
                              xxx,ULTRANECROZIUMZ,Ultranecrozium Z, Ultranecrozium Z,1,0,"It's a crystal that turns Necrozma fused with Solgaleo or Lunala into a new form.",0,0,0,
                              xxx,NSOLARIZER,N-Solarizer,N-Solarizers,8,0,"A machine to fuse and separate Necrozma; needs light, and Solgaleo.",5,0,6,
                              xxx,NLUNARIZER,N-Lunarizer,N-Lunarizers,8,0,"A machine to fuse and separate Necrozma; needs light, and Lunala.",5,0,6,
                              xxx= last item number in your item.txt

                              Then, downloadd that icon into your Icon Folder (Graphic/Icon) and change the number to the same number in item.txt.


                              So, i edited a little BlackOutG5 scritps to Soul Heart (credit to him):
                              Spoiler:

                              in 'PokeBattle_Battler' search to 'Moxie' Ability:
                              Code:
                                  # Moxie
                                  if user.hasWorkingAbility(:MOXIE) && target.fainted?
                                    if user.pbIncreaseStatWithCause(PBStats::ATTACK,1,user,PBAbilities.getName(user.ability))
                                      PBDebug.log("[Ability triggered] #{user.pbThis}'s Moxie")
                                    end
                                  end
                              And below add:
                              Code:
                                  # Soul Heart
                                  if user.hasWorkingAbility(:SOULHEART) && target.fainted? && pbPartner.isFainted?
                                    user=self
                                    if !user.pbTooHigh?(PBStats::SPATK)
                                      @battle.pbDisplayEffect(self)
                                      user.pbIncreaseStatBasic(PBStats::SPATK,1)
                                      @battle.pbCommonAnimation("StatUp",user,nil)
                                      if EFFECTMESSAGES
                                        @battle.pbDisplay(_INTL("{1}'s Special Attack rose!",user.pbThis(true)))
                                      else
                                        @battle.pbDisplay(_INTL("{1}'s Soul Heart raised its Special Attack!",user.pbThis))
                                      end
                                    #if user.pbIncreaseStatWithCause(PBStats::SPATK,1,user,PBAbilities.getName(user.ability))
                                        #PBDebug.log("[Ability triggered] #{user.pbThis}'s Soul Heart.")
                                    end
                                  end
                              If you use EBS, add this in 'if EFFECTMESSAGES' , in def 'def pbAbilitiesOnSwitchIn(*args)', add':SOULHEART' in the list on 'if self.'. Something like this:
                              Code:
                              if EFFECTMESSAGES
                              
                              class PokeBattle_Battler
                                alias pbAbilitiesOnSwitchIn_ebs pbAbilitiesOnSwitchIn unless self.method_defined?(:pbAbilitiesOnSwitchIn_ebs)
                                def pbAbilitiesOnSwitchIn(*args)
                                  if self.checkForAbilities(:FRISK,:FOREWARN,:BADDREAMS,:MOODY,:HARVEST,:TRACE,:INTIMIDATE,:SOULHEART)
                                    @battle.abilityTrick = self
                                  else
                                    @battle.abilityMessage = self
                                  end
                                  ret = pbAbilitiesOnSwitchIn_ebs(*args)
                                  @battle.abilityTrick = nil
                                  @battle.abilityMessage = nil
                                  return ret    
                                end


                              EDIT
                              When Necrozma fused:

                              in 'Pokemon_Forms' before 'MultipleForms.register(:GIRATINA,{' add:

                              Spoiler:

                              Code:
                              MultipleForms.register(:NECROZMA,{
                              "onSetForm"=>proc{|pokemon,form|
                                 moves=[
                                    :SUNSTEELSTRIKE, #Solgaleo is pokemon.form=1
                                    :MOONGEISTBEAM #Lunala is pokemon.form=2
                                 ]
                                 hasoldmove=-1
                                 for i in 0...4
                                   for j in 0...moves.length
                                     if isConst?(pokemon.moves[i].id,PBMoves,moves[j])
                                       hasoldmove=i; break
                                     end
                                   end
                                   break if hasoldmove>=0
                                 end
                                 if form>0
                                   newmove = moves[form-1]
                                   if newmove!=nil && hasConst?(PBMoves,newmove)
                                     if hasoldmove>=0
                                       # Automatically replace the old form's special move with the new one's
                                       oldmovename = PBMoves.getName(pokemon.moves[hasoldmove].id)
                                       newmovename = PBMoves.getName(getID(PBMoves,newmove))
                                       pokemon.moves[hasoldmove] = PBMove.new(getID(PBMoves,newmove))
                                       Kernel.pbMessage(_INTL("1,\\wt[16] 2, and\\wt[16]...\\wt[16] ...\\wt[16] ... Ta-da!\\se[Battle ball drop]\1"))
                                       Kernel.pbMessage(_INTL("{1} forgot how to use {2}.\\nAnd...\1",pokemon.name,oldmovename))
                                       Kernel.pbMessage(_INTL("\\se[]{1} learned {2}!\\se[Pkmn move learnt]",pokemon.name,newmovename))
                                     else
                                       # Try to learn the new form's special move
                                       pbLearnMove(pokemon,getID(PBMoves,newmove),true)
                                     end
                                   end
                                 else
                                   if hasoldmove>=0
                                     # Forget the old form's special move
                                     oldmovename=PBMoves.getName(pokemon.moves[hasoldmove].id)
                                     pokemon.pbDeleteMoveAtIndex(hasoldmove)
                                     Kernel.pbMessage(_INTL("{1} forgot {2}...\\nAnd...\1",pokemon.name,oldmovename))
                                     pbLearnMove(pokemon,getID(PBMoves,:CONFUSION))
                                   end
                                 end
                              }
                              })
                              Attached Images
                              File Type: png item677.png‎ (510 Bytes, 73 views) (Save to Dropbox)
                              File Type: png item676.png‎ (515 Bytes, 67 views) (Save to Dropbox)
                              File Type: png item675.png‎ (535 Bytes, 70 views) (Save to Dropbox)
                              Reply With Quote
                                #90    
                              Old 2 Weeks Ago (8:00 AM). Edited 1 Week Ago by WolfPP.
                              WolfPP's Avatar
                              WolfPP WolfPP is offline
                                 
                                Join Date: Aug 2018
                                Location: Brazil
                                Gender: Male
                                Nature: Jolly
                                Posts: 146
                                Now, lets add Dream Ball, Park Ball and Beast Ball:

                                in item.txt, add (x=last number):
                                Code:
                                XXX,DREAMBALL,Dream Ball,Dream Balls,3,0,"A special Poké Ball that appears in your Bag out of nowhere in the Entree Forest. It can catch any Pokémon.",0,2,4,
                                XXX,PARKBALL,Park Ball,Park Balls,3,0,"A special Poké Ball for the Pal Park.",0,2,4,
                                XXX,BEASTBALL,Beast Ball,Beast Balls,3,1000,"A special Poké Ball designed to catch Ultra Beasts.",0,2,4,

                                in 'PItem_PokeBalls' search 'PItem_PokeBalls' and add:

                                Code:
                                   24=>:PARKBALL,#
                                   25=>:DREAMBALL,#
                                   26=>:BEASTBALL#
                                Then, after:
                                Spoiler:

                                Code:
                                BallHandlers::ModifyCatchRate.add(:MOONBALL,proc{|ball,catchRate,battle,battler|
                                   if isConst?(battler.species,PBSpecies,:NIDORANfE) ||
                                      isConst?(battler.species,PBSpecies,:NIDORINA) ||
                                      isConst?(battler.species,PBSpecies,:NIDOQUEEN) ||
                                      isConst?(battler.species,PBSpecies,:NIDORANmA) ||
                                      isConst?(battler.species,PBSpecies,:NIDORINO) ||
                                      isConst?(battler.species,PBSpecies,:NIDOKING) ||
                                      isConst?(battler.species,PBSpecies,:CLEFFA) ||
                                      isConst?(battler.species,PBSpecies,:CLEFAIRY) ||
                                      isConst?(battler.species,PBSpecies,:CLEFABLE) ||
                                      isConst?(battler.species,PBSpecies,:IGGLYBUFF) ||
                                      isConst?(battler.species,PBSpecies,:JIGGLYPUFF) ||
                                      isConst?(battler.species,PBSpecies,:WIGGLYTUFF) ||
                                      isConst?(battler.species,PBSpecies,:SKITTY) ||
                                      isConst?(battler.species,PBSpecies,:DELCATTY) ||
                                      isConst?(battler.species,PBSpecies,:MUNNA) ||
                                      isConst?(battler.species,PBSpecies,:MUSHARNA)
                                     catchRate*=4
                                   end
                                   next [catchRate,255].min
                                })


                                add:
                                Spoiler:

                                Code:
                                BallHandlers::IsUnconditional.add(:PARKBALL,proc{|ball,battle,battler|
                                   next true
                                })
                                
                                BallHandlers::IsUnconditional.add(:DREAMBALL,proc{|ball,battle,battler|
                                   next true
                                })
                                
                                BallHandlers::ModifyCatchRate.add(:BEASTBALL,proc{|ball,catchRate,battle,battler|
                                   if isConst?(battler.species,PBSpecies,:NIHILEGO) ||
                                      isConst?(battler.species,PBSpecies,:BUZZWOLE) ||
                                      isConst?(battler.species,PBSpecies,:PHEROMOSA) ||
                                      isConst?(battler.species,PBSpecies,:XURKITREE) ||
                                      isConst?(battler.species,PBSpecies,:CELESTEELA) ||
                                      isConst?(battler.species,PBSpecies,:KARTANA) ||
                                      isConst?(battler.species,PBSpecies,:GUZZLORD) ||
                                      isConst?(battler.species,PBSpecies,:POIPOLE) ||
                                      isConst?(battler.species,PBSpecies,:NAGANADEL) ||
                                      isConst?(battler.species,PBSpecies,:STAKATAKA) ||
                                      isConst?(battler.species,PBSpecies,:BLACEPHALON)
                                     catchRate*=5
                                   end
                                   next catchRate
                                })


                                Bellow, the attachments. 'itemxxx' in Icon Folder (Graphics/Icon) and 'icon_ball' in Summary folder (Graphics/Pictures/Summary).

                                EDIT:

                                Lets add Photon Geyser, the signature moves of Necrozma.

                                First, add in moves.txt
                                Code:
                                XXX,PHOTONGEYSER,Photon Geyser,170,100,PSYCHIC,Special,100,5,0,00,0,bef,"The user attacks a target with a pillar of light. This move inflicts Attack or Sp. Atk damage—whichever stat is higher for the user."
                                See '170', he is our number to class the move in 'PokeBattle_MoveEffects'
                                So, in the script, add in the last line:

                                Spoiler:

                                Code:
                                ################################################################################
                                # Inflicts Attack or Sp. Atk damage—whichever stat is higher for the user.
                                # (Photon Geyser)
                                ################################################################################
                                class PokeBattle_Move_170 < PokeBattle_Move
                                	def pbBaseDamage(basedmg,attacker,opponent)
                                		if attacker.attack > attacker.spatk
                                			attacker.spatk=attacker.attack
                                      opponent.spdef=opponent.defense
                                    elsif attacker.spatk >= attacker.attack
                                			attacker.spatk=attacker.spatk
                                      opponent.spdef=opponent.spdef
                                		end
                                	end
                                end


                                EDIT: I try to add this part:

                                This move also ignores the target's Ability if the Ability changes the effect of the attack on the target. Abilities that affect the user of the attack, like Pressure, are not ignored. Photon Geyser does not ignore the effects of Shadow Shield and Prism Armor.

                                Maybe this but i dont get it:
                                Spoiler:

                                Code:
                                ################################################################################
                                # Inflicts Attack or Sp. Atk damage—whichever stat is higher for the user.
                                # (Photon Geyser)
                                ################################################################################
                                class PokeBattle_Move_170 < PokeBattle_Move
                                  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
                                    if isConst?(opponent.ability,PBAbilities,:INTIMIDATE)
                                      opponent.effects[PBEffects::GastroAcid]=true
                                    elsif isConst?(opponent.ability,PBAbilities,:PRESSURE) ||
                                       isConst?(opponent.ability,PBAbilities,:PRISMARMOR) ||
                                       isConst?(opponent.ability,PBAbilities,:SHADOWSHIELD)
                                      opponent.effects[PBEffects::GastroAcid]=false
                                    end
                                  end
                                  
                                  def pbBaseDamage(basedmg,attacker,opponent)
                                		if attacker.attack > attacker.spatk
                                			attacker.spatk=attacker.attack
                                      opponent.spdef=opponent.defense
                                    elsif attacker.spatk >= attacker.attack
                                			attacker.spatk=attacker.spatk
                                      opponent.spdef=opponent.spdef
                                		end
                                	end
                                  
                                  def pbEffectAfterHit(attacker,opponent,turneffects)
                                    opponent.effects[PBEffects::GastroAcid]=false if opponent.effects[PBEffects::GastroAcid]=true
                                  end
                                end
                                
                                ################################################################################
                                # Ignore the target's Ability if it changes the effect of the attack on the 
                                # target. Abilities that affect the user of the attack, like Pressure, are not 
                                # ignored. Does not ignore the effects of Shadow Shield and Prism Armor.
                                # (Sunsteel Strike and Moongeist Beam)
                                ################################################################################
                                class PokeBattle_Move_171 < PokeBattle_Move  
                                  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
                                    if isConst?(opponent.ability,PBAbilities,:INTIMIDATE)
                                      opponent.effects[PBEffects::GastroAcid]=true
                                    elsif isConst?(opponent.ability,PBAbilities,:PRESSURE) ||
                                       isConst?(opponent.ability,PBAbilities,:PRISMARMOR) ||
                                       isConst?(opponent.ability,PBAbilities,:SHADOWSHIELD)
                                      opponent.effects[PBEffects::GastroAcid]=false
                                    end
                                  end
                                  
                                  def pbEffectAfterHit(attacker,opponent,turneffects)
                                    opponent.effects[PBEffects::GastroAcid]=false if opponent.effects[PBEffects::GastroAcid]=true
                                  end
                                end


                                How can i do that in move effects?

                                EDIT 2: DONE!
                                In 'PokeBattle_Battler' (with R), find 'def pbUseMove(choice,specialusage=false)'.
                                Below:
                                Spoiler:

                                Code:
                                    # Stance Change
                                    if hasWorkingAbility(:STANCECHANGE) && isConst?(species,PBSpecies,:AEGISLASH) &&
                                       [email protected][PBEffects::Transform]
                                      if thismove.pbIsDamaging? && self.form!=1
                                        self.form=1
                                        pbUpdate(true)
                                        @battle.scene.pbChangePokemon(self,@pokemon)
                                        @battle.pbDisplay(_INTL("{1} changed to Blade Forme!",pbThis))
                                        PBDebug.log("[Form changed] #{pbThis} changed to Blade Forme")
                                      elsif isConst?(thismove.id,PBMoves,:KINGSSHIELD) && self.form!=0
                                        self.form=0
                                        pbUpdate(true)
                                        @battle.scene.pbChangePokemon(self,@pokemon)
                                        @battle.pbDisplay(_INTL("{1} changed to Shield Forme!",pbThis))
                                        PBDebug.log("[Form changed] #{pbThis} changed to Shield Forme")
                                      end      
                                    end

                                Paste:
                                Spoiler:

                                Code:
                                    # Photon Geyser, Moongeist Beam and Sunsteel Strike effect on
                                    if (isConst?(species,PBSpecies,:SOLGALEO) && 
                                      isConst?(thismove.id,PBMoves,:SUNSTEELSTRIKE) ||
                                      isConst?(species,PBSpecies,:LUNALA) && 
                                      isConst?(thismove.id,PBMoves,:MOONGEISTBEAM) ||
                                      isConst?(species,PBSpecies,:NECROZMA) && 
                                      isConst?(thismove.id,PBMoves,:PHOTONGEYSER))
                                      if (hasWorkingAbility(:PRESSURE) || 
                                        hasWorkingAbility(:SHADOWSHIELD) ||
                                        hasWorkingAbility(:PRISMARMOR))
                                        effects[PBEffects::GastroAcid]=false
                                      elsif hasWorkingAbility(:INTIMIDATE)
                                        effects[PBEffects::GastroAcid]=true
                                      end
                                    end

                                Then, find 'def pbEndTurn(choice)':
                                Spoiler:

                                Code:
                                  def pbEndTurn(choice)
                                    # True end(?)
                                    if @effects[PBEffects::ChoiceBand]<0 && @lastMoveUsed>=0 && !fainted? && 
                                       (self.hasWorkingItem(:CHOICEBAND) ||
                                       self.hasWorkingItem(:CHOICESPECS) ||
                                       self.hasWorkingItem(:CHOICESCARF))
                                      @effects[PBEffects::ChoiceBand][email protected]
                                    end
                                    @battle.pbPrimordialWeather
                                    for i in 0...4
                                      @battle.battlers[i].pbBerryCureCheck
                                    end
                                    for i in 0...4
                                      @battle.battlers[i].pbAbilityCureCheck
                                    end
                                    for i in 0...4
                                      @battle.battlers[i].pbAbilitiesOnSwitchIn(false)
                                    end
                                    for i in 0...4
                                      @battle.battlers[i].pbCheckForm
                                    end
                                 end

                                and replace to:
                                Spoiler:

                                Code:
                                  def pbEndTurn(choice)
                                    # True end(?)
                                    if @effects[PBEffects::ChoiceBand]<0 && @lastMoveUsed>=0 && !fainted? && 
                                       (self.hasWorkingItem(:CHOICEBAND) ||
                                       self.hasWorkingItem(:CHOICESPECS) ||
                                       self.hasWorkingItem(:CHOICESCARF))
                                      @effects[PBEffects::ChoiceBand][email protected]
                                    end
                                    @battle.pbPrimordialWeather
                                    for i in 0...4
                                      @battle.battlers[i].pbBerryCureCheck
                                    end
                                    for i in 0...4
                                      @battle.battlers[i].pbAbilityCureCheck
                                    end
                                    for i in 0...4
                                      @battle.battlers[i].pbAbilitiesOnSwitchIn(false)
                                    end
                                    for i in 0...4
                                      @battle.battlers[i].pbCheckForm
                                    end
                                    # Photon Geyser, Moongeist Beam and Sunsteel Strike effect off
                                    if (isConst?(species,PBSpecies,:SOLGALEO) || isConst?(species,PBSpecies,:LUNALA) ||
                                      isConst?(species,PBSpecies,:NECROZMA))
                                      effects[PBEffects::GastroAcid]=false
                                    end
                                    #
                                  end
                                Attached Images
                                File Type: png item678.png‎ (485 Bytes, 55 views) (Save to Dropbox)
                                File Type: png item621.png‎ (601 Bytes, 59 views) (Save to Dropbox)
                                File Type: png item679.png‎ (466 Bytes, 57 views) (Save to Dropbox)
                                File Type: png icon_ball_26.png‎ (490 Bytes, 54 views) (Save to Dropbox)
                                File Type: png icon_ball_25.png‎ (440 Bytes, 56 views) (Save to Dropbox)
                                File Type: png icon_ball_24.png‎ (539 Bytes, 51 views) (Save to Dropbox)
                                Reply With Quote
                                Reply

                                Quick Reply

                                Join the conversation!

                                Create an account to post a reply in this thread, participate in other discussions, and more!

                                Create a PokéCommunity Account
                                Thread Tools

                                Posting Rules
                                You may not post new threads
                                You may not post replies
                                You may not post attachments
                                You may not edit your posts

                                BB code is On
                                Smilies are On
                                [IMG] code is On
                                HTML code is Off

                                Forum Jump


                                All times are GMT -8. The time now is 12:00 AM.