• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • 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] Idea for move (I need some help scripting it)

  • 71
    Posts
    5
    Years
    Hi,

    I came up with a new move for one of the new types of my fangame (that being Sound type) .And while I've been trying to make the move work, I'm not able to pull it out:(

    The move is called "Doppler", and it lasts for 3 turns (I thought because of this I could use the Outrage Move Effect and work from there, but I'm not really able to do it).
    On the first turn, it does 50 damage
    After that, on the second turn, it does 150 damage
    Lastly, on the third turn, it does 50 damage again. Then, it leaves the target with the "Soundproof" ability (so it's immune to the next time Doppler is used and you can't abuse the move).
    For this last part, I guess I can work it out from Worry Seed? I was able to "change" the ability but the target wasn't immune even then :(


    This is what I have for now. I don't know if I'm changing the ability wrongly, or how to change the damage each turn (because it's not by multiplying like Fury Cutter or Rollout).
    Code:
    class PokeBattle_Move_204 < PokeBattle_Move
    
      def pbEffectAfterAllHits(user,target)
        if !target.damageState.unaffected && user.effects[PBEffects::Doppler]==0
          user.effects[PBEffects::Doppler] = 3
          user.currentMove = @id
        end
        if user.effects[PBEffects::Doppler]>0
          user.effects[PBEffects::Doppler] -= 1
          if user.effects[PBEffects::Outrage]==0
              target.ability = getConst(PBAbilities,:INSOMNIA)
              @battle.pbReplaceAbilitySplash(target)
              @battle.pbDisplay(_INTL("¡{1} adquirió  {2}!",target.pbThis,target.abilityName))
          end
        end
      end
    end
     
    Back
    Top