• 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] Pokémon Essentials 18.1 - Move that paralyzes the user.

  • 15
    Posts
    3
    Years
    • Seen Dec 15, 2021
    Greetings.

    First of all, thanks for reading this, because it means you want to help me. You'll see. I'm trying to create an Electric-type move that will paralyze the user after being used. I would like it to have 120 points of damage and paralyze the user regardless of immunities, affecting Electric types, Pokémon with Volt Absorb, Lightning Rod or any similar ability. I've tried everything. A variant of the recoil moves, copying the Flamesphere script ... But nothing works. Please can you tell me how to do it?

    Thank you for reading.

    EDIT: I have already written everything necessary in the PBS file, except for the probability of side effect because I am not sure if I should put 100 or 0.
     
    Last edited:

    StCooler

    Mayst thou thy peace discover.
  • 9,304
    Posts
    4
    Years
    • Seen today
    Hey, it is straightforward actually:

    Code:
    class PokeBattle_Move_XXX < PokeBattle_Move
      def pbEffectAfterAllHits(user,target)
        return if user.pbHasAnyStatus?
        user.pbParalyze
      end
    end

    Replace the XXX with the function code that you want.
     
  • 15
    Posts
    3
    Years
    • Seen Dec 15, 2021
    Hey, it is straightforward actually:

    Code:
    class PokeBattle_Move_XXX < PokeBattle_Move
      def pbEffectAfterAllHits(user,target)
        return if user.pbHasAnyStatus?
        user.pbParalyze
      end
    end

    Replace the XXX with the function code that you want.

    This is the second time you have helped me with scripting and this is the second time it has worked.
    StCooler, I love you.
     

    StCooler

    Mayst thou thy peace discover.
  • 9,304
    Posts
    4
    Years
    • Seen today
    To do that, I think you should look at how Tar Shot is coded; namely:
    • Add a new PBEffect (let's call it "ElectricImmunity"), it should be an effect that applies to battlers.
    • In the file PokeBattle_Battler, in the function pbInitEffects(batonPass), initialise this effect to false, like this:
      Code:
      @effects[PBEffects::ElectricImmunity] = false
    • Subclass PokeBattle_Move to make your move, and in pbAdditionalEffect():
      Code:
        def pbAdditionalEffect(user,target)
          # Maybe some conditions or stuff
          target.effects[PBEffects::ElectricImmunity] = true
        end
    • In the function pbCalcTypeModSingle(), add something like that:
      Code:
          if target.effects[PBEffects::ElectricImmunity] && isConst?(moveType,PBTypes,:ELECTRIC)
            ret = PBTypeEffectiveness::INEFFECTIVE
          end
    I have not tested this but that's how I would start doing it.
     
    Back
    Top