• 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] [version Eighteen] How would I make a move super-effective on a certain type, i.e. Ghost or Electric?

HeroesFightingFear

"The Champion of Alon"
99
Posts
4
Years
  • How would I make a move super-effective on a certain type, like Ghost or Electric? This is important because I want to do this for two special moves exclusive to a post-purification Shadow Alolan Marowak in my game.
     

    HeroesFightingFear

    "The Champion of Alon"
    99
    Posts
    4
    Years
  • Never mind, this should work, right?
    Code:
    return (PBTypeEffectiveness::NORMAL_EFFECTIVE * 2) if isConst?(move,PBMoves,:SPIRITBURNER) &&
           target.pbHasType?(:GHOST)
        return (PBTypeEffectiveness::NORMAL_EFFECTIVE * 2) if isConst?(move,PBMoves,:GRAVEDIGGER) &&
           target.pbHasType?(:ELECTRIC)
     

    Phye

    The Eternal Night :.
    71
    Posts
    14
    Years
  • I assume you can just make new move effects akin to Freeze-Dry. As Freeze-dry already uses the "super effective vs a certain type."
    Code:
    #===============================================================================
    # Freezes the target. Effectiveness against Water-type is 2x. (Freeze-Dry)
    #===============================================================================
    class PokeBattle_Move_135 < PokeBattle_FreezeMove
      def pbCalcTypeModSingle(moveType,defType,user,target)
        return PBTypeEffectiveness::SUPER_EFFECTIVE_ONE if isConst?(defType,PBTypes,:WATER)
        return super
      end
    end
    You can probably just copy freeze-dry's effect and change it to the type you want the move to be super effective against and then add them as move effects for your moves. :D This is for v18.
     

    HeroesFightingFear

    "The Champion of Alon"
    99
    Posts
    4
    Years
  • I assume you can just make new move effects akin to Freeze-Dry. As Freeze-dry already uses the "super effective vs a certain type."
    Code:
    #===============================================================================
    # Freezes the target. Effectiveness against Water-type is 2x. (Freeze-Dry)
    #===============================================================================
    class PokeBattle_Move_135 < PokeBattle_FreezeMove
      def pbCalcTypeModSingle(moveType,defType,user,target)
        return PBTypeEffectiveness::SUPER_EFFECTIVE_ONE if isConst?(defType,PBTypes,:WATER)
        return super
      end
    end
    You can probably just copy freeze-dry's effect and change it to the type you want the move to be super effective against and then add them as move effects for your moves. :D This is for v18.

    Thanks, I honestly forgot Freeze-Dry was a move until now. This is a big help and solves the issue I had with the previous attempt.
     
    Back
    Top