• 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.

Custom Attacks

152
Posts
11
Years
  • Age 12
  • Seen May 11, 2015
In the game I am working on, I'm adding new attacks (And Pokemon, but I know how to do that.)

How do I make new function codes to suit their effects? For example, there is a move that is essentially the Special version of Dragon Dance, raising Sp. Attack instead of Attack.

Although, the trickiest one would be one that diminishes in power the less PP it has.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Pick an unused function code (133 or higher) and give it to your new move in moves.txt.

Then go into the script section PokeBattle_MoveEffects and find an effect similar to the one you want your new move to have. Copy that effect's class and give the copy your new function code's number. Then fiddle with the effect.

The "trickiest" one you mentioned is almost identical to Trump Card, except the power increases with more PP rather than decreases. Not difficult at all, actually.
 
152
Posts
11
Years
  • Age 12
  • Seen May 11, 2015
How would I get a move like Miracle Eye/Foresight to work, except that it lets Poison-type moves hit Steel Types?

I can't figure out how Miracle Eye's script works, so I don't know what to edit.

Also I'm having problems with another move that raises both the user's and the opponent's attack by 1. Originally, I had accidentally assigned its number as 133, which is the move above (Acidify, lets Poison hit Steel). So when I used Acidify, it would have this effect instead. I fixed this and gave this move 134. However, when I use it now, nothing happens.

This is the script for the move:

Code:
class PokeBattle_Move_134 < PokeBattle_Move
  def pbEffect(attacker,opponent)
    ret=-1
    if opponent.effects[PBEffects::Substitute]>0
      @battle.pbDisplay(_INTL("{1}'s attack missed!",attacker.pbThis))
      return -1
    end
    @battle.pbAnimation(@id,attacker,opponent)
    if !attacker.pbTooHigh?(PBStats::ATTACK)
      attacker.pbIncreaseStatBasic(PBStats::ATTACK,1)
      @battle.pbCommonAnimation("StatUp",attacker,opponent)
      @battle.pbDisplay(_INTL("{1}'s Attack rose!",attacker.pbThis))
      ret=0
    end
    if !opponent.pbTooHigh?(PBStats::ATTACK)
      opponent.pbIncreaseStatBasic(PBStats::ATTACK,1)
      @battle.pbCommonAnimation("StatUp",attacker,opponent)
      @battle.pbDisplay(_INTL("{1}'s Attack rose!",opponent.pbThis))
      ret=0
    end
    return ret
  end
end
And this is the line in the PB file:
Code:
561,ATARMS,At Arms,134,0,FIGHTING,Status,0,25,0,20,0,be,Cool,"The user honorably powers up itself and the foe to fight."
 
Last edited:
Back
Top