Modifying status effects

Kioshi Hoshitsuya

Trainer
Member
Joined
Mar 4, 2018
Posts
52
How can I do it? I don't koow if the effects are like in gen 7, but I wanna make them like that, making burn do 1/16 of the maximum hp, paralyze reducing speed by 2 stages instead of 3, making sleep last a maximum of 3 turns and making hitting oneself when confued a 33.3% of the times. Thanks in advance!
 

Scyl

Ironically Unironic Edgelord Extraordinaire
Member
Joined
Apr 4, 2018
Posts
42
For Burn, CTRL + Shift + F and search for "Heatproof".

http://prntscr.com/jyl14q

Go to the line in the screenshot above, and you'll find the following code:

Ruby:
      if i.status==PBStatuses::BURN
        if !i.hasWorkingAbility(:MAGICGUARD)
          PBDebug.log("[Status damage] #{i.pbThis} took damage from burn")
          if i.hasWorkingAbility(:HEATPROOF)
            PBDebug.log("[Ability triggered] #{i.pbThis}'s Heatproof")
            i.pbReduceHP((i.totalhp/16).floor)
          else
            i.pbReduceHP((i.totalhp/8).floor)
          end
        end
        i.pbContinueStatus
      end

Simply change the 8 in the "else" to 16.

For Paralysis, CTRL + Shift + F and search for "speedmult".

http://prntscr.com/jyl1wg

And go to this line. (It's the only one that has a /4)

Ruby:
    if self.status==PBStatuses::PARALYSIS && !self.hasWorkingAbility(:QUICKFEET)
      speedmult=(speedmult/4).round
    end

Simply change the 4 to 2.

That's all I can help you with, I don't know about the other two.
 

Kioshi Hoshitsuya

Trainer
Member
Joined
Mar 4, 2018
Posts
52
For Burn, CTRL + Shift + F and search for "Heatproof".

http://prntscr.com/jyl14q

Go to the line in the screenshot above, and you'll find the following code:

Ruby:
      if i.status==PBStatuses::BURN
        if !i.hasWorkingAbility(:MAGICGUARD)
          PBDebug.log("[Status damage] #{i.pbThis} took damage from burn")
          if i.hasWorkingAbility(:HEATPROOF)
            PBDebug.log("[Ability triggered] #{i.pbThis}'s Heatproof")
            i.pbReduceHP((i.totalhp/16).floor)
          else
            i.pbReduceHP((i.totalhp/8).floor)
          end
        end
        i.pbContinueStatus
      end

Simply change the 8 in the "else" to 16.
Thanks, it worked! I'll try to find out myself how to do the other ones, don't worry. :D
For Paralysis, CTRL + Shift + F and search for "speedmult".

http://prntscr.com/jyl1wg

And go to this line. (It's the only one that has a /4)

Ruby:
    if self.status==PBStatuses::PARALYSIS && !self.hasWorkingAbility(:QUICKFEET)
      speedmult=(speedmult/4).round
    end

Simply change the 4 to 2.

That's all I can help you with, I don't know about the other two.
Thanks, it worked! I'll try to find out myself how to do the other ones, don't worry. :D
 

Kioshi Hoshitsuya

Trainer
Member
Joined
Mar 4, 2018
Posts
52
So I checked both sleep and confusion and they both call a script called pbRandom, followed by a number. For sleep it was 3 and for confusion, 2. Are these numbers the ones that determine sleep turns and hitting yourself in confusion chances?
 
Top