• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Apologies if you've had troubles connecting to the site, you may need a VPN to access it. Staff are also facing issues connecting, so if it's urgent please message Cat on-site or through Discord directly.
  • Hey Guest, staff applications are open! If you are interested in becoming a forum staff member and/or Discord staff member, please apply through this Google Form before April 2! You can also message Cat with any questions.
Resource icon

Tutorial Normal-Type Attacks without STAB match your first Type instead 1.69

SuperSpyroDragon64

Cooltrainer
Member
Joined
Apr 20, 2022
Posts
165
SuperSpyroDragon64 submitted a new resource:

Normal-Type Attacks without STAB match your first Type instead - Normal moves used by non-Normal type Pokemon match your first Type instead

Just replace the "pbCalcType(user)" code with this.

Code:
Expand Collapse Copy
  def pbCalcType(user)
    @powerBoost = false
    type = @calcType
    userTypes = user.pbTypes(true)
    ret = pbBaseType(user)
    if ret == :NORMAL && !user.pbHasType?(:NORMAL)
    ret = userTypes[0]
    end
    if ret && GameData::Type.exists?(:ELECTRIC)
      if @battle.field.effects[PBEffects::IonDeluge] && ret == :NORMAL
        ret = :ELECTRIC
        @powerBoost = false
      end
      if user.effects[PBEffects::Electrify]...

Read more about this resource...
 
Back
Top