• 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] Need Script suggestions for custom moves

29
Posts
6
Years
    • Seen Feb 8, 2024
    Hey guys, it's been a while since I've gotten really involved with Fan game development. I'm not too deep into it, I'm mostly into just modification of what's already there, but I do want to add a couple moves that I haven't been able to figure out how to script. So if anyone can help me script these moves, I would greatly appreciate it.

    Here's the list of moves and the effects I want to add (so far):

    Love Slap-

    Basically, a Fairy type attack that does damage but also has the effect of the move Attract

    Hydro Aerobics-

    This ones a little more complicated. This move does Water & Flying type damage and has a 30% chance of raising the user's Speed.

    Prodder-

    Steel type attack that does damage and lowers Defense and Special Defense 100% of the time

    Healing Drench-

    Another complicated one. This attack does damage but gives the opponent the effect of leftovers, which is healing HP every turn after it is used.

    I know a couple of these moves might be a little complex to script, but I would appreciate any advice/help/suggestions that anybody can offer.

    I'm looking forward to it :-)
     
    188
    Posts
    9
    Years
    • Seen Jan 21, 2024
    For Love Slap, what is the probability of the attraction occurring (assuming the conditions are right)? For Hydro Aerobics, you can use the function code for increasing Speed by 1 (0x01F) and some modification is needed to PokeBattle_Move, def pbTypeModifier for both it and Flying Press' dual-type nature. Healing Drench will require you to create a new PBEffect, add the effect wherever it checks for the Aqua Ring effect so it checks for Aqua Ring or the new effect and copy the Aqua Ring code to a new move function and modify it as follows:
    Code:
    [COLOR="Red"]class PokeBattle_Move_nnn < PokeBattle_Move[/COLOR]
      def isHealingMove?
        return true
      end
    
      def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
        [COLOR="red"]ret=super(attacker,opponent,hitnum,alltargets,showanimation)
        if opponent.effects[PBEffects::HealingDrench][/COLOR]
          [s]@battle.pbDisplay(_INTL("But it failed!"))[/s]
          [COLOR="red"]return ret[/COLOR]
        end
        [COLOR="red"]pbShowAnimation(@id,opponent,nil,hitnum,alltargets,showanimation)
        opponent.effects[PBEffects::HealingDrench]=true
        @battle.pbDisplay(_INTL("{1} surrounded itself with a veil of water!",opponent.pbThis))
        return ret[/color]
      end
    end
    Modify the pbDisplay message if you want.
     
    Last edited:
    Back
    Top